[#89806] [Ruby trunk Bug#15306] Generate prelude.c using miniruby — v.ondruch@...
Issue #15306 has been reported by vo.x (Vit Ondruch).
3 messages
2018/11/15
[ruby-core:89914] [Ruby trunk Bug#15325] Ruby 2.5.3 seg fault after find block returns
From:
stanhu@...
Date:
2018-11-20 22:11:15 UTC
List:
ruby-core #89914
Issue #15325 has been reported by stanhu (Stan Hu).
----------------------------------------
Bug #15325: Ruby 2.5.3 seg fault after find block returns
https://bugs.ruby-lang.org/issues/15325
* Author: stanhu (Stan Hu)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
In https://gitlab.com/gitlab-org/gitlab-ce/blob/233af8f1731734aaad7e5055af39f26c16608649/app/services/ci/register_job_service.rb#L48, we see a repeatable seg fault on both MacOS and Ubuntu with Rails 5.0.7 in a development environment. The seg fault appears to occur after the `find` returns:
~~~
builds.find do |build|
next unless runner.can_pick?(build)
begin
# In case when 2 runners try to assign the same build, second runner will be declined
# with StateMachines::InvalidTransition or StaleObjectError when doing run! or save method.
if assign_runner!(build, params)
register_success(build)
return Result.new(build, true) # <--- SEG FAULT HAPPENS AFTER HERE
end
rescue StateMachines::InvalidTransition, ActiveRecord::StaleObjectError
~~~
The segfault shows some bad memory access:
~~~
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff5d0e8b86 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff5d19ec50 pthread_kill + 285
2 libsystem_c.dylib 0x00007fff5d0521c9 abort + 127
3 ruby 0x000000010f5ec6a9 die + 9
4 ruby 0x000000010f5ec908 rb_bug_context + 600
5 ruby 0x000000010f6db7a1 sigsegv + 81
6 libsystem_platform.dylib 0x00007fff5d193b3d _sigtramp + 29
7 ??? 000000000000000000 0 + 0
8 ruby 0x000000010f75461e vm_exec + 142
9 ruby 0x000000010f761f25 invoke_block_from_c_bh + 405
10 ruby 0x000000010f74f719 rb_yield + 153
11 ruby 0x000000010f5e33b9 find_i + 41
12 ruby 0x000000010f7620ca invoke_block_from_c_bh + 826
13 ruby 0x000000010f74f719 rb_yield + 153
14 ruby 0x000000010f57cce9 rb_ary_each + 41
15 ruby 0x000000010f759f51 vm_call_cfunc + 305
16 ruby 0x000000010f742a0d vm_exec_core + 9149
17 ruby 0x000000010f75461e vm_exec + 142
18 ruby 0x000000010f761d41 rb_call0 + 161
19 ruby 0x000000010f74fe54 iterate_method + 52
20 ruby 0x000000010f74fd9b rb_iterate0 + 347
21 ruby 0x000000010f74fe1a rb_block_call + 74
22 ruby 0x000000010f5e0518 enum_find + 104
23 ruby 0x000000010f759f51 vm_call_cfunc + 305
24 ruby 0x000000010f7436bd vm_exec_core + 12397
~~~
We do NOT see the problem after downgrading to 2.4.5.
---Files--------------------------------
ruby_2018-11-20-132027_jet.crash (66.1 KB)
ruby-2.5.3-segfault.txt (774 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>