13
45
Fork
You've already forked fibers
10

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

Open
opened 2022年12月26日 02:38:35 +01:00 by gdt · 1 comment
gdt commented 2022年12月26日 02:38:35 +01:00 (Migrated from github.com)
Copy link

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.

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 commented 2022年12月26日 14:20:19 +01:00 (Migrated from github.com)
Copy link

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%)
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%) ```
Sign in to join this conversation.
No Branch/Tag specified
main
revert-110-wip-cancel-timer-operations
fdless-draft
pr-60-adjust
more-operations
timer-wheel
cross
nice-dynamic-wind-experiment
v1.4.3
v1.4.2
v1.4.1
v1.4.0
v1.3.1
v1.3.0
v1.2.0
v1.1.1
v1.1.0
v1.0.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
v0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
guile/fibers#75
Reference in a new issue
guile/fibers
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?