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

GAP.jl hangs sometimes #905

Closed
fingolfin opened this issue Jun 19, 2023 · 1 comment
Closed

GAP.jl hangs sometimes #905

fingolfin opened this issue Jun 19, 2023 · 1 comment
Labels
kind: bug Something isn't working

Comments

@fingolfin
Copy link
Member

We've been debugging an issue where GAP.jl sometimes just hangs in CI jobs. I just couldn't find an issue for this, so I've decided to open one now; if there is already an issue, please add a comment here pointing to it.

@ThomasBreuer narrowed it down in PR #875 to a call to AUTODOC_AbsolutePath while running makedoc.g. That function hangs inside Process(Directory(dir), pwd, InputTextNone(), OutputTextString(result, true), []);, where the program it tries to execute is /bin/pwd.

The latest AutoDoc release 2023.06.19 (from today) actually gets rid of this function, so once we switch to that (by upgrading to a newer GAP package distro or some other means) this particular hang won't occur again.

But the underlying issue is still there: Process hangs. But I so far couldn't reproduce it locally :-(. I tried something naive (on both macOS and Linux), no success:

mypwd = GAP.evalstr("""
function()
    local pwd, result;
    pwd := Filename( DirectoriesSystemPrograms(), "pwd" );
    if pwd = fail then
        Error("failed to locate 'pwd' tool");
    fi;
    result := "";
    Process(DirectoryCurrent(), pwd, InputTextNone(), OutputTextString(result, true), []);
    return Chomp(result);
end
""")
for i in 1:1000 println(i, ": ", mypwd()) end

I am guessing for the hang to occur, certain other circumstances must align.

Earlier today I thought this was an issue with GAP's child process handling interfering with that of Julia. But I now realized that this is nonsense, because Process is implemented using ExecuteProcess, and we already are replacing that function by a Julia implementation! So if at all it seems like the replacement Julia code may have an issue?

Without a good way to reproduce the hang locally, it may be difficult to tackler this properly :-(

@fingolfin
Copy link
Member Author

Resolved by PR #906 for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant