[sane-devel] Re: scanimage seg fault doing network scanning!

Henning Meier-Geinitz henning at meier-geinitz.de
Sat Aug 13 10:16:02 UTC 2005


On Wed, Aug 10, 2005 at 10:41:45AM +0200, Per Arnold Blåsmo wrote:
> Thats correct, but the CD that comes with the scanner has backend for
> Linux. It uses Samsungs MFP driver, but I dont think that they are
> necessary.

Ah, ok. Can you please send the ouput of sane-find-scanner?

> A least it tries to install 2 kernel modules for something
> called 'mfpport' and 'mfpportprobe'. The problem is that my kernel is
> not supported in the install package, and the source code is not
> available for this modules.

Maybe these are for parallel port access?

> OK, I tried something like that and discovered that it worked when I ran
> saned in debug mode from the command line on the server.
> So I found that from xinetd config file that I ran saned as user 'saned'
> and that the problem was access right to the device.

Ah, ok. Still the net backend on the client shouldn't crash. I'll
check what's wrong there.

> scanimage does not work OK over the network.

all the frontends use the same net backend so the networking code is
identical. The only thing that may be different is timing. So some
bugs in backends may only be visible with scanimage.

> > [net] sane_read: handle=0x80a6980, data=0xbffd3b30, max_length=32768, length=0xbffdcb60
> > [net] sane_read: reading paket length
> > [net] sane_read: read 4 bytes, 0 from 4 total
> > [net] sane_read: next record length=-1 bytes
> > [net] sane_read: received error signal
> > [net] sane_read: error code Error during device I/O

I think saned on the server got "error during device i/o" from the
backend and sends that error to the net backend. You can confirm this
when you enable debugging on the server.

> This is the output running scanimage locally on the server:

> > SANE_DEBUG_NET=255 scanimage >test.pnm

This doesn't make much sense because the net backend is not used if
you scan directly on the server. You must enable debugging of the real
backend. I have no idea how that works. Is there a manual page for the

> > scanimage: WARNING: read more data than announced by backend (26083328/26071038)[net] sane_exit: exiting

This is a severe backend bug.

> As you can see the image is scanned with a warning when running locally
> bit exits with an I/O error when scanned via the network.

I don't think that these two problems are connected.

> Also when scanning locally you can see the attempt to do an insmod of
> the kernel modules. I dont think that those kernel modules are necessary
> and that they do not have anything to do with the error.

Probably you are right but only the author of the backend can tell.

> I can use xsane or kooka, but I would prefer to use scanimage since I
> want to make a script to do the scanning "automatically" and produce a
> pdf file (using convert) of the documents. The documents are testreports
>   with several pages from a production line and therefore I want does in
> PDF for archiving.
> So any idea about what is wrong with scanimage?

Most probably nothing. I think that this is a backend bug.
You could try to use the test backend just to make sure that nothing
is wrong with the net backend, scanimage and saned:

$ scanimage -d net:server-address:test --test

> Trying to use scanadf segfaults both locally and via network.

At least locally the crash is probably in the backend. You may try to
look more closely at the crash with gdb.

So I think the core of the problem is somewhere in the backend and you
should contact the backend author.


More information about the sane-devel mailing list