Bug 572775 - SIGSEGV in fileno on call to ppdOpen(NULL, ) running /usr/bin/hp-toolbox
Summary: SIGSEGV in fileno on call to ppdOpen(NULL, ) running /usr/bin/hp-toolbox
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 12
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:fc49dd40c14be448d90f18edd78...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-12 00:14 UTC by Ken Dubrick
Modified: 2010-07-27 02:44 UTC (History)
6 users (show)

Fixed In Version: hplip-3.10.5-1.fc12
Clone Of:
Environment:
Last Closed: 2010-07-27 02:44:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (51.26 KB, text/plain)
2010-03-12 00:14 UTC, Ken Dubrick
no flags Details
suggested patch (803 bytes, patch)
2010-03-17 19:06 UTC, Jiri Popelka
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Launchpad 542013 0 None None None Never

Description Ken Dubrick 2010-03-12 00:14:22 UTC
abrt 1.0.8 detected a crash.

architecture: i686
Attached file: backtrace
cmdline: python /usr/bin/hp-toolbox
component: python
executable: /usr/bin/python
kernel: 2.6.31.9-174.fc12.i686
package: python-2.6.2-4.fc12
rating: 4
reason: Process /usr/bin/python was killed by signal 11 (SIGSEGV)
release: Fedora release 12 (Constantine)

Comment 1 Ken Dubrick 2010-03-12 00:14:25 UTC
Created attachment 399511 [details]
File: backtrace

Comment 2 Dave Malcolm 2010-03-12 00:43:17 UTC
Thank you for reporting this bug.

How reproducible is this problem?  If you run the program from a terminal, is an error message printed?

What is the output of running the following command?
  rpm -q hplip-gui cups-libs hplip-libs

Looking at the backtrace, it looks like the problem occurred in the program's single thread in fileno with a NULL pointer.

It looks like the openPPD was somehow called with a NULL file, and this led to the SIGSEGV.

Reassigning component from "python" to "hplip";  hopefully the hplip maintainer will be able to figure this out further or reassign as necessary.  

If you need to track down exactly what is happening in the Python code, it may be possible to use this Fedora 13 feature:
https://fedoraproject.org/wiki/Features/EasierPythonDebugging

by copying this file:
http://fedorapeople.org/gitweb?p=dmalcolm/public_git/libpython.git;a=blob;f=libpython.py;hb=HEAD
to:
/usr/lib/debug/usr/lib/libpython2.6.so.1.0.debug-gdb.py
(assuming a 32-bit box like the one in this report) and regenerating the backtrace.

Comment 3 Tim Waugh 2010-03-12 10:05:21 UTC
Note: this is segfaulting in the HPLIP Python extension for cups, not from pycups in system-config-printer-libs.

Comment 4 Jiri Popelka 2010-03-17 19:06:29 UTC
Created attachment 400861 [details]
suggested patch

This should (I don't know how to reproduce) prevent hplip from crashing.

Comment 5 Tim Waugh 2010-03-19 16:40:23 UTC
Here's a really easy way to trigger this:

$ python
>>> import cupsext
>>> cupsext.openPPD ('')

Basically any argument will work as long as it isn't a real queue name.

Comment 6 Tim Waugh 2010-03-19 16:42:53 UTC
Reported upstream.  Not sure whether they want the interface to return None there or raise an exception.

Comment 7 Fedora Update System 2010-05-17 15:33:28 UTC
hplip-3.10.5-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/hplip-3.10.5-1.fc13

Comment 8 Fedora Update System 2010-05-17 15:35:35 UTC
hplip-3.10.5-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/hplip-3.10.5-1.fc12

Comment 9 Fedora Update System 2010-05-18 21:51:07 UTC
hplip-3.10.5-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 hplip'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/hplip-3.10.5-1.fc12

Comment 10 Fedora Update System 2010-07-01 18:50:33 UTC
hplip-3.10.5-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2010-07-27 02:44:14 UTC
hplip-3.10.5-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.