HarperFast / HarperFast/harper
Harper fails to restart: 'Thread has been restarted undefined times' after LMDB transaction errors
- Dominant language
- JavaScript
- Stars
- 89
- Forks
- 10
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 200
Description
## Problem
After a restart triggered by tests, Harper sometimes fails to come back up with:
```
uncaughtException Error: Invalid argument: No transaction to renew opening database
Thread has been restarted undefined times and will not be restarted
```
Also seen: `MDB_BAD_RSLOT: Invalid reuse of reader locktable slot: The reader lock pid 0, txn -1, doesn't match env pid 1`
## Details
- Flaky — not every test run triggers it
- Observed with both `threads.count=2` (default) and `threads.count=3`
- Happens during Docker CI test runs when Postman collection restarts Harper mid-suite
- The "undefined times" suggests the restart count tracking has a bug (NaN/undefined instead of a number)
🤖 Filed by Claude on behalf of Kris.
Contributor guide
Assessment
This issue has not been assessed yet.