| Summary: | sysctl -a: kernel trap 12. | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Thomas Quinot <thomas> |
| Component: | kern | Assignee: | dd <dd> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.3-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Thomas Quinot
2001-07-05 21:40:01 UTC
Thomas Quinot <thomas@cuivre.fr.eu.org> writes: > >Description: > Running 'sysctl -a' reproduceably causes a null pointer dereference > in kernel: This was only broken for a period of about a day and a half. Upgrade to a more recent -stable. Le 2001-07-06, Dima Dorfman écrivait : > > Running 'sysctl -a' reproduceably causes a null pointer dereference > > in kernel: > This was only broken for a period of about a day and a half. Upgrade > to a more recent -stable. I cvsupped to today's -stalbe, remade kernel and reproduced the crash. Is a 'make world' required as well? (also note that this is not the same problem as PR misc/27706, if that's the one you were referring to: here we're having a kernel trap 12, not a freeze.) Thomas. -- Thomas.Quinot@Cuivre.FR.EU.ORG [ Ernst, I'm cc'ing you regarding PR 24596; I'd like you to try the patch attached below and see if it helps that problem. ] Thomas Quinot <thomas@cuivre.fr.eu.org> writes: > Le 2001-07-06, Dima Dorfman écrivait : > > > > Running 'sysctl -a' reproduceably causes a null pointer dereference > > > in kernel: > > This was only broken for a period of about a day and a half. Upgrade > > to a more recent -stable. > > I cvsupped to today's -stalbe, remade kernel and reproduced the crash. > Is a 'make world' required as well? > > (also note that this is not the same problem as PR misc/27706, > if that's the one you were referring to: here we're having > a kernel trap 12, not a freeze.) Okay, I read your PR too fast; it is indeed a different problem. You are right, this is related to cd0 not being present. The CAM code doesn't properly clean up after itself in this case (or so I think). If you can reproduce the problem, please try the patch below and see if it helps (and you should be able to reproduce it). Thanks, Dima Dorfman dima@unixfreak.org Index: scsi_cd.c =================================================================== RCS file: /stl/src/FreeBSD/src/sys/cam/scsi/scsi_cd.c,v retrieving revision 1.51 diff -u -r1.51 scsi_cd.c --- scsi_cd.c 2001/05/08 08:30:47 1.51 +++ scsi_cd.c 2001/07/06 08:40:55 @@ -487,6 +487,9 @@ } devstat_remove_entry(&softc->device_stats); cam_extend_release(cdperiphs, periph->unit_number); + if (softc->dev) { + disk_destroy(softc->dev); + } free(softc, M_DEVBUF); splx(s); } Le 2001-07-06, Dima Dorfman écrivait : > If you can reproduce the problem, please try the patch below and see > if it helps (and you should be able to reproduce it). The patch seems to fix the problem, thanks! > + if (softc->dev) { > + disk_destroy(softc->dev); > + } I rewrote this as if (softc->disk.d_dev) { disk_destroy(softc->disk.d_dev); } as I am using -STABLE. Apparently my guess was correct: the machine rebooted correctly, and the sysctl -a went fine. Next issue will be: why is the attach failing? I'll try to clarify this and submit a separate PR. -- Thomas.Quinot@Cuivre.FR.EU.ORG Responsible Changed From-To: freebsd-bugs->dd I have a patch to fix this. State Changed From-To: open->analyzed Patch as discussed applied to -current, will mfc in a week or so. Thanks! State Changed From-To: analyzed->closed MFC'd |