You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:16:05 UTC

[jira] [Created] (TRAFODION-451) LP Bug: 1342945 - LLVM's JIT Compiler produces 'invalid' instruciton

Alice Chen created TRAFODION-451:
------------------------------------

             Summary: LP Bug: 1342945 - LLVM's JIT Compiler produces 'invalid' instruciton
                 Key: TRAFODION-451
                 URL: https://issues.apache.org/jira/browse/TRAFODION-451
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
            Reporter: Apache Trafodion
            Assignee: Apache Trafodion
            Priority: Critical
             Fix For: 0.9 (pre-incubation)


When core/TEST002  is run on slave02, slave03, or slave07 (machines used by Jenkins in checking out users' changes),  one of the Expressions that we attempt to optimize by converting from PCODE to LLVM somehow confuses LLVM's JIT Compiler and causes it to produce a machine instruction which UDIS86 reports as having an opcode of 'invalid'.   The JIT Compiler then completes normally, but when we attempt to use the native code at runtime (i.e. our Executor branches to the generated code), the process dies due to a H/W exception.

The PCODE Expression being translated is a simple one containing just 4 PCODE instructions:
MOVE_MBIN16U_IBIN16U [4,0] (MBIN16U) =  116 4 0 -1 LIVE: [1,24] [1,16]
MOVE_MBIN64S_MBIN64S [4,8] (MBIN64S) = [1,24] (MBIN64S), 203 4 8 1 24 LIVE: [1,24] [1,16]
MOVE_MBIN64S_MBIN32S [4,16] (MBIN64S) = [1,16] (MBIN32S), 12 4 16 1 16 LIVE: [1,16]
RETURN  =  264 LIVE:

and the LLVM Intermediate Representation is also perfectly normal looking.

Furthermore, if we change the code to tell the JIT Compiler to *not* do any optimization, then the problem does not happen.
Instead, 7 perfectly normal machine instructions are generated.

We are DISABLING the Native Expressions feature for now ... so that we can continue making progress in testing all the various changes that other developers are trying to check into the source. base.    We must leave the feature DISABLED until we can either solve the problem OR find a way to prevent the 'invalid' instructions from being used at runtime.     The purpose of this feature is to improve performance.  The feature is not needed for correct operation.
Assigned to LaunchPad User James Capps



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)