hp-sendfax segmentation fault

Bug #735507 reported by Liphtier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
In Progress
Undecided
shunmugaraj

Bug Description

Linux Distribution and version:
Linux 2.6.36-gentoo-r5
x86_64 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz GenuineIntel GNU/Linux
-----------------------------------------------------
Printer:
Officejet_6500_E710a-f
-------------------------------------------
'hp-check -t' output:

# hp-check -t

HP Linux Imaging and Printing System (ver. 3.11.1)
Dependency/Version Check Utility ver. 14.3

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies are installed to
successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball has the proper dependencies
installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time dependencies).

Saving output in log file: hp-check.log

Initializing. Please wait...

---------------
| SYSTEM INFO |
---------------

Basic system information:
Linux nyx 2.6.36-gentoo-r5 #2 SMP Tue Mar 15 12:06:38 IST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz GenuineIntel GNU/Linux

Distribution:
gentoo 0.0

Checking Python version...
OK, version 2.6.6 installed

Checking PyQt 4.x version...
OK, version 4.8.1 installed.

Checking for CUPS...
Status: scheduler is running
Version: 1.3.11
error_log is set to level: info

Checking for dbus/python-dbus...
dbus daemon is running.
python-dbus version: 0.83.2
------------------------------------
| COMPILE AND RUNTIME DEPENDENCIES |
------------------------------------

note: To check for compile-time only dependencies, re-run hp-check with the -c parameter (ie, hp-check -c).
note: To check for run-time only dependencies, re-run hp-check with the -r parameter (ie, hp-check -r).

Checking for dependency: CUPS - Common Unix Printing System...
OK, found.

Checking for dependency: CUPS DDK - CUPS driver development kit...
OK, found.

Checking for dependency: CUPS devel- Common Unix Printing System development files...
OK, found.

Checking for dependency: CUPS image - CUPS image development files...
OK, found.

Checking for dependency: DBus - Message bus system...
OK, found.

Checking for dependency: gcc - GNU Project C and C++ Compiler...
OK, found.

Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency: libcrypto - OpenSSL cryptographic library...
OK, found.

Checking for dependency: libjpeg - JPEG library...
OK, found.

Checking for dependency: libnetsnmp-devel - SNMP networking library development files...
OK, found.

Checking for dependency: libpthread - POSIX threads library...
OK, found.

Checking for dependency: libtool - Library building support services...
OK, found.

Checking for dependency: libusb - USB library...
OK, found.

Checking for dependency: make - GNU make utility to maintain groups of programs...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
OK, found.

Checking for dependency: PolicyKit - Administrative policy framework...
OK, found.

Checking for dependency: PyQt 4 DBus - DBus Support for PyQt4...
OK, found.

Checking for dependency: Python DBus - Python bindings for DBus...
OK, found.

Checking for dependency: Python devel - Python development files...
OK, found.

Checking for dependency: Python libnotify - Python bindings for the libnotify Desktop notifications...
OK, found.

Checking for dependency: Python XML libraries...
OK, found.

Checking for dependency: Python 2.3 or greater - Required for fax functionality...
OK, found.

Checking for dependency: Python 2.2 or greater - Python programming language...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
OK, found.

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: SANE - Scanning library development files...
OK, found.

Checking for dependency: scanimage - Shell scanning program...
OK, found.

Checking for dependency: xsane - Graphical scanner frontend for SANE...
OK, found.

----------------------
| HPLIP INSTALLATION |
----------------------

Currently installed HPLIP version...
HPLIP 3.11.1 currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.11.1

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.11.1-r2
html=/usr/share/doc/hplip-3.11.1-r2/html
icon=/usr/share/applications
cupsbackend=/usr/libexec/cups/backend
cupsfilter=/usr/libexec/cups/filter
drv=/usr/share/cups/drv/hp

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=no
foomatic-drv-install=no
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.11.1.19
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=yes
hpijs-only-build=no
lite-build=no
udev-acl-rules=no
hpcups-only-build=no
hpijs-only-build=no

Current contents of '/var/lib/hp/hplip.state' file:
# hplip.state - HPLIP runtime persistent variables.

[plugin]
installed=0
eula=0

Current contents of '~/.hplip/hplip.conf' file:
[last_used]
printer_name = Officejet-7200
working_dir = .
device_uri = hp:/net/Officejet_7200_series?ip=192.168.0.31

[commands]
fax = hp-sendfax -d %FAX_URI%
scan = xsane -V %SANE_URI%
prnt = hp-print -p%PRINTER%
pcard = hp-unload -d %DEVICE_URI%
cpy = hp-makecopies -d %DEVICE_URI%

[installation]
version = 3.9.12.29
date_time = 10/03/10 11:44:44

[settings]
systray_messages = 0
systray_visible = 0

[fax]
email_address =
voice_phone =

[refresh]
rate = 30
enable = true
type = 0

[polling]
enable = false
device_list =
interval = 5

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

HP6500
------
Type: Printer
Device URI: hp:/net/Officejet_6500_E710a-f?ip=192.168.0.33
PPD: /etc/cups/ppd/HP6500.ppd
PPD Description: HP Officejet 6500 e710a-f, hpcups 3.11.1
Printer status: printer HP6500 is idle. enabled since Tue Mar 15 15:38:22 2011
Communication status: Good

HP6500FAX
---------
Type: Fax
Device URI: hpfax:/net/Officejet_6500_E710a-f?ip=192.168.0.33
PPD: /etc/cups/ppd/HP6500FAX.ppd
PPD Description: HP Fax hpcups
Printer status: printer HP6500FAX is idle. enabled since Tue Mar 15 15:39:12 2011
Communication status: Good

Officejet_7200
--------------
Type: Printer
Device URI: hp:/net/Officejet_7200_series?ip=192.168.0.31
PPD: /etc/cups/ppd/Officejet_7200.ppd
PPD Description: HP Officejet 7200 Series, hpcups 3.9.12
Printer status: printer Officejet_7200 is idle. enabled since Sun Oct 3 12:25:24 2010
Communication status: Good

Officejet_7200_fax
------------------
Type: Fax
Device URI: hpfax:/net/Officejet_7200_series?ip=192.168.0.31
PPD: /etc/cups/ppd/Officejet_7200_fax.ppd
PPD Description: HP Fax hpcups
Printer status: printer Officejet_7200_fax is idle. enabled since Sun Oct 3 12:25:37 2010
Communication status: Good

----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
OK, found. SANE backend 'hpaio' is properly set up.

Checking output of 'scanimage -L'...
device `hpaio:/net/Officejet_6500_E710a-f?ip=192.168.0.33' is a Hewlett-Packard Officejet_6500_E710a-f all-in-one
device `hpaio:/net/Officejet_7200_series?ip=192.168.0.31' is a Hewlett-Packard Officejet_7200_series all-in-one

---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

Checking 'scanext' SANE scanning extension...
OK, found.

---------------
| USER GROUPS |
---------------

root bin daemon sys adm disk wheel floppy dialout tape video

-----------
| SUMMARY |
-----------

No errors or warnings.

Done.
------------------------------------------------------

When launched under regular user
$ hp-sendfax

HP Linux Imaging and Printing System (ver. 3.11.1)
PC Sendfax Utility ver. 9.0
...
Segmentation fault
-----------------------------------------------------------------
Under root and with logging level debug:

# hp-sendfax -ldebug
warning: hp-sendfax should not be run as root/superuser.

HP Linux Imaging and Printing System (ver. 3.11.1)
PC Sendfax Utility ver. 9.0

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

hp-sendfax[4795]: debug: getPrinterName(None, None, ['hpfax'], {'fax-type': (<built-in function gt>, 0)})
hp-sendfax[4795]: debug: Mode=1
hp-sendfax[4795]: debug: hp:/net/Officejet_6500_E710a-f?ip=192.168.0.33: back_end:hp is_hp:True bus:net model:Officejet_6500_E710a-f serial: dev_file: host:192.168.0.33 zc: port:1
hp-sendfax[4795]: debug: hpfax:/net/Officejet_6500_E710a-f?ip=192.168.0.33: back_end:hpfax is_hp:True bus:net model:Officejet_6500_E710a-f serial: dev_file: host:192.168.0.33 zc: port:1
hp-sendfax[4795]: debug: Cache miss: officejet_6500_e710a-f
hp-sendfax[4795]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-sendfax[4795]: debug: Searching for section [officejet_6500_e710a-f] in file /usr/share/hplip/data/models/models.dat
hp-sendfax[4795]: debug: Found section [officejet_6500_e710a-f] in file /usr/share/hplip/data/models/models.dat
hp-sendfax[4795]: debug: hp:/net/Officejet_7200_series?ip=192.168.0.31: back_end:hp is_hp:True bus:net model:Officejet_7200_series serial: dev_file: host:192.168.0.31 zc: port:1
hp-sendfax[4795]: debug: hpfax:/net/Officejet_7200_series?ip=192.168.0.31: back_end:hpfax is_hp:True bus:net model:Officejet_7200_series serial: dev_file: host:192.168.0.31 zc: port:1
hp-sendfax[4795]: debug: Cache miss: officejet_7200_series
hp-sendfax[4795]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-sendfax[4795]: debug: Searching for section [officejet_7200_series] in file /usr/share/hplip/data/models/models.dat
hp-sendfax[4795]: debug: Found section [officejet_7200_series] in file /usr/share/hplip/data/models/models.dat
hp-sendfax[4795]: debug: [u'HP6500FAX', u'Officejet_7200_fax']
hp-sendfax[4795]: debug: No printer selected/specified
hp-sendfax[4795]: debug: Loading user settings...
hp-sendfax[4795]: debug: FAB command: /usr/bin/hp-fab
hp-sendfax[4795]: debug: Scan command: /usr/bin/xsane -V %SANE_URI%
hp-sendfax[4795]: debug: Auto refresh: False
hp-sendfax[4795]: debug: Auto refresh rate: 30
hp-sendfax[4795]: debug: Auto refresh type: 1
hp-sendfax[4795]: debug: Systray visible: 0
hp-sendfax[4795]: debug: Systray messages: 0
hp-sendfax[4795]: debug: Last used device URI: hpfax:/net/Officejet_6500_E710a-f?ip=192.168.0.33
hp-sendfax[4795]: debug: Last used printer: HP6500
hp-sendfax[4795]: debug: Working directory: .
hp-sendfax[4795]: debug: Loading user settings...
hp-sendfax[4795]: debug: FAB command: /usr/bin/hp-fab
hp-sendfax[4795]: debug: Scan command: /usr/bin/xsane -V %SANE_URI%
hp-sendfax[4795]: debug: Auto refresh: False
hp-sendfax[4795]: debug: Auto refresh rate: 30
hp-sendfax[4795]: debug: Auto refresh type: 1
hp-sendfax[4795]: debug: Systray visible: 0
hp-sendfax[4795]: debug: Systray messages: 0
hp-sendfax[4795]: debug: Last used device URI: hpfax:/net/Officejet_6500_E710a-f?ip=192.168.0.33
hp-sendfax[4795]: debug: Last used printer: HP6500
hp-sendfax[4795]: debug: Working directory: .
hp-sendfax[4795]: debug: Not starting dbus: running as root.
Traceback (most recent call last):
  File "/usr/bin/hp-sendfax", line 202, in <module>
    dlg = SendFaxDialog(None, printer_name, device_uri, mod.args)
  File "/usr/share/hplip/ui4/sendfaxdialog.py", line 121, in __init__
    self.initUi()
  File "/usr/share/hplip/ui4/sendfaxdialog.py", line 142, in initUi
    self.initRecipientsPage()
  File "/usr/share/hplip/ui4/sendfaxdialog.py", line 386, in initRecipientsPage
    self.db = fax.FaxAddressBook()
  File "/usr/share/hplip/fax/fax.py", line 206, in __init__
    self.load()
  File "/usr/share/hplip/fax/fax.py", line 209, in load
    self._fab = os.path.join(prop.user_dir, "fab.pickle")
  File "/usr/lib64/python2.6/posixpath.py", line 67, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

