ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:90986] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
@ 2019-01-10 10:44 ` v.ondruch
  2019-01-10 10:46 ` [ruby-core:90987] " v.ondruch
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: v.ondruch @ 2019-01-10 10:44 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been reported by vo.x (Vit Ondruch).

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522

* 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.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:90987] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
  2019-01-10 10:44 ` [ruby-core:90986] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7 v.ondruch
@ 2019-01-10 10:46 ` v.ondruch
  2019-01-10 11:08 ` [ruby-core:90988] " dan
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: v.ondruch @ 2019-01-10 10:46 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by vo.x (Vit Ondruch).


Also, it would be nice if the JIT output used different markup, which does not collide with Redmine markup :/

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76207

* 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.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:90988] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
  2019-01-10 10:44 ` [ruby-core:90986] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7 v.ondruch
  2019-01-10 10:46 ` [ruby-core:90987] " v.ondruch
@ 2019-01-10 11:08 ` dan
  2019-01-10 11:36 ` [ruby-core:90990] " v.ondruch
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: dan @ 2019-01-10 11:08 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by sharkcz (Dan Horák).


IMHO either something call __multi3 and doesn't link to libgcc or gcc emits call to __multi3 and it's not implemented in libgcc.
Would be useful to see /tmp/_ruby_mjit_p20163u1.c source and the command line used to compile/link it.

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76208

* 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.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:90990] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-01-10 11:08 ` [ruby-core:90988] " dan
@ 2019-01-10 11:36 ` v.ondruch
  2019-01-10 11:48 ` [ruby-core:90991] " v.ondruch
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: v.ondruch @ 2019-01-10 11:36 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by vo.x (Vit Ondruch).


The smaller reproducer probably is:

~~~
$ ruby --disable-gems --jit-verbose=10 --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"
~~~

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76210

* 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.





-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:90991] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2019-01-10 11:36 ` [ruby-core:90990] " v.ondruch
@ 2019-01-10 11:48 ` v.ondruch
  2019-01-10 12:40 ` [ruby-core:90993] " takashikkbn
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: v.ondruch @ 2019-01-10 11:48 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by vo.x (Vit Ondruch).

File _ruby_mjit_p207u2.c added

This should be the C code (although generated on my x86_64, because I don't have aarch64 readily available).

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76211

* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:90993] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2019-01-10 11:48 ` [ruby-core:90991] " v.ondruch
@ 2019-01-10 12:40 ` takashikkbn
  2019-01-10 12:42 ` [ruby-core:90994] " takashikkbn
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: takashikkbn @ 2019-01-10 12:40 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by k0kubun (Takashi Kokubun).


> Also, it would be nice if the JIT output used different markup, which does not collide with Redmine markup :/

Yeah. I'll change that later.

