hplip cups backends crash constantly

Bug #1302437 reported by Pierre Ossman (Cendio AB) on 2014-04-04
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
Undecided
Unassigned
hplip (Ubuntu)
Medium
Unassigned

Bug Description

Easily provoked by e.g. "lpinfo -v".

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: hplip 3.14.3-0ubuntu2
ProcVersionSignature: Ubuntu 3.13.0-22.44-generic 3.13.8
Uname: Linux 3.13.0-22-generic x86_64
ApportVersion: 2.14-0ubuntu1
Architecture: amd64
CupsErrorLog:
 E [04/Apr/2014:02:04:30 -0700] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.
 E [04/Apr/2014:02:10:40 -0700] [CGI] Failed to initialize libusb (-99)
 E [04/Apr/2014:02:10:40 -0700] [cups-deviced] PID 3148 (hp) crashed on signal 11!
 E [04/Apr/2014:02:10:40 -0700] [cups-deviced] PID 3157 (hpfax) crashed on signal 11!
 E [04/Apr/2014:02:10:41 -0700] [cups-deviced] PID 3142 (gutenprint52+usb) stopped with status 4!
Date: Fri Apr 4 02:10:40 2014
ExecutablePath: /usr/lib/cups/backend/hp
InstallationDate: Installed on 2014-03-28 (6 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Beta amd64 (20140326)
Lpstat: Error: command ['lpstat', '-v'] failed with exit code 1: lpstat: No destinations added.
Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
MachineType: VMware, Inc. VMware Virtual Platform
Papersize: letter
ProcCmdline: hp
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF8
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-22-generic root=UUID=82a9f05f-32d0-45f7-b302-894b3fdfe56e ro find_preseed=/preseed.cfg noprompt quiet
SegvAnalysis:
 Segfault happened at: 0x7f4e43472414 <__GI___pthread_mutex_lock+4>: mov 0x10(%rdi),%esi
 PC (0x7f4e43472414) ok
 source "0x10(%rdi)" (0x00000030) not located in a known VMA region (needed readable region)!
 destination "%esi" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: hplip
StacktraceTop:
 __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:66
 libusb_get_device_list () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
 ?? () from /usr/lib/libhpmud.so.0
 hpmud_probe_devices () from /usr/lib/libhpmud.so.0
 ?? ()
Title: hp crashed with SIGSEGV in __GI___pthread_mutex_lock()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

dmi.bios.date: 07/02/2012
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 6.00
dmi.board.name: 440BX Desktop Reference Platform
dmi.board.vendor: Intel Corporation
dmi.board.version: None
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:bvr6.00:bd07/02/2012:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A:
dmi.product.name: VMware Virtual Platform
dmi.product.version: None
dmi.sys.vendor: VMware, Inc.

StacktraceTop:
 __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:66
 libusb_get_device_list (ctx=0x0, list=list@entry=0x7fffffb6cca8) at ../../libusb/core.c:671
 musb_probe_devices (lst=lst@entry=0x7fffffb6d1f0 "", lst_size=lst_size@entry=16384, cnt=cnt@entry=0x7fffffb6d13c) at io/hpmud/musb.c:2037
 hpmud_probe_devices (bus=bus@entry=HPMUD_BUS_ALL, buf=buf@entry=0x7fffffb6d1f0 "", buf_size=buf_size@entry=16384, cnt=cnt@entry=0x7fffffb6d13c, bytes_read=bytes_read@entry=0x7fffffb6d140) at io/hpmud/hpmud.c:598
 device_discovery () at prnt/backend/hp.c:493

Changed in hplip (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
information type: Private → Public
Till Kamppeter (till-kamppeter) wrote :

To the HPLIP developers at HP: The "hp" and "hpfax" backends seem not to handle gracefully the case if they are run on a computer without USB or if the USB kernel modules are not loaded (server/high security environments). libusb fails to initialize but the HP backends try to access the connection which libusb failed to establish.

If libusb initialization fails, the backend should skip the USB printer detection with an empty result.

Changed in hplip:
status: New → Confirmed
Changed in hplip (Ubuntu):
status: New → Confirmed
Till Kamppeter (till-kamppeter) wrote :

To the HPLIP developers at HP: Attached is the patch which I have applied to the Ubuntu package of HPLIP now. It makes the result of the libusb_init() calls always checked and on failure the USB access gets skipped. In addition, NULL checks are added to the bugout procedures.

This should solve the problem and I suggest this to be included upstream.

Changed in hplip (Ubuntu):
status: Confirmed → Fix Committed
tags: added: patch
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hplip - 3.14.3-0ubuntu3

---------------
hplip (3.14.3-0ubuntu3) trusty; urgency=low

  * debian/patches/musb-c-do-not-crash-on-usb-failure.patch: Make sure that
    the HPLIP components which access the USB (especially the CUPS backends
    "hp" and "hpfax") do not crash when libusb fails to connect to the USB,
    for example on machines without USB or with the USB kernel modules not
    loaded (LP: #1302437).
 -- Till Kamppeter <email address hidden> Fri, 4 Apr 2014 17:00:00 +0200

Changed in hplip (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers