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
Upgrade to Rails 6.0.0 #429
Conversation
This option is inconsistent between versions. In newer rubies this has been changed to `--no-document`.
@mokhan looks like |
There appears to be a segfault occuring after the tests have passed in the ruby 2.5/rails 6.0 job. Ruby: 2.5
|
Looking forward for this :) |
I’ll look into it tomorrow morning! |
I'm trying to reproduce this locally. I tried ruby 2.5 and 2.5.1 and I'm definitely getting a weird error, but not the same.
Not finding anything obvious in the logs. Feels like some dependency issue as I know there isn't anything in flipper that should cause this. Gotta run, but I'll keep poking at this over the weekend and on Monday. I have a build going with 2.6 added to the mix to see if this is 2.5 specific or not. Next step is probably google the error and then slowly start upgrading dependencies to see if that helps. |
I tried to repro locally as well yesterday but wasn't able to repro the error produced on Travis. I will try to continue to repro today with the samy ruby, rails and sqlite3 versions (2.5, 6.0, 1.4.1) A segfault from ruby's linked list is an interesting find and doesn't look directly related to flipper. |
😕 [15:22:07][~/development/flipper] [rails-6]
モ script/test
/home/mokha/.rbenv/versions/2.5.5/bin/ruby -I/home/mokha/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.2/lib:/home/mokha/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/rspec-support-3.8.2/lib /home/mokha/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb --color
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Finished in 1 minute 22.35 seconds (files took 17.25 seconds to load)
1367 examples, 0 failures
/home/mokha/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:87: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0002 p:0006 s:0006 e:000005 BLOCK /home/mokha/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
/home/mokha/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb:87:in `block (2 levels) in threadlocal_finalizer'
-- Machine register context ------------------------------------------------
RIP: 0x000055b567e807c9 RBP: 0x00007fe5e02c1b80 RSP: 0x00007fe5e02c13e8
RAX: 0x000055b56b80a4d0 RBX: 0x000055b567e92a53 RCX: 0x00007fe5e01c0fb0
RDX: 0x0000000000000000 RDI: 0x000055b56b80a4d0 RSI: 0x00007fe5e01c0fb0
R8: 0x635f6c6f6f702f72 R9: 0x00007fe5e01c0fb0 R10: 0x000055b56a248930
R11: 0x0000000000000004 R12: 0x00000000000404bb R13: 0x000055b56b7f0670
R14: 0x000055b56a119bf0 R15: 0x00007fe5e01c0fb0 EFL: 0x0000000000010206
-- C level backtrace information -------------------------------------------
Run options: --seed 45036
# Running:
..............................................................................................................................................................................................................
Finished in 7.272625s, 28.3254 runs/s, 868.0497 assertions/s.
206 runs, 6313 assertions, 0 failures, 0 errors, 0 skips
[15:28:43][~/development/flipper] [rails-6]
モ echo $?
0 |
Soooo are we good ? |
I have confirmation people are using rails 6 by bundling against git, but travis ci and locally are failing with weird failures. I'm not really sure what is going on or how to fix them currently. I will continue to poke at it as I have time. I could do a release, but if something was wrong, I'd feel bad. The specs/tests seem to pass, but then some weird segfault happens. Feels like a ruby thing. |
Sorry @kwent, I haven't had much time to work on this. As a temporary workaround you can use: gem 'flipper-active_record', '~> 0.16', github: 'mokhan/flipper', branch: 'rails-6' I agree with @jnunemaker, it's better to delay and get to the root cause of the segfaults. Until then, I hope this workaround is good enough for now. |
Thank you. I thing that's a reasonable workaround |
Based on #429 (comment) I think this is a case of ruby-concurrency/concurrent-ruby#808 I haven't confirmed that reverting ruby-concurrency/concurrent-ruby@eb81fff fixes the issue. |
I've narrowed this down a bit maybe. When I downgrade sqlite ruby to 1.3.x/rails 6, I get failures (needing higher than 1.3.x) but no segfault. When I switch back to 1.4.x/rails 6, I get a segfault. Makes it feel like this is related to sqlite3 or the dependency failure shortcuts code loading which loads concurrent ruby and thus causes failure instead of segfault. |
I'm certain this isn't flipper so I'm going to move forward on this PR. Hope that is ok with everyone. |
FWIW, I completely removed sqlite and the segfault remained so definitely something that rails is using like concurrent ruby. |
Thank you, @jnunemaker. |
It is possible to release a new version of
flipper-active_record
with the loosened version constraint that will allow it to work in rails 6.0 applications?