Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#992721: hplip: Scanning with Deskjet 3050A J611 crash

105 views
Skip to first unread message

Florence Birée

unread,
Aug 22, 2021, 1:10:04 PM8/22/21
to
Package: hplip
Version: 3.21.4+dfsg0-1
Severity: important
X-Debbugs-Cc: flor...@biree.name

Dear Maintainer,

My HP Deskjet 3055A, used only to scan files, doesn't work anymore when
scanning with both hp-scan, xsane or simple-scan, here on Debian
unstable/experimental. It used to work with another computer on Debian
Buster (didn't try with Bullseye, the computer is dead), as well on
other computer with Ubuntu 20.04.

Either of this three programs crashes with this message on a terminal:

> *** stack smashing detected ***: terminated
> fish : Tâche , 'simple-scan' terminée par le signal SIGABRT (Abandon)

I tried to 'apt purge' all packages involved in scanning and hplip, and
install them again, with the same result.

I'm ready to give you more informations if needed…

Thanks for your works,
Florence


-- Package-specific info:
Saving output in log file: /home/florence/hp-check.log

HP Linux Imaging and Printing System (ver. 3.21.4)
Dependency/Version Check Utility ver. 15.1

Copyright (c) 2001-18 HP 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).

Check types:
a. EXTERNALDEP - External Dependencies
b. GENERALDEP - General Dependencies (required both at compile and run time)
c. COMPILEDEP - Compile time Dependencies
d. [All are run-time checks]
PYEXT SCANCONF QUEUES PERMISSION

Status Types:
OK
MISSING - Missing Dependency or Permission or Plug-in
INCOMPAT - Incompatible dependency-version or Plugin-version

warning: debian-11 version is not supported. Using debian-10.8 versions dependencies to verify and install...

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

Kernel: 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) GNU/Linux
Host: lyra
Proc: 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) GNU/Linux
Distribution: debian 11
Bitness: 64 bit


-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.21.4
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for debian distro 11 version

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

[hplip]
version=3.21.4

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hplip/HP
ppdbase=/usr/share/ppd/hplip
doc=/usr/share/doc/hplip
html=/usr/share/doc/hplip-doc
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
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=yes
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.21.4
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=yes
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no
class-driver=no


Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: No such file or directory

Current contents of '~/.hplip/hplip.conf' file:
[commands]
scan = /usr/bin/simple-scan %SANE_URI%

[fax]
email_address =
voice_phone =

[installation]
date_time = 08/22/21 18:51:05
version = 3.21.4

[last_used]
device_uri = hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK
printer_name =
working_dir = .

[polling]
device_list =
enable = false
interval = 5

[refresh]
enable = false
rate = 30
type = 1

[settings]
systray_messages = 0
systray_visible = 0

[upgrade]
last_upgraded_time = 1629621696
notify_upgrade = false
pending_upgrade_time = 0


<Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>

-------------------------
| External Dependencies |
-------------------------

error: cups CUPS - Common Unix Printing System REQUIRED 1.1 - INCOMPAT 'CUPS may not be installed or not running'
gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 9.53.3 OK -
error: xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 - MISSING 'xsane needs to be installed'
scanimage scanimage - Shell scanning program OPTIONAL 1.0 1.0.32 OK -
dbus DBus - Message bus system REQUIRED - 1.12.20 OK -
policykit PolicyKit - Administrative policy framework OPTIONAL - 0.105 OK -
network network -wget OPTIONAL - 1.21 OK -
avahi-utils avahi-utils OPTIONAL - 0.8 OK -

------------------------
| General Dependencies |
------------------------

error: libjpeg libjpeg - JPEG library REQUIRED - - MISSING 'libjpeg needs to be installed'
error: cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - - MISSING 'cups-devel needs to be installed'
error: cups-image CUPS image - CUPS image development files REQUIRED - - MISSING 'cups-image needs to be installed'
libpthread libpthread - POSIX threads library REQUIRED - b'2.31' OK -
error: libusb libusb - USB library REQUIRED - 1.0 MISSING 'libusb needs to be installed'
sane SANE - Scanning library REQUIRED - - OK -
error: sane-devel SANE - Scanning library development files REQUIRED - - MISSING 'sane-devel needs to be installed'
error: libavahi-dev libavahi-dev REQUIRED - - MISSING 'libavahi-dev needs to be installed'
error: libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 - MISSING 'libnetsnmp-devel needs to be installed'
libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 1.1.1 OK -
python3X Python 2.2 or greater - Python programming language REQUIRED 2.2 3.9.2 OK -
python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - OK -
error: python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4 OPTIONAL 4.0 - MISSING 'python3-pyqt4-dbus needs to be installed'
error: python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x) REQUIRED 4.0 - MISSING 'python3-pyqt4 needs to be installed'
python3-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.2.18 OK -
python3-xml Python XML libraries REQUIRED - 2.2.10 OK -
python3-devel Python devel - Python development files REQUIRED 2.2 3.9.2 OK -
python3-pil PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL - 8.1.2 OK -
python3-reportlab Reportlab - PDF library for Python OPTIONAL 2.0 3.5.59 OK -

--------------
| COMPILEDEP |
--------------

error: libtool libtool - Library building support services REQUIRED - - MISSING 'libtool needs to be installed'
gcc gcc - GNU Project C and C++ Compiler REQUIRED - 10.2.1 OK -
make make - GNU make utility to maintain groups of programs REQUIRED 3.0 4.3 OK -

---------------------
| Python Extentions |
---------------------

cupsext CUPS-Extension REQUIRED - 3.21.4 OK -
hpmudext IO-Extension REQUIRED - 3.21.4 OK -

----------------------
| Scan Configuration |
----------------------

'/etc/sane.d/dll.d/hpaio' not found.
hpaio HPLIP-SANE-Backend REQUIRED - 3.21.4 OK 'hpaio found in /etc/sane.d/dll.conf'
scanext Scan-SANE-Extension REQUIRED - 3.21.4 OK -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------

device `hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK' is a Hewlett-Packard Deskjet_3050A_J611_series all-in-one


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

Device URI Model
-------------------------------------- ----------------------------
hp:/usb/Deskjet_3050A_J611_series?seri HP Deskjet 3050A J611 series
al=CN31L1CQMP05WK

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


Canon_MG3600_EEDF_Vert
----------------------
Type: Unknown
Device URI: usb://Canon/MG3600%20series?serial=F90AEA&interface=1
PPD: /etc/cups/ppd/Canon_MG3600_EEDF_Vert.ppd
warning: Failed to read /etc/cups/ppd/Canon_MG3600_EEDF_Vert.ppd ppd file
PPD Description:
Printer status: printer Canon_MG3600_EEDF_Vert is idle. enabled since Sun Feb 16 14:13:12 2020
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

Canon_Noire_EEDF_Jojo
---------------------
Type: Unknown
Device URI: usb://Canon/TS5000%20series?serial=573AD6&interface=1
PPD: /etc/cups/ppd/Canon_Noire_EEDF_Jojo.ppd
warning: Failed to read /etc/cups/ppd/Canon_Noire_EEDF_Jojo.ppd ppd file
PPD Description:
Printer status: printer Canon_Noire_EEDF_Jojo is idle. enabled since Sat Jul 3 02:53:48 2021
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

Canon_Noire_EEDF_Juju
---------------------
Type: Unknown
Device URI: usb://Canon/TS5000%20series?serial=573BD3&interface=1
PPD: /etc/cups/ppd/Canon_Noire_EEDF_Juju.ppd
warning: Failed to read /etc/cups/ppd/Canon_Noire_EEDF_Juju.ppd ppd file
PPD Description:
Printer status: printer Canon_Noire_EEDF_Juju is idle. enabled since Sun Jun 6 21:01:49 2021
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

Deskjet_3050A_J611
------------------
Type: Printer
Device URI: hp:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK
PPD: /etc/cups/ppd/Deskjet_3050A_J611.ppd
warning: Failed to read /etc/cups/ppd/Deskjet_3050A_J611.ppd ppd file
PPD Description:
Printer status: printer Deskjet_3050A_J611 is idle. enabled since Sun Aug 22 18:30:10 2021
Communication status: Good

HP_Photosmart_EEDF_Noire
------------------------
Type: Printer
Device URI: hp:/usb/Photosmart_B010_series?serial=CN08Q2K1YR05K9
PPD: /etc/cups/ppd/HP_Photosmart_EEDF_Noire.ppd
warning: Failed to read /etc/cups/ppd/HP_Photosmart_EEDF_Noire.ppd ppd file
PPD Description:
Printer status: printer HP_Photosmart_EEDF_Noire disabled since Thu Feb 20 19:23:27 2020 -
Backend /usr/lib/cups/backend/hp does not exist!
[31;01merror: Unable to communicate with device (code=12): hp:/usb/Photosmart_B010_series?serial=CN08Q2K1YR05K9 [0m
error: Device not found
error: Communication status: Failed

Imprimante_Parents_HP_C5180
---------------------------
Type: Unknown
Device URI: dnssd://Photosmart%20C5100%20series%20%5BB843EE%5D._pdl-datastream._tcp.local/
PPD: /etc/cups/ppd/Imprimante_Parents_HP_C5180.ppd
warning: Failed to read /etc/cups/ppd/Imprimante_Parents_HP_C5180.ppd ppd file
PPD Description:
Printer status: printer Imprimante_Parents_HP_C5180 is idle. enabled since Fri Dec 20 23:44:55 2019
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

Lexmark-An01
------------
Type: Unknown
Device URI: socket://192.168.15.244:9100
PPD: /etc/cups/ppd/Lexmark-An01.ppd
warning: Failed to read /etc/cups/ppd/Lexmark-An01.ppd ppd file
PPD Description:
Printer status: printer Lexmark-An01 is idle. enabled since Fri Aug 13 11:11:49 2021
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

MG3600-series-EEDF-Grise
------------------------
Type: Unknown
Device URI: usb://Canon/MG3600%20series?serial=96F692&interface=1

MP280-series
------------
Type: Unknown
Device URI: usb://Canon/MP280%20series?serial=193EED&interface=1
PPD: /etc/cups/ppd/MP280-series.ppd
warning: Failed to read /etc/cups/ppd/MP280-series.ppd ppd file
PPD Description:
Printer status: printer MP280-series disabled since Tue Mar 9 11:59:49 2021 -
Unplugged or turned off
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

Samsung_C48x_Utopons
--------------------
Type: Unknown
Device URI: usb://Samsung/C48x%20Series?serial=0BEKB8KHBB0141V&interface=1
PPD: /etc/cups/ppd/Samsung_C48x_Utopons.ppd
warning: Failed to read /etc/cups/ppd/Samsung_C48x_Utopons.ppd ppd file
PPD Description:
Printer status: printer Samsung_C48x_Utopons disabled since Sun Jun 20 15:50:12 2021 -
Unplugged or turned off
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

Toshiba_Perm
------------
Type: Unknown
Device URI: dnssd://TOSHIBA%20e-STUDIO2500AC-12032774._ipp._tcp.local/?uuid=12bcbc24-2634-46bc-b4fd-6e564b29ddfd
PPD: /etc/cups/ppd/Toshiba_Perm.ppd
warning: Failed to read /etc/cups/ppd/Toshiba_Perm.ppd ppd file
PPD Description:
Printer status: printer Toshiba_Perm is idle. enabled since Fri Jun 25 14:31:45 2021
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

XEROX_3100MFP_Diego
-------------------
Type: Unknown
Device URI: usb://XEROX/Phaser%203100MFP?serial=L510251LE890328
PPD: /etc/cups/ppd/XEROX_3100MFP_Diego.ppd
warning: Failed to read /etc/cups/ppd/XEROX_3100MFP_Diego.ppd ppd file
PPD Description:
Printer status: printer XEROX_3100MFP_Diego disabled since Sat Aug 21 19:05:49 2021 -
Unplugged or turned off
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.


--------------
| PERMISSION |
--------------

USB Deskjet_3050A_J611 Required - - OK Node:'/dev/bus/usb/002/010' Perm:' root lp rw- rw- rw- rw- rw- r--'

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

Missing Required Dependencies
-----------------------------
error: 'cups' package is missing or 'cups' service is not running.
error: 'libcups2' package is missing/incompatible
error: 'libjpeg62-turbo-dev' package is missing/incompatible
error: 'libcups2-dev' package is missing/incompatible
error: 'cups-bsd' package is missing/incompatible
error: 'cups-client' package is missing/incompatible
error: 'libcupsimage2' package is missing/incompatible
error: 'libcupsimage2-dev' package is missing/incompatible
error: 'libusb-1.0.0-dev' package is missing/incompatible
error: 'libsane-dev' package is missing/incompatible
error: 'libavahi-client-dev' package is missing/incompatible
error: 'libavahi-core-dev' package is missing/incompatible
error: 'libavahi-common-dev' package is missing/incompatible
error: 'libsnmp-dev' package is missing/incompatible
error: 'snmp' package is missing/incompatible
error: 'python3-pyqt4' package is missing/incompatible
error: 'gtk2-engines-pixbuf' package is missing/incompatible
error: 'libtool' package is missing/incompatible
error: 'libtool-bin' package is missing/incompatible

Missing Optional Dependencies
-----------------------------
error: 'xsane' package is missing/incompatible
error: 'python3-dbus.mainloop.qt' package is missing/incompatible

Total Errors: 13
Total Warnings: 9


Done.

-- System Information:
Debian Release: 11.0
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-8-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages hplip depends on:
ii adduser 3.118
ii cups 2.3.3op2-3+deb11u1
ii hplip-data 3.21.4+dfsg0-1
ii libc6 2.31-16
ii libcups2 2.3.3op2-3+deb11u1
ii libdbus-1-3 1.12.20-2
ii libhpmud0 3.21.4+dfsg0-1
ii libpython3.9 3.9.2-1
ii libsane-hpaio 3.21.4+dfsg0-1
ii libsane1 1.0.32-4
ii lsb-base 11.1.0
ii printer-driver-hpcups 3.21.4+dfsg0-1
ii python3 3.9.2-3
ii python3-dbus 1.2.18-2
ii python3-gi 3.40.1-2
ii python3-pexpect 4.8.0-2
ii python3-pil 8.1.2+dfsg-0.3
ii python3-reportlab 3.5.59-2
ii wget 1.21-1+b1
ii xz-utils 5.2.5-2

Versions of packages hplip recommends:
ii avahi-daemon 0.8-5
ii policykit-1 0.105-31
ii printer-driver-postscript-hp 3.21.2+dfsg1-2
ii sane-utils 1.0.32-4

Versions of packages hplip suggests:
pn hplip-doc <none>
ii hplip-gui 3.21.2+dfsg1-2
ii python3-notify2 0.3-4
ii system-config-printer 1.5.14-1

-- no debconf information

Brian Potkin

unread,
Aug 23, 2021, 10:40:04 AM8/23/21
to
On Sun 22 Aug 2021 at 18:58:26 +0200, Florence Birée wrote:

> Package: hplip
> Version: 3.21.4+dfsg0-1
> Severity: important
> X-Debbugs-Cc: flor...@biree.name
>
> Dear Maintainer,
>
> My HP Deskjet 3055A, used only to scan files, doesn't work anymore when
> scanning with both hp-scan, xsane or simple-scan, here on Debian
> unstable/experimental. It used to work with another computer on Debian
> Buster (didn't try with Bullseye, the computer is dead), as well on
> other computer with Ubuntu 20.04.
>
> Either of this three programs crashes with this message on a terminal:
>
> > *** stack smashing detected ***: terminated
> > fish : Tâche , 'simple-scan' terminée par le signal SIGABRT (Abandon)
>
> I tried to 'apt purge' all packages involved in scanning and hplip, and
> install them again, with the same result.
>
> I'm ready to give you more informations if needed…
>
> Thanks for your works,
> Florence

Hello Florence,

Thank you for your detailed report. Please give us the output of

grep PRETTY /usr/lib/os-release

Regards,

Brian.

Florence Birée

unread,
Aug 23, 2021, 11:50:05 AM8/23/21
to
Hello Brian,

Here is the output:

$ grep PRETTY /usr/lib/os-release
PRETTY_NAME="Debian GNU/Linux bookworm/sid"

Regards,
Florence

Le Mon, 23 Aug 2021 15:03:58 +0100,
Brian Potkin <clarem...@gmail.com> a écrit :
--
Florence Birée (elle)
06 52 92 15 32

En ces temps d'état policier, ne les laissons pas lire nos mails,
chiffrons-les ! https://emailselfdefense.fsf.org/fr/index.html

Brian Potkin

unread,
Aug 23, 2021, 12:10:03 PM8/23/21
to
On Mon 23 Aug 2021 at 17:35:11 +0200, Florence Birée wrote:

> Hello Brian,
>
> Here is the output:
>
> $ grep PRETTY /usr/lib/os-release
> PRETTY_NAME="Debian GNU/Linux bookworm/sid"

Reduce bookworm/sid to fewer than 12 characters. For examole, remove
"sid". Save and try scanning.

Cheers,

Brian.

Florence Birée

unread,
Aug 23, 2021, 3:10:04 PM8/23/21
to
Le Mon, 23 Aug 2021 17:05:28 +0100,
Brian Potkin <clarem...@gmail.com> a écrit :
> Reduce bookworm/sid to fewer than 12 characters. For examole, remove
> "sid". Save and try scanning.

This makes hp-scan works well, thanks! (I've now a working scanning
solution)

But the problem is still the same for simple-scan and xsane…

Cheers,

Brian Potkin

unread,
Aug 23, 2021, 7:00:03 PM8/23/21
to
On Mon 23 Aug 2021 at 21:04:09 +0200, Florence Birée wrote:

> Le Mon, 23 Aug 2021 17:05:28 +0100,
> Brian Potkin <clarem...@gmail.com> a écrit :
> > Reduce bookworm/sid to fewer than 12 characters. For examole, remove
> > "sid". Save and try scanning.
>
> This makes hp-scan works well, thanks! (I've now a working scanning
> solution)

That's something, at least.

> But the problem is still the same for simple-scan and xsane…

Is the "stack smashing detected" message given in these cases?

Please provide

scanimage -L

Cheers,

Brian.

Florence Birée

unread,
Aug 24, 2021, 5:30:04 AM8/24/21
to
Le Mon, 23 Aug 2021 23:50:45 +0100,
Brian Potkin <clarem...@gmail.com> a écrit :
>
> > But the problem is still the same for simple-scan and xsane…
>
> Is the "stack smashing detected" message given in these cases?

Yes, exactly.

> Please provide
>
> scanimage -L

$ scanimage -L
device `hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK' is
a Hewlett-Packard Deskjet_3050A_J611_series all-in-one

