simple-scan seg faults if you unplug scanner and try to scan again

Bug #702167 reported by Kit Westneat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Simple Scan
New
Undecided
Unassigned

Bug Description

I'm running Ubuntu 10.10 and simple-scan 2.32.0 and I ran into a reproducible issue where if I scan something then unplug the scanner and try scanning again, the program segfaults. I got a core file, which I can put online somewhere if that would be useful. Here's the backtrace from the core:

Core was generated by `simple-scan'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007fc8edc54212 in sanei_usb_open () from /usr/lib/sane/libsane-plustek.so.1
(gdb) bt
#0 0x00007fc8edc54212 in sanei_usb_open () from /usr/lib/sane/libsane-plustek.so.1
#1 0x00007fc8edc6593a in ?? () from /usr/lib/sane/libsane-plustek.so.1
#2 0x00007fc8edc6a974 in ?? () from /usr/lib/sane/libsane-plustek.so.1
#3 0x00007fc8edc6ba4e in sane_plustek_start () from /usr/lib/sane/libsane-plustek.so.1
#4 0x000000000041526a in ?? ()
#5 0x00007fc900bb17e4 in ?? () from /lib/libglib-2.0.so.0
#6 0x00007fc9029c5971 in start_thread () from /lib/libpthread.so.0
#7 0x00007fc90047f92d in clone () from /lib/libc.so.6
#8 0x0000000000000000 in ?? ()

Sometimes I have to hit the scan button many times to get it to crash, but it seems pretty consistent. Here's another backtrace, slightly different:

Program terminated with signal 11, Segmentation fault.
#0 0x00007f47e82fa7aa in vfprintf () from /lib/libc.so.6
(gdb) bt
#0 0x00007f47e82fa7aa in vfprintf () from /lib/libc.so.6
#1 0x00007f47e83aea80 in __vsnprintf_chk () from /lib/libc.so.6
#2 0x00007f47e83ae9ba in __snprintf_chk () from /lib/libc.so.6
#3 0x00007f47dcac7c90 in ?? () from /lib/libusb-0.1.so.4
#4 0x00007f47dcac7d6d in usb_os_open () from /lib/libusb-0.1.so.4
#5 0x00007f47dcac5af5 in usb_open () from /lib/libusb-0.1.so.4
#6 0x00007f47d96f41cf in sanei_usb_open () from /usr/lib/sane/libsane-plustek.so.1
#7 0x00007f47d970593a in ?? () from /usr/lib/sane/libsane-plustek.so.1
#8 0x00007f47d970a974 in ?? () from /usr/lib/sane/libsane-plustek.so.1
#9 0x00007f47d970ba4e in sane_plustek_start () from /usr/lib/sane/libsane-plustek.so.1
#10 0x000000000041526a in ?? ()
#11 0x00007f47e8ac97e4 in ?? () from /lib/libglib-2.0.so.0
#12 0x00007f47ea8dd971 in start_thread () from /lib/libpthread.so.0
#13 0x00007f47e839792d in clone () from /lib/libc.so.6
#14 0x0000000000000000 in ?? ()

So maybe another thread is modifying data that sanei_usb_open is working on? I managed to get a debug log, so I'll attach that as well.

Thanks,
Kit

Revision history for this message
Kit Westneat (kit-westneat) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

The log shows it is the driver crashing. I am working on separating the driver code from the UI code so in the future these problems will not cause simple scan to crash.

Revision history for this message
Michael Nagel (nailor) wrote :

Robert is talking about Bug #564357
To get the crash fixed, your best bet is to get in contact with the sane-backend developers via http://www.sane-project.org/mailing-lists.html

I am closing this Bug Report, because we cannot do much about this in Simple Scan itself -- except for getting a process boundary between us and the driver, and that is what Bug #564357 is already about.

Best Regards
Michael

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.