NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/39526: adh driver crashes system if it runs out of memory



The following reply was made to PR kern/39526; it has been noted by GNATS.

From: Wolfgang Stukenbrock <Wolfgang.Stukenbrock%nagler-company.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/39526: adh driver crashes system if it runs out of memory
Date: Mon, 29 Sep 2008 13:57:33 +0200

 Hi again.
 
 OK if this is a "known" bug in the ahd and ahc driver, than the 
 workaround by allocating all possible SCB-structures during startup 
 should be added in all cases to both drivers - or the main cause of the 
 problem should be fixed in them as soon as possible. (Sorry, I've not 
 enougth time to go deeper into that and my knowlegde of the 
 dma-subsystem (interaction with CPU-cache, PCI-related things, ...) is 
 poor at this time ... With a short look at the code, I've seen no error 
 in the calls to free for the partial allocated dma-memory.)
 It is no real good idea to have an instable driver in the kernel that 
 may crash the system if SCSI traffic starts after some large processes 
 eat up all memory.
 And the adaptec cards are used by many people. I've also came back to 
 them myself, because e.g. the mpt-driver does not support any of the LSI 
 SCSI-Cards currently sold by LSI ... And I've found no other 
 SCSI-PCI-X-Cards that are available from whatever vendor in europe taht 
 are supported by NetBSD.
 
 The fastes way to work around the crashes temporary would be, to 
 allocate all SCB's at startup.
 The workaround should just contain the while loop to allocate all SCB's 
 from my patch below:
 e.g. "while (ahd_alloc_scbs(ahd) != 0);".
 
 
 Neverless there is a problem with pagedaemon in the kernel, because 
 pagedaemon ignores any range information of the failed allocation-request.
 I've got the system freezing up with the ahc driver if all lower 4GB 
 memory is allocated, but some memory above 4GB is free.
 The command "top" in an other window shows 100% CPU for pagedaemon on on 
 CPU and 100% for the ahc drive on the second CPU just before nothing 
 works anymore.
 Some debugging output shows that the ahc-driver tries to allocate some 
 pages that should reside below 4GB, but there is nothing free anymore. 
 It kicks pagedaemon and blocks. Pagedaemon have a short look at the 
 system statistics, sees that there is plenty of memory available. It 
 deciedes to do nothing, just wake up the ahc-driver and waits for the 
 next request. This is an endless loop ....
 
 
 Best regards
 
 W. Stukenbrock
 
 
 


Home | Main Index | Thread Index | Old Index