Document scanner crashes after tumbleweed update

Hi,

used to use my “HP ScanJet 2600 Pro f1” via the “Document Scanner” software from the opensuse tumbleweed repository without problems. Did a distribution update this noon and now the document scanner window crashes instantly after invocation.

Installing the “Document Scanner” from flatpack opens fine, finds the scanner, but fails to connect for scanning.

Re-Installing the hplip software made no change for either.

I’d be grateful for any pointers.

Best,

PS: Things still work fine under Leap 15.6. Looks like tumbleweed is a rather rocky experience recently.

What is the terminal output of the crash?

I start this as a flatpack program via the GUI. I wasn’t even able to figure out the actual binary name as “Details” (from right-clicking the desktop icon) just gives me the installation window in “Software” and a simple “find /var/lib/flatpack -name *scan*” just gave tons out inconclusive output. And traditionally, the flatpack codes seem not to be made for invocation in my bash environment …

Sorry, not all that helpful.

I assume that it is discovered when you run scanimage -L? Capture the scanner device URI eg “hpaio:/usb/HP_ScanJet_Pro_2600_f1?serial=CNXXXXXXX” to use in the debugging command below.

Try invoking scanimage > test.pnm in a terminal. Does that work ok?

Fore more logging verbosity you could something like

SANE_DEBUG_HPAIO=3 scanimage -d "hpaio:/usb/HP_ScanJet_Pro_2600_f1" -v > test.pnm 2> debug.log

If scanimage works ok, then it might just be an issue with the graphical scanner frontend that is crashing. You could also try another frontend such as “simple-scan” perhaps.

1 Like

Well, that escalated quickly:

~> scanimage -L
Segmentation fault         (core dumped) scanimage -L
~> zypper se --provides scanimage
Loading repository data...
Reading installed packages...
No matching items found.
~> type scanimage
scanimage is hashed (/usr/bin/scanimage)

Not even sure, where this comes from.

@deano_ferrari Thanks for looking into this.

Best

@deano_ferrari Looked into simple scan. Not good:

~> simple-scan 
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
Segmentation fault         (core dumped) simple-scan
~> zypper search -s simple-scan
Loading repository data...
Reading installed packages...

S  | Name             | Type    | Version    | Arch   | Repository
---+------------------+---------+------------+--------+----------------------
i+ | simple-scan      | package | 49.0.1-1.1 | x86_64 | Main Repository (OSS)
i+ | simple-scan      | package | 49.0.1-1.1 | x86_64 | openSUSE:Factory
i+ | simple-scan      | package | 49.0.1-1.1 | x86_64 | openSUSE-20240222-0
   | simple-scan-lang | package | 49.0.1-1.1 | noarch | Main Repository (OSS)
   | simple-scan-lang | package | 49.0.1-1.1 | noarch | openSUSE:Factory
   | simple-scan-lang | package | 49.0.1-1.1 | noarch | openSUSE-20240222-0
~> 

It does not feel comfortable to get segmentation faults and core dumps from packages out of the Main Repository.

Best,

For the records,
The update this noon moved to tumbleweed 20251014, the one from just now moved to 20251015. Am I hitting sweet spots of inconsistency in the repos? I would hope not.

Its TW things break. report the problem and it probably gets fixed

OK. I’ll see to it. Yet another account …

@gogalthorp Thanks for looking into this.

Good night

For sure. Can you share your configured repos first?
zypper lr -d

It looks like you have multiple repos providing the same packages (Main Repository (OSS), openSUSE:Factory, and openSUSE-20240222-0). That could cause problems for you like you have encountered here.

Yep. I would like to see the actual repos, People should not have Factory repos.
@smoothtux show zypper lr -d

@deano_ferrari @knurpht Sure enough. Here we go:

~> zypper lr -d
#  | Alias                                | Name                                   | Enabled | GPG Check | Refresh | Keep | Priority | Type   | URI                                                                 | Service
---+--------------------------------------+----------------------------------------+---------+-----------+---------+------+----------+--------+---------------------------------------------------------------------+--------
 1 | download.opensuse.org-non-oss        | Main Repository (NON-OSS)              | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/non-oss/               | 
 2 | download.opensuse.org-oss            | Main Repository (OSS)                  | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/oss/                   | 
 3 | download.opensuse.org-tumbleweed     | Main Update Repository                 | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | http://download.opensuse.org/update/tumbleweed/                     | 
 4 | ftp.gwdg.de-openSUSE_Tumbleweed      | Packman Repository                     | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ | 
 5 | https-download.opensuse.org-1360e432 | openSUSE:Factory                       | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | https://download.opensuse.org/tumbleweed/repo/oss/                  | 
 6 | openSUSE-20240222-0                  | openSUSE-20240222-0                    | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/oss/                   | 
 7 | repo-debug                           | openSUSE-Tumbleweed-Debug              | No      | ----      | ----    | -    |   99     | N/A    | http://download.opensuse.org/debug/tumbleweed/repo/oss/             | 
 8 | repo-openh264                        | Open H.264 Codec (openSUSE Tumbleweed) | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed             | 
 9 | repo-source                          | openSUSE-Tumbleweed-Source             | No      | ----      | ----    | -    |   99     | N/A    | http://download.opensuse.org/source/tumbleweed/repo/oss/            | 
10 | vivaldi                              | vivaldi                                | Yes     | (r ) Yes  | Yes     | -    |   99     | rpm-md | https://repo.vivaldi.com/archive/rpm/x86_64                         | 
~> 

Not sure how repos 5 an 6 made it into the list. Looking in the www for software by what it does not by name I might have installed something from https://software.opensuse.org in the past. Not sure if that has this consequence. Not sure, if the Factory repo is offered during the initial installation among others. I had to compile a canon printer driver in the past, because canon does not offer anything for opensuse. That is, how repo 7 and 8 made it into the list.

