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

race-until test runs forever (1.2.0 + affinity patch, NetBSD 9 amd64) #75

Open
gdt opened this issue Dec 26, 2022 · 1 comment
Open
Labels
bug no-clue Don't know what the fix would be / whether this fix is correct, but acknowledged.

Comments

@gdt
Copy link

gdt commented Dec 26, 2022

I'm building 1.2.0 plus the patch to not use affinity on most platforms (thanks @aconchillo), under pkgsrc.

The test that prints assert run-fibers on (race-until 100) terminates: runs indefinitely. I have done a build and make check 4 or 5 times and the indefinite running (with CPU usage - I can hear the fan spin up) happens reliably.

I'm sure there is a bug, maybe fibers, maybe guile, maybe in the OS, but I have no idea where. But, this issue is that the test should instead always exit, failing if that's how it is, perhaps just by having a max loop count.

The tests prior to this pass, with very reasonable runtimes, almost all less than 20 ms.

@gdt
Copy link
Author

gdt commented Dec 26, 2022

Actually some take longer but are clearly not stuck:

assert terminates: (run-fibers (lambda () (spawn-fiber-tree 5 (lambda () (sleep 1)))) #:drain? #t): ok (1.011651015 s)
assert terminates: (run-fibers (lambda () (spawn-fiber-chain 5)) #:drain? #t): ok (9.70913e-4 s)
assert terminates: (run-fibers (lambda () (spawn-fiber-chain 50)) #:drain? #t): ok (0.001394422 s)
assert terminates: (run-fibers (lambda () (spawn-fiber-chain 500)) #:drain? #t): ok (0.007145873 s)
assert terminates: (run-fibers (lambda () (spawn-fiber-chain 5000)) #:drain? #t): ok (0.05655267 s)
assert terminates: (run-fibers (lambda () (spawn-fiber-chain 50000)) #:drain? #t): ok (0.591639325 s)
assert terminates: (run-fibers (lambda () (spawn-fiber-chain 500000)) #:drain? #t): ok (5.526817611 s)
assert terminates: (run-fibers (lambda () (spawn-fiber-chain 5000000)) #:drain? #t): ok (55.836063731 s)
assert terminates: (run-fibers (lambda () (test-run-order 10)) #:parallelism 1 #:drain? #t): ok (0.038900581 s)
assert terminates: (run-fibers (lambda () (test-wakeup-order 10)) #:parallelism 1 #:drain? #t): ok (2.51773e-4 s)
assert terminates: (run-fibers (lambda () 1) #:drain? #t): ok (7.68028e-4 s)
assert run-fiber-return-vals equal to (1): ok
assert terminates: (run-fibers (lambda () (do-times 20 (check-sleep (random 1.0)))) #:drain? #t): assert sleep 0.06564007283307066s < actual 0.071227626s: #t (diff: 8.512411589089872%)

@emixa-d emixa-d added bug no-clue Don't know what the fix would be / whether this fix is correct, but acknowledged. labels Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug no-clue Don't know what the fix would be / whether this fix is correct, but acknowledged.
Projects
None yet
Development

No branches or pull requests

2 participants