[DragonFlyBSD - Bug #1996] (Closed) panic: assertion: p->p_lock == 0 in kern_wait

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Sat Oct 23 14:30:40 PDT 2021


Issue #1996 has been updated by y0n3t4n1.

Description updated
Status changed from New to Closed
Assignee deleted (0)

Forgot closing the issue after seeing the fix made it into the repo.

----------------------------------------
Bug #1996: panic: assertion: p->p_lock == 0 in kern_wait
http://bugs.dragonflybsd.org/issues/1996#change-14176

* Author: y0n3t4n1
* Status: Closed
* Priority: Normal
* Target version: 6.2
----------------------------------------
Hi.
Apparently a few hours of pbulk test can trigger this panic (this is
on x86_64 and the kernel is built from source as of 5347900e6).
As opposed to what KKASSERT claims, p->p_lock doesn't hold the non-zero
value in the frame 5:

  #4  0xffffffff802ad259 in panic (fmt=0xffffffff804f212a "assertion: %s in %s")
      at /usr/src/sys/kern/kern_shutdown.c:799
  #5  0xffffffff802989a1 in kern_wait (pid=<value optimized out>,
      status=0xffffffe05e997a74, options=1528637672, rusage=0x0,
      res=0xffffffe05e997b58) at /usr/src/sys/kern/kern_exit.c:901
  #6  0xffffffff80298c4e in sys_wait4 (uap=0xffffffe05e997b58)
      at /usr/src/sys/kern/kern_exit.c:754
  #7  0xffffffff804b580c in syscall2 (frame=0xffffffe05e997c08)
      at /usr/src/sys/platform/pc64/x86_64/trap.c:1182
  #8  0xffffffff804ae53f in Xfast_syscall ()
      at /usr/src/sys/platform/pc64/x86_64/exception.S:318
  #9  0x000000000000002b in ?? ()
  Backtrace stopped: previous frame inner to this frame (corrupt stack?)
  (kgdb) fr 5
  #5  0xffffffff802989a1 in kern_wait (pid=<value optimized out>,
      status=0xffffffe05e997a74, options=1528637672, rusage=0x0,
      res=0xffffffe05e997b58) at /usr/src/sys/kern/kern_exit.c:901
  901                             KKASSERT(p->p_lock == 0);
  (kgdb) p p->p_lock
  $1 = 0

I'm not sure if this is a problem in kgdb or a result of optimization,
or it's an MP race.

---Files--------------------------------
0001-Remove-double-semi-colon.patch (892 Bytes)
0002-kernel-Replace-LW-P-HOLD-RELE-to-use-refcount-APIs.patch (5.79 KB)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list