Brian Potkin

unread,
Aug 24, 2021, 6:00:03 AM8/24/21
to
On Tue 24 Aug 2021 at 11:18:15 +0200, Florence Birée wrote:

> Le Mon, 23 Aug 2021 23:50:45 +0100,
> Brian Potkin <clarem...@gmail.com> a écrit :
> >
> > > But the problem is still the same for simple-scan and xsane…
> >
> > Is the "stack smashing detected" message given in these cases?
>
> Yes, exactly.
>
> > Please provide
> >
> > scanimage -L
>
> $ scanimage -L
> device `hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK' is
> a Hewlett-Packard Deskjet_3050A_J611_series all-in-one

Can you scan with any of these?

scanimage -d "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK" > image.pnm
simple-scan "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK"
xsane "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK"

You could also try removing the slash from os-release.

Cheers,

Brian.

Florence Birée

unread,
Aug 24, 2021, 6:40:04 AM8/24/21
to
Le Tue, 24 Aug 2021 10:50:19 +0100,
Brian Potkin <clarem...@gmail.com> a écrit :
> Can you scan with any of these?
>
> scanimage -d
> "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK" >
> image.pnm
> simple-scan
> "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK"
> xsane
> "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK"

With some tests, it seems the crash is not always reproducible (sometimes, it's working…),
so I run each command 4 times to see (and add hp-scan again, in case it crash sometimes too).

Without removing the slash:

$ scanimage -d "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK" > image.pnm

-> on 4 runs, 1 give "stack smashing", 3 works well…

$ simple-scan "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK"

-> on 4 runs, 4 "stack smashing" crashes. I can see the top of the image appearing in simple-scan,
and the program do no crash at the same times (sometimes more of the scan is displayed before the
crash)

$ xsane "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK"

-> on 4 runs, 4 "stack smashing" crashes

$ hp-scan

-> on 4 runs, 4 "stack smashing" crash… (but it worked yesterday…)

** after the removal of the slash in os-release:

$ scanimage -d "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK" > image.pnm

-> on 4 runs, 1 "stack smashing", 3 works

$ simple-scan "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK"

-> on 4 runs, 4 "stack smashing" crashes.

$ xsane "hpaio:/usb/Deskjet_3050A_J611_series?serial=CN31L1CQMP05WK"

-> on 4 runs, 4 "stack smashing" crashes (but on some preliminary tests, it works sometimes…)

$ hp-scan

-> on 4 runs, 4 "stack smashing" crash, at various percentages of scanning


So… it seems the problem is not 100% reproducible, even if it happens in the large majority
of times… And I'm not sure the os-release changes really changes something, maybe the times when
hp-scan was working was just luck…

Brian Potkin

unread,
Aug 24, 2021, 8:40:03 AM8/24/21
to
That's a lot of work you have done, Florence! Thanks.

We have met this "stack smashing" situation before but in a printing
context. OdyX managed to fix it then. Bug #932246.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932246

There is very little more I can do now, apart from suggesting a downgrade
from HPLIP experimental packages to unstable ones. scanimage appears to
be your best bet for scanning for the present.

Good Luck,

Brian.

Bernhard Übelacker

unread,
Sep 13, 2021, 12:20:03 PM9/13/21
to
Hello Florence,
there might be still something that could be done
to retrieve some more information (if you have still
the versions installed that show the issue).

The easiest first thing might be to install the package
systemd-coredump, if possible.

Then open in another terminal 'journalctl -f'.

And reproduce one of the "stack smashings".

Then in the other terminal a "Stack trace" should appear - this
should point out the library and maybe function where the issue is.

Kind regards,
Bernhard

Florence Birée

unread,
Sep 15, 2021, 1:10:04 PM9/15/21
to
Hi Bernhard,

Here is the stack trace (scanning with simple-scan):

sept. 15 18:55:47 lyra systemd[1]: Created slice Slice /system/systemd-coredump.
sept. 15 18:55:47 lyra systemd[1]: Started Process Core Dump (PID 113128/UID 0).
sept. 15 18:55:48 lyra systemd-coredump[113129]: [🡕] Process 113052 (simple-scan) of user 1000 dumped core.

Stack trace of thread 113079:
#0 0x00007f858b12ae71 raise (libc.so.6 + 0x3ce71)
#1 0x00007f858b114536 abort (libc.so.6 + 0x26536)
#2 0x00007f858b16c2b8 n/a (libc.so.6 + 0x7e2b8)
#3 0x00007f858b1fad42 __fortify_fail (libc.so.6 + 0x10cd42)
#4 0x00007f858b1fad20 __stack_chk_fail (libc.so.6 + 0x10cd20)
#5 0x00007f857c763146 get_size (libsane-hpaio.so.1 + 0x14146)
#6 0xffffffffffffffff n/a (n/a + 0x0)
sept. 15 18:55:48 lyra systemd[1]: systemd-...@0-113128-0.service:
Succeeded.

I hope it will be useful!

Cheers,
Florence

Le Mon, 13 Sep 2021 18:11:40 +0200,
Bernhard Übelacker <bern...@mailbox.org> a écrit :

Bernhard Übelacker

unread,
Sep 15, 2021, 6:40:03 PM9/15/21
to
Hello Florence, dear Maintainer,

>
> Stack trace of thread 113079:
> #0 0x00007f858b12ae71 raise (libc.so.6 + 0x3ce71)
> #1 0x00007f858b114536 abort (libc.so.6 + 0x26536)
> #2 0x00007f858b16c2b8 n/a (libc.so.6 + 0x7e2b8)
> #3 0x00007f858b1fad42 __fortify_fail (libc.so.6 + 0x10cd42)
> #4 0x00007f858b1fad20 __stack_chk_fail (libc.so.6 + 0x10cd20)
> #5 0x00007f857c763146 get_size (libsane-hpaio.so.1 + 0x14146)
> #6 0xffffffffffffffff n/a (n/a + 0x0)


Thanks for the fast response.
From looking at this stack trace I assume a stack variable in
function "get_size" gets overwritten. At the end of this function
the stack check gets triggered.

From looking at [1] I _think_ the issue might be with the
variable "char buffer[7]".
It looks like this buffer gets some hexadecimal size
information written to from a http connection.

Therefore my hypothesis is that either this "size" exceeds what
is with these 7 places possible (would be 268 MB ?),
or some unexpected input is read from the connection and
therefore the loop is not left before the buffer is overrun.

One easy thing might be to test if the resolution could be
changed to some lower value in the hope to get this "size" to
a lower value, does the scan then succeed ?

Kind regards,
Bernhard



[1] https://sources.debian.org/src/hplip/3.21.6+dfsg0-1/scan/sane/bb_ledm.c/#L1086
1084
1085 int get_size(struct ledm_session* ps)
1086 {
1087 struct bb_ledm_session *pbb = ps->bb_session;
1088 char buffer[7];
1089 int i=0, tmo=50, len;
1090
1091 if(ps->currentResolution >= 1200) tmo *= 5;
1092
1093 while(1)
1094 {
1095 if(http_read_size(pbb->http_handle, buffer+i, 1, tmo, &len) == 2) return 0;
1096 if( i && *(buffer+i) == '\n' && *(buffer+i-1) == '\r') break;
1097 i++;
1098 }
1099 *(buffer+i+1)='\0';
1100 return strtol(buffer, NULL, 16);
1101 }
1102

[2] https://sources.debian.org/src/hplip/3.21.6+dfsg0-1/scan/sane/http.c/#L513
debugging.txt

Bernhard Übelacker

unread,
Sep 16, 2021, 4:40:03 AM9/16/21
to
Am 16.09.21 um 00:29 schrieb Bernhard Übelacker:
> exceeds what
> is with these 7 places possible (would be 268 MB ?)

Short correction:
6 bytes for the hex number and 1 byte termination.
Would just give something around 16 MB as a maximum?

Kind regards,
Bernhard

Florence Birée

unread,
Sep 20, 2021, 4:50:05 AM9/20/21
to
Hello,

Le Thu, 16 Sep 2021 00:29:47 +0200,
Bernhard Übelacker <bern...@mailbox.org> a écrit :
> One easy thing might be to test if the resolution could be
> changed to some lower value in the hope to get this "size" to
> a lower value, does the scan then succeed ?

You seems to be right. I try to scan with simple scan, in text mode:

- with resolution 75ppp: scan ok
- with resolution 150ppp: scan ok
- with resolution 200ppp: scan ok
- with resolution 300ppp: simple scan crash, stack smashing detected

the stack trace:
sept. 20 10:31:48 lyra systemd-coredump[78476]: [🡕] Process 78221
(simple-scan) of user 1000 dumped core.
Stack trace of thread 78257:
#0 0x00007f7ebfeeee71 raise (libc.so.6 + 0x3ce71)
#1 0x00007f7ebfed8536 abort (libc.so.6 + 0x26536)
#2 0x00007f7ebff302b8 n/a (libc.so.6 + 0x7e2b8)
#3 0x00007f7ebffbed42 __fortify_fail (libc.so.6 + 0x10cd42)
#4 0x00007f7ebffbed20 __stack_chk_fail (libc.so.6 + 0x10cd20)
#5 0x00007f7e9834b146 get_size (libsane-hpaio.so.1 + 0x14146)
#6 0xffffffffffffffff n/a (n/a + 0x0)

Cheers,

Bernhard Übelacker

unread,
Sep 20, 2021, 1:30:03 PM9/20/21
to
Hello Florence, dear Maintainer,
then attached patch is growing this buffer from 6
to 10 usable bytes, making a size around 1 TB possible.
And tries to break the loop before overrunning the buffer.

Unfortunately I cannot test this patch,
so it is completely untested, just compiles...

Kind regards,
Bernhard

0082-Resize-buffer-and-try-not-to-overrun-it.patch

Florence Birée

unread,
Sep 21, 2021, 12:40:02 PM9/21/21
to
Hi,

I applied the patch and try it on hplip 3.21.6+dfsg0-1.

No more stack smashing. But at a random point during the scan,
simple-scan stop and display a message : « Failed to scan - Error
communicating with scanner ».
Nothing in the terminal nor in journald.

The random point where it failed is random in the sense of when I scan,
I can show the beginning of the scanned picture appear in simple-scan,
and at one point (sometimes at the begining, sometimes near the end),
the error message appear.

Cheers,
Florence

Le Mon, 20 Sep 2021 19:18:11 +0200,
Bernhard Übelacker <bern...@mailbox.org> a écrit :

Bernhard Übelacker

unread,
Sep 26, 2021, 7:10:03 AM9/26/21
to
Am 21.09.21 um 18:36 schrieb Florence Birée:
> Hi,
>
> I applied the patch and try it on hplip 3.21.6+dfsg0-1.
>
> No more stack smashing. But at a random point during the scan,
> simple-scan stop and display a message : « Failed to scan - Error
> communicating with scanner ».
> Nothing in the terminal nor in journald.
>
> The random point where it failed is random in the sense of when I scan,
> I can show the beginning of the scanned picture appear in simple-scan,
> and at one point (sometimes at the begining, sometimes near the end),
> the error message appear.
>
> Cheers,
> Florence
>


Hello Florence,
so the patch helps for the stack smashing, but the
error message might have other reasons.

The message itself is located in one of these lines [1] in simple-scan.

You could try to run simple-scan with some environment variables,
to active some more verbose debugging output.
I think these in [2] coult already be quite verbose.


[1]
https://sources.debian.org/src/simple-scan/40.5-1/src/scanner.vala/#L1368
https://sources.debian.org/src/simple-scan/40.5-1/src/scanner.vala/#L1479

[2]
script -c "SANE_DEBUG_DLL=255 SANE_DEBUG_ESCL=255 SANE_DEBUG_SANEI_TCP=255 simple-scan" -a ~/simple-scan-debug-output.txt

Ulrich Thorwarth

unread,
Nov 10, 2021, 5:10:03 AM11/10/21
to
Maybe this is helpful(?)

I had the same troubles after upgrade to bullseye (scanning and
printing) using an HP officejet 4630.

After sveral purge and reinstall of hplip I finally moved to
sane-airscan and the bug is still unsolved. i

hplip is not installed anymore, so maybe it is not hplip related?

This is what I do (using sane-airscan):

Switching on officejet, /var/log/messages recognizes the new usb device
and things look ok.

Starting simple scan, two devices are detected: Selecting the eSCL entry
(the other entry does not work, but that is another topic).

Starting scan gives an error message in a pop-up:
"Scanning failed - scan process could not be started"
(my translation of the original German message)

But the scanner is actually starting to scan without giving a result.
/var/log/messages gives:

> .... xdg-desktop-por[5256]: Backend call failed: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Operation not permitted
> .... xdg-desktop-por[5239]: Failed to get application states: GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list
> .... odin kernel: [ 9613.142032] perf: interrupt took too long (2507 > 2500), lowering kernel.perf_event_max_sample_rate to 79750
> .... odin xdg-desktop-por[5256]: Backend call failed: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Operation not permitted


The weird thing now is that without changing anything, just restarting
simple-scan scanning works perfectly.
Next scan fails again....
In approx. 90% of the scans it fails, in 10% it is ok without changing
anything in the setting.

Scanimage the same effect:

scanimage -v --format=jpeg -o out.jpg
scanimage: sane_start: Error during device I/O

A few seconds later without changing anything:
scanimage -v --format=jpeg -o out.jpg
scanimage: scanning image of size 2550x3508 pixels at 24 bits/pixel
scanimage: acquiring RGB frame
scanimage: min/max graylevel value = 2/255
scanimage: read 26836200 bytes in total

Let me know if I can provide better log outputs.

Ulrich
0 new messages