From owner-freebsd-hackers@freebsd.org Thu Apr 12 04:01:02 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EC75F8B616 for ; Thu, 12 Apr 2018 04:01:02 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 3766D7BA97 for ; Thu, 12 Apr 2018 04:01:02 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mailman.ysv.freebsd.org (Postfix) id EB0F8F8B611; Thu, 12 Apr 2018 04:01:01 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C902AF8B610 for ; Thu, 12 Apr 2018 04:01:01 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x230.google.com (mail-yb0-x230.google.com [IPv6:2607:f8b0:4002:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D49B7BA93 for ; Thu, 12 Apr 2018 04:01:01 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x230.google.com with SMTP id e5-v6so1360055ybq.13 for ; Wed, 11 Apr 2018 21:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:from:date:message-id:subject:to; bh=VkwA0oXZxUxSXUyJoiVBwTH+qAx0T4uneSLTvAWSKBE=; b=AX8RUdXxrVfya1HvqF1IPDLy5nSZdxL337BTIAzLtyXa/teIiOxEo2loNNkVZ7iv+j kzpqkvs3sNcAvS+mBuW9HpBSlnA08lL5HtU2vCF6LjUwCOO5B2nujLWYHArNE59Ngumk MNfojklf8ZnwxdQkV6dLDEPG19ZsG0PDp+L9w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VkwA0oXZxUxSXUyJoiVBwTH+qAx0T4uneSLTvAWSKBE=; b=q+HHsiO/0fm1GyneJSD76JIzD/eMvRvc99j0a4BnOR7BSgyLXhFZhSrEflzjmoFzqY 7evf66lfePCFtoScu1Z1tWfQtOeSSaZinTDEpVmUJibfI7C+7XJe5Krv3kv87Q6+69Ou 671uP6ciCtdQDYHGn7Q+lK6I/3803Vd0nuvWwDVxxLeql1kPOyxlhk91w0r3NPyWb31p 9QTPnt6n6wU/8YF4e8aSYYcKvvjaDWnzl+AfZXLVDr/EiZFvVdEd7GohPGa/qmsWvT1b vt6yEDt7TLNZSy0PuLv6E63ea1jOOERCEi7Y84iVl3VRyF+6OBa5cnlBssFUHjB13gF5 zqvw== X-Gm-Message-State: ALQs6tByiBVhZFdcOZCIuZ72SAowYIWc2lMjUxfyVZ7gYVHOMP9PnYrQ 5po/0oLjEuRG8j8KxtNJ8l/3QGfSYAo2ntr8ue919MH7 X-Google-Smtp-Source: AIpwx4+nU3pvBJx90o2uqh5gf+6qR9P5DVKNTWUz3ZWc6TJ6gxkaG1qQQPXJbw/SrdarPkzNHco45jdHu2BTd3NN00E= X-Received: by 2002:a25:268f:: with SMTP id m137-v6mr3310466ybm.460.1523505660477; Wed, 11 Apr 2018 21:01:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:98c3:0:0:0:0:0 with HTTP; Wed, 11 Apr 2018 21:00:29 -0700 (PDT) From: Eitan Adler Date: Wed, 11 Apr 2018 21:00:29 -0700 Message-ID: Subject: panic: deadlkres: possible deadlock detected for 0xfffff80141b04560, blocked for 1801695 ticks To: "hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2018 04:01:02 -0000 How to reproduce? # kldload sem # kldunload sem < wait debug.deadlkres.slptime_threshold seconds > https://reviews.freebsd.org/P168 Reading symbols from ./kernel/kernel...Reading symbols from /usr/home/eax/crashes/sem_load_dklres/kernel/kernel.debug...done. done. Unread portion of the kernel message buffer: [29474] panic: deadlkres: possible deadlock detected for 0xfffff80141b04560, blocked for 1801695 ticks [29474] [29474] cpuid = 31 [29474] time = 1523493929 [29474] KDB: stack backtrace: [29474] db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00a6204960 [29474] vpanic() at vpanic+0x18d/frame 0xfffffe00a62049c0 [29474] panic() at panic+0x43/frame 0xfffffe00a6204a20 [29474] deadlkres() at deadlkres+0x3a6/frame 0xfffffe00a6204a70 [29474] fork_exit() at fork_exit+0x84/frame 0xfffffe00a6204ab0 [29474] fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00a6204ab0 [29474] --- trap 0, rip = 0, rsp = 0, rbp = 0 --- [29474] KDB: enter: panic __curthread () at ./machine/pcpu.h:230 230 __asm("movq %%gs:%1,%0" : "=r" (td) (kgdb) bt #0 __curthread () at ./machine/pcpu.h:230 #1 doadump (textdump=0x1) at /usr/src/sys/kern/kern_shutdown.c:361 #2 0xffffffff80434f4c in db_fncall_generic (addr=, rv=, nargs=, args=) at /usr/src/sys/ddb/db_command.c:609 #3 db_fncall (dummy1=, dummy2=, dummy3=, dummy4=) at /usr/src/sys/ddb/db_command.c:657 #4 0xffffffff80434a99 in db_command (last_cmdp=, cmd_table=, dopager=) at /usr/src/sys/ddb/db_command.c:481 #5 0xffffffff80434814 in db_command_loop () at /usr/src/sys/ddb/db_command.c:534 #6 0xffffffff80437a3f in db_trap (type=, code=) at /usr/src/sys/ddb/db_main.c:250 #7 0xffffffff80babf53 in kdb_trap (type=0x3, code=0xffff0ff0, tf=) at /usr/src/sys/kern/subr_kdb.c:697 #8 0xffffffff81024aa8 in trap (frame=0xfffffe00a6204890) at /usr/src/sys/amd64/amd64/trap.c:548 #9 #10 kdb_enter (why=0xffffffff8129f663 "panic", msg=) at /usr/src/sys/kern/subr_kdb.c:479 #11 0xffffffff80b66b5a in vpanic (fmt=, ap=0xfffffe00a6204a00) at /usr/src/sys/kern/kern_shutdown.c:826 #12 0xffffffff80b66be3 in panic (fmt=0xffffffff81deab08 "5i&\201\377\377\377\377") at /usr/src/sys/kern/kern_shutdown.c:764 #13 0xffffffff80b00466 in deadlkres () at /usr/src/sys/kern/kern_clock.c:288 #14 0xffffffff80b26e34 in fork_exit (callout=0xffffffff80b000c0 , arg=0x0, frame=0xfffffe00a6204ac0) at /usr/src/sys/kern/kern_fork.c:1039 #15 (kgdb) #13 0xffffffff80b00466 in deadlkres () at /usr/src/sys/kern/kern_clock.c:288 288 panic("%s: possible deadlock detected for %p, blocked for %d ticks\n", (kgdb) info locals tryl = slpticks = 0x1b7740 blkticks = 0xdbba0 p = 0xfffff80141b00538 td = wchan = 0xffffffff81deb2d8 tticks = 0x1b7ddf slptype = i = (more in the paste) -- Eitan Adler