Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonar is crashing due to an invalid memory address or nil pointer dereference #857

Open
jrevillas opened this issue Nov 30, 2024 · 1 comment

Comments

@jrevillas
Copy link

jrevillas commented Nov 30, 2024

After running for a few days, my Sonar instance is crashing with the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xa19ec0]

goroutine 68 [running]:
github.com/bluesky-social/indigo/sonar.(*Sonar).HandleRepoCommit(0x4000380300, {0xe8f160, 0x4000a6aa20}, 0x40007d5970)
	/app/sonar/sonar.go:230 +0xa60
github.com/bluesky-social/indigo/sonar.(*Sonar).HandleStreamEvent(0x4000380300, {0xe8f198, 0x400048bdb0}, 0x40007cd9e0)
	/app/sonar/sonar.go:111 +0x1130
github.com/bluesky-social/indigo/events/schedulers/sequential.(*Scheduler).AddWork(0x40000b4480, {0xe8f198, 0x400048bdb0}, {0x78f?, 0x60?}, 0x40007cd9e0)
	/app/events/schedulers/sequential/sequential.go:51 +0x70
github.com/bluesky-social/indigo/events.HandleRepoStream({0xe8f198?, 0x400048a140?}, 0x4000316580, {0xe878b0, 0x40000b4480})
	/app/events/consumer.go:202 +0x618
main.Sonar.func5()
	/app/cmd/sonar/main.go:200 +0xb0
created by main.Sonar in goroutine 1
	/app/cmd/sonar/main.go:197 +0xaa0

The current implementation (feceb36) seems to be unable to process a commit:

$ cat sonar_cursor.json | jq .
{
  "last_seq": 838239253,
  "last_seq_processed_at": "2024-11-29T17:47:47.946669887Z"
}

As a result, Sonar is unable to recover and make progress on the next run because the cursor is still pointing at a commit it can't process.

@jrevillas
Copy link
Author

I just found the problematic repository: did:plc:5hdeww3gu2q2cqcnkmtiesg2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant