Package Details: ricoh-sp150su-sane 1.0.22-2

Git Clone URL: https://aur.archlinux.org/ricoh-sp150su-sane.git (read-only, click to copy)
Package Base: ricoh-sp150su-sane
Description: SANE driver for Ricoh SP150SU series
Upstream URL: http://support.ricoh.com/bb/html/dr_ut_e/re1/model/sp150su/sp150su.htm
Licenses: custom
Submitter: aineko
Maintainer: aineko
Last Packager: aineko
Votes: 1
Popularity: 0.000000
First Submitted: 2018-12-23 15:34 (UTC)
Last Updated: 2025-02-08 22:24 (UTC)

Latest Comments

aineko commented on 2025-02-08 22:27 (UTC)

Thank you for sharing your debugging details paussnic!

I have patched away the getifaddrs() call in libsane-alto.so so the package works out of the box without the need for LD_PRELOAD.

paussnic commented on 2025-02-05 13:39 (UTC)

After some investigation using GDB to attach scanimage -L, it appears that libsane-alto.so segfaults when processing the result of getifaddrs() for certain interfaces. In my case, it crashes when I enable my TUN VPN.

libsane-alto calls getifaddrs() for some SNMP-related operations, as seen in the backtrace above, but we don't actually need it for using the scanner.

To work around this issue, I created a dummy shared library, no_getifaddrs.so (source bellow), that always returns an EACCES error when getifaddrs() is called. I then preload this library using LD_PRELOAD when running my scanner program (simple-scan), and it works perfectly.

#include <sys/types.h>
#include <ifaddrs.h>
#include <errno.h>

int getifaddrs(struct ifaddrs **ifap)
{
    errno = EACCES;
    return -1;
}

dreieck commented on 2023-09-15 11:12 (UTC)

Currently, having this package installed results in a Segmentation Fault of xsane.

gdb xsane, (gdb) run:

[...]
Thread 1 "xsane" received signal SIGSEGV, Segmentation fault.
0x00007fffcf81297b in NET_FindSnmpAgent () from /usr/lib/sane/libsane-alto.so.1

/usr/lib/sane/libsane-alto.so.1 belongs to the package ricoh-sp150su-sane.

A (gdb) bt (with partially available debugging symbols via debuginfod):

#0  0x00007fffd901297b in NET_FindSnmpAgent () at /usr/lib/sane/libsane-alto.so.1
#1  0x00007fffd9013067 in sane_alto_init () at /usr/lib/sane/libsane-alto.so.1
#2  0x00007ffff7f66910 in  () at /usr/lib/libsane.so.1
#3  0x00007ffff7f674b0 in sane_dll_get_devices () at /usr/lib/libsane.so.1
#4  0x00005555555befd7 in  ()
#5  0x000055555556e3de in  ()
#6  0x00007ffff7227cd0 in __libc_start_call_main (main=main@entry=0x55555556e0c0, argc=argc@entry=1, argv=argv@entry=0x7fffffffd998)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#7  0x00007ffff7227d8a in __libc_start_main_impl
    (main=0x55555556e0c0, argc=1, argv=0x7fffffffd998, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd988)
    at ../csu/libc-start.c:360
#8  0x000055555556e575 in  ()

Removing the package ricoh-sp150su-sane solves the xsane crash.

Regards!