element-hq / element-hq/dendrite

Server Crash - fatal error: Found bad pointer in go heap

Open
#3,221 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
965
Forks
101
PR merge metrics
No merged PRs in 30d

Description

*This issue was originally created by [**@hugeblank**](https://github.com/hugeblank) at .*

### Background information

- **Dendrite version or git SHA**: 3d02c8103152fbb9a5401a091ef0f681a32bfeee
- **SQLite3 or Postgres?**: postgres (PostgreSQL) 15.4
- **Running in Docker?**: No
- **`go version`**: `go version go1.21.1 linux/amd64`

### Description

- **What** is the problem: Server Crashes infrequently and randomly, the first error before dumping a massive stack trace is: `fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)`
- **Who** is affected: Users of my server
- **How** is this bug manifesting: log of incident will be sent to @kegan:matrix.org as I'm not sure what in this log, if anything, would reveal information about my HS setup.
- **When** did this first appear: It has been a problem since I've set up this dendrite instance. This is the second instance of this happening, the trace beyond the first `fatal error` line in the log was different that first time. Unfortunately I accidentally overwrote that log when capturing this new one. If it happens again and more context is needed I'll capture another one.

### Steps to reproduce

- Start a federated dendrite server
- Leave it alone for a while

Contributor guide

Open the contributing guide

Research direction

No source file, failing test, or complete crash log is identified. Start by obtaining the incident log and investigating reproduction with Dendrite commit 3d02c8103152fbb9a5401a091ef0f681a32bfeee, Go 1.21.1, and PostgreSQL 15.4. Done requires a confirmed trigger and a validated fix with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.