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?
I have two kernels on this system: netbsd-GENERIC and
netbsd-GOLIATH-noamdgpu.
Surprisingly, GOLIATH-noamdgpu crashes when GENERIC doesn't. The diff
between both configurations is:
1c1
< ### START CONFIG FILE "/usr/src/sys/arch/amd64/conf/GENERIC"
---
> ### START CONFIG FILE
"/home/triaxx/NetBSD/src/sys/arch/amd64/conf/GOLIATH-noamdgpu"
118,119c118,119
< #options DEBUG # expensive debugging checks/support
< #options LOCKDEBUG # expensive locking checks/support
---
> options DEBUG # expensive debugging checks/support
> options LOCKDEBUG # expensive locking checks/support
130,131c130,131
< #options KGDB # remote debugger
< #options KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600
---
> options KGDB # remote debugger
> options KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600
255c255
< #options ACPIVERBOSE # verbose ACPI configuration messages
---
> options ACPIVERBOSE # verbose ACPI configuration messages
461,462c461,462
< i915drmkms* at pci? dev ? function ?
< intelfb* at intelfbbus?
---
> #i915drmkms* at pci? dev ? function ?
> #intelfb* at intelfbbus?
464,465c464,465
< radeon* at pci? dev ? function ?
< radeondrmkmsfb* at radeonfbbus?
---
> #radeon* at pci? dev ? function ?
> #radeondrmkmsfb* at radeonfbbus?
470,471c470,471
< nouveau* at pci? dev ? function ?
< nouveaufb* at nouveaufbbus?
---
> #nouveau* at pci? dev ? function ?
> #nouveaufb* at nouveaufbbus?
1245c1245
< ### END CONFIG FILE "/usr/src/sys/arch/amd64/conf/GENERIC"
---
> ### END CONFIG FILE
"/home/triaxx/NetBSD/src/sys/arch/amd64/conf/GOLIATH-noamdgpu"
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