Can zypper be asked to list the software installed from one particular repo? (… and if so, how? :wink:

Best,

As repo 2, 5 and 6 have the same URL, simply remove repo 5 and 6.
sudo zypper rr 5 6

@hui Did this, did a distribution update, did a reboot, but, e.g., scanimage and simple-scan binaries did not change nor the part of the OS that these stumble upon, so I still get

~> scanimage -L
Segmentation fault         (core dumped) scanimage -L
~> scanimage --version
scanimage (sane-backends) 1.2.1; backend version 1.2.1
~> simple-scan 
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
Segmentation fault         (core dumped) simple-scan
~> simple-scan --version
simple-scan 49.0.1
~> 

Best,

Let’s start with scanimage. Show results from zypper se -si sane

You could disable the HPLIP “hpaio” backend temporarily to see if it is causing and issue…

cd /usr/lib64/sane
sudo mv libsane-hpaio.so.1.0.0 libsane-hpaio.so.1.0.0.disabled
sudo mv libsane-hpaio.so.1 libsane-hpaio.so.1.disabled

then run scanimage -L again to see whether it still segfaults.

You can restore the backend after testing with

cd /usr/lib64/sane
sudo mv libsane-hpaio.so.1.disabled libsane-hpaio.so.1
sudo mv libsane-hpaio.so.1.0.0.disabled libsane-hpaio.so.1.0.0

For a deeper dive you could use the “gdb” (debugger utility). Install the debugging packages with
sudo zypper install gdb sane-backends-debuginfo
then start it…
gdb --args scanimage -L
At the (gdb) prompt type run and when prompted Enable debuginfod for this session? (y or [n]) type y.

If the program crashes, gdb stops automatically and prints a message. You can then type bt (backtrace) to see what led to the crash. Type quit to finish.

@deano_ferrari Thanks for diving into this!

Here is the sane info from zypper:

~> zypper se -si sane
Loading repository data...
Reading installed packages...

S  | Name                     | Type    | Version    | Arch   | Repository
---+--------------------------+---------+------------+--------+----------------------
i  | hplip-sane               | package | 3.25.6-2.1 | x86_64 | Main Repository (OSS)
i+ | libsane1                 | package | 1.3.1-3.2  | x86_64 | Main Repository (OSS)
i+ | sane-backends            | package | 1.3.1-3.2  | x86_64 | Main Repository (OSS)
i+ | sane-backends-autoconfig | package | 1.3.1-3.2  | noarch | Main Repository (OSS)

Getting the hpaio-libraries out of sight did not change the behaviour of scanimage: segmentation fault.

gdb was installed, and sane-backends-debuginfo was not found by zypper, but during startup gdb started downloading debug info automatically.

And here is the gdb output at the segmentation fault (left out the gdb start up for brevity):

Thread 1 "scanimage" received signal SIGSEGV, Segmentation fault.
Downloading 2.53 K source file /usr/src/debug/glibc-2.42/libio/iofgets.c
0x00007ffff7c84893 in _IO_fgets (buf=buf@entry=0x7fffffffb030 "", n=n@entry=128, fp=fp@entry=0x0) at iofgets.c:47                                                                                          
47	  _IO_acquire_lock (fp);
(gdb) bt
#0  0x00007ffff7c84893 in _IO_fgets (buf=buf@entry=0x7fffffffb030 "", n=n@entry=128, fp=fp@entry=0x0) at iofgets.c:47
#1  0x00007ffff760c2b6 in fgets (__stream=0x0, __n=128, __s=0x7fffffffb030 "") at /usr/include/x86_64-linux-gnu/bits/stdio2.h:263
#2  sane_hpgt2500_init (version_code=<optimized out>, authorize=<optimized out>) at canopus.c:618
#3  0x00007ffff7f8b1f1 in init (be=be@entry=0x555555565400) at /usr/src/debug/backends-1.3.1/backend/dll.c:653
#4  0x00007ffff7f8bce5 in sane_dll_get_devices (device_list=device_list@entry=0x7fffffffb238, local_only=local_only@entry=0) at /usr/src/debug/backends-1.3.1/backend/dll.c:1095
#5  0x00007ffff7f8bdf5 in sane_get_devices (dl=dl@entry=0x7fffffffb238, local=local@entry=0) at /usr/src/debug/backends-1.3.1/backend/dll-s.c:21
#6  0x0000555555557776 in main (argc=2, argv=0x7fffffffdaf8) at /usr/src/debug/backends-1.3.1/frontend/scanimage.c:2238
(gdb) quit

I am out of bounds here. Not sure what to make of it.

Best,

The sane_hpgt2500 calls fgets with the NULL pointer to FILE. This is a bug in the backend that is being loaded.

A bug report needs to be submitted for this one.

As a temporary workaround you could identify the relevant backend files in /usr/lib64/sane/ and rename them

sudo mv /usr/lib64/sane/libsane-hpgt2500.so.1 /usr/lib64/sane/libsane-hpgt2500.so.1.disabled
sudo mv /usr/lib64/sane/libsane-hpgt2500.so.1.2.1 /usr/lib64/sane/libsane-hpgt2500.so.1.2.1.disabled
sudo ldconfig

then test scanimage again see if there are any other issues present.

Another option my be to try setting the SANE_DEFAULT_DEVICE environment variable and call the application eg
SANE_DEFAULT_DEVICE=hpaio:/usb/HP_ScanJet_2600 scanimage > test.pnm

For the records: Bug submitted.
https://bugzilla.opensuse.org/show_bug.cgi?id=1252295

1 Like