Index out of bounds crates/trc/src/atomics/bitset.rs:44:9:

Issue Description

When stalwart is executed (background), I got this error:
Oct 20 07:18:20 dediscaleway stalwart[2089626]: thread ‘tokio-rt-worker’ (2089630) panicked at crates/trc/src/atomics/bitset.rs:44:9:
Oct 20 07:18:20 dediscaleway stalwart[2089626]: index out of bounds: the len is 10 but the index is 10
Oct 20 07:18:20 dediscaleway stalwart[2089626]: note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Oct 20 07:18:21 dediscaleway stalwart[2089626]: thread ‘tokio-rt-worker’ (2089630) panicked at crates/trc/src/atomics/bitset.rs:44:9:

Stalwart however continues to launch it seems.

Expected Behavior

No panic behaviour.

Actual Behavior

Panic behaviour.

Stalwart Version

v0.16.x

Installation Method

Binary (Linux)

Database Backend

MySQL

Blob Storage

MySQL

Search Engine

MySQL

Directory Backend

SQL

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

That panic means the server looked up an event id that doesn’t exist in its own event table. I went through every 0.16 release, and none of them can produce an id that high, so I suspect the binary or the data didn’t come from a stock 0.16 release. What does stalwart --version print, and how was it installed (install script, a distro package, or built from source, and from which commit)? Has a nightly or development build ever run against this database? If you can, start it once with RUST_BACKTRACE=1 set and post the full backtrace; that shows which code path is asking.