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

Intermittent Data Race in Queues tests #16546

Closed
zeripath opened this issue Jul 25, 2021 · 2 comments · Fixed by #16560
Closed

Intermittent Data Race in Queues tests #16546

zeripath opened this issue Jul 25, 2021 · 2 comments · Fixed by #16560
Milestone

Comments

@zeripath
Copy link
Contributor

  • Gitea version (or commit ref): v1.16.0-dev-47-g6a33b290a
  • Log gist:
==================
214s
70	WARNING: DATA RACE
214s
71	Write at 0x00c000266780 by goroutine 96:
214s
72	  gitea.com/lunny/levelqueue.(*Queue).Close()
214s
73	      /drone/src/vendor/gitea.com/lunny/levelqueue/queue.go:299 +0xde
214s
74	  code.gitea.io/gitea/modules/queue.(*LevelQueueByteFIFO).Close()
214s
75	      /drone/src/modules/queue/queue_disk.go:108 +0x4f
214s
76	  code.gitea.io/gitea/modules/queue.(*ByteFIFOQueue).Terminate()
214s
77	      /drone/src/modules/queue/queue_bytefifo.go:262 +0x27e
...
171	Previous read at 0x00c000266780 by goroutine 106:
214s
172	  gitea.com/lunny/levelqueue.(*Queue).RPop()
214s
173	      /drone/src/vendor/gitea.com/lunny/levelqueue/queue.go:198 +0x215
214s
174	  code.gitea.io/gitea/modules/queue.(*LevelQueueByteFIFO).Pop()
214s
175	      /drone/src/modules/queue/queue_disk.go:99 +0x4f
214s

Description

There is an intermittent datarace detected in the queue_disk_test due to an unlocked reset of the internal db in Close within the levelqueue.

This is fixed by: https://gitea.com/lunny/levelqueue/pulls/4

@zeripath zeripath added this to the 1.16.0 milestone Jul 25, 2021
@lunny
Copy link
Member

lunny commented Jul 27, 2021

merged and gitea.com/lunny/levelqueue v0.4.0 is released.

@zeripath
Copy link
Contributor Author

Thanks @lunny

zeripath pushed a commit that referenced this issue Jul 27, 2021
lunny added a commit to lunny/gitea that referenced this issue Jul 27, 2021
6543 pushed a commit that referenced this issue Jul 27, 2021
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 10, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants