Skip to content

ZED still crashing after PR-11928 fix integrated #11963

Closed
@don-brady

Description

@don-brady

System information

Type Version/Name
Distribution Name Ubuntu
Distribution Version 18.04
Linux Kernel 5.4.0-1045
Architecture x86_64
ZFS Version 2021.04.27.17-3b038a4
SPL Version 2021.04.27.17-3b038a4

Describe the problem you're observing

ZED is encountering an assert due to adding a duplicate key into an AVL tree.

Describe how to reproduce the problem

We are just using stock ZED in our automated testing

Include any warning/errors/backtraces from the system logs

#1  0x00007feb6a1e5921 in __GI_abort () at abort.c:79
#2  0x00007feb6b20d805 in libspl_assertf (file=0x7feb6b21c199 "../../module/avl/avl.c", func=0x7feb6b21c1b0 <__FUNCTION__.5089> "avl_add", line=640, format=<optimized out>)
    at assert.c:45
#3  0x00007feb6b215cfc in libspl_assert (line=640, func=<synthetic pointer>, file=0x7feb6b21c199 "../../module/avl/avl.c",
    buf=0x7feb6b21c170 "avl_find(tree, new_node, &where) == NULL") at ../../lib/libspl/include/assert.h:46
#4  0x00007feb6b21601b in avl_add (tree=tree@entry=0x5639784be320 <_launched_processes>, new_node=new_node@entry=0x563979d54de0) at ../../module/avl/avl.c:640
#5  0x00005639782b14f9 in _zed_exec_fork_child (eid=eid@entry=1644, dir=<optimized out>, prog=prog@entry=0x563979d4e3d0 "all-syslog.sh", env=env@entry=0x563979d57bc0,
    zfd=7, in_foreground=B_TRUE) at zed_exec.c:180
#6  0x00005639782b1b5f in zed_exec_process (eid=1644, class=<optimized out>, subclass=subclass@entry=0x563979d551b0 "history_event", zcp=zcp@entry=0x7ffe923a8940,
    envs=envs@entry=0x563979d577f0) at zed_exec.c:361
#7  0x00005639782b1253 in zed_event_service (zcp=0x7ffe923a8940) at zed_event.c:979
#8  0x00005639782ac7e0 in main (argc=<optimized out>, argv=<optimized out>) at zed.c:291
(gdb) frame 4
#4  0x00007feb6b21601b in avl_add (tree=tree@entry=0x5639784be320 <_launched_processes>, new_node=new_node@entry=0x563979d54de0) at ../../module/avl/avl.c:640
640	../../module/avl/avl.c: No such file or directory.
(gdb)  p *(struct launched_process_node *)0x563979d54de0
$1 = {node = {avl_child = {0x0, 0x0}, avl_pcb = 0}, pid = 24641, eid = 1644, name = 0x563979d576b0 "all-syslog.sh"}
(gdb) p *tree
$2 = {avl_root = 0x563979d574a0, avl_compar = 0x5639782b12a0 <_launched_process_node_compare>, avl_offset = 0, avl_numnodes = 1, avl_size = 48}
(gdb) p *(struct avl_node *) 0x563979d574a0
$3 = {avl_child = {0x0, 0x0}, avl_pcb = 1}
(gdb) frame 5
#5  0x00005639782b14f9 in _zed_exec_fork_child (eid=eid@entry=1644, dir=<optimized out>, prog=prog@entry=0x563979d4e3d0 "all-syslog.sh", env=env@entry=0x563979d57bc0,
    zfd=7, in_foreground=B_TRUE) at zed_exec.c:180
180	zed_exec.c: No such file or directory.
(gdb) p _launched_processes_lock
$4 = pthread_mutex_t = {Type = Normal, Status = Acquired, possibly with no waiters, Owner ID = 1851, Robust = No, Shared = No, Protocol = None}
(gdb) p pid
$5 = 24641
(gdb) p eid
$6 = 1644
(gdb) thread 3
[Switching to thread 3 (Thread 0x7feb637fe700 (LWP 1936))]
#0  0x00007feb6a5a7fc2 in __libc_pause () at ../sysdeps/unix/sysv/linux/pause.c:30
30	../sysdeps/unix/sysv/linux/pause.c: No such file or directory.
(gdb) bt
#0  0x00007feb6a5a7fc2 in __libc_pause () at ../sysdeps/unix/sysv/linux/pause.c:30
#1  0x00005639782b18b5 in _reap_children (arg=<optimized out>) at zed_exec.c:214
#2  0x00007feb6a59d6db in start_thread (arg=0x7feb637fe700) at pthread_create.c:463
#3  0x00007feb6a2c671f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) frame 1
#1  0x00005639782b18b5 in _reap_children (arg=<optimized out>) at zed_exec.c:214
214	zed_exec.c: No such file or directory.
(gdb) p pid
$7 = -1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Triage NeededNew issue which needs to be triagedType: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions