Bug #1037

panic: assertion: (node->flags & HAMMER_NODE_DELETED) == 0 in hammer_cursor_seek

Added by rumcic about 8 years ago. Updated almost 8 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


With latest -HEAD I get the mentioned panic. Managed to get a memory dump and I
uploaded it to leaf:~rumko/crash/01.07.08

The backtrace:
#0 dumpsys () at ./machine/thread.h:83
#1 0xc01d17f5 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:375
#2 0xc01d1ab8 in panic (fmt=0xc03d7a58 "assertion: %s in %s")
at /usr/src/sys/kern/kern_shutdown.c:800
#3 0xc02fea88 in hammer_cursor_seek (cursor=0xdd21cc60, node=0xdcf7a218,
index=0) at /usr/src/sys/vfs/hammer/hammer_cursor.c:289
#4 0xc0300b99 in hammer_sync_inode (ip=0xdd922150)
at /usr/src/sys/vfs/hammer/hammer_inode.c:2021
#5 0xc02ff597 in hammer_flusher_flush_inode (ip=0xdd922150, trans=0xdd20d108)
at /usr/src/sys/vfs/hammer/hammer_flusher.c:361
#6 0xc02ff775 in hammer_flusher_slave_thread (arg=0xdd05be70)
at /usr/src/sys/vfs/hammer/hammer_flusher.c:236
#7 0xc01d94c1 in lwkt_deschedule_self (td=Cannot access memory at address 0x8
) at /usr/src/sys/kern/lwkt_thread.c:223
Backtrace stopped: previous frame inner to this frame (corrupt stack?)


#1 Updated by dillon about 8 years ago

:With latest -HEAD I get the mentioned panic. Managed to get a memory dump and I
:uploaded it to leaf:~rumko/crash/01.07.08

Nice catch. I'll get it fixed today. It's a simple race.... the
deleted flag test on line 2018 of hammer_inode.c occurs before
the node is locked, and the assertion that caused the panic occurs
after the node is locked. The node can easily become deleted while
blocked on the lock. I just need to lock the node before doing the
first test.


Also available in: Atom PDF