Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Oct 2020 14:09:41 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        YAMAMOTO Shigeru <shigeru@os-hackers.jp>
Cc:        freebsd-current@freebsd.org
Subject:   Re: zfs panic when 'make buildworld buildkernel'
Message-ID:  <CAGudoHG_RPB2C3pC3iRb=E1FdHjKL6drHz9qGbFzirTm8HeLng@mail.gmail.com>
In-Reply-To: <20201013.202148.2154404302288800973.shigeru@os-hackers.jp>
References:  <20201013.202148.2154404302288800973.shigeru@os-hackers.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/13/20, YAMAMOTO Shigeru <shigeru@os-hackers.jp> wrote:
>
> Hi,
>
> I try to 'make buildworld buildkernel' at full ZFS environment.
> But I can't finished buildworld/buildkernel without panic.
> Anyone have same trouble?
>
> uname -a:
> ```
> FreeBSD jenkins-02.current.os-hackers.jp 13.0-CURRENT FreeBSD 13.0-CURRENT
> #0 r366657: Tue Oct 13 13:07:15 JST 2020
> root@jenkins-02.current.os-hackers.jp:/usr/obj/usr/src/amd64.amd64/sys/GENERIC
> amd64
> ```
>
> panic message:
> ```
> login: panic: VERIFY(tid) failed
>
> cpuid = 2
> time = 1602582381
> KDB: stack backtrace:
> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame
> 0xfffffe002abaa9f0
> vpanic() at vpanic+0x182/frame 0xfffffe002abaaa40
> spl_panic() at spl_panic+0x3a/frame 0xfffffe002abaaaa0
> taskq_dispatch() at taskq_dispatch+0xe8/frame 0xfffffe002abaaae0
> arc_prune_async() at arc_prune_async+0x3f/frame 0xfffffe002abaab00
> arc_evict_cb() at arc_evict_cb+0x1f6/frame 0xfffffe002abaab60
> zthr_procedure() at zthr_procedure+0x8f/frame 0xfffffe002abaabb0
> fork_exit() at fork_exit+0x80/frame 0xfffffe002abaabf0
> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe002abaabf0
> --- trap 0, rip = 0, rsp = 0, rbp = 0 ---
> KDB: enter: panic
> [ thread pid 19 tid 100070 ]
> Stopped at      kdb_enter+0x37: movq    $0,0x10b0116(%rip)
> db>
> ```
>

The issue is pretty apparent:

        taskqid_t tqid = atomic_fetchadd_int(&tqidnext, 1);

this eventually wraps to 0 and then you get the crash.

Probably the thing to do is ot bump it to 64 bit and 0-check on other platforms.

-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHG_RPB2C3pC3iRb=E1FdHjKL6drHz9qGbFzirTm8HeLng>