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

time.sleep sleeps indefinitely #29

Closed
dicej opened this issue Sep 8, 2023 · 3 comments
Closed

time.sleep sleeps indefinitely #29

dicej opened this issue Sep 8, 2023 · 3 comments

Comments

@dicej
Copy link
Collaborator

dicej commented Sep 8, 2023

For example, when targeting the wasi:cli command world:

from hello import exports
from time import sleep

class Run(exports.Run):
    def run(self):
        print("Hello, world!")
        sleep(0.00001)

The above prints "Hello, world!" and then seems to sleep forever.

@dicej
Copy link
Collaborator Author

dicej commented Sep 8, 2023

Actually, this seems non-deterministic, i.e. it sometimes blocks forever and sometimes not at all. Someone on MacOS reported that it either doesn't block at all or traps with an integer or floating point overflow error.

@dicej
Copy link
Collaborator Author

dicej commented Sep 11, 2023

This is addressed by bytecodealliance/wasmtime#6993

@dicej
Copy link
Collaborator Author

dicej commented Sep 13, 2023

This was a bug in wasmtime-wasi and will be fixed in Wasmtime 13, to be released soon.

@dicej dicej closed this as completed Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant