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

mkpidlock: close update loop in error path #51902

Merged

Conversation

IanButterworth
Copy link
Sponsor Member

@IanButterworth IanButterworth commented Oct 27, 2023

No description provided.

@IanButterworth IanButterworth added the kind:bugfix This change fixes an existing bug label Oct 27, 2023
@IanButterworth IanButterworth marked this pull request as draft October 27, 2023 16:20
@IanButterworth
Copy link
Sponsor Member Author

I was able to reproduce #51901 on this branch

Copy link
Sponsor Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This is why I wish we could bind a resource to a Task, so that one it ends that resource is implicitly also closed. Channels can do that, but not other resources. Although wait(proc) does not throw errors, so this should be unimportant)

@vtjnash vtjnash removed the kind:bugfix This change fixes an existing bug label Oct 27, 2023
@vtjnash vtjnash marked this pull request as ready for review October 27, 2023 17:31
@IanButterworth
Copy link
Sponsor Member Author

Although wait(proc) does not throw errors

But wait(proc) can be interrupted

julia> begin
       wait(run(`julia -e "sleep(10)"`, wait=false))
       println("here")
       end
^CERROR: InterruptException:
Stacktrace:
 [1] poptask(W::Base.IntrusiveLinkedListSynchronized{Task})
   @ Base ./task.jl:974
 [2] wait()
   @ Base ./task.jl:983
 [3] wait(c::Base.GenericCondition{Base.Threads.SpinLock}; first::Bool)
   @ Base ./condition.jl:130
 [4] wait
   @ ./condition.jl:125 [inlined]
 [5] wait(x::Base.Process)
   @ Base ./process.jl:661

I can still trigger #51901 on this PR though

@IanButterworth IanButterworth merged commit 9c581cd into JuliaLang:master Oct 28, 2023
9 checks passed
@IanButterworth IanButterworth deleted the ib/close_pidfile_refresh branch October 28, 2023 11:50
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

Successfully merging this pull request may close these issues.

2 participants