[sane-devel] HP-Backend asks for a Password (Probably a Bug)

Henning Meier-Geinitz henning@meier-geinitz.de
Tue, 23 Jul 2002 20:48:46 +0200


On Tue, Jul 23, 2002 at 12:14:45AM +0200, Konstantin Seiler wrote:
> > To find out more about the problem, could you please send us the output
> > of
> > SANE_DEBUG_SANEI_WIRE=255 SANE_DEBUG_NET=255 scanimage --help

Ok, lets have a look:

[net] sane_control_option: option 19, action 0
[net] sane_control_option: remote control option

We try to read the value of option 19.

[sanei_wire] sanei_w_set_dir: wire 3, new direction WIRE_DECODE
[sanei_wire] sanei_w_status: wire 3
[sanei_wire] sanei_w_word: wire 3
[sanei_wire] sanei_w_space: 4 bytes for wire 3
[sanei_wire] sanei_w_space: free buffer size is 0
[sanei_wire] sanei_w_space: DECODE: receiving data
[sanei_wire] sanei_w_space: DECODE: no data received (13)

That should be the answer from the saned on the other side of the
wire. But it doesn't send data. It's probably dead. IIRC, error 13 is
permission denied. I would expect broken pipe after a read, however.

> > It may be worth a try to run saned on the server in debug mode:
> > Disable it in inetd (or xinetd) and start it like this:
> > SANE_DEBUG_HP=255 saned -d255
> You will find the output in sanedebug2.txt.gz. The segfault occures at the 
> same time the client asks for the password. So the server istn's running 
> anymore when I have to enter the password.

That's what I guessed. So the interesting thin is, what happens when
reading option 19:

[saned] process_request: got request 5
[hp] sane_control_option called
[hp] scsi_inquire: sending INQUIRE
[hp] scsi_new: sending TEST_UNIT_READY
[hp] sanei_hp_optset_control: lamp-off

Option 19 seems to be LAMP_OFF.

Without further knowledge of the HP backend I can't find out what's
the real problem. But on first sight, it looks like a hp backend bug
in or around sanei_hp_optset_control. Sometimes such bugs only occur
with saned because of timing issues.

If you want to do more research, you could add some more DBG lines in
the function sanei_hp_optset_control in backend/hp-option.c to locate
the excat point of the segfault. Maybe you can even run saned in gdb
(I don't remeber if I ever tried).

Maybe the maintainer of the HP backend,  Peter Kirchgessner, has an
idea what's going on?

At least we can be pretty sure that the problem is on the server.