> This should be the C code (although generated on my x86_64, because I don't have aarch64 readily available).

How did you get the output in the ticket description? If possible, I want you to upload rb_mjit_min_header-2.6.0.h under install directory and the exact /tmp/_ruby_mjit_p20163u1.c whose so can't be loaded.

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76213

* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:90994] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2019-01-10 12:40 ` [ruby-core:90993] " takashikkbn
@ 2019-01-10 12:42 ` takashikkbn
  2019-01-10 14:06 ` [ruby-core:90996] " v.ondruch
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: takashikkbn @ 2019-01-10 12:42 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by k0kubun (Takashi Kokubun).

Assignee set to k0kubun (Takashi Kokubun)

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76214

* Author: vo.x (Vit Ondruch)
* Status: Open
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:90996] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2019-01-10 12:42 ` [ruby-core:90994] " takashikkbn
@ 2019-01-10 14:06 ` v.ondruch
  2019-01-10 14:56 ` [ruby-core:91002] [Ruby trunk Bug#15522][Feedback] " takashikkbn
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: v.ondruch @ 2019-01-10 14:06 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by vo.x (Vit Ondruch).

Assignee deleted (k0kubun (Takashi Kokubun))

k0kubun (Takashi Kokubun) wrote:
> > Also, it would be nice if the JIT output used different markup, which does not collide with Redmine markup :/
> 
> Yeah. I'll change that later.

Thx

> > This should be the C code (although generated on my x86_64, because I don't have aarch64 readily available).
> 
> How did you get the output in the ticket description?

That is from builder which is not easily accessible. I can throw in SRPM and get resulting logs and RPMs, but I cannot easily access the intermediate results  :/

> If possible, I want you to upload rb_mjit_min_header-2.6.0.h under install directory and the exact /tmp/_ruby_mjit_p20163u1.c whose .so can't be loaded.

I will see what I can do about it. Hopefully, @sharkcz will be able to help :)

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76216

* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:91002] [Ruby trunk Bug#15522][Feedback] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (7 preceding siblings ...)
  2019-01-10 14:06 ` [ruby-core:90996] " v.ondruch
@ 2019-01-10 14:56 ` takashikkbn
  2019-01-11 10:02 ` [ruby-core:91016] [Ruby trunk Bug#15522][Open] " v.ondruch
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: takashikkbn @ 2019-01-10 14:56 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by k0kubun (Takashi Kokubun).

Status changed from Open to Feedback

Thank you. I'll wait for that first.
Also having logs with --jit-verbose=2 version of https://bugs.ruby-lang.org/issues/15522#note-3 would be helpful.

P.S. The output format is changed in r66781.

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76223

* Author: vo.x (Vit Ondruch)
* Status: Feedback
* 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)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:91016] [Ruby trunk Bug#15522][Open] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (8 preceding siblings ...)
  2019-01-10 14:56 ` [ruby-core:91002] [Ruby trunk Bug#15522][Feedback] " takashikkbn
@ 2019-01-11 10:02 ` v.ondruch
  2019-01-11 10:42 ` [ruby-core:91017] [Ruby trunk Bug#15522] " dan
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: v.ondruch @ 2019-01-11 10:02 UTC (permalink / raw)
  To: ruby-core

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/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:91017] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (9 preceding siblings ...)
  2019-01-11 10:02 ` [ruby-core:91016] [Ruby trunk Bug#15522][Open] " v.ondruch
@ 2019-01-11 10:42 ` dan
  2019-01-11 11:10 ` [ruby-core:91019] [Ruby trunk Bug#15522][Assigned] " takashikkbn
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: dan @ 2019-01-11 10:42 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by sharkcz (Dan Horák).


I suppose "-nostartfiles -nodefaultlibs -nostdlib" are the reason that libgcc isn't linked into the _ruby_mjit_p111u0.so

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76242

* 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/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:91019] [Ruby trunk Bug#15522][Assigned] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (10 preceding siblings ...)
  2019-01-11 10:42 ` [ruby-core:91017] [Ruby trunk Bug#15522] " dan
@ 2019-01-11 11:10 ` takashikkbn
  2019-01-11 16:11 ` [ruby-core:91027] [Ruby trunk Bug#15522] " v.ondruch
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: takashikkbn @ 2019-01-11 11:10 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by k0kubun (Takashi Kokubun).

Status changed from Open to Assigned
Assignee set to k0kubun (Takashi Kokubun)

> Header and the content of /tmp directory (except the .gch, which was huge :/) are attached.

Thanks! Much appreciated.

> I suppose "-nostartfiles -nodefaultlibs -nostdlib" are the reason that libgcc isn't linked into the _ruby_mjit_p111u0.so
>
>__multi3 is provided in /lib64/libgcc_s-4.8.5-20150702.so.1

Possibly. It's causing issues on #15513 as well... I'll try to fix it.

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76244

* Author: vo.x (Vit Ondruch)
* Status: Assigned
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* 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/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:91027] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (11 preceding siblings ...)
  2019-01-11 11:10 ` [ruby-core:91019] [Ruby trunk Bug#15522][Assigned] " takashikkbn
@ 2019-01-11 16:11 ` v.ondruch
  2019-01-14  6:32 ` [ruby-core:91069] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails onaarch64 RHEL7 takashikkbn
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: v.ondruch @ 2019-01-11 16:11 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by vo.x (Vit Ondruch).


sharkcz (Dan Horák) wrote:
> I guess -nodefaultlibs should be omitted and/or -static-libgcc added. Skipping libgcc seems dangerous in general on any arch.

I removed `-nodefaultlibs` and it changed nothing. But reading GCC options [1] manual, the `-nostdlib` description, it says:

> In other words, when you specify -nostdlib or -nodefaultlibs you should usually specify -lgcc as well.

and indeed after adding `-lgcc`, the build passed. Also, the `-lgcc` is already used in some cases [2], maybe it should be used in all cases ...

[1]: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
[2]: https://github.com/ruby/ruby/blame/trunk/mjit_worker.c#L277

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76249

* Author: vo.x (Vit Ondruch)
* Status: Assigned
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* 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/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:91069] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails onaarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (12 preceding siblings ...)
  2019-01-11 16:11 ` [ruby-core:91027] [Ruby trunk Bug#15522] " v.ondruch
@ 2019-01-14  6:32 ` takashikkbn
  2019-01-14 11:58 ` [ruby-core:91079] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7 v.ondruch
  2019-01-17 21:54 ` [ruby-core:91147] " naruse
  15 siblings, 0 replies; 16+ messages in thread
From: takashikkbn @ 2019-01-14  6:32 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by k0kubun (Takashi Kokubun).


@vo.x Could you check if r66812 works?

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76293

* Author: vo.x (Vit Ondruch)
* Status: Closed
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* 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/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:91079] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (13 preceding siblings ...)
  2019-01-14  6:32 ` [ruby-core:91069] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails onaarch64 RHEL7 takashikkbn
@ 2019-01-14 11:58 ` v.ondruch
  2019-01-17 21:54 ` [ruby-core:91147] " naruse
  15 siblings, 0 replies; 16+ messages in thread
From: v.ondruch @ 2019-01-14 11:58 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by vo.x (Vit Ondruch).


k0kubun (Takashi Kokubun) wrote:
> @vo.x Could you check if r66812 works?

Actually it is r66811 + r66812. Applying these two patches, the test suite passes on RHEL7 on all supported architectures and it keeps passing on Fedora Rawhide on all supported architectures. Thx for the fix.

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76308

* Author: vo.x (Vit Ondruch)
* Status: Closed
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [aarch64-linux]
* Backport: 2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [ruby-core:91147] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7
       [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
                   ` (14 preceding siblings ...)
  2019-01-14 11:58 ` [ruby-core:91079] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7 v.ondruch
@ 2019-01-17 21:54 ` naruse
  15 siblings, 0 replies; 16+ messages in thread
From: naruse @ 2019-01-17 21:54 UTC (permalink / raw)
  To: ruby-core

Issue #15522 has been updated by naruse (Yui NARUSE).

Backport changed from 2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED to 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONE

ruby_2_6 r66849 merged revision(s) 66811,66812,66816.

----------------------------------------
Bug #15522: TestJIT#test_compile_insn_local fails on aarch64 RHEL7
https://bugs.ruby-lang.org/issues/15522#change-76377

* Author: vo.x (Vit Ondruch)
* Status: Closed
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [aarch64-linux]
* Backport: 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONE
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-01-17 21:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15522.20190110104455@ruby-lang.org>
2019-01-10 10:44 ` [ruby-core:90986] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7 v.ondruch
2019-01-10 10:46 ` [ruby-core:90987] " v.ondruch
2019-01-10 11:08 ` [ruby-core:90988] " dan
2019-01-10 11:36 ` [ruby-core:90990] " v.ondruch
2019-01-10 11:48 ` [ruby-core:90991] " v.ondruch
2019-01-10 12:40 ` [ruby-core:90993] " takashikkbn
2019-01-10 12:42 ` [ruby-core:90994] " takashikkbn
2019-01-10 14:06 ` [ruby-core:90996] " v.ondruch
2019-01-10 14:56 ` [ruby-core:91002] [Ruby trunk Bug#15522][Feedback] " takashikkbn
2019-01-11 10:02 ` [ruby-core:91016] [Ruby trunk Bug#15522][Open] " v.ondruch
2019-01-11 10:42 ` [ruby-core:91017] [Ruby trunk Bug#15522] " dan
2019-01-11 11:10 ` [ruby-core:91019] [Ruby trunk Bug#15522][Assigned] " takashikkbn
2019-01-11 16:11 ` [ruby-core:91027] [Ruby trunk Bug#15522] " v.ondruch
2019-01-14  6:32 ` [ruby-core:91069] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails onaarch64 RHEL7 takashikkbn
2019-01-14 11:58 ` [ruby-core:91079] [Ruby trunk Bug#15522] TestJIT#test_compile_insn_local fails on aarch64 RHEL7 v.ondruch
2019-01-17 21:54 ` [ruby-core:91147] " naruse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).