Ubuntu 22.04: libusb-1.0.25 breaks libinklevel and ink

Bug #1973091 reported by Markus Heinz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libusb-1.0 (Ubuntu)
Fix Released
High
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

* Impact

libusb as an incompatibility with previous versions which breaks ink and maybe some other softwares

* Test case

install ink and

$ ink -p usb

it shouldn't segfault

* Regression potential

libusb is used by fwupd, libfprint, cups, boxes, gvfs and others. Ensure those services are still working as expected (printing, listing new usb devices on the desktop, fingerprint login, firmware update, boxes VM usb hardware detection)

--------------------------------------------

The following packages are installed:

1. libusb-1.0-0/jammy,now 2:1.0.25-1ubuntu1 amd64
2. libinklevel5/jammy,now 0.9.3-3 amd64
3. ink/jammy,now 0.5.3-3 amd64

Command invoked is:

ink -p usb

Result is a segmentation fault. Backtrace in gdb:

gdb) bt
#0 0x00007ffff7dfcf74 in pthread_mutex_lock () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff7d52879 in libusb_get_device_list () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#2 0x00007ffff7f96c90 in find_printer () from /lib/x86_64-linux-gnu/libinklevel.so.5
#3 0x00007ffff7f963e5 in get_device_id () from /lib/x86_64-linux-gnu/libinklevel.so.5
#4 0x00007ffff7f90d55 in get_ink_level () from /lib/x86_64-linux-gnu/libinklevel.so.5
#5 0x000055555555554e in ?? ()
#6 0x00007ffff7d8ed90 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x00007ffff7d8ee40 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000555555555795 in ?? ()

I have compiled libusb-1.0.26 into my $HOME and pointed LD_LIBRARY_PATH to it. Then I get the expected result:

ink -p usb
ink 0.5.3 (c) 2018 Markus Heinz

hp deskjet 5550

Black: 0%
Color: 0%

ldd /usr/bin/ink
 linux-vdso.so.1 (0x00007ffe6e47b000)
 libinklevel.so.5 => /lib/x86_64-linux-gnu/libinklevel.so.5 (0x00007f479dd44000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f479db1c000)
 libusb-1.0.so.0 => /home/markus/privat/programmieren/c/printer/libusb-dist/libusb-1.0.26/libusb/.libs/libusb-1.0.so.0 (0x00007f479dafc000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f479dd79000)
 libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f479dad2000)

So I have the assumption that there is a regression in libusb-1.0.25 which has been fixed in libusb-1.0.26.

On Ubuntu 20.04 there was no problem with libusb and libinklevel / ink. It just appeared after the update to Ubuntu 22.04 which I did today.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1973091

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
affects: linux (Ubuntu) → libusb-1.0 (Ubuntu)
Revision history for this message
Markus Heinz (markus-heinz) wrote :

To my knowledge this issue is not related to the Linux kernel, but to the libusb-1.0-0 package.

Changed in libusb-1.0 (Ubuntu):
status: Incomplete → Confirmed
tags: added: jammy
Revision history for this message
Markus Heinz (markus-heinz) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, that's fixed in https://launchpad.net/ubuntu/+source/libusb-1.0/2:1.0.26-1 and I've uploaded a stable update for 22.04 with a cherry pick from https://github.com/libusb/libusb/commit/6b29aeb9 which fixes the issue

Changed in libusb-1.0 (Ubuntu):
importance: Undecided → High
status: Confirmed → Fix Released
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Markus, or anyone else affected,

Accepted libusb-1.0 into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libusb-1.0/2:1.0.25-1ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libusb-1.0 (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Markus Heinz (markus-heinz) wrote :

I have downloaded

- libusb-1.0-0_1.0.25-1ubuntu2_amd64.deb
- libusb-1.0-0-dev_1.0.25-1ubuntu2_amd64.deb
- libusb-1.0-doc_1.0.25-1ubuntu2_all.deb

from https://launchpad.net/ubuntu/+source/libusb-1.0/2:1.0.25-1ubuntu2/+build/23755643 and installed all three packages with "dpkg -i".

Then I have run "ink -p usb" and got the expected result:

ink 0.5.3 (c) 2018 Markus Heinz

hp deskjet 5550

Black: 0%
Color: 0%

Therefore with the updated libusb packages the segfault does not occur anymore.
Thank you for the quick support.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for testing!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for libusb-1.0 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libusb-1.0 - 2:1.0.25-1ubuntu2

---------------
libusb-1.0 (2:1.0.25-1ubuntu2) jammy; urgency=medium

  * debian/patches/git_backward_compat.patch: revert a behaviour change in
    libusb 1.0.25 which triggers issues when the API is misused, fix
    ink segfaulting (lp: #1973091)

 -- Sebastien Bacher <email address hidden> Fri, 13 May 2022 13:20:38 +0200

Changed in libusb-1.0 (Ubuntu Jammy):
status: Fix Committed → 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.