system-config-printer.py assert failure: *** glibc detected *** python: realloc(): invalid next size: 0x091d93e0 ***

Bug #545755 reported by Agung Yoga
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cups (Fedora)
Fix Released
Medium
python-cups (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: system-config-printer

1st. System config printer is able to detect the printer on Windows Vista workstation but unable to make it work.
2nd. When trying to delete the printer and again try to rediscover again, it suddenly crash.

ProblemType: Crash
Architecture: i386
AssertionMessage: *** glibc detected *** python: realloc(): invalid next size: 0x091d93e0 ***
CrashCounter: 1
Date: Wed Mar 24 12:50:53 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/share/system-config-printer/system-config-printer.py
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
InterpreterPath: /usr/bin/python2.6
Lpstat:
 device for efax-printer: ipp://192.168.1.20:631/printers/efax-printer
 device for Epson-Stylus-T10: ipp://192.168.1.3:631/printers/Epson-Stylus-T10
 device for EPSON-Stylus-T11: ipp://192.168.1.8:631/printers/EPSON-Stylus-T11
MachineType: Intel Corporation Axioo zetta
Package: system-config-printer-gnome 1.1.17+20100217-0ubuntu2
PackageArchitecture: all
Papersize: letter
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-17-generic root=UUID=a026dab9-962d-4e12-b3c3-a87582b85eb2 ro quiet splash
ProcCmdline: python /usr/share/system-config-printer/system-config-printer.py
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-17.26-generic 2.6.32.10+drm33.1
Signal: 6
SourcePackage: system-config-printer
StacktraceTop:
 __kernel_vsyscall ()
 raise () from /lib/tls/i686/cmov/libc.so.6
 abort () from /lib/tls/i686/cmov/libc.so.6
 ?? () from /lib/tls/i686/cmov/libc.so.6
 ?? () from /lib/tls/i686/cmov/libc.so.6
Title: system-config-printer.py assert failure: *** glibc detected *** python: realloc(): invalid next size: 0x091d93e0 ***
Uname: Linux 2.6.32-17-generic i686
UserGroups: adm admin audio cdrom dialout dip fax fuse lpadmin netdev plugdev sambashare tape video
dmi.bios.date: 12/03/2007
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: SROSA001.86C.0046.D.0712031435
dmi.board.name: SANTA ROSA
dmi.board.vendor: Intel Corporation
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 1
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvrSROSA001.86C.0046.D.0712031435:bd12/03/2007:svnIntelCorporation:pnAxioozetta:pvrNotApplicable:rvnIntelCorporation:rnSANTAROSA:rvrNotApplicable:cvnNoEnclosure:ct1:cvrN/A:
dmi.product.name: Axioo zetta
dmi.product.version: Not Applicable
dmi.sys.vendor: Intel Corporation

Related branches

Revision history for this message
In , Edgar (edgar-redhat-bugs) wrote :

abrt 1.0.6 detected a crash.

architecture: x86_64
Attached file: backtrace
cmdline: python /usr/share/system-config-printer/applet.py
component: system-config-printer
executable: /usr/bin/python
kernel: 2.6.31.12-174.2.3.fc12.x86_64
package: system-config-printer-1.1.16-13.fc12
rating: 4
reason: Process was terminated by signal 6 (Aborted)
release: Fedora release 12 (Constantine)

How to reproduce
-----
I don't know how to reproduce.
I just printed something and deleted some jobs from the print server queue, and then the printer applet crashes.

Revision history for this message
In , Edgar (edgar-redhat-bugs) wrote :

Created attachment 395557
File: backtrace

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

Can you describe how exactly did you deleted those jobs ? Thanks.

Revision history for this message
In , Tim (tim-redhat-bugs) wrote :

So the crash was from freeing the list of Connection objects, and it was most likely caused by some kind of memory scribble.

The only thing I can see wrong in that code is that it assumes the to-be-dealloc'd Connection object appears in the list. However, it ought to.

Anyway, I can harden that (to protect against e.g. bit-errors) by only removing the object from the list if it appears there in the first place. Hopefully that will prevent this kind of problem.

Revision history for this message
In , Tim (tim-redhat-bugs) wrote :

Fixed upstream.

Revision history for this message
In , Tim (tim-redhat-bugs) wrote :

I've discovered the reason for this, and have confirmed that the upstream fix is correct.

First, a reproducer:

==>
import signal
import cups

def alarmclock (signum, frame):
    raise KeyboardInterrupt

signal.signal (signal.SIGALRM, alarmclock)
connections = []
while True:
    # Create
    signal.alarm (10)
    connections.append (cups.Connection ())
    signal.alarm (0)
<==

This just keeps creating more and more connections until cupsd stops accepting them (when it hits its maximum file descriptor count). At that point, the program raises an exception and exits.

What happens is that Connection_init() fails *before* the newly-allocated Connection object is added into the list. As the initialization failed, the object is deallocated with Connection_dealloc(), and of course that assumes the object is in the list.

So the correct behaviour is to verify that the connection is in the list before trying to remove it.

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

*** Bug 571356 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

*** Bug 570806 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.93-6.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/system-config-printer-1.1.93-6.fc13

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.93-6.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/system-config-printer-1.1.93-6.fc13

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.18-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/system-config-printer-1.1.18-1.fc12

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.18-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/system-config-printer-1.1.18-1.fc11

Revision history for this message
In , Tim (tim-redhat-bugs) wrote :

*** Bug 573157 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

*** Bug 573379 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.18-1.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/system-config-printer-1.1.18-1.fc11

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.18-1.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/system-config-printer-1.1.18-1.fc12

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.93-6.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.18-2.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/system-config-printer-1.1.18-2.fc12

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.18-2.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/system-config-printer-1.1.18-2.fc11

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.18-2.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

system-config-printer-1.1.18-2.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
Agung Yoga (agung-yoga) wrote :
Revision history for this message
Tim Waugh (twaugh) wrote :

Looks like a pycups bug I fixed recently.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Does the current pycups only add this fix and nothing else? As we are after Feature Freeze, we can only add bug fixes currently. If the pycups contains anything which we cannot take, please attach a patch to this bug report. Thanks.

affects: system-config-printer (Ubuntu) → python-cups (Ubuntu)
Changed in python-cups (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-10.04-beta-2
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-cups - 1.9.49-0ubuntu1

---------------
python-cups (1.9.49-0ubuntu1) lucid; urgency=low

  * New upstream release
     o Fixes LP: #545755 (Red Hat bug #567386).
     o The new release only adds the above-mentioned bug fix, nothing else
       (according to the ChangeLog file), so no problem with the Lucid FF.
 -- Till Kampeter <email address hidden> Thu, 25 Mar 2010 13:17:56 +0100

Changed in python-cups (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Tim, thank you very much. I have updated pycups now.

Revision history for this message
In , Tim (tim-redhat-bugs) wrote :

*** Bug 556686 has been marked as a duplicate of this bug. ***

Changed in python-cups (Fedora):
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.