9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: James A. Robinson Jim.Robinson@Stanford.Edu
Subject: [9fans] file server dying on sleep???
Date: Fri, 23 Oct 1998 23:16:25 -0700	[thread overview]
Message-ID: <19981024061625.23rchXEK6vevJxMsO5VOARm-b4C_zeR2GoWc078S424@z> (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




                 reply	other threads:[~1998-10-24  6:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19981024061625.23rchXEK6vevJxMsO5VOARm-b4C_zeR2GoWc078S424@z \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).