RE: saned: process_request: received unexpected procedure number 0

Dr. Detlev Reymann (D.Reymann@geisenheim.mnd.fh-wiesbaden.de)
Wed, 19 May 1999 21:25:17 +0200

Hi,
thanks for the respones to my first mail.

>
> Detlev, try taking saned out of inetd.conf and running it as a standalone
> server using 'saned -d'. I bet it works fine that way.
>

I tried this suggestion but without any succes. The problem is still the same.
Perhaps som more debugging info is usefull.
I tried to catch some information with strace:
The result on the server-box and on the client-box follows (is somebody able to
explain the strace-output? I only got a rough idea what is happening)

on my linux-machine there are two processes named saned
the end of the output of the first goes like this:
strace -p270:

select(11, [1 9], [10], NULL, NULL) = 2 (in [9], out
[10])
write(10, "9{bA", 4) = 4
select(11, [1 9], [10], NULL, NULL) = 2 (in [9], out
[10])
alarm(300) = 300
select(11, [1 9], [10], NULL, NULL) = 2 (in [9], out
[10])
write(10, "\216A7\207", 4) = 4
select(11, [1 9], [10], NULL, NULL) = 2 (in [9], out
[10])
read(9, "\26\35#,# \35\31\26\26\31(\26\26"..., 7617) =
4096
--- SIGCHLD (Child exited) ---
read(9, "\26\26\35%#%\26\26\26\26\31\35/:"..., 3521) =
3521
close(9) = 0
alarm(300) = 300
select(11, [1 9], [10], NULL, NULL) = -1 EBADF (Bad
file descriptor)
select(11, [1], [10], NULL, NULL) = 1 (out [10])
write(10, "N9\215C1vdH\207E/}H5\217p5|<3\220"..., 4780) =
4780
select(11, [1], [10], NULL, NULL) = 1 (out [10])
write(10, "\301\26\35\35(%#(,,#,#\31# \31# "..., 2846) =
2846
close(10) = 0
alarm(300) = 300
read(1, "\0\0\0\3\0\0\0\0", 8192) = 8
sigprocmask(SIG_BLOCK, ~[], []) = 0
sigprocmask(SIG_SETMASK, [], NULL) = 0
sigprocmask(SIG_BLOCK, ~[], []) = 0
write(8, "*\0\0\0$\0\0\0\22\0\0\0\0\0\0\0\0"..., 42) = 42
sigprocmask(SIG_SETMASK, [], NULL) = 0
select(9, [8], NULL, NULL, NULL) = 1 (in [8])
sigprocmask(SIG_BLOCK, ~[], []) = 0
read(8, "$\0\0\0$\0\0\0\22\0\0\0\0\0\0\0\0"..., 36) = 36
sigprocmask(SIG_SETMASK, [], NULL) = 0
sigprocmask(SIG_BLOCK, ~[], []) = 0
sigprocmask(SIG_SETMASK, [], NULL) = 0
close(8) = 0
close(6) = 0
write(1, "\0\0\0\0", 4) = 4
alarm(300) = 240
read(1, "\0\0\0\n", 8192) = 4
munmap(0x4011c000, 62912) = 0
munmap(0x40013000, 29988) = 0
time([927064597]) = 927064597
getpid() = 270
sigaction(SIGPIPE, {0x400dc350, [], SA_NOMASK|0x13034},
{0x8049690, [], SA_STACK
|0x50d70}) = 0
send(3, "<30>May 18 23:56:37 saned[270]: "..., 41, 0) = 41
sigaction(SIGPIPE, {0x8049690, [], SA_NOMASK|0x13054},
NULL) = 0
close(3) = 0
_exit(0)

the output of the second process like this:
strace -p274

sigprocmask(SIG_BLOCK, ~[], []) = 0
sigprocmask(SIG_SETMASK, [], NULL) = 0
sigprocmask(SIG_BLOCK, ~[], []) = 0
write(0, ".\0\0\0\345\35\0\0m\3\0\0\0\0\0\0"..., 46) = 46
sigprocmask(SIG_SETMASK, [], NULL) = 0
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
sigprocmask(SIG_BLOCK, ~[], []) = 0
read(0, "\345\35\0\0\345\35\0\0m\3\0\0\0\0"..., 7653) =
7653
sigprocmask(SIG_SETMASK, [], NULL) = 0
sigprocmask(SIG_BLOCK, ~[], []) = 0
sigprocmask(SIG_SETMASK, [], NULL) = 0
write(1, "\26\35#,# \35\31\26\26\31(\26\26"..., 7617) =
7617
_exit(0)

If I try to get some info with strace on the client-
machine after I started scanimage I get:
strace -pPIDofSCANIMAGE:

read(5, "", 32768) = 0
read(5, "", 32768) = 0
read(5, "", 32768) = 0
read(5, "", 32768) = 0
read(5, "", 32768) = 0
read(5, "", 32768) = 0
read(5, 0xbfff770c, 32768) = -1 ENOTCONN
(Transport endpoint is not connected)
close(5) = 0
write(2, "scanimage: sane_read: Error duri"..., 46) = 46
write(4, "\0\0\0\3\0\0\0\0", 8) = 8
read(4, "\0\0\0\0", 8192) = 4
write(4, "\0\0\0\n", 4) = 4
close(4) = 0
munmap(0x40013000, 29988) = 0
write(1, "\21\35 #\26\31 \26% \26\26\31\26"..., 2299) =
2299
munmap(0x4001b000, 4096) = 0
_exit(0)

the related output on the console is:
test@client > scanimage > tmp.ppm
scanimage: sane_read: Error during device I/O
test@client >

**************************************************************
Wenn Sie mit PGP arbeiten, senden Sie mir doch bitte Ihren Key.
If you are using pgp, please send me your pgp-key.
**************************************************************

Prof. Dr. Detlev Reymann
FH Wiesbaden
Studienstandort Geisenheim
Fachbereich Gartenbau und Landespflege
von-Lade-Strasse 1
Tel. 06722-502732
Fax: 06722-502380
EMail: D.Reymann@geisenheim.fbl.fh-wiesbaden.de
Meine Webseite: http://www.mnd.fh-wiesbaden.de/~dreymann

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com