Hi, On Sun, Dec 11, 2005 at 12:09:54AM +0100, Julien BLACHE wrote: > The fact that this code (net and saned) has not been touched in a > little less than 3 years really bothers me (and even more so that I > know this code very well and rewrote part of it); it's considered > stable by now. Either this bug is an heisenbug, or it's specific to > your machine ...
At least on first sight it looks like stack corruption for me. I would have thought that this is again an xsane problem, but xsane seems to have the fixed version. Testing with scanimage and other frontends may help to exclude this cause. Running saned -d may lead to different behaviour because the original error may not happen (e.g. because saned -d runs as root while from (x)inetd its ran as user "saned" or "scanner" or whatever). Let's have a look on the trace: I can understand this part: #8 0x4115f524 in sanei_w_string () from /usr/lib/sane/libsane-net.so.1 #9 0x4115f9c6 in sanei_w_device () from /usr/lib/sane/libsane-net.so.1 #10 0x4115f385 in sanei_w_ptr () from /usr/lib/sane/libsane-net.so.1 #11 0x4115fa5d in sanei_w_device_ptr () from /usr/lib/sane/libsane-net.so.1 #12 0x4115f1db in sanei_w_array () from /usr/lib/sane/libsane-net.so.1 #13 0x4115e838 in sanei_w_get_devices_reply () from /usr/lib/sane/libsane-net.so.1 #14 0x41160117 in sanei_w_free () from /usr/lib/sane/libsane-net.so.1 #15 0x4115c232 in sane_net_get_devices () from /usr/lib/sane/libsane-net.so.1 #16 0x40036c89 in sane_dll_get_devices () from /usr/lib/libsane.so.1 #17 0x40037070 in sane_get_devices () from /usr/lib/libsane.so.1 #18 0x080a9c04 in ?? () #19 0x080c58e4 in optind () #20 0x00000000 in ?? () Xsane runs sane_get_devices and that calls the same function in the net backend. The net backend gets an error status from the remote server (for whatever reason) and tries to free the device list. #8 tries to free one of the strings e.g. sane_device.name. Now *w->codec.w_string should be called (sanei_wire.c, 350). However this happens instead: #5 0x40746d61 in free () from /lib/libc.so.6 #6 0x4115f0bd in sanei_w_array () from /usr/lib/sane/libsane-net.so.1 #7 0x4115e5f2 in sanei_config_read () from /usr/lib/sane/libsane-net.so.1 Either gdb is confused somehow, or sanei_config_read is called mistakenly (or I miss something). I remember similar problems when the sanei_net/sanei_codec* code between xscanimage and sane-backends ran out of sync. However xsane doesn't seem to use sanei at all. Bye, Henning -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]