---------------------------------------
Steps to reproduce:

run hp-sendfax from command line

Changed in hplip:
status: New → In Progress
Changed in hplip:
assignee: nobody → shunmugaraj (shunmugaraj83)
Revision history for this message
shunmugaraj (shunmugaraj83) wrote :

Hi Liphtier,

I tried to Reproduce the issue, I could not reproduce.

Following are the versions i used

Ubuntu 10.10

HPLIP-3.11.3

Cups 1.4.4

I would like to check following things

1. Check weather you have .hplip folder created in you home directory where you are running hp-sendfax

2. Check weather it has fab.pickle file created or not

3. If 1 and 2 are ok, Add log.error("prop.user_dir =%s" %prop.user_dir) at line number 208, and let me know what "prop.user_dir" is pointing to, it should have a path to .hplip folder in your home directory.

Please try the above steps and let me know the results.

Thanks and Regards,

Shunmugaraj

Revision history for this message
Liphtier (liphtier) wrote :

Hi!

1. I have the .hplip folder in my home profile
2. The file fab.pickle looks corrupted, its size is 6 bytes and in text editor I see just few unreadable characters

I deleted the file and ran the hp-sendfax - the file was recreated in the same unusable state.
So the step 3 is impossible

Thank you

Revision history for this message
Liphtier (liphtier) wrote :

Yes, when I ran the hp-sendfax, the segfault happened as expected

Revision history for this message
shunmugaraj (shunmugaraj83) wrote :

Hi Liphtier,

Since address book does not have any entries added you are seeing file with small size.

Could you please add "log.error("prop.user_dir =%s" %prop.user_dir)" line before "self._fab = os.path.join(prop.user_dir, "fab.pickle")" line in "/usr/share/hplip/fax/fax.py" file and relaunch the hp-sendfax and let me know "prop.user_dir" is acutally pointing to .hplip folder in you home directory.

Thanks and Regards,

Shunmugaraj

Revision history for this message
Liphtier (liphtier) wrote :

Yes, it points to actual .hplip folder in my home directory when run by regular user

$ hp-sendfax

HP Linux Imaging and Printing System (ver. 3.11.1)
PC Sendfax Utility ver. 9.0

Copyright (c) 2001-9 .... more details.

error: prop.user_dir =/home/shurik/.hplip
error: prop.user_dir =/home/shurik/.hplip
Segmentation fault
 _____________________
However when run as root it points to "None":

# hp-sendfax
warning: hp-sendfax should not be run as root/superuser.

HP Linux Imaging and Printing System (ver. 3.11.1)
PC Sendfax Utility ver. 9.0

Copyright (c) .... more details.

error: prop.user_dir =None
Traceback (most recent call last):
  File "/usr/bin/hp-sendfax", line 202, in <module>
    dlg = SendFaxDialog(None, printer_name, device_uri, mod.args)
  File "/usr/share/hplip/ui4/sendfaxdialog.py", line 121, in __init__
    self.initUi()
  File "/usr/share/hplip/ui4/sendfaxdialog.py", line 142, in initUi
    self.initRecipientsPage()
  File "/usr/share/hplip/ui4/sendfaxdialog.py", line 386, in initRecipientsPage
    self.db = fax.FaxAddressBook()
  File "/usr/share/hplip/fax/fax.py", line 206, in __init__
    self.load()
  File "/usr/share/hplip/fax/fax.py", line 210, in load
    self._fab = os.path.join(prop.user_dir, "fab.pickle")
  File "/usr/lib64/python2.6/posixpath.py", line 67, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Revision history for this message
Liphtier (liphtier) wrote :

Actiually I deleted /root/.hplip earlier trying to solve the problem and assuming that it should be recreated. But it wasn't

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.