From: v.ondruch@... Date: 2019-01-11T10:02:08+00:00 Subject: [ruby-core:91016] [Ruby trunk Bug#15522][Open] TestJIT#test_compile_insn_local fails on aarch64 RHEL7 Issue #15522 has been updated by vo.x (Vit Ondruch). File rb_mjit_min_header-2.6.0.h added File mjit_multi3.tgz added Status changed from Feedback to Open So here is the output: ~~~ $ ruby --disable-gems --jit-verbose=2 --jit-min-calls=1 --jit-debug --jit-wait --jit-save-temps -e " begin def foo a = 0 [1, 2].each do |i| a += i [3, 4].each do |j| a *= j end end a end print foo end" MJIT: CC defaults to /usr/bin/gcc MJIT: tmp_dir is /tmp Creating precompiled header Starting process: /usr/bin/gcc /usr/bin/gcc -w -Wfatal-errors -fPIC -shared -w -pipe -ggdb3 -o /tmp/_ruby_mjit_hp111u0.h.gch /opt/rh/rh-ruby26/root/usr/include/rb_mjit_min_header-2.6.0.h start compilation: foo@-e:3 -> /tmp/_ruby_mjit_p111u0.c Starting process: /usr/bin/gcc /usr/bin/gcc -w -Wfatal-errors -fPIC -shared -w -pipe -ggdb3 -o /tmp/_ruby_mjit_p111u0.o /tmp/_ruby_mjit_p111u0.c -c -Wl,-z,relro -nostartfiles -nodefaultlibs -nostdlib Starting process: /usr/bin/gcc /usr/bin/gcc -shared -Wfatal-errors -fPIC -shared -w -pipe -ggdb3 -o /tmp/_ruby_mjit_p111u0.so /tmp/_ruby_mjit_p111u0.o -Wl,-z,relro -nostartfiles -nodefaultlibs -nostdlib MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p111u0.so': /tmp/_ruby_mjit_p111u0.so: undefined symbol: __multi3 start compilation: block in foo@-e:5 -> /tmp/_ruby_mjit_p111u1.c Starting process: /usr/bin/gcc /usr/bin/gcc -w -Wfatal-errors -fPIC -shared -w -pipe -ggdb3 -o /tmp/_ruby_mjit_p111u1.o /tmp/_ruby_mjit_p111u1.c -c -Wl,-z,relro -nostartfiles -nodefaultlibs -nostdlib Starting process: /usr/bin/gcc /usr/bin/gcc -shared -Wfatal-errors -fPIC -shared -w -pipe -ggdb3 -o /tmp/_ruby_mjit_p111u1.so /tmp/_ruby_mjit_p111u1.o -Wl,-z,relro -nostartfiles -nodefaultlibs -nostdlib MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p111u1.so': /tmp/_ruby_mjit_p111u1.so: undefined symbol: __multi3 start compilation: block (2 levels) in foo@-e:7 -> /tmp/_ruby_mjit_p111u2.c Starting process: /usr/bin/gcc /usr/bin/gcc -w -Wfatal-errors -fPIC -shared -w -pipe -ggdb3 -o /tmp/_ruby_mjit_p111u2.o /tmp/_ruby_mjit_p111u2.c -c -Wl,-z,relro -nostartfiles -nodefaultlibs -nostdlib Starting process: /usr/bin/gcc /usr/bin/gcc -shared -Wfatal-errors -fPIC -shared -w -pipe -ggdb3 -o /tmp/_ruby_mjit_p111u2.so /tmp/_ruby_mjit_p111u2.o -Wl,-z,relro -nostartfiles -nodefaultlibs -nostdlib MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p111u2.so': /tmp/_ruby_mjit_p111u2.so: undefined symbol: __multi3 168Stopping worker thread Successful MJIT finish ~~~ Header and the content of /tmp directory (except the .gch, which was huge :/) are attached. k0kubun (Takashi Kokubun) wrote: > P.S. The output format is changed in r66781. Nice, thanks! ---------------------------------------- Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7 https://bugs.ruby-lang.org/issues/15522#change-76241 * Author: vo.x (Vit Ondruch) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [aarch64-linux] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- Trying to build Ruby 2.6 on RHEL7, I observe the following test failure on RHEL7, but just on aarch64. The other platforms pass just fine: ~~~ 1) Failure: TestJIT#test_compile_insn_local [/builddir/build/BUILD/ruby-2.6.0/test/ruby/test_jit.rb:64]: Expected 3 times of JIT success, but succeeded 2 times. script: ``` def foo a = 0 [1, 2].each do |i| a += i [3, 4].each do |j| a *= j end end a end print foo ``` stderr: ``` JIT success (276.6ms): foo@-e:2 -> /tmp/_ruby_mjit_p20163u0.c JIT success (347.3ms): block in foo@-e:4 -> /tmp/_ruby_mjit_p20163u1.c MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p20163u2.so': /tmp/_ruby_mjit_p20163u2.so: undefined symbol: __multi3 Successful MJIT finish ``` . <3> expected but was <2>. ~~~ I suspect this must be some combination of architecture/compiler (gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)), because I don't observe similar issues on Fedora. ---Files-------------------------------- _ruby_mjit_p207u2.c (3.48 KB) rb_mjit_min_header-2.6.0.h (781 KB) mjit_multi3.tgz (993 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: