Debian Bug report logs - #673065
rred segfaults during apt-get update

version graph

Package: libapt-pkg4.12; Maintainer for libapt-pkg4.12 is APT Development Team <deity@lists.debian.org>; Source for libapt-pkg4.12 is src:apt.

Reported by: Paul Menzel <pm.debian@googlemail.com>

Date: Tue, 15 May 2012 20:12:02 UTC

Severity: normal

Tags: patch

Merged with 554387, 670401

Fixed in version 0.9.5

Done: David Kalnischkies <kalnischkies+debian@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#673065; Package apt. (Tue, 15 May 2012 20:12:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Menzel <pm.debian@googlemail.com>:
New Bug report received and forwarded. Copy sent to APT Development Team <deity@lists.debian.org>. (Tue, 15 May 2012 20:12:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Paul Menzel <pm.debian@googlemail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: rred segfaults during apt-get update
Date: Tue, 15 May 2012 22:09:28 +0200
[Message part 1 (text/plain, inline)]
Package: apt
Version: 0.9.3
Severity: normal

Dear Debian folks,


on Saturday,  APT was upgraded from 0.9.2 to 0.9.3. But I saw a segfault
from rred just today.

        /var/log/syslog:May 15 4:30:26 hostname kernel: [11212.643812] rred[27456]: segfault at 822884c ip b73cad52 sp bfdf6c98 error 4 in libc-2.13.so[b735b000+156000]

So it could be that bug #554387 [1] is not fixed yet. But I am not sure
and therefore I am submitting a new report.

Just for the record. I also had the `rred` segfaults with versions of
APT less than 0.9.3.

        /var/log/syslog.4.gz:May  6 5:31:02 hostname kernel: [18427.777006] rred[16785]: segfault at 83ebb9c ip 00000000f73b7cc1 sp 00000000ffd41168 error 4 in libc-2.13.so[f7345000+156000]

Unfortunately I do not know how to reproduce that problem as it only
happens “randomly”.


Thanks,

Paul


[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=554387

-- Package-specific info:

-- apt-config dump --

APT "";
APT::Architecture "i386";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Install-Recommends "1";
APT::Install-Suggests "0";
APT::Authentication "";
APT::Authentication::TrustCDROM "true";
APT::NeverAutoRemove "";
APT::NeverAutoRemove:: "^firmware-linux.*";
APT::NeverAutoRemove:: "^linux-firmware$";
APT::NeverAutoRemove:: "^linux-image.*";
APT::NeverAutoRemove:: "^kfreebsd-image.*";
APT::NeverAutoRemove:: "^linux-restricted-modules.*";
APT::NeverAutoRemove:: "^linux-ubuntu-modules-.*";
APT::NeverAutoRemove:: "^gnumach$";
APT::NeverAutoRemove:: "^gnumach-image.*";
APT::Never-MarkAuto-Sections "";
APT::Never-MarkAuto-Sections:: "metapackages";
APT::Never-MarkAuto-Sections:: "restricted/metapackages";
APT::Never-MarkAuto-Sections:: "universe/metapackages";
APT::Never-MarkAuto-Sections:: "multiverse/metapackages";
APT::Never-MarkAuto-Sections:: "oldlibs";
APT::Never-MarkAuto-Sections:: "restricted/oldlibs";
APT::Never-MarkAuto-Sections:: "universe/oldlibs";
APT::Never-MarkAuto-Sections:: "multiverse/oldlibs";
APT::Periodic "";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Update "";
APT::Update::Post-Invoke "";
APT::Update::Post-Invoke:: "touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";
APT::Update::Post-Invoke-Success "";
APT::Update::Post-Invoke-Success:: "[ ! -f /var/run/dbus/system_bus_socket ] || /usr/bin/dbus-send --system --dest=org.debian.apt --type=signal /org/debian/apt org.debian.apt.CacheChanged || true";
APT::Update::Post-Invoke-Success:: "/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 1 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null";
APT::Archives "";
APT::Archives::MaxAge "30";
APT::Archives::MinAge "2";
APT::Archives::MaxSize "500";
APT::Architectures "";
APT::Architectures:: "i386";
APT::Compressor "";
APT::Compressor::. "";
APT::Compressor::.::Name ".";
APT::Compressor::.::Extension "";
APT::Compressor::.::Binary "";
APT::Compressor::.::Cost "1";
APT::Compressor::gzip "";
APT::Compressor::gzip::Name "gzip";
APT::Compressor::gzip::Extension ".gz";
APT::Compressor::gzip::Binary "gzip";
APT::Compressor::gzip::Cost "2";
APT::Compressor::gzip::CompressArg "";
APT::Compressor::gzip::CompressArg:: "-9n";
APT::Compressor::gzip::UncompressArg "";
APT::Compressor::gzip::UncompressArg:: "-d";
APT::Compressor::bzip2 "";
APT::Compressor::bzip2::Name "bzip2";
APT::Compressor::bzip2::Extension ".bz2";
APT::Compressor::bzip2::Binary "bzip2";
APT::Compressor::bzip2::Cost "3";
APT::Compressor::bzip2::CompressArg "";
APT::Compressor::bzip2::CompressArg:: "-9";
APT::Compressor::bzip2::UncompressArg "";
APT::Compressor::bzip2::UncompressArg:: "-d";
APT::Compressor::xz "";
APT::Compressor::xz::Name "xz";
APT::Compressor::xz::Extension ".xz";
APT::Compressor::xz::Binary "xz";
APT::Compressor::xz::Cost "4";
APT::Compressor::xz::CompressArg "";
APT::Compressor::xz::CompressArg:: "-6";
APT::Compressor::xz::UncompressArg "";
APT::Compressor::xz::UncompressArg:: "-d";
APT::Compressor::lzma "";
APT::Compressor::lzma::Name "lzma";
APT::Compressor::lzma::Extension ".lzma";
APT::Compressor::lzma::Binary "xz";
APT::Compressor::lzma::Cost "5";
APT::Compressor::lzma::CompressArg "";
APT::Compressor::lzma::CompressArg:: "--format=lzma";
APT::Compressor::lzma::CompressArg:: "-9";
APT::Compressor::lzma::UncompressArg "";
APT::Compressor::lzma::UncompressArg:: "--format=lzma";
APT::Compressor::lzma::UncompressArg:: "-d";
APT::Compressor::::Name "";
APT::Compressor::::Extension ".";
APT::Compressor::::Binary "";
APT::Compressor::::Cost "100";
APT::Compressor::::CompressArg "";
APT::Compressor::::CompressArg:: "-9";
APT::Compressor::::UncompressArg "";
APT::Compressor::::UncompressArg:: "-d";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::mirrors "mirrors/";
Dir::State::extended_states "extended_states";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::vendorlist "vendors.list";
Dir::Etc::vendorparts "vendors.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::netrc "auth.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Etc::preferencesparts "preferences.d";
Dir::Etc::trusted "trusted.gpg";
Dir::Etc::trustedparts "trusted.gpg.d";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::solvers "";
Dir::Bin::solvers:: "/usr/lib/apt/solvers";
Dir::Bin::dpkg "/usr/bin/dpkg";
Dir::Bin::bzip2 "/bin/bzip2";
Dir::Bin::xz "/usr/bin/xz";
Dir::Media "";
Dir::Media::MountPath "/media/apt";
Dir::Log "var/log/apt";
Dir::Log::Terminal "term.log";
Dir::Log::History "history.log";
Dir::Ignore-Files-Silently "";
Dir::Ignore-Files-Silently:: "~$";
Dir::Ignore-Files-Silently:: "\.disabled$";
Dir::Ignore-Files-Silently:: "\.bak$";
Dir::Ignore-Files-Silently:: "\.dpkg-[a-z]+$";
Dir::Ignore-Files-Silently:: "\.save$";
Dir::Ignore-Files-Silently:: "\.orig$";
Acquire "";
Acquire::cdrom "";
Acquire::cdrom::mount "/media/cdrom/";
Acquire::Languages "";
Acquire::Languages:: "en";
Acquire::Languages:: "none";
Acquire::Languages:: "de";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/apt-listbugs apt || exit 10";
DPkg::Pre-Install-Pkgs:: "/usr/bin/apt-listchanges --apt || test $? -ne 10";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
DPkg::Tools "";
DPkg::Tools::Options "";
DPkg::Tools::Options::/usr/sbin/apt-listbugs "";
DPkg::Tools::Options::/usr/sbin/apt-listbugs::Version "2";
DPkg::Tools::Options::/usr/bin/apt-listchanges "";
DPkg::Tools::Options::/usr/bin/apt-listchanges::Version "2";
DPkg::Post-Invoke "";
DPkg::Post-Invoke:: "/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 1 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null";
DPkg::Post-Invoke:: "if [ -x /usr/bin/debsums ]; then /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; fi";
DPkg::Post-Invoke:: "if [ -d /var/lib/update-notifier ]; then touch /var/lib/update-notifier/dpkg-run-stamp; fi; if [ -e /var/lib/update-notifier/updates-available ]; then echo > /var/lib/update-notifier/updates-available; fi ";
Unattended-Upgrade "";
Unattended-Upgrade::Origins-Pattern "";
Unattended-Upgrade::Origins-Pattern:: "origin=Debian,archive=stable,label=Debian-Security";
CommandLine "";
CommandLine::AsString "apt-config dump";

-- (no /etc/apt/preferences present) --


-- /etc/apt/sources.list --
[…]

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages apt depends on:
ii  debian-archive-keyring  2012.2
ii  gnupg                   1.4.12-4
ii  libapt-pkg4.12          0.9.3
ii  libc6                   2.13-32
ii  libgcc1                 1:4.7.0-8
ii  libstdc++6              4.7.0-8

apt recommends no packages.

Versions of packages apt suggests:
ii  apt-doc     <none>
ii  aptitude    0.6.7-1
ii  dpkg-dev    1.16.3
ii  python-apt  0.8.4
ii  synaptic    0.75.10
ii  xz-utils    5.1.1alpha+20110809-3

-- no debconf information
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#673065; Package apt. (Wed, 16 May 2012 10:33:41 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Hartwig <mandyke@gmail.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Wed, 16 May 2012 10:33:43 GMT) Full text and rfc822 format available.

Message #10 received at 673065@bugs.debian.org (full text, mbox):

From: Daniel Hartwig <mandyke@gmail.com>
To: Paul Menzel <pm.debian@googlemail.com>, 673065@bugs.debian.org
Subject: Re: Bug#673065: rred segfaults during apt-get update
Date: Wed, 16 May 2012 18:30:30 +0800
On 16 May 2012 04:09, Paul Menzel <pm.debian@googlemail.com> wrote:

> on Saturday,  APT was upgraded from 0.9.2 to 0.9.3. But I saw a segfault
> from rred just today.
>
>        /var/log/syslog:May 15 4:30:26 hostname kernel: [11212.643812] rred[27456]: segfault at 822884c ip b73cad52 sp bfdf6c98 error 4 in libc-2.13.so[b735b000+156000]
>
> So it could be that bug #554387 [1] is not fixed yet. But I am not sure
> and therefore I am submitting a new report.
>
> Just for the record. I also had the `rred` segfaults with versions of
> APT less than 0.9.3.
>

Hello

So these are the same symptoms you reported in #656865.  In that
report you mention that 'apt-get update' fails "most of the time",
would you say this is still true for 0.9.3?

>
> Unfortunately I do not know how to reproduce that problem as it only
> happens “randomly”.
>

Not sure if this would be helpful: next time it happens and before you
run another apt command could you take a copy of the list files:

$ tar czf  /var/lib/apt/lists/

Regards




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#673065; Package apt. (Wed, 16 May 2012 11:21:35 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Kalnischkies <kalnischkies+debian@gmail.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Wed, 16 May 2012 11:21:40 GMT) Full text and rfc822 format available.

Message #15 received at 673065@bugs.debian.org (full text, mbox):

From: David Kalnischkies <kalnischkies+debian@gmail.com>
To: Daniel Hartwig <mandyke@gmail.com>, 673065@bugs.debian.org
Cc: Paul Menzel <pm.debian@googlemail.com>
Subject: Re: Bug#673065: rred segfaults during apt-get update
Date: Wed, 16 May 2012 13:17:40 +0200
On Wed, May 16, 2012 at 12:30 PM, Daniel Hartwig <mandyke@gmail.com> wrote:
> On 16 May 2012 04:09, Paul Menzel <pm.debian@googlemail.com> wrote:
>
>> on Saturday,  APT was upgraded from 0.9.2 to 0.9.3. But I saw a segfault
>> from rred just today.

Just to be sure (you know, clutching at a straw):
You upgraded also libapt-pkg4.12, right? (or preferable your complete system)
as the supposed fix for this is not in the apt package, even through
the failing program (rred) is in it.
(It was and presumable still is FileFd::Close failing)


> So these are the same symptoms you reported in #656865.  In that
> report you mention that 'apt-get update' fails "most of the time",
> would you say this is still true for 0.9.3?

I haven't seen it that often (in fact only once) with 0.9.2 and this segfault
was fixed with 0.9.3, but these memory bugs tend to be really nasty as
just reordering the involved code or something as simple as enabling
debug (or adding output by hand) "fixed" the bug.

So it's possible i only fixed one of possibly many or none of them,
just another which happened to "order" everything "correctly".

A bit mysteries is that valgrind doesn't talk about accessing invalid
memory, it only happens if rred is called from apt - if i call it by hand
with the needed files everything works as expected, as it does if you rerun
apt - and it only happens in rred even through the code which segfaults is
the closing of a (gzip compressed) file, so that the gzip method should fail,
too (but it is not used that much anymore, so we might just not see it), and
given that the bzip2 code isn't that different it should be failing, too
(and bz2 is run all the time as it is the preferred compression type).

(From the provided traces aswell as my own tests with reordered code it
 not only happens with gzip files, it does also with uncompressed, but this
 makes even less sense as we open files in a lot of places and not just rred,
 so i presume it first gets it wrong with gzip but survives deathly wounded
 finally dying "at random" files)


>> Unfortunately I do not know how to reproduce that problem as it only
>> happens “randomly”.
>>
>
> Not sure if this would be helpful: next time it happens and before you
> run another apt command could you take a copy of the list files:
>
> $ tar czf  /var/lib/apt/lists/

It should be, at least that is what i did and do now again in the hope that
i will hit it again to have a testcase for it… I love it™


Best regards

David Kalnischkies




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#673065; Package apt. (Wed, 16 May 2012 14:27:14 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Menzel <pm.debian@googlemail.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Wed, 16 May 2012 14:27:14 GMT) Full text and rfc822 format available.

Message #20 received at 673065@bugs.debian.org (full text, mbox):

From: Paul Menzel <pm.debian@googlemail.com>
To: David Kalnischkies <kalnischkies+debian@gmail.com>
Cc: Daniel Hartwig <mandyke@gmail.com>, 673065@bugs.debian.org
Subject: Re: Bug#673065: rred segfaults during aptitude update
Date: Wed, 16 May 2012 16:24:04 +0200
[Message part 1 (text/plain, inline)]
Am Mittwoch, den 16.05.2012, 13:17 +0200 schrieb David Kalnischkies:
> On Wed, May 16, 2012 at 12:30 PM, Daniel Hartwig <mandyke@gmail.com> wrote:
> > On 16 May 2012 04:09, Paul Menzel <pm.debian@googlemail.com> wrote:
> >
> >> on Saturday,  APT was upgraded from 0.9.2 to 0.9.3. But I saw a segfault
> >> from rred just today.
> 
> Just to be sure (you know, clutching at a straw):
> You upgraded also libapt-pkg4.12, right? (or preferable your complete system)
> as the supposed fix for this is not in the apt package, even through
> the failing program (rred) is in it.
> (It was and presumable still is FileFd::Close failing)

Unfortunately it was also upgraded in the same run as the other APT
packages. So the error still seems to be there. :/

> > So these are the same symptoms you reported in #656865.

Daniel, you had me there. Luckily this was not me. ;-) Though I already
have lost track of some bugs I submitted. :/

[…]


Thanks and good luck to us all hunting that down,

Paul
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#673065; Package apt. (Mon, 21 May 2012 12:37:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ralf Jung <post@ralfj.de>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Mon, 21 May 2012 12:37:15 GMT) Full text and rfc822 format available.

Message #25 received at 673065@bugs.debian.org (full text, mbox):

From: Ralf Jung <post@ralfj.de>
To: 673065@bugs.debian.org
Subject: rred segfaults during apt-get update
Date: Mon, 21 May 2012 14:30:47 +0200
Hi,

I am having the same problem (amd64, testing, current version of all apt and -
related packages). Weird enough, if the update fails and I run it again, it 
succeeds.

A tar-gzipped copy of /var/lib/apt/lists directly after the errornous update 
ended is currently uploading to http://www.ralfj.de/upload/debian/ (should be 
finished in 20 to 30 minutes).

