kopia lustrzana https://gitlab.com/sane-project/website
208 wiersze
7.2 KiB
HTML
208 wiersze
7.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>sane-devel: Re: always Segmentation Fault</TITLE>
|
|
<META NAME="Author" CONTENT="abel deuring (adeuring@gmx.net)">
|
|
<META NAME="Subject" CONTENT="Re: always Segmentation Fault">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: always Segmentation Fault</H1>
|
|
<!-- received="Sun Feb 25 05:34:52 2001" -->
|
|
<!-- isoreceived="20010225133452" -->
|
|
<!-- sent="Sun, 25 Feb 2001 14:57:43 +0100" -->
|
|
<!-- isosent="20010225135743" -->
|
|
<!-- name="abel deuring" -->
|
|
<!-- email="adeuring@gmx.net" -->
|
|
<!-- subject="Re: always Segmentation Fault" -->
|
|
<!-- id="3A990F57.DAF9D600@gmx.net" -->
|
|
<!-- inreplyto="01022302483402.00354@gen" -->
|
|
<STRONG>From:</STRONG> abel deuring (<A HREF="mailto:adeuring@gmx.net?Subject=Re:%20always%20Segmentation%20Fault&In-Reply-To=<3A990F57.DAF9D600@gmx.net>"><EM>adeuring@gmx.net</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Sun Feb 25 2001 - 05:57:43 PST
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0215.html">Peter Kirchgessner: "Re: HP 5100C and SANE"</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0213.html">Shea Martin: "Re: Snapscan problem"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0197.html">Christoph H.: "always Segmentation Fault"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0218.html">Christoph H.: "Re: always Segmentation Fault"</A>
|
|
<LI><STRONG>Reply:</STRONG> <A HREF="0218.html">Christoph H.: "Re: always Segmentation Fault"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#214">[ date ]</A>
|
|
<A HREF="index.html#214">[ thread ]</A>
|
|
<A HREF="subject.html#214">[ subject ]</A>
|
|
<A HREF="author.html#214">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
"Christoph H." wrote:
|
|
<BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> Hi!
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> A few month ago I changed my system from Slackware 7 to Debian 2.2.
|
|
</EM><BR>
|
|
<EM>> Under Slackware I used my Mustek ScanExpress 12000 SP without problems, but
|
|
</EM><BR>
|
|
<EM>> now (under Debian) I always get a Segmentation Fault error with any of the programs included
|
|
</EM><BR>
|
|
<EM>> in the sane-package, if they try to access the scanner device /dev/sg2.
|
|
</EM><BR>
|
|
<EM>> Nothing was changed of the hardware configuration!
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> My configuration:
|
|
</EM><BR>
|
|
<EM>> - SCSI-adapter: AHA-2940U PCI
|
|
</EM><BR>
|
|
<EM>> - Scanner: Mustek 12000-SP
|
|
</EM><BR>
|
|
<EM>> - Linux: Debian 2.2 Potato
|
|
</EM><BR>
|
|
<EM>> - Kernel: 2.2.17 (self-compiled with support for generic SCSI devices (32k buffer))
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> I tried it with:
|
|
</EM><BR>
|
|
<EM>> - Sane 1.0.1 (included in Debian 2.2)
|
|
</EM><BR>
|
|
<EM>> - Sane 1.0.3 (self-compiled)
|
|
</EM><BR>
|
|
<EM>> - Sane 1.0.4 (self-compiled)
|
|
</EM><BR>
|
|
<EM>> --> always the same: Segmentation fault
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> I don't know what to do, please help me.
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> Perhaps the strace-output of scanimage can help you to give me a hint how to solve the problem:
|
|
</EM><BR>
|
|
<EM>> (I think it has something to do with the "inappropriate ioctl for device"-error at the end of the output)
|
|
</EM><BR>
|
|
<P>Christoph,
|
|
<BR>
|
|
<P>This is probably caused by sanei_scsi_open_extended. This function uses
|
|
<BR>
|
|
some ioctl calls to detect the version of the SG driver. If the "get
|
|
<BR>
|
|
version" ioctl fails, Sane assumes that the oldest SG driver is
|
|
<BR>
|
|
installed.
|
|
<BR>
|
|
<P><EM>>
|
|
</EM><BR>
|
|
<EM>> ------------------------------
|
|
</EM><BR>
|
|
<EM>> # strace /usr/local/bin/scanimage
|
|
</EM><BR>
|
|
[...]
|
|
<BR>
|
|
<EM>> open("/dev/sg2", O_RDWR) = 6
|
|
</EM><BR>
|
|
<EM>> close(6) = 0
|
|
</EM><BR>
|
|
<EM>> open("/proc/sys/kernel/sg-big-buff", O_RDONLY) = 6
|
|
</EM><BR>
|
|
<EM>> read(6, "32768\n", 31) = 6
|
|
</EM><BR>
|
|
<EM>> close(6) = 0
|
|
</EM><BR>
|
|
<EM>> open("/dev/sg2", O_RDWR|O_EXCL) = 6
|
|
</EM><BR>
|
|
<EM>> ioctl(6, TIOCSCCINI, 0xbfffca88) = -1 ENOTTY (Inappropriate ioctl for device)
|
|
</EM><BR>
|
|
<EM>> ioctl(6, TIOCGKISS, 0x40169c60) = -1 ENOTTY (Inappropriate ioctl for device)
|
|
</EM><BR>
|
|
<EM>> brk(0x8054000) = 0x8054000
|
|
</EM><BR>
|
|
<EM>> rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
|
|
</EM><BR>
|
|
<EM>> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
|
|
</EM><BR>
|
|
<EM>> rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
|
|
</EM><BR>
|
|
<EM>> write(6, "*\0\0\0\204\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 42) = 42
|
|
</EM><BR>
|
|
<EM>> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
|
|
</EM><BR>
|
|
<EM>> select(7, [6], NULL, NULL, NULL) = 1 (in [6])
|
|
</EM><BR>
|
|
<EM>> rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
|
|
</EM><BR>
|
|
<EM>> read(6, "", 132) = 0
|
|
</EM><BR>
|
|
<P>The return value 0 for the read call is weird. A read call to the SG
|
|
<BR>
|
|
driver should return at least sizeof(sg_header) bytes.
|
|
<BR>
|
|
<P><EM>> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
|
|
</EM><BR>
|
|
<EM>> --- SIGSEGV (Segmentation fault) ---
|
|
</EM><BR>
|
|
<EM>> +++ killed by SIGSEGV +++
|
|
</EM><BR>
|
|
<P>The segfault below is probably caused by:
|
|
<BR>
|
|
<P> nread = read (req->fd, &req->sgdata.cdb,
|
|
<BR>
|
|
req->sgdata.cdb.hdr.reply_len);
|
|
<BR>
|
|
[...]
|
|
<BR>
|
|
nread -= sizeof (req->sgdata.cdb.hdr);
|
|
<BR>
|
|
[...]
|
|
<BR>
|
|
memcpy (req->dst, req->sgdata.cdb.data, nread);
|
|
<BR>
|
|
<P>in sanei_scsi_req_wait.
|
|
<BR>
|
|
<P>I'd recommend to install a more recent version of the SG driver.
|
|
<BR>
|
|
<P>Abel
|
|
<BR>
|
|
<P><PRE>
|
|
--
|
|
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
|
|
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20always%20Segmentation%20Fault&In-Reply-To=<3A990F57.DAF9D600@gmx.net>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0215.html">Peter Kirchgessner: "Re: HP 5100C and SANE"</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0213.html">Shea Martin: "Re: Snapscan problem"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0197.html">Christoph H.: "always Segmentation Fault"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0218.html">Christoph H.: "Re: always Segmentation Fault"</A>
|
|
<LI><STRONG>Reply:</STRONG> <A HREF="0218.html">Christoph H.: "Re: always Segmentation Fault"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#214">[ date ]</A>
|
|
<A HREF="index.html#214">[ thread ]</A>
|
|
<A HREF="subject.html#214">[ subject ]</A>
|
|
<A HREF="author.html#214">[ author ]</A>
|
|
</UL>
|
|
<!-- trailer="footer" -->
|
|
<HR NOSHADE>
|
|
<P>
|
|
<SMALL>
|
|
<EM>
|
|
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
|
: <EM>Sun Feb 25 2001 - 05:39:25 PST</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|