Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2018 21:28:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 233277] Panic when receiving incremental ZFS send (solaris assert: db->db_buf == ((void *)0))
Message-ID:  <bug-233277-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233277

            Bug ID: 233277
           Summary: Panic when receiving incremental ZFS send (solaris
                    assert: db->db_buf =3D=3D ((void *)0))
           Product: Base System
           Version: CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: delphij@FreeBSD.org

Seen on CURRENT (as of r340474) when receiving an incremental stream (zfs s=
end
-e) from a 11.2-RELEASE system.

Panic message:

panic: solaris assert: db->db_buf =3D=3D ((void *)0) (0xfffff801f7f43e40 =
=3D=3D 0x0),
file: /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c, line:
1097
cpuid =3D 6=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
time =3D 1542352871=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
KDB: stack backtrace:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00b12f9=
940=20=20
vpanic() at vpanic+0x1a3/frame 0xfffffe00b12f99a0=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
panic() at panic+0x43/frame 0xfffffe00b12f9a00=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
assfail3() at assfail3+0x2c/frame 0xfffffe00b12f9a20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
dmu_buf_will_fill() at dmu_buf_will_fill+0x24b/frame 0xfffffe00b12f9a60=20=
=20=20=20=20=20=20=20=20
dmu_buf_write_embedded() at dmu_buf_write_embedded+0xe0/frame
0xfffffe00b12f9ab0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
dmu_write_embedded() at dmu_write_embedded+0xea/frame 0xfffffe00b12f9b10=20=
=20=20=20=20=20=20=20
receive_writer_thread() at receive_writer_thread+0x513/frame 0xfffffe00b12f=
9bb0=20
fork_exit() at fork_exit+0x84/frame 0xfffffe00b12f9bf0=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00b12f9bf0=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
--- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 ---=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20
KDB: enter: panic=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
[ thread pid 21 tid 101208 ]=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
Stopped at      kdb_enter+0x3b: movq    $0,kdb_why=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
db> where=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
Tracing pid 21 tid 101208 td 0xfffff8001cb49580=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
kdb_enter() at kdb_enter+0x3b/frame 0xfffffe00b12f9940=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
vpanic() at vpanic+0x1c0/frame 0xfffffe00b12f99a0=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
panic() at panic+0x43/frame 0xfffffe00b12f9a00=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
assfail3() at assfail3+0x2c/frame 0xfffffe00b12f9a20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
dmu_buf_will_fill() at dmu_buf_will_fill+0x24b/frame 0xfffffe00b12f9a60=20=
=20=20=20=20=20=20=20=20
dmu_buf_write_embedded() at dmu_buf_write_embedded+0xe0/frame
0xfffffe00b12f9ab0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
dmu_write_embedded() at dmu_write_embedded+0xea/frame 0xfffffe00b12f9b10=20=
=20=20=20=20=20=20=20
receive_writer_thread() at receive_writer_thread+0x513/frame 0xfffffe00b12f=
9bb0=20
fork_exit() at fork_exit+0x84/frame 0xfffffe00b12f9bf0=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00b12f9bf0=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
--- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 ---=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20


It seems that the call path was:

receive_writer_thread -> receive_process_record (DRR_WRITE_EMBEDDED) ->
receive_write_embedded -> dmu_write_embedded -> dmu_buf_hold_noread()

Then:

dmu_buf_write_embedded -> dmu_buf_will_not_fill -> dmu_buf_will_fill ->
dbuf_noread (db->db_state =3D=3D DB_NOFILL) -> dbuf_clear_data ->
ASSERT3P(db->db_buf, =3D=3D, NULL); and failed there.

Looking at the code, it seems that dmu_buf_will_not_fill would
unconditionally set db_state to DB_NOFILL, but for some reason the dbuf
might have db_buf associated (maybe DB_CACHED?)

I can't reproduce the issue when not using -e at sending side.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233277-227>