Skip to content
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

This PR fixes s390x issues and enables CI #144

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

velemas
Copy link
Contributor

@velemas velemas commented Nov 8, 2021

This PR fixes issue #136
and breakage introduced by commit 5980ef9 seen in
kubernetes/ingress-nginx#6504 on s390x.

Additionally implemented:

  • Table traversal changes for s390x introduced in commits c6f5ef6 and bb0f241.
  • CI (valgrind disabled for s390x because of unimplemented instruction).

Signed-off-by: Artiom Vaskov artiom.vaskov@ibm.com

@velemas
Copy link
Contributor Author

velemas commented Nov 8, 2021

s390x build with Valgrind failed. Running Valgrind build locally with Valgrind 3.16 results only in 4 failed tests with the same error:

==900264== Process terminating with default action of signal 4 (SIGILL): dumping core
==900264==  Illegal opcode at address 0x1027EB0
==900264==    at 0x1027EB0: lj_vm_floor (in /usr/local/bin/luajit-2.1.0-beta3)
==900264==    by 0x1011A79: lua_pcall (lj_api.c:1145)
==900264==    by 0x1004BEF: docall (luajit.c:121)
==900264==    by 0x1005BF1: handle_script (luajit.c:292)
==900264==    by 0x1005BF1: pmain (luajit.c:553)
==900264==    by 0x1025861: lj_BC_FUNCC (in /usr/local/bin/luajit-2.1.0-beta3)
==900264==    by 0x1011ADB: lua_cpcall (lj_api.c:1173)
==900264==    by 0x100465F: main (luajit.c:582)

Disassemble of lj_vm_floor shows a legal DIDBR instruction at 0x1027EB0:

Dump of assembler code for function lj_vm_floor:
   0x0000000001027ea8 <+0>:     lghi    %r0,1
   0x0000000001027eac <+4>:     cdfbr   %f1,%r0
   0x0000000001027eb0 <+8>:     didbr   %f0,%f2,%f1,7
   0x0000000001027eb4 <+12>:    jnle    0x1027ebc <lj_vm_floor+20>
   0x0000000001027eb8 <+16>:    ldr     %f0,%f2
   0x0000000001027eba <+18>:    br      %r14
   0x0000000001027ebc <+20>:    stg     %r0,0

Running Valgrind in verbose mode and with --sigill-diagnostics=yes produces:

vex s390->IR: unimplemented insn: B35B 2701
==915074== valgrind: Unrecognised instruction at address 0x1027eb0.
==915074==    at 0x1027EB0: lj_vm_floor (in /usr/local/bin/luajit-2.1.0-beta3)
==915074==    by 0x1011A79: lua_pcall (lj_api.c:1145)
==915074==    by 0x1004BEF: docall (luajit.c:121)
==915074==    by 0x1005BF1: handle_script (luajit.c:292)
==915074==    by 0x1005BF1: pmain (luajit.c:553)
==915074==    by 0x1025861: lj_BC_FUNCC (in /usr/local/bin/luajit-2.1.0-beta3)
==915074==    by 0x1011ADB: lua_cpcall (lj_api.c:1173)
==915074==    by 0x100465F: main (luajit.c:582)
==915074== Your program just tried to execute an instruction that Valgrind
==915074== did not recognise.  There are two possible reasons for this.
==915074== 1. Your program has a bug and erroneously jumped to a non-code
==915074==    location.  If you are running Memcheck and you just saw a
==915074==    warning about a bad jump, it's probably your program's fault.
==915074== 2. The instruction is legitimate but Valgrind doesn't handle it,
==915074==    i.e. it's Valgrind's fault.  If you think this is the case or
==915074==    you are not sure, please let us know and we'll try to fix it.
==915074== Either way, Valgrind will now raise a SIGILL signal which will
==915074== probably kill your program.

So it looks like Valgrind build should be disabled for s390x for now.

and breakage introduced by commit 5980ef9 seen in
kubernetes/ingress-nginx#6504 on s390x.

Additionally implemented:
- Table traversal changes for s390x introduced in commits c6f5ef6 and bb0f241.
- CI (valgrind disabled for s390x because of unimplemented instruction).

Signed-off-by: Artiom Vaskov <artiom.vaskov@ibm.com>
@zhuizhuhaomeng zhuizhuhaomeng merged commit 1085a4d into openresty:v2.1-agentzh Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants