Debian Bug report logs - #602306
update-notifier-common: segmentation fault

Package: apt; Maintainer for apt is APT Development Team <[email protected]>; Source for apt is src:apt (PTS, buildd, popcon).

Reported by: Michel Briand <[email protected]>

Date: Wed, 3 Nov 2010 16:00:02 UTC

Severity: normal

Reply or subscribe to this bug.

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


Report forwarded to [email protected], Julian Andres Klode <[email protected]>:
Bug#602306; Package update-notifier-common. (Wed, 03 Nov 2010 16:00:04 GMT) (full text, mbox, link).


Acknowledgement sent to Michel Briand <[email protected]>:
New Bug report received and forwarded. Copy sent to Julian Andres Klode <[email protected]>. (Wed, 03 Nov 2010 16:00:05 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Michel Briand <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: update-notifier-common: segmentation fault
Date: Wed, 03 Nov 2010 16:58:18 +0100
Package: update-notifier-common
Version: 0.99.3debian6
Severity: normal

apt_check seems to be broken.

Repeating messages in /var/log/messages rang a bell :

Nov  3 14:42:14 eana kernel: [267334.156043] apt-check[20433]: segfault at 0 ip 00007fea023498ab sp 00007fff54e24878 error 6 in libc-2.11.2.so[7fea022ca000+158000]

Trying as a normal user:

$ /usr/lib/update-notifier/apt_check.py
Erreur de segmentation


Best regards,
Michel

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash

Versions of packages update-notifier-common depends on:
ii  python                  2.6.6-3+squeeze1 interactive high-level object-orie
ii  python-apt              0.7.98.1         Python interface to libapt-pkg

Versions of packages update-notifier-common recommends:
ii  libpam-modules                1.1.1-6.1  Pluggable Authentication Modules f

update-notifier-common suggests no packages.

-- Configuration Files:
/etc/apt/apt.conf.d/10periodic changed:
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";


-- no debconf information




Information forwarded to [email protected]:
Bug#602306; Package update-notifier-common. (Wed, 03 Nov 2010 16:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to Julian Andres Klode <[email protected]>:
Extra info received and forwarded to list. (Wed, 03 Nov 2010 16:33:04 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Julian Andres Klode <[email protected]>
To: Michel Briand <[email protected]>, [email protected]
Subject: Re: Bug#602306: update-notifier-common: segmentation fault
Date: Wed, 03 Nov 2010 17:31:54 +0100
On Mi, 2010-11-03 at 16:58 +0100, Michel Briand wrote:
> Package: update-notifier-common
> Version: 0.99.3debian6
> Severity: normal
> 
> apt_check seems to be broken.
> 
> Repeating messages in /var/log/messages rang a bell :
> 
> Nov  3 14:42:14 eana kernel: [267334.156043] apt-check[20433]: segfault at 0 ip 00007fea023498ab sp 00007fff54e24878 error 6 in libc-2.11.2.so[7fea022ca000+158000]
> 
> Trying as a normal user:
> 
> $ /usr/lib/update-notifier/apt_check.py
> Erreur de segmentation
> 
That's clearly not a bug in apt_check, it's just a Python script. Please
get a backtrace and if you can identify the cause of the bug, reassign
the bug, otherwise add the backtrace to the bug. For information on how
to get a backtrace, see http://wiki.debian.org/HowToGetABacktrace

You might need to install python-apt-dbg and/or python-dbg to get a
useful backtrace.
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.






Information forwarded to [email protected], Julian Andres Klode <[email protected]>:
Bug#602306; Package update-notifier-common. (Thu, 04 Nov 2010 08:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Michel Briand <[email protected]>:
Extra info received and forwarded to list. Copy sent to Julian Andres Klode <[email protected]>. (Thu, 04 Nov 2010 08:33:03 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Michel Briand <[email protected]>
To: Julian Andres Klode <[email protected]>
Cc: [email protected]
Subject: Re: Bug#602306: update-notifier-common: segmentation fault
Date: Thu, 4 Nov 2010 09:28:53 +0100
Julian Andres Klode <[email protected]> - Wed, 03 Nov 2010 17:31:54 +0100

>On Mi, 2010-11-03 at 16:58 +0100, Michel Briand wrote:
>> Package: update-notifier-common
>> Version: 0.99.3debian6
>> Severity: normal
>> 
>> apt_check seems to be broken.
>> 
>> Repeating messages in /var/log/messages rang a bell :
>> 
>> Nov  3 14:42:14 eana kernel: [267334.156043] apt-check[20433]: segfault at 0 ip 00007fea023498ab sp 00007fff54e24878 error 6 in libc-2.11.2.so[7fea022ca000+158000]
>> 
>> Trying as a normal user:
>> 
>> $ /usr/lib/update-notifier/apt_check.py
>> Erreur de segmentation
>> 
>That's clearly not a bug in apt_check, it's just a Python script. Please
>get a backtrace and if you can identify the cause of the bug, reassign
>the bug, otherwise add the backtrace to the bug. For information on how
>to get a backtrace, see http://wiki.debian.org/HowToGetABacktrace
>
>You might need to install python-apt-dbg and/or python-dbg to get a
>useful backtrace.

Python won't provide a backtrace by itself.

So ...

$ gdb python
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...Reading symbols from /usr/lib/debug/usr/bin/python2.6...done.
(no debugging symbols found)...done.
(gdb) run /usr/lib/update-notifier/apt_check.py
Starting program: /usr/bin/python /usr/lib/update-notifier/apt_check.py
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6a4b8ab in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0x00007ffff6a4b8ab in memcpy () from /lib/libc.so.6
#1  0x00007ffff6318e05 in pkgCacheGenerator::pkgCacheGenerator(DynamicMMap*, OpProgress*) ()
   from /usr/lib/libapt-pkg.so.4.10
#2  0x00007ffff631b315 in pkgCacheGenerator::MakeStatusCache(pkgSourceList&, OpProgress*, MMap**, bool) ()
   from /usr/lib/libapt-pkg.so.4.10
#3  0x00007ffff630ed73 in pkgCacheFile::BuildCaches(OpProgress*, bool) () from /usr/lib/libapt-pkg.so.4.10
#4  0x00007ffff630eebc in pkgCacheFile::Open(OpProgress*, bool) () from /usr/lib/libapt-pkg.so.4.10
#5  0x00007ffff65b0afa in pkgCacheFile::Open (type=0x7ffff67d7220, Args=<value optimized out>, 
    kwds=<value optimized out>) at /usr/include/apt-pkg/cachefile.h:59
#6  PkgCacheNew (type=0x7ffff67d7220, Args=<value optimized out>, kwds=<value optimized out>)
    at python/cache.cc:309
#7  0x000000000046f0a3 in type_call (type=0x0, args=
    (<OpNullProgress(subop='', percent=<float at remote 0x8ab5b0>, subOp='', major_change=1, majorChange=1, op='Reading package lists', Op='Reading package lists') at remote 0x7ffff7e8f2d0>,), kwds=0x0)
    at ../Objects/typeobject.c:726
#8  0x000000000041ef47 in PyObject_Call (func=<type at remote 0x7ffff67d7220>, arg=
    <unknown at remote 0x7fffffff9310>, kw=<unknown at remote 0x42e8>) at ../Objects/abstract.c:2492
#9  0x00000000004a72b8 in do_call (f=
    Frame 0x9f33c0, for file /usr/lib/update-notifier/apt_check.py, line 95, in run (options=<Values(security_updates_unattended=None, show_package_names=None, readable_output=None) at remote 0x7ffff7e383f8>), 
    throwflag=<value optimized out>) at ../Python/ceval.c:3968
#10 call_function (f=
    Frame 0x9f33c0, for file /usr/lib/update-notifier/apt_check.py, line 95, in run (options=<Values(security_updates_unattended=None, show_package_names=None, readable_output=None) at remote 0x7ffff7e383f8>), 
    throwflag=<value optimized out>) at ../Python/ceval.c:3773
#11 PyEval_EvalFrameEx (f=
    Frame 0x9f33c0, for file /usr/lib/update-notifier/apt_check.py, line 95, in run (options=<Values(security_updates_unattended=None, show_package_names=None, readable_output=None) at remote 0x7ffff7e383f8>), 
    throwflag=<value optimized out>) at ../Python/ceval.c:2412
#12 0x00000000004a95c1 in PyEval_EvalCodeEx (co=0x7ffff7f0a6c0, globals=<value optimized out>, 
    locals=<value optimized out>, args=0x1, argcount=<value optimized out>, kws=<value optimized out>, 
    kwcount=0, defs=0x7ffff7e8f7a8, defcount=1, closure=0x0) at ../Python/ceval.c:3000
#13 0x00000000004a7752 in fast_function (f=
    Frame 0x92f0d0, for file /usr/lib/update-notifier/apt_check.py, line 197, in <module> (), 
    throwflag=<value optimized out>) at ../Python/ceval.c:3846
#14 call_function (f=
    Frame 0x92f0d0, for file /usr/lib/update-notifier/apt_check.py, line 197, in <module> (), 
    throwflag=<value optimized out>) at ../Python/ceval.c:3771
#15 PyEval_EvalFrameEx (f=
    Frame 0x92f0d0, for file /usr/lib/update-notifier/apt_check.py, line 197, in <module> (), 
    throwflag=<value optimized out>) at ../Python/ceval.c:2412
#16 0x00000000004a95c1 in PyEval_EvalCodeEx (co=0x7ffff7f0a738, globals=<value optimized out>, 
    locals=<value optimized out>, args=0x0, argcount=<value optimized out>, kws=<value optimized out>, 
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3000
#17 0x00000000004a9692 in PyEval_EvalCode (co=0x0, globals=<unknown at remote 0x7fffffff9310>, locals=
    <unknown at remote 0x42e8>) at ../Python/ceval.c:541
---Type <return> to continue, or q <return> to quit---
#18 0x00000000004c98be in run_mod (fp=<value optimized out>, filename=
    0x7fffffffe5d1 "/usr/lib/update-notifier/apt_check.py", start=<value optimized out>, 
    globals=<value optimized out>, locals=<value optimized out>, closeit=1, flags=0x7fffffffe150)
    at ../Python/pythonrun.c:1351
#19 PyRun_FileExFlags (fp=<value optimized out>, filename=
    0x7fffffffe5d1 "/usr/lib/update-notifier/apt_check.py", start=<value optimized out>, 
    globals=<value optimized out>, locals=<value optimized out>, closeit=1, flags=0x7fffffffe150)
    at ../Python/pythonrun.c:1337
#20 0x00000000004c9ad4 in PyRun_SimpleFileExFlags (fp=<value optimized out>, filename=
    0x7fffffffe5d1 "/usr/lib/update-notifier/apt_check.py", closeit=1, flags=0x7fffffffe150)
    at ../Python/pythonrun.c:941
#21 0x000000000041a6bd in Py_Main (argc=-135331712, argv=<value optimized out>) at ../Modules/main.c:577
#22 0x00007ffff69eac4d in __libc_start_main () from /lib/libc.so.6
#23 0x00000000004198d9 in _start ()
(gdb) 






Information forwarded to [email protected], Julian Andres Klode <[email protected]>:
Bug#602306; Package update-notifier-common. (Fri, 22 Apr 2011 14:27:14 GMT) (full text, mbox, link).


Acknowledgement sent to David Morgado <[email protected]>:
Extra info received and forwarded to list. Copy sent to Julian Andres Klode <[email protected]>. (Fri, 22 Apr 2011 14:27:14 GMT) (full text, mbox, link).


Message #20 received at [email protected] (full text, mbox, reply):

From: David Morgado <[email protected]>
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Bug#602306: update-notifier-common: segmentation fault
Date: Fri, 22 Apr 2011 15:23:32 +0100
Hi I came across this bug lately and found what was causing it.

Apparently the python script is run as the current user and needs to
be able to read some of the files at /etc/apt. In my case was that I
added apt pining in /etc/apt/preferences.d/default.pref and some extra
repositories in /etc/apt/sources.list.d.

I was getting this problem because the permissions on those files
where 0600. I changed that to 0644 and now everything works as
expected.

The script should check for those permissions and complain about it
can't read something, not getting into a segmentation fault.


Thanks

David Morgado




Bug reassigned from package 'update-notifier-common' to 'apt'. Request was from Julian Andres Klode <[email protected]> to [email protected]. (Sun, 01 May 2011 11:51:41 GMT) (full text, mbox, link).


Bug No longer marked as found in versions update-notifier/0.99.3debian6. Request was from Julian Andres Klode <[email protected]> to [email protected]. (Sun, 01 May 2011 11:51:42 GMT) (full text, mbox, link).


Information forwarded to [email protected], APT Development Team <[email protected]>:
Bug#602306; Package apt. (Tue, 14 Jan 2014 14:18:19 GMT) (full text, mbox, link).


Acknowledgement sent to Per Cederqvist <[email protected]>:
Extra info received and forwarded to list. Copy sent to APT Development Team <[email protected]>. (Tue, 14 Jan 2014 14:18:19 GMT) (full text, mbox, link).


Message #29 received at [email protected] (full text, mbox, reply):

From: Per Cederqvist <[email protected]>
To: [email protected]
Subject: update-notifier-common: segmentation fault
Date: Tue, 14 Jan 2014 15:16:49 +0100
I can reproduce this in Debian 7.2, like this:

 [1] $ sudo apt-get update
     [ lots of output ]
 [2] $ /usr/lib/update-notifier/apt-check;echo
     0;0
 [3] $ sudo touch /etc/apt/sources.list.d/foo.list
 [4] $ sudo chmod 600  /etc/apt/sources.list.d/foo.list
 [5] $ /usr/lib/update-notifier/apt-check;echo
     E: Error: Opening the cache (E:Opening
/etc/apt/sources.list.d/foo.list - ifstream::ifstream (13: Permission
denied), E:The list of sources could not be read., E:The package lists
or status file could not be parsed or opened.
 [6] $ sudo apt-get update
     [ lots of output ]
 [7] $ /usr/lib/update-notifier/apt-check;echo
     Segmentation fault (core dumped)
 [8] $ sudo chmod 644  /etc/apt/sources.list.d/foo.list
 [9] $ /usr/lib/update-notifier/apt-check;echo
     0;0
[10] $ sudo rm  /etc/apt/sources.list.d/foo.list
[11] $ /usr/lib/update-notifier/apt-check;echo
     0;0

In step 2 I have a system where the apt-check command works.

Steps 3 and 4 creates a file that is unreadable by the current user.

Step 5 shows apt-check printing an error message. (This isn't pretty, as
it contains no newlines, but it works.)

In step 6, I run apt-get update. Afterwards, in step 7, the apt-check
command no longer gives an error message. Instead, it crashes.

Step 8 and 9 shows that setting the permissions so that the file
is readable is enough to make apt-check work.

Step 10 and 11 shows that removing the unreadable file also
makes apt-cehck work. (This actually works even if you skip
step 8 and 9 as well.)

Yours,

    /ceder



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Sun Sep 22 07:42:12 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.