[sane-devel] saned problems with 1.0.10-pre3 (incl. segfault)

Henning Meier-Geinitz henning@meier-geinitz.de
Wed, 29 Jan 2003 18:48:20 +0100


Hi,

On Tue, Jan 28, 2003 at 05:04:39PM -0800, Lee Howard wrote:
> >Looks like it happens in sane_open. Please Try setting "export
> >SANE_DEBUG_PLUSTEK=255" also
> 
> Here you go...
> 
> [saned] main: starting debug mode (level 128)
[...]
> [saned] process_request: got request 2
> [dll] load: searching backend `plustek' in `/usr/lib/sane'
> [dll] load: trying to load `/usr/lib/sane/libsane-plustek.so.1'
> [dll] load: dlopen()ing `/usr/lib/sane/libsane-plustek.so.1'
> [dll] init: initializing backend `plustek'
> [sanei_debug] Setting debug level of plustek to 255.
> [plustek] Plustek backend V0.45-3, part of sane-backends 1.0.10-pre3
[...]
> [plustek] open failed: -1
> [dll] init: backend `plustek' is version 1.0.0
> [plustek] sane_get_devices (0xbffff7a8, 1)
> [dll] load: searching backend `net' in `/usr/lib/sane'
> [dll] load: trying to load `/usr/lib/sane/libsane-net.so.1'
> [dll] load: dlopen()ing `/usr/lib/sane/libsane-net.so.1'
> [dll] init: initializing backend `net'
> [dll] init: backend `net' is version 1.0.10
> Segmentation fault (core dumped)

I was wrong. The bug not in plustek or any other backend. It's a bug
in saned. Thanks for mentioning, this is a rather grave bug. It's
fixed in CVS. I'll write a separate announcement on this list about
the details.

> Program received signal SIGSEGV, Segmentation fault.
> 0x0804ada3 in strcpy () at strcpy:-1
> -1	strcpy: No such file or directory.
> 	in strcpy
> (gdb) bt
> #0  0x0804ada3 in strcpy () at strcpy:-1
> #1  0x08050a80 in _IO_stdin_used ()
> #2  0x0804b7d2 in strcpy () at strcpy:-1
> #3  0x4009f657 in __libc_start_main (main=0x804b420 <strcpy+7224>, 
> argc=2, ubp_av=0xbffff994,     init=0x80492e0 <_init>, fini=0x804e8f0 
> <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>,     stack_end=0xbffff98c) at 
> ../sysdeps/generic/libc-start.c:129

For some reason the gdb output is rather misleading here. 

> Remember that
>   1) the permissions on the server prohibit saned from access, and

It happens alway when no scanner is found. Try to unplug your scanner,
you'll get the same result.

>   2) the client executes 'scanimage --help -d "net:192.168.0.1"

Results in empty resource name -> bang.

Bye,
  Henning