Bug 81332
Summary: | [crash] Sane doesn't work but crashes with canon scanner | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Kai Engert (:kaie) (inactive account) <kengert> | ||||
Component: | sane-backends | Assignee: | Tim Waugh <twaugh> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 8.0 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2003-01-09 12:23:20 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Kai Engert (:kaie) (inactive account)
2003-01-08 05:04:15 UTC
Stack trace please. $ gdb scanimage GNU gdb Red Hat Linux (5.2.1-4) (gdb) r Starting program: /usr/bin/scanimage Program received signal SIGSEGV, Segmentation fault. 0x402b89d2 in sanei_scsi_req_enter2 () from /usr/lib/sane/libsane-canon.so.1 (gdb) bt #0 0x402b89d2 in sanei_scsi_req_enter2 () from /usr/lib/sane/libsane-canon.so.1 #1 0x402b9630 in sanei_scsi_cmd2 () from /usr/lib/sane/libsane-canon.so.1 #2 0x402ada91 in get_scan_mode () from /usr/lib/sane/libsane-canon.so.1 #3 0x402b4edc in sane_canon_start () from /usr/lib/sane/libsane-canon.so.1 #4 0x40029c3f in sane_dll_start () from /usr/lib/libsane.so.1 #5 0x40029f4f in sane_start () from /usr/lib/libsane.so.1 #6 0x0804ae89 in scan_it () #7 0x0804c57d in main () #8 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6 Is it easily possible to build a binary RPM from a source RPM where the executables contain debug info? Make a .rpmrc containing: optflags: i386 -g and a .rpmmacros containing: %_topdir %(mkdir -p /tmp/{BUILD,RPMS/i386,SOURCES,SRPMS,SPECS}; echo "/tmp") %_srcrpmdir /tmp/SRPMS Then rpm -ivh the src.rpm and put this in the /tmp/SPECS/sane-backends.spec file: %define __spec_install_post /bin/true || : Then rpmbuild -bb /tmp/SPECS/sane-backends.spec. Created attachment 89228 [details]
Full stacktrace with local variables
Thanks for the explanation, I was able to build a debug RPM and I'm still able
to reproduce the bug. Attached is the output from "gdb - bt full". I tried
twice, both times it crashed with the same stack.
Can you set a breakpoint on sanei_scsi_open, called from sane_canon_start? That's where fd gets set, and it certainly shouldn't be -1. On return from sanei_scsi_open we hope that its return code was SANE_STATUS_GOOD and s->fd isn't -1, and we should be back in sane_start (or sane_canon_start, I think the function changed name. BTW which version of sane-backends did you recompile?). $ gdb scanimage (gdb) b sane_scsi_open (gdb) up (if it's in sane_canon_start:) (gdb) finish (gdb) p status (gdb) p s->fd Debugging was slightly more complicated, because of delayed shared module loading and function pointers, and even after libs are loaded and having set a breakpoint to sanei_scsi_open, it doesn't stop there. But I was able to do it manually by running until sane_start and manual stepping. On return from sanei_scsi_open, status is SANE_STATUS_GOOD. s->fd is 5. the call to do_focus(s) is what changes s->fd to -1 do_focus calls get_film_status, then sanei_scsi_cmd2 fails with return code 9 (IO_ERROR ?) do_focus then calls sanei_scsi_close and sets s->fd = -1 Fixed package is sane-backends-1.0.9-2, which will shortly appear in rawhide. Thanks for helping out. Thanks for providing the new package, I finally tried it. While it no longer crashes, I still have problems. scanimage does not iniate a scan, but bails out with: scanimage: sane_start: Invalid argument This is when not giving any parameters. scanimage --list-devices does find my scanner. Another thing that confuses me is that scanimage complains about command line options that worked before, and that are even mentioned in its own help output. For example, scanimage --help lists options --format, --verbose, --test, but when giving any of these options on the command line, it complains with messages like: scanimage: unrecognized option `--verbose' This newer version of sane seems to have more regressions when compared with the version shipped with RH 7.3 - I'm going back to that version again. Please let me know if I can be of further help. One issue per bug report please. Otherwise it can't be tracked. |