NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/58043: kernel crash in assert_sleepable() in -current, dk(4) driver?
The following reply was made to PR kern/58043; it has been noted by GNATS.
From: triaxx%NetBSD.org@localhost
To: Paul Goyette <paul%whooppee.com@localhost>, gnats-bugs%netbsd.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/58043: kernel crash in assert_sleepable() in -current, dk(4)
driver?
Date: Wed, 27 Mar 2024 11:55:11 +0100
I have a system with:
$ dmesg -t | grep ccd
dk7 at wd1: "ccd0p0", 488397088 blocks at 40, type: ccd
dk8 at wd2: "ccd0p1", 488397088 blocks at 40, type: ccd
ccd0: Interleaving 2 components (63 block interleave)
ccd0: /dev/dk7 (488397042 blocks)
ccd0: /dev/dk8 (488397042 blocks)
ccd0: total 976794084 blocks
ccd0: GPT GUID: 546b7b1d-bf71-46a2-9788-226ebaf7ae2d
dk12 at ccd0: "ccd0", 976794008 blocks at 40, type: ffs
The patch fixes the issue with the kernel that crashes on this system.
> I've already converted my config to raid0 instead of ccd, so I am sorry
> that I am unable to test the patch. :-(
>
> On Mon, 18 Mar 2024, J. Hannken-Illjes wrote:
>
>> The following reply was made to PR kern/58043; it has been noted by
>> GNATS.
>>
>> From: "J. Hannken-Illjes" <hannken%mailbox.org@localhost>
>> To: gnats-bugs%netbsd.org@localhost
>> Cc:
>> Subject: Re: kern/58043: kernel crash in assert_sleepable() in
>> -current, dk(4)
>> driver?
>> Date: Mon, 18 Mar 2024 10:52:09 +0100
>>
>> Paul,
>>
>> please try the attached patch -- if it prevents assert_sleepable() to
>> fire
>> it is the call to CCD_GETBUF() aka. pool_cache_get(ccd_cache, PR_WAITOK)
>> from softint context that has to be fixed.
>>
>> --
>> J. Hannken-Illjes - hannken%mailbox.org@localhost <mailto:hannken%mailbox.org@localhost>
>>
>> ccd_defer
>>
>> Always defer requests to the helper thread so ccdstart() doesn't
>> get called from softint anymore.
>>
>> diff -r 8b8d2498ffd9 -r 2ec4e85f1120 sys/dev/ccd.c
>> --- sys/dev/ccd.c
>> +++ sys/dev/ccd.c
>> @@ -777,17 +777,10 @@ ccdstrategy(struct buf *bp)
>> Â Â Â Â Â Â Â Â return;
>> Â Â Â Â }
>>
>> -Â Â Â /* Defer to thread if system is low on memory. */
>> +Â Â Â /* Always defer to thread. */
>> Â Â Â Â bufq_put(cs->sc_bufq, bp);
>> -Â Â Â if (__predict_false(ccdbackoff(cs))) {
>> -Â Â Â Â Â Â Â mutex_exit(cs->sc_iolock);
>> -#ifdef DEBUG
>> -Â Â Â Â Â Â Â Â if (ccddebug & CCDB_FOLLOW)
>> -Â Â Â Â Â Â Â Â Â Â Â Â printf("ccdstrategy: holding off on I/O\n");
>> -#endif
>> -Â Â Â Â Â Â Â return;
>> -Â Â Â }
>> -Â Â Â ccdstart(cs);
>> +Â Â Â cv_broadcast(&cs->sc_push);
>> +Â Â Â mutex_exit(cs->sc_iolock);
>> Â }
>>
>> Â static void
Home |
Main Index |
Thread Index |
Old Index