Re: [PARPORT] lp locks with three devs on parport


Tim Waugh (tim@cyberelk.demon.co.uk)
Sun, 12 Jul 1998 17:57:20 +0100 (BST)


Okay, I've now managed to reproduce this.

I'm using my user-space parport driver to simulate the third device
(module can be found on www.cyberelk.demon.co.uk). I run a program from
user-space that claims the port, waits 250ms, releases the port and
immediately starts again.

I started to print something. It just worked. While that was happening,
I loaded the ppa module.

Mounting the Zip disk worked. Copying a large file from it to /dev/null
worked. Meanwhile, the print-job finished.

I start another one going, and copied all of the files on the Zip disk to
/dev/null. I've now managed to get the user-space program to stop, and
it's in D-state.

"ps l" reveals little: it says that WCHAN is zero for every process
running(!).

/proc/parport/0/devices showed this:
 lp
 ppa
 ppuser0

...until lp got bored and went away, at which point it became
 ppa
 ppuser0

So, the conclusion is that some race condition is causing a deadlock. It
looks to me like the port's waiting list "loses" someone, or the device's
"waiting" flags get corrupted somehow (lose bit 1?).

Ideas, anyone?

Tim.
*/

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:57 EST