dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
24.46k stars 884 forks source link

test_mixed_append test crashes in debug mode #3240

Closed romange closed 2 days ago

romange commented 3 days ago

To reproduce:

  1. ./dragonfly --port=6379 --proactor_threads=4 --tiered_prefix=/tmp/tiering_test_backing --maxmemory=1G --tiered_offload_threshold=0.0 --tiered_storage_write_depth=1000 --dbfilename=  --noversion_check  --num_shards=3
  2. pytest dragonfly/tiering_test.py -k test_mixed_append --existing-port 6379

The process crashes with:

F20240628 14:48:25.504035 423353 small_bins.cc:77] Check failed: key_list.mapped().size() > 0u (0 vs. 0) 
*** Check failure stack trace: ***
    @     0x5e065213ca5f  google::LogMessage::Fail()
    @     0x5e065213c9a5  google::LogMessage::SendToLog()
    @     0x5e065213c17a  google::LogMessage::Flush()
    @     0x5e065213fff2  google::LogMessageFatal::~LogMessageFatal()
    @     0x5e0651df2c81  dfly::tiering::SmallBins::ReportStashed()
    @     0x5e0651ae0ce8  dfly::TieredStorage::ShardOpManager::SetExternal()
romange commented 2 days ago

This happens because SmallBins::Delete erases from current_bin_ but does not update current_bin_bytes_ @dranikpg

kostasrim commented 2 days ago

Test also failed as well https://github.com/dragonflydb/dragonfly/actions/runs/9681657533/job/26712730878?pr=3226#step:12:1189