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

http_open/3 hangs after being called twice #2834

Open
thierrymarianne opened this issue Feb 25, 2025 · 2 comments
Open

http_open/3 hangs after being called twice #2834

thierrymarianne opened this issue Feb 25, 2025 · 2 comments

Comments

@thierrymarianne
Copy link

thierrymarianne commented Feb 25, 2025

Hello 👋🏼,

I've noticed this related issue #2470.
Since it was not closed in between, and I've encountered a similar issue,

I've added the same test case to two separate branches,
and the issue is reproducible for both rebis-dev brand and v0.9.4 tag.

Pull-request #2833 was opened by mistake (when I intended to trigger the ci workflow from my fork,
sorry about that). However, it contains a module which can be loaded
to have a closer look at the issue.

By debugging, one can see that execution gets stuck on third request being sent at
https://github.com/mthom/scryer-prolog/blob/rebis-dev/src/machine/system_calls.rs#L4497

Image

With some guidance, I could perhaps offer a fix if someone sees how to proceed further,
which may or may not help in closing #2470 as well.

@thierrymarianne
Copy link
Author

thierrymarianne commented Feb 25, 2025

It seems that replacing futures::executor:block_on with tokio::block_in_place can help in identifying the actual issues in the way how the Ok(resp) branch is handled.

By removing all resource_error_call_result! macros,
direct unwrapping leads to a solution (no more hanging calls to http_open/3).

Of course, it would be better to fix the macro (in rebis-dev),
but I don't know how it should be done.

@thierrymarianne
Copy link
Author

thierrymarianne commented Feb 25, 2025

A tentative pull-request to check from ci workflows that nothing broke from the futures::executor:block_on replacement with tokio::block_in_place appears to be ok.
https://github.com/thierrymarianne/contrib-scryer-prolog/actions/runs/13529411529/job/37807772388

thierrymarianne pushed a commit to revuedepresse/org.revue-de-presse.bsky-client that referenced this issue Feb 27, 2025
fix: Process list items with more simplicity after figuring [http client issue upstream](thierrymarianne/contrib-scryer-prolog#8)
fix: Fixed off-by-one error
build: Revised submodule for the [time being](mthom/scryer-prolog#2834)
build: Added Docker exclude rules
feat: Removed status from query select clause
chore: Remove JetBrains logo
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