Kind regards,
Ralf




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#673065; Package apt. (Mon, 21 May 2012 22:09:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Kalnischkies <kalnischkies+debian@gmail.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Mon, 21 May 2012 22:09:04 GMT) Full text and rfc822 format available.

Message #30 received at 673065@bugs.debian.org (full text, mbox):

From: David Kalnischkies <kalnischkies+debian@gmail.com>
To: Ralf Jung <post@ralfj.de>, 673065@bugs.debian.org, 670401@bugs.debian.org
Subject: Re: Bug#673065: rred segfaults during apt-get update
Date: Tue, 22 May 2012 00:06:42 +0200
reassign 673065 libapt-pkg4.12
reassign 670401 libapt-pkg4.12
forcemerge 673065 670401
tag 673065 + patch
thanks


So, after hitting it myself again while trying to work on something else
(as always) here we go with my second try on fixing this
(and this time i am reasonable sure that it is for real):

=== modified file 'apt-pkg/contrib/mmap.cc'
--- apt-pkg/contrib/mmap.cc     2012-01-17 23:40:38 +0000
+++ apt-pkg/contrib/mmap.cc     2012-05-21 17:12:25 +0000
@@ -84,6 +84,7 @@
       if ((Flags & ReadOnly) != ReadOnly)
         return _error->Error("Compressed file %s can only be mapped
readonly", Fd.Name().c_str());
       Base = new unsigned char[iSize];
+      SyncToFd = new FileFd();
       if (Fd.Seek(0L) == false || Fd.Read(Base, iSize) == false)
         return _error->Error("Compressed file %s can't be read into
mmap", Fd.Name().c_str());
       return true;

=== modified file 'debian/changelog'
--- debian/changelog    2012-05-21 14:50:52 +0000
+++ debian/changelog    2012-05-21 17:12:25 +0000
@@ -7,6 +7,10 @@
   * buildlib/inttypes.h.in:
     - remove inttypes.h compatibility as providing such a c99 types
       compatibility conflicts with the usage of c99 type long long
+  * apt-pkg/contrib/mmap.cc:
+    - have a dummy SyncToFd around in case of ReadOnly access to a
+      compressed file as we otherwise on Close() do not delete[] the
+      char buffer but munmap() it… (Closes: #673815)

  -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 21 May 2012
15:10:49 +0200


In case you wonder, yes it is always the same, the most painful to debug
problems which eat hours end up being fixed with a single line…
(the changelog says it all basically, so i will spare further details.)
Feel free to test the patch, otherwise its on the list for an upload
tomor^Wtoday.


Best regards

David Kalnischkies




Bug reassigned from package 'apt' to 'libapt-pkg4.12'. Request was from David Kalnischkies <kalnischkies+debian@gmail.com> to control@bugs.debian.org. (Mon, 21 May 2012 22:09:06 GMT) Full text and rfc822 format available.

No longer marked as found in versions apt/0.9.3. Request was from David Kalnischkies <kalnischkies+debian@gmail.com> to control@bugs.debian.org. (Mon, 21 May 2012 22:09:07 GMT) Full text and rfc822 format available.

Merged 554387 670401 673065 Request was from David Kalnischkies <kalnischkies+debian@gmail.com> to control@bugs.debian.org. (Mon, 21 May 2012 22:09:11 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from David Kalnischkies <kalnischkies+debian@gmail.com> to control@bugs.debian.org. (Mon, 21 May 2012 22:09:12 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#673065; Package libapt-pkg4.12. (Tue, 22 May 2012 22:51:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Tue, 22 May 2012 22:51:09 GMT) Full text and rfc822 format available.

Message #43 received at 673065@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.net>
To: David Kalnischkies <kalnischkies+debian@gmail.com>, 670401@bugs.debian.org
Cc: Ralf Jung <post@ralfj.de>, 673065@bugs.debian.org
Subject: Re: Bug#670401: Bug#673065: rred segfaults during apt-get update
Date: Wed, 23 May 2012 00:47:56 +0200
On 2012-05-22 00:06:42 +0200, David Kalnischkies wrote:
> reassign 673065 libapt-pkg4.12
> reassign 670401 libapt-pkg4.12
> forcemerge 673065 670401
> tag 673065 + patch
> thanks
> 
> 
> So, after hitting it myself again while trying to work on something else
> (as always) here we go with my second try on fixing this
> (and this time i am reasonable sure that it is for real):
> 
> === modified file 'apt-pkg/contrib/mmap.cc'
> --- apt-pkg/contrib/mmap.cc     2012-01-17 23:40:38 +0000
> +++ apt-pkg/contrib/mmap.cc     2012-05-21 17:12:25 +0000
> @@ -84,6 +84,7 @@
>        if ((Flags & ReadOnly) != ReadOnly)
>          return _error->Error("Compressed file %s can only be mapped
> readonly", Fd.Name().c_str());
>        Base = new unsigned char[iSize];
> +      SyncToFd = new FileFd();
>        if (Fd.Seek(0L) == false || Fd.Read(Base, iSize) == false)
>          return _error->Error("Compressed file %s can't be read into
> mmap", Fd.Name().c_str());
>        return true;
> 
> === modified file 'debian/changelog'
> --- debian/changelog    2012-05-21 14:50:52 +0000
> +++ debian/changelog    2012-05-21 17:12:25 +0000
> @@ -7,6 +7,10 @@
>    * buildlib/inttypes.h.in:
>      - remove inttypes.h compatibility as providing such a c99 types
>        compatibility conflicts with the usage of c99 type long long
> +  * apt-pkg/contrib/mmap.cc:
> +    - have a dummy SyncToFd around in case of ReadOnly access to a
> +      compressed file as we otherwise on Close() do not delete[] the
> +      char buffer but munmap() it… (Closes: #673815)
                                                ^^^^^^

This is not one of the bugs 554387, 670401, 673065. Is this an error
or are these bugs the same one, in which case a merge is missing?

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 02 Jul 2012 07:32:39 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 08:13:01 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.