Bug 572775

Summary: SIGSEGV in fileno on call to ppdOpen(NULL, ) running /usr/bin/hp-toolbox
Product: [Fedora] Fedora Reporter: Ken Dubrick <ken>
Component: hplipAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dmalcolm, ivazqueznet, james.antill, jonathansteffan, jpopelka, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:fc49dd40c14be448d90f18edd78e16fdadf706e8
Fixed In Version: hplip-3.10.5-1.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-27 02:44:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
suggested patch none

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.