9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] file server dying on sleep???
@ 1998-10-24  6:16 James
  0 siblings, 0 replies; only message in thread
From: James @ 1998-10-24  6:16 UTC (permalink / raw)


Hey all,

Did some more debugging of my file server tonight. It appears that my file
server is hanging within sleep(). At least, that is as far as I could
trace it. I suppose it could just be that something isn't getting data
back down to sleep()... 

I don't know enough about OS layer programming yet to figure this out. I
took a guess, and tried fiddling with my wait states, but that didn't
help. I'm wondering if my CPU MHz not being detected properly by the
kernel is the problem? If so, I didn't see any patchs in the updates
dir that fixed clock speeds on P2 chips... :(

Details: 

A little while back, I found that if I set io.h's NTarget to 1, the system
could initalize the disk, but then I couldn't type anything at the prompt.

Looking within ncr53c8xx.c's io() call (which gets called by scsiprobe),
and devcons.c, I find that both call sleep while waiting for data. That
makes sense, but what doesn't is that the system never returns from
sleep in some cases.


in ncr53c8xx's io(), I stuck in some print statements:

	#ifdef FS
		print("Sleeping on %d/%d ... ", target, lun);
		sleep(d, done, d);
		print("done!\n");
	#endif

The system either prints out

	Sleeping on 0/0 ... done!
	D6.0.0.0: ready
	Sleeping on 1/0 ...
	
and hangs. Or else it prints:

	Sleeping on 0/0 ... done!
	D6.0.0.0: ready
	Sleeping on 1/0 ... done!
	Sleeping on 1/0 ...

and hangs. If I set NTarget to 1, I get past this point and to the prompt.
But I can't type anything at the prompt.  In devcons.c, in getc(),
I put in

	loop:
	print("sleep(&readq, reading, 0); ... ");
		sleep(&readq, reading, 0);
	print("done!\n");

and it never gets to done (and I try typing on the keyboard at this
point).Any ideas on what I should do next?


Jim




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-10-24  6:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-24  6:16 [9fans] file server dying on sleep??? James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).