-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[REPL] fix lock ordering mistake in load_pkg #56215
Conversation
Also fix waiting on the package_locks being always a no-op here. Fixes #56206
REPLExt = Base.require_stdlib(Pkg_pkgid, "REPLExt") | ||
@lock Base.require_lock begin | ||
REPLExt = Base.require_stdlib(Pkg_pkgid, "REPLExt") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require_stdlib
locks require_lock
for the entire function, so why does the lock need to be released between these operations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It releases the lock many times internally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah so the additional lock layer prevents those from releasing fully
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We could do an unlockall/relockall pair like wait
does, but it is sort of always a concurrency bug if your application actually relies on that.
Fixes #56206