[Bug 248070] kernel panic sysctl -a
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Jul 18 15:45:46 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248070
Bug ID: 248070
Summary: kernel panic sysctl -a
Product: Base System
Version: 12.1-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs at FreeBSD.org
Reporter: lampa at fit.vutbr.cz
uname -a
FreeBSD xxx 12.1-STABLE FreeBSD 12.1-STABLE r363310 xxxx amd64
sysctl -a
kern.ostype: FreeBSD
kern.osrelease: 12.1-STABLE
kern.osrevision: 199506
kern.version: FreeBSD 12.1-STABLE r363310 VOJEN
kern.maxvnodes: 620153
kern.maxproc: 38036
kern.maxfiles: 1044518
kern.argmax: 524288
kern.securelevel: -1
kern.hostname: xxx
kern.hostid: 2119532645
kern.clockrate: { hz = 1000, tick = 1000, profhz = 8128, stathz = 127 }
<<<---- panic at eip 0x20:0xfffffff8058946b
bt
pget() at pget+0x200/frame 0xfffffe009f4987e0
sysctl_kern_proc_kstack() at sysctl_kern_proc_kstack+0x27
sysctl_root_handler_locked() at sysctl_root_handler_locked+0x7d
sysctl_root() at sysctl_root+0x192
userland_sysctl() ...
Source of panic is mismerge of kern_proc.c in 363038 at line 413, original was:
} else {
if (pid <= PID_MAX) {
...
} else if ((flags & PGET_NOTID) == 0) {
p = pfind_tid_locked(pid);
} else {
p = NULL;
}
revision 363038:
} else {
if (pid <= PID_MAX) {
...
} else if ((flags & PGET_NOTID) == 0) {
td1 = tdfind(pid, -1);
if (td1 != NULL)
p = td1->td_proc;
}
If tdfind() fails, p is not reset to NULL and also NOTID case was lost. Merge
missed assignment p = NULL before if (pid <= PID_MAX):
} else {
p = NULL; /* THIS STATEMENT IS IN HEAD, NOT IN STABLE */
if (pid <= PID_MAX) {
...
} else if ((flags & PGET_NOTID) == 0) {
td1 = tdfind(pid, -1);
if (td1 != NULL)
p = td1->td_proc;
}
With this change, sysctl -a no longer panics.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list