13
45
Fork
You've already forked fibers
10

Infinite loops on uncaught exceptions #58

Open
opened 2022年04月27日 23:56:02 +02:00 by cwebber · 5 comments
cwebber commented 2022年04月27日 23:56:02 +02:00 (Migrated from github.com)
Copy link

In switching guile-goblins from Fibers 1.0 to 1.10, I noticed that when exceptions occured, schedulers suddenly stopped working but also my cpu would shoot up to 100%. That's strange, that shouldn't happen, what gives?

I did a git-bisect against fibers to try to figure out where this started. The issue is introduced in 84addfbfc6. I haven't checked for sure, but I'm pretty certain that what's happening is that where the scheduler previously was catching the exception in the individual task but the scheduler would continue looping, now the scheduler is breaking and not continuing on an individual error. Thus, it isn't feeding anything to the individual fibers, which start spin locking madly.

In switching [guile-goblins](https://gitlab.com/spritely/guile-goblins) from Fibers 1.0 to 1.10, I noticed that when exceptions occured, schedulers suddenly stopped working but also my cpu would shoot up to 100%. That's strange, that shouldn't happen, what gives? I did a git-bisect against fibers to try to figure out where this started. The issue is introduced in 84addfbfc69e7dea63c4b9b08656d052043bcecf. I haven't checked for sure, but I'm pretty certain that what's happening is that where the scheduler previously was catching the exception in the individual task but the scheduler would continue looping, now the scheduler is breaking and *not* continuing on an individual error. Thus, it isn't feeding anything to the individual fibers, which start spin locking madly.
cwebber commented 2022年04月28日 21:30:20 +02:00 (Migrated from github.com)
Copy link

One option is simply to revert 84addfbfc6. Maybe @wingo might not like this; it fixes it, but it re-introduces whatever performance issue the commit was meant to address.

One option is simply to revert 84addfbfc69e7dea63c4b9b08656d052043bcecf. Maybe @wingo might not like this; it fixes it, but it re-introduces whatever performance issue the commit was meant to address.
aconchillo commented 2022年04月28日 23:26:49 +02:00 (Migrated from github.com)
Copy link

IMO, stability is always preferred over performance.

IMO, stability is always preferred over performance.
wingo commented 2022年04月29日 15:31:23 +02:00 (Migrated from github.com)
Copy link

Do you have a test case?

Do you have a test case?
aconchillo commented 2022年06月04日 07:17:47 +02:00 (Migrated from github.com)
Copy link

@cwebber Probably completely unrelated, but I'm wondering if this commit github.com/wingo/fibers@c25dcb9cc4 would fix the issue you are seeing. Available in Fibers 1.1.1.

@cwebber Probably completely unrelated, but I'm wondering if this commit https://github.com/wingo/fibers/commit/c25dcb9cc4b5b977474ffe555b40ce2f1d0d1edc would fix the issue you are seeing. Available in Fibers 1.1.1.
wingo commented 2023年06月08日 10:29:43 +02:00 (Migrated from github.com)
Copy link

Pretty sure this is fixed via #76, which is now in Guile main. Christine can you give a try with Guile from git and see if you are still having issues? Or otherwise close this one if you think it is fixed.

Pretty sure this is fixed via #76, which is now in Guile `main`. Christine can you give a try with Guile from git and see if you are still having issues? Or otherwise close this one if you think it is fixed.
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#58
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?