https://slatedb.io logo
@criccomini I digged a bit and I wonder
# general
p
@criccomini I digged a bit and I wonder if it's not deadlocking when close() is called when the backpressure handling is "active"
Copy code
2025-12-01T12:26:02.520546Z  WARN slatedb::mem_table_flush: won't flush imm to l0 because too many l0 files [l0_len=16, l0_max_ssts=16]
2025-12-01T12:26:02.520567Z  WARN slatedb::mem_table_flush: won't flush imm to l0 because too many l0 files [l0_len=16, l0_max_ssts=16]
2025-12-01T12:26:02.520597Z  WARN slatedb::mem_table_flush: won't flush imm to l0 because too many l0 files [l0_len=16, l0_max_ssts=16]
2025-12-01T12:26:02.520613Z  WARN slatedb::mem_table_flush: won't flush imm to l0 because too many l0 files [l0_len=16, l0_max_ssts=16]
2025-12-01T12:26:02.520652Z  WARN slatedb::mem_table_flush: won't flush imm to l0 because too many l0 files [l0_len=16, l0_max_ssts=16]
2025-12-01T12:26:02.520706Z  WARN slatedb::mem_table_flush: won't flush imm to l0 because too many l0 files [l0_len=16, l0_max_ssts=16]
2025-12-01T12:26:02.520746Z  WARN slatedb::mem_table_flush: won't flush imm to l0 because too many l0 files [l0_len=16, l0_max_ssts=16]
2025-12-01T12:26:02.520894Z  INFO slatedb::garbage_collector: garbage collector shutdown
2025-12-01T12:26:02.521661Z  INFO slatedb::mem_table_flush: memtable flush thread exiting [result=Ok(())]
2025-12-01T12:26:02.522159Z  INFO slatedb::db: db closed
[no progress]
c
So, close definitely calls flush, which waits for the current L0 to get written to storage (or WAL if enabled). This will block if the L0s hit max L0 sst size. But if the compactor is not dead, it should clear the L0s out to make room for the active L0 to get flushed.
p
Hmm interesting
c
I have hit scenarios where we’ve configured the compactor. In such a way that the size tiered compactor can’t actually schedule a compaction. In those cases it does get deadlocked. But I think that configurations for that are pretty pathological. Let me find the GitHub issue.
p
Yeah I remember that
This one is a bit weird, I can only reproduce under extreme load
c
Yea that is suspicious … 🤔
p
That's why I suspect some kind of deadlock 🤔
When this happens cpu usage drops to 0
c
Yea…
Can you take a stack dump?
p
I cleared some bugs on my side, and I'll bother you if I can reliabely reproduce
It's kind of flacky too...
What a pain lol
c
Yea flaky bugs are the worst. LMK if it continues. Happy to help. IMO next step is to get more debugging info to see where it locks up.
Either through added logs or stack dumps.
You might check out our scripts dir, which has a stack dump thingy for GitHub actions.
We use it for slow tests that time out in nextest
p
So far I've not been able to reproduce it, a bit unnerving
c
Yea that’s not great
At least it seems like a hang rather than data loss tho
p
Yeah I am not too worried
c
Is this running on a GitHub action machine?
p
This will
The failed run was on a test vm