-
Notifications
You must be signed in to change notification settings - Fork 519
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
Prevent hard crash on duplicate plugin paths #1650
Conversation
When a global plugin is used both locally and within the project, there are cases when the rebar3 program will hard crash (killed in do_boot). This has been traced to plugin-handling in compilation, where the same code path may be purged twice in a row without further reloading for the compile operation. This of course yields the result where the code handling on the VM kills all processes holding references to the module in memory, in this case the rebar3 process itself. By deduplicating the paths first, we ensure at most one purge before reloading plugins and paths, and this prevents a hard crash.
Is this coming to nightly soon? |
I'm awaiting some review from @tsloughter or @talentdeficit |
I'll merge this; if @tsloughter can think of a better fix, we can always revert and fix then. |
@ferd Found more weird issues related to this. Apparently it works with Rebar3 3.4.4 but not latest master: 3.4.4
3.4.7+build.3957.ref46ea7e1e
(Note the double plugin compiled from both a local |
Some more research: Working Versions
Broken Versions
|
Ugh, I'm betting there's more stuff related to plugins paths here. I'll have to take a look a bit later. Possibly related to the following series of patches:
I'm guessing the global plugin path is lost on the newest one, so the fix may not be super hard. |
When a global plugin is used both locally and within the project, there
are cases when the rebar3 program will hard crash (killed in do_boot).
This has been traced to plugin-handling in compilation, where the same
code path may be purged twice in a row without further reloading for the
compile operation.
This of course yields the result where the code handling on the VM kills
all processes holding references to the module in memory, in this case
the rebar3 process itself.
By deduplicating the paths first, we ensure at most one purge before
reloading plugins and paths, and this prevents a hard crash.