element-hq / element-hq/dendrite
Crash after calling DendriteMonolith.stop()
- Dominant language
- Go
- Stars
- 967
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
*This issue was originally created by [**@Juha-Park-TII**](https://github.com/Juha-Park-TII) at .*
### Background information
- **Dendrite version or git SHA**: 0.8.7
- **Monolith or Polylith?**: Monolith
- **SQLite3 or Postgres?**: No Idea
- **Running in Docker?**: No
- **`go version`**: go1.17.7 darwin/amd64
- **Client used (if applicable)**:
### Description
- **What** is the problem: When Dendrite monolith in android stop, it crashes
- **Who** is affected: Dendrite in Android
- **How** is this bug manifesting: E/GoLog: time="2022-06-07T08:59:02.988851880Z" level=fatal msg="accept tcp 127.0.0.1:65432: use of closed network connection"
- **When** did this first appear: it happens all the time regardless of dendrite version when dendrite server is stopped
### Steps to reproduce
- list the steps
1. monolith = DendriteMonolith()
2. monolith ?.storageDirectory = applicationContext.filesDir.toString()
3. monolith ?.cacheDirectory = applicationContext.cacheDir.toString()
4. monolith ?.start()
5. monolith?.stop()
- that reproduce the bug
- using hyphens as bullet points
Contributor guide
Research direction
Start at DendriteMonolith.stop() and follow the listener shutdown path that produces the reported fatal "use of closed network connection" message. Reproduce the Android monolith start/stop sequence with the listed storage and cache directories, then verify that stopping the server completes without a crash or fatal log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, go
- Domain
- backend, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100