-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
bundler throws NullPointerException when running rake tasks #4424
Comments
would add |
ok so most of the time when I run this rake task with these flags, everything works and the output is as follows:
I'm guessing all
|
The NPE and your original ConcurrencyError are likely different bugs with the same cause. The NPE occurs in one of our IR passes, which might indicate some thread unsafety in the compiler. I know @enebo has been trying to make more parts of IR immutable, so he'll be interested in this. The ConcurrencyError, I suspect, may be due to unsafe threading code in Bundler. There is a report at rubygems/bundler#5142 that led to an as-yet-unreleased patch for code that was concurrently modifying a Set, which is just backed by a not-threadsafe Hash. You may want to report the ConcurrencyError to bundler, after confirming their fix does not resolve your issue. The NPE...I'm not sure what to recommend. @enebo? |
@headius This is the concurrent compilation of a child closure and compilation of one of its parents. The PR I submitted I think will fix this but I was concerned about any other fallout from it. @mohamedhafez Is there a way we can run this. Our biggest problem has been trying to reproduce this problem as it is a race across threads. |
Looking back through my logs I am actually getting both ConcurrentModificationException and NPE's on a regular basis (once every few days I get one or the other). @enebo would you like me to run your PR, or do you mean me setting up a way of giving you guys my code + a sample database maybe for you guys to mess around with it? I'm happy to do either, though the code is proprietary and used in an active business, so if we could limit the number of people with access to it that would be great |
@mohamedhafez I think those two errors are different problems personally. But if you could try my PR it would, I hope, tell us whether the NPE problem is solved with it. |
Ok so I was getting a weird unrelated error with the pull request, so I just cherry-picked 70d4921 on top of the 9.1.7.0 release, I'm running that now and will be until further notice, and I'll post back if I see the NPE error |
@enebo I don't see your PR linked. Has it been merged post-9.1.8.0? |
I mean post 9.1.7.0 of course... |
Just to update, in the 6 days of running this fix, no more NPEs! I've also been running the rake task that used to throw the error 3x more frequently, so it should have happened by now if if the problem wasn't fixed. Also I don't notice any other kind of adverse effects as far as I can tell. Strangely, I've also stopped getting the ConcurrentModificationException errors in this time period also... in any case this patch seems to have fixed this issue, I'll go ahead and close it, thanks guys! |
aasome news, thanks! marking as duplicate of #4304 |
Once in a while I get the following error when I try to run rake tasks:
Environment
I'm running JRuby 9.1.6.0, Rake 11.3.0, Bundler 1.13.7, on Ubuntu 16.04
uname -a:
Linux sa 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
command line:
JRUBY_OPTS=-J-Xmx2g RAILS_ENV=production bundle exec rake sa:recurring_tasks:all
The text was updated successfully, but these errors were encountered: