From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 23 Oct 1998 23:16:25 -0700 From: James A. Robinson Jim.Robinson@Stanford.Edu Subject: [9fans] file server dying on sleep??? Topicbox-Message-UUID: 853b8f98-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19981024061625.23rchXEK6vevJxMsO5VOARm-b4C_zeR2GoWc078S424@z> 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