home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / bsd / 2978 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  1.9 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!sdd.hp.com!elroy.jpl.nasa.gov!ucla-cs!ucla-mic!scott
  2. From: scott@pita.cns.ucla.edu (Scott Burris)
  3. Newsgroups: comp.unix.bsd
  4. Subject: 386BSD 0.1: kmem_map too small panic fix
  5. Message-ID: <1992Jul27.131414.12063@mic.ucla.edu>
  6. Date: 27 Jul 92 20:14:14 GMT
  7. Reply-To: scott@pita.cns.ucla.edu (Scott Burris)
  8. Organization: UCLA Campus Network Services
  9. Lines: 55
  10. Nntp-Posting-Host: pita.cns.ucla.edu
  11.  
  12. Problem:
  13.  
  14. Sometime the kernel crashes on bootup with a kmem_map too small panic.
  15.  
  16. Solution:
  17.  
  18. To my knowledge, this only happens with SCSI systems.  In the SCSI driver,
  19. the block size of the disk is obtained through a SCSI READ CAPACITY
  20. command.  Unfortunately, sometimes the returned block size is insane,
  21. causing the kernel to go belly up.
  22.  
  23. * HACK ALERT * HACK ALERT * HACK ALERT * HACK ALERT * HACK ALERT *
  24. Although the following change fixes the problem by looping until a reasonable
  25. looking block size is returned (never more than 1 loop in my experience),
  26. I don't understand why the bogus information is returned in the first
  27. place.  I consider this to be more of a hack than a fix, since the READ
  28. CAPACITY code should work correctly the first time.
  29.  
  30. My advice is to not install this patch unless you are getting the
  31. panic described above.
  32.  
  33. Patch follows:
  34.  
  35.  
  36. *** as.c    Sun Jul 19 08:15:02 1992
  37. --- as.c.orig    Sat Jul 18 20:10:32 1992
  38. ***************
  39. *** 438,444 ****
  40.           goto done;
  41.       }
  42.   
  43. - bsagain:
  44.       as->scsi_cdb_len = 10;
  45.       bzero(cdb, 10);
  46.       cdb[0] = 0x25;  /* SCSI_READCAPACITY */
  47. --- 434,439 ----
  48. ***************
  49. *** 450,460 ****
  50.           
  51.       }
  52.   
  53. -     if (as->disk && as->bs > 10000) {
  54. -         printf("weird bs %d\n", as->bs);
  55. -         goto bsagain;
  56. -     }
  57.   if(asverbose)
  58.       printf("block size %d disksize %d ", as->bs, disksize);
  59.   
  60. --- 445,450 ----
  61. --
  62. ----------
  63. Scott Burris
  64. UCLA Campus Network Services
  65. cnetslb@oac.ucla.edu (213) 206-4860 - OR - scott@pita.cns.ucla.edu
  66.