spritely/goblins
4
58
Fork
You've already forked goblins
4

Exceptions playing with vats at REPL result in weird behavior (infinite loops?) #12

Closed
opened 2022年04月21日 18:28:34 +02:00 by dustyweb · 9 comments
dustyweb commented 2022年04月21日 18:28:34 +02:00 (Migrated from gitlab.com)
Copy link

When playing around at the REPL, I seem to get into situations like this:

> (define a-vat (spawn-vat))
> (a-vat (lambda () (error "Yikes")))
*Exception half-prints, CPU goes into infinite loop*

Okay, what's in an infinite loop then? Let's see:

> ,scheds
No schedulers.

Well... that's strange. That doesn't make much sense. Our vat should
still be running, and nothing should be infinite looping. What's
going on?

My suspicion is that somehow the scheduler is disappearing and, since
Fibers takes this weird spin-locking strategy, something
is... spinning infinitely. (On that note, I'm pretty skeptical of
Fibers' spin-locking approach...)

It could be that setting up a dedicated scheduler for vats would solve
this. I need to look into that I guess.

When playing around at the REPL, I seem to get into situations like this: ``` scheme > (define a-vat (spawn-vat)) > (a-vat (lambda () (error "Yikes"))) *Exception half-prints, CPU goes into infinite loop* ``` Okay, what's in an infinite loop then? Let's see: ``` scheme > ,scheds No schedulers. ``` Well... that's strange. That doesn't make much sense. Our vat should still be running, and nothing should be infinite looping. What's going on? My suspicion is that somehow the scheduler is disappearing and, since Fibers takes this weird spin-locking strategy, something is... spinning infinitely. (On that note, I'm pretty skeptical of Fibers' spin-locking approach...) It could be that setting up a dedicated scheduler for vats would solve this. I need to look into that I guess.
dustyweb commented 2022年04月27日 22:07:22 +02:00 (Migrated from gitlab.com)
Copy link

This error didn't happen previously, and I was wondering why. It
turns out it's some sort of bug introduced in Fibers 1.1.0. It
doesn't exist in 1.0.

We should try to figure out what caused this and help upstream pin it
down. In the meanwhile, I guess we should pin to the old package
version in our manifest / guix.scm. Too bad about this...

This error didn't happen previously, and I was wondering why. It turns out it's some sort of bug introduced in Fibers 1.1.0. It doesn't exist in 1.0. We should try to figure out what caused this and help upstream pin it down. In the meanwhile, I guess we should pin to the old package version in our manifest / guix.scm. Too bad about this...
dustyweb commented 2022年04月27日 23:07:39 +02:00 (Migrated from gitlab.com)
Copy link

I did a git-bisect against Fibers to figure out where it introduced
the error. Here's the source:

84addfbfc69e7dea63c4b9b08656d052043bcecf
Author: Andy Wingo <wingo@pobox.com>
CommitDate: Sun Aug 6 15:30:49 2017 +0200
Lighten up fibers by installing "catch" in scheduler
This takes the load off of each fiber and speeds things up.

guile-fibers hadn't seen a new release until very recently, so I guess
that's probably how this bug missed general usage.

I'll try to work with upstream to fix the problem.

I did a git-bisect against Fibers to figure out where it introduced the error. Here's the source: ``` diff 84addfbfc69e7dea63c4b9b08656d052043bcecf Author: Andy Wingo <wingo@pobox.com> CommitDate: Sun Aug 6 15:30:49 2017 +0200 Lighten up fibers by installing "catch" in scheduler This takes the load off of each fiber and speeds things up. ``` guile-fibers hadn't seen a new release until very recently, so I guess that's probably how this bug missed general usage. I'll try to work with upstream to fix the problem.
dustyweb commented 2022年04月27日 23:56:31 +02:00 (Migrated from gitlab.com)
Copy link
Filed an issue: https://github.com/wingo/fibers/issues/58
dustyweb commented 2022年05月19日 18:39:49 +02:00 (Migrated from gitlab.com)
Copy link

mentioned in issue #21

mentioned in issue #21
dustyweb commented 2023年01月02日 16:31:13 +01:00 (Migrated from gitlab.com)
Copy link

I don't think we've seen anything like this in a long time and this could have been related to the other REPL hanging bugs that turned out to be geiser based? But I'm not sure.

I don't think we've seen anything like this in a long time and this could have been related to the other REPL hanging bugs that turned out to be geiser based? But I'm not sure.
dustyweb commented 2023年01月02日 16:34:26 +01:00 (Migrated from gitlab.com)
Copy link

Dave has also experienced some REPL hanging issues but not a reproducible setup. Let's leave this open, anyone who experiences ANY weird repl things should report to this thread for now to track them.

Dave has also experienced some REPL hanging issues but not a reproducible setup. Let's leave this open, anyone who experiences ANY weird repl things should report to this thread for now to track them.
dustyweb commented 2023年01月26日 16:05:01 +01:00 (Migrated from gitlab.com)
Copy link

We did find out this issue isn't fixed, it appears to be a geiser issue still... I'm guessing that since they only partially accepted my solution that the thing they checked in doesn't solve this fully.

You can reproduce this by evaluating test-vat.scm line by line.

We can deal with this in the next release.

We did find out this issue isn't fixed, it appears to be a geiser issue still... I'm guessing that since they only *partially* accepted my solution that the thing they checked in doesn't solve this fully. You can reproduce this by evaluating `test-vat.scm` line by line. We can deal with this in the next release.
dustyweb commented 2023年01月26日 20:20:54 +01:00 (Migrated from gitlab.com)
Copy link

mentioned in merge request !79

mentioned in merge request !79
dustyweb commented 2023年07月05日 17:42:38 +02:00 (Migrated from gitlab.com)
Copy link

This is solved in Guile and Fibers upstream! Thank you Andy Wingo!

This is solved in Guile and Fibers upstream! Thank you Andy Wingo!
dustyweb (Migrated from gitlab.com) closed this issue 2023年07月05日 17:42:38 +02:00
Sign in to join this conversation.
No Branch/Tag specified
main
hashtable-actor
vat-log-resize-metacommand
fix-ocapn-ci
fix-796
support-zero-values
maybe-fix-ocapn-ci
document-wants-partial
prelay-docs
aurie-docs
lazy-captp
fast-sealers-fast-spawn
more-handoff-recieve-checks
ocapn-test-suite
add-keys-values-to-ghash-actor
docs-captp-ref-passing
fix-nested-with-vat
fix-281
captp-crossed-hellos
fix-243
sleepymaps
hootify-tests
move-define-actor-docs
websocket-netlayer
hoot-deprecation-warning
add-new-on-macros
replace-while-with-do
unenclose-syscaller
update-methods
new-devel
aurie-netlayer
devel
document-value-extraction
aurie-churn-fix
io-actor
cwebber-aurie-foundations
ci-code-coverage
0.12-news
gnutls-package
oops-all-goblins
relay-maybe-simplified
fake-indentation-fix
captp-remove-wants-partial-from-op-listen
mvre-wtf
multi-value-return-everywhere
simple-pick
remove-ports-dynamic-wrap
fast-spawn
additional-vat-events
onion-netlayer-temp
klugey-queue-captp-message
rest-of-captp
facet
ghash-pretty-print
fixing-syrup
fake-netlayer
onion-netlayer
string-formatting-errors
remove-waiter-cruft
lmethods
current-scheduler-kludge
hygienic-define-recordable
convert-captp
v0.17.0
v0.16.1
v0.16.0
v0.15.1
v0.15.0
v0.14.0
v0.13.0
v0.12.0
v0.11.0
v0.10
v0.8
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
spritely/goblins#12
Reference in a new issue
spritely/goblins
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?