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:18:06 UTC

[jira] [Created] (TRAFODION-766) LP Bug: 1392522 - mxosrvr core dumped doing showplan (with Native Expression enabled)

Alice Chen created TRAFODION-766:
------------------------------------

             Summary: LP Bug: 1392522 - mxosrvr core dumped doing showplan (with Native Expression enabled)
                 Key: TRAFODION-766
                 URL: https://issues.apache.org/jira/browse/TRAFODION-766
             Project: Apache Trafodion
          Issue Type: Bug
            Reporter: Apache Trafodion
            Assignee: Apache Trafodion
             Fix For: 1.0 (pre-incubation)


Core was generated by `mxosrvr -ZkHost n014.cm.cluster:2181,n015.cm.cluster:2181,n016.cm.cluster:2181'.
Program terminated with signal 6, Aborted.
#0  0x00007ffff527f8a5 in raise () from /lib64/libc.so.6
#0  0x00007ffff527f8a5 in raise () from /lib64/libc.so.6
#1  0x00007ffff5281085 in abort () from /lib64/libc.so.6
#2  0x00007ffff6388a55 in os::abort(bool) () from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
#3  0x00007ffff6508f87 in VMError::report_and_die() () from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
#4  0x00007ffff638d96f in JVM_handle_linux_signal () from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
#5  <signal handler called>
#6  PCodeCfg::getIntConstValue (this=<value optimized out>, op=0x323bb10) at ../exp/ExpPCodeOptsConstProp.cpp:1846
#7  0x00007ffff20fbb1e in PCodeOperand::getJitValue (this=<value optimized out>, cfg=<value optimized out>, Bldr=<value optimized out>, IRtype=0x1e87250, blk=0x32b0560, orig=0x323bb10, noSave=0) at ../exp/ExpPCodeOptsNativeExpr.cpp:2641
#8  0x00007ffff20fb680 in PCodeOperand::getJitValue (this=<value optimized out>, cfg=<value optimized out>, Bldr=<value optimized out>, IRtype=0x1e87250, blk=0x32b0560, orig=0x0, noSave=0) at ../exp/ExpPCodeOptsNativeExpr.cpp:2241
#9  0x00007ffff21005c9 in PCodeCfg::layoutNativeCode (this=0x32a8a50, showplanSpace=0x7fffe5a8a770) at ../exp/ExpPCodeOptsNativeExpr.cpp:7313
#10 0x00007ffff20baae2 in PCodeCfg::generateShowPlan (this=0x32a8a50, pCode=<value optimized out>, space=0x7fffe5a8a770) at ../exp/ExpPCodeOptimizations.cpp:2578
#11 0x00007ffff204965b in ex_expr::displayContents (this=0x7fffd17ed3b0, space=0x7fffe5a8a770, mode=<value optimized out>, displayStr=<value optimized out>, flag=0) at ../exp/exp_expr.cpp:302
#12 0x00007ffff2049a3e in AggrExpr::displayContents (this=0x7fffd17ed3b0, space=0x7fffe5a8a770, mode=0, displayStr=0x7ffff3af13da "hbAggrExpr_", flag=15) at ../exp/exp_expr.cpp:531
#13 0x00007ffff3abc739 in ComTdb::displayExpression (this=0x7fffd17ff740, space=0x7fffe5a8a770, flag=15) at ../comexe/ComTdb.cpp:337
#14 0x00007ffff3acc0e7 in ComTdbHashGrby::displayContents (this=0x7fffd17ff740, space=0x7fffe5a8a770, flag=15) at ../comexe/ComTdbHashGrby.cpp:240
#15 0x00007ffff3abc582 in ComTdb::displayChildren (this=0x7fffd1804e38, space=0x7fffe5a8a770, flag=15) at ../comexe/ComTdb.cpp:370
#16 0x00007ffff3addcc2 in ComTdbSplitBottom::displayContents (this=0x7fffd1804e38, space=0x7fffe5a8a770, flag=15) at ../comexe/ComTdbSplitBottom.cpp:272
.
.
.

NOTE:  This is a known problem.   It was entered as ALM 7383 back on 11/7/2013.    It has never been fixed because (a) it was deemed to not be all that important since customers would not be using showplan and (b) it would be not be easy to fix – so we didn’t have time to do so before whatever deadline we were facing at the time.

The basic problem here is that showplan attempts to call the Native Expression code on *un-optimized* pcode, whereas when we are doing actual compilations and go to generate a Native Expression, we are working with *optimized* pcode at the time.   Un-optimized pcode has some weird qualities about.   Furthermore, we questioned how much value there was to having showplan display the un-optimized pcode  when we were not really going to be using that at runtime.

Justin recently told me that he was considering trying to make showplan use the optimized pcode (in his copious spare time).   Walt looked into it about a year ago and concluded that it would not be easy.

If you really need to see what the pcode and/or Native code looks like for a given plan, there are some debug options (CQDs) that we can turn on and get the actual SQL Compilation to put out the fairly voluminous debug output.   I think this does assume, though, that you are using a Debug-Mode build.

NOTE: Yes.   It would be easy to go into    PCodeCfg::generateShowPlan()  in  …/sql/exp/ExpPCodeOptimizations.cpp   at the point where it calls layoutNativeCode(space) and have it do something else instead … such as putting out the message saying  something like "unoptimized native expression not being displayed"  rather than taking a chance on getting a core dump.
Assigned to LaunchPad User James Capps



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