Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

concurrent map read and map write #321

Closed
1 of 6 tasks
NDagestad opened this issue Aug 13, 2020 · 2 comments
Closed
1 of 6 tasks

concurrent map read and map write #321

NDagestad opened this issue Aug 13, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@NDagestad
Copy link
Contributor

How have you installed cordless

  • Arch User Repository
  • Snap
  • scoop
  • brew
  • go get
  • git clone & go build .

What happened

If a server is marked read while cordless is open (from a phone app or desktop or something) it sometimes crashes.

How do you reproduce this bug

It is not reliably reproducible as it seems to be a race condition, but to make it happen, one should mark a server as read while discord is open

Error output

https://paste.git.dagestad.fr/~nicolai/ffb3bc8af04cedc092be1d69215fd6cf843e19e3

Hints on what could've happened

In ´readstate/readmarkers.go´ line 220 ´data´ is read and probably written to at the same time from another thread.

System information

Key Value
OS Arch
Architecture amd64
Go version go1.15 linux/amd64
@Bios-Marcel Bios-Marcel added the bug Something isn't working label Aug 13, 2020
@Bios-Marcel
Copy link
Owner

I've added locking. If this occurs again, please reopen the issue.

@NDagestad
Copy link
Contributor Author

I imagine that would fix the issue, thanks 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants