Race in queue code #9983

Closed
opened 2025-11-02 08:54:54 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @KN4CK3R on GitHub (Dec 15, 2022).

Description

Looks like there is still a race in the queue code:

2022/12/14 10:12:18 .../queue/workerpool.go:552:doWork() [E] [6399a182-6] Unhandled Data in queue 3
--- FAIL: TestChannelQueue_Pause (0.60s)
    queue_channel_test.go:281: 
        	Error Trace:	/drone/src/modules/queue/queue_channel_test.go:281
        	Error:      	handler chan should contain test1
        	Test:       	TestChannelQueue_Pause
2022/12/14 10:12:19 ...ueue_channel_test.go:169:func3() [I] Finally terminating
2022/12/14 10:12:19 ...eue/queue_channel.go:153:func1() [W] ChannelQueue:  Terminated before completed flushing
2022/12/14 10:12:20 ...ueue_disk_channel.go:184:func3() [W] [6399a184] LevelQueue: second-level shut down before completely flushed
2022/12/14 10:12:20 ...eue/queue_channel.go:153:func1() [W] ChannelQueue: second-channel Terminated before completed flushing
2022/12/14 10:12:21 ...disk_channel_test.go:202:func1() [I] [6399a184-3] pausing
2022/12/14 10:12:21 ...eue/queue_channel.go:153:func1() [W] ChannelQueue: first-channel Terminated before completed flushing
2022/12/14 10:12:22 ...disk_channel_test.go:202:func1() [I] [6399a186] pausing
2022/12/14 10:12:22 ...eue/queue_channel.go:153:func1() [W] ChannelQueue: second-channel Terminated before completed flushing
2022/12/14 10:12:22 ...ueue_disk_channel.go:184:func3() [W] [6399a185-2] LevelQueue: second-level shut down before completely flushed
2022/12/14 10:12:22 ...disk_channel_test.go:257:func3() [I] Finally terminating

Gitea Version

main

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://drone.gitea.io/go-gitea/gitea/64466/2/14

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

CI

Database

None

Originally created by @KN4CK3R on GitHub (Dec 15, 2022). ### Description Looks like there is still a race in the queue code: ``` 2022/12/14 10:12:18 .../queue/workerpool.go:552:doWork() [E] [6399a182-6] Unhandled Data in queue 3 --- FAIL: TestChannelQueue_Pause (0.60s) queue_channel_test.go:281: Error Trace: /drone/src/modules/queue/queue_channel_test.go:281 Error: handler chan should contain test1 Test: TestChannelQueue_Pause 2022/12/14 10:12:19 ...ueue_channel_test.go:169:func3() [I] Finally terminating 2022/12/14 10:12:19 ...eue/queue_channel.go:153:func1() [W] ChannelQueue: Terminated before completed flushing 2022/12/14 10:12:20 ...ueue_disk_channel.go:184:func3() [W] [6399a184] LevelQueue: second-level shut down before completely flushed 2022/12/14 10:12:20 ...eue/queue_channel.go:153:func1() [W] ChannelQueue: second-channel Terminated before completed flushing 2022/12/14 10:12:21 ...disk_channel_test.go:202:func1() [I] [6399a184-3] pausing 2022/12/14 10:12:21 ...eue/queue_channel.go:153:func1() [W] ChannelQueue: first-channel Terminated before completed flushing 2022/12/14 10:12:22 ...disk_channel_test.go:202:func1() [I] [6399a186] pausing 2022/12/14 10:12:22 ...eue/queue_channel.go:153:func1() [W] ChannelQueue: second-channel Terminated before completed flushing 2022/12/14 10:12:22 ...ueue_disk_channel.go:184:func3() [W] [6399a185-2] LevelQueue: second-level shut down before completely flushed 2022/12/14 10:12:22 ...disk_channel_test.go:257:func3() [I] Finally terminating ``` ### Gitea Version main ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://drone.gitea.io/go-gitea/gitea/64466/2/14 ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? CI ### Database None
GiteaMirror added the type/bug label 2025-11-02 08:54:54 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Dec 15, 2022):

@zeripath fyi

@KN4CK3R commented on GitHub (Dec 15, 2022): @zeripath fyi
Author
Owner

@zeripath commented on GitHub (Dec 15, 2022):

I think that's more likely a race in the test. Not the code itself.

@zeripath commented on GitHub (Dec 15, 2022): I think that's more likely a race in the test. Not the code itself.
Author
Owner

@zeripath commented on GitHub (Dec 29, 2022):

It would also fix the test error here: https://drone.gitea.io/go-gitea/gitea/64883/2/13

@zeripath commented on GitHub (Dec 29, 2022): It would also fix the test error here: https://drone.gitea.io/go-gitea/gitea/64883/2/13
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9983