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

[jira] [Created] (TRAFODION-537) LP Bug: 1356069 - Executor assert may not dump core within embedded compiler

Alice Chen created TRAFODION-537:
------------------------------------

             Summary: LP Bug: 1356069 - Executor assert may not dump core within embedded compiler
                 Key: TRAFODION-537
                 URL: https://issues.apache.org/jira/browse/TRAFODION-537
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
            Reporter: justin.du@hp.com
            Assignee: Howard Qin
            Priority: Critical
             Fix For: 0.9 (pre-incubation)


The embedded compiler throws exceptions instead of dumping core during query compilation for assert calls. However, the executor code may be executed inside the embedded compiler code. The executor assertion may need to dump core and abort in order to limit the potential data corruption.

Here is a call stack that executor code was executed inside compilation and the global identifier was set to embedded compiler:

(gdb) bt
#0  0x0000003aab4328a5 in raise () from /lib64/libc.so.6
#1  0x0000003aab434085 in abort () from /lib64/libc.so.6
#2  0x00007ffff5f7ad8b in ComCondition::setSQLCODE (this=0x7fffd76b60f8, 
    newSQLCODE=-8581) at ../export/ComDiags.cpp:1425
#3  0x00007ffff4a56fc1 in operator<< (d=..., dgObj=...)
    at ../common/DgBaseType.cpp:138
#4  0x00007ffff4fefd82 in ExUniqueHashJoinTcb::workUp (this=0x7fffd7c203c8)
    at ../executor/ex_hashj.cpp:3558
#5  0x00007ffff4ff207f in ExUniqueHashJoinTcb::sWorkUp (tcb=0x7fffd7c203c8)
    at ../executor/ex_hashj.h:623
#6  0x00007ffff50c5f7b in ExSubtask::work (this=0x7fffd7c20df8)
    at ../executor/ExScheduler.cpp:751
#7  0x00007ffff50c533e in ExScheduler::work (this=0x7fffd7c1e218, 
    prevWaitTime=0) at ../executor/ExScheduler.cpp:328
#8  0x00007ffff500499b in ex_root_tcb::execute (this=0x7fffd7c20e58, 
    cliGlobals=0xb909d0, glob=0x7fffd7c28d98, input_desc=0x7fffe90dd640, 
    diagsArea=@0x7ffffffea730, reExecute=0) at ../executor/ex_root.cpp:1025
#9  0x00007ffff625d115 in CliStatement::execute (this=0x7fffe911e0d0, 
    cliGlobals=0xb909d0, input_desc=0x7fffe90dd640, diagsArea=..., 
    execute_state=CliStatement::INITIAL_STATE_, fixupOnly=0, cliflags=0)
    at ../cli/Statement.cpp:4740
#10 0x00007ffff6202743 in SQLCLI_PerformTasks(CliGlobals *, ULng32, SQLSTMT_ID *, SQLDESC_ID *, SQLDESC_ID *, Lng32, Lng32, typedef __va_list_tag __va_list_tag *, SQLCLI_PTR_PAIRS *, SQLCLI_PTR_PAIRS *) (cliGlobals=0xb909d0, tasks=4882, 
    statement_id=0x1459e50, input_descriptor=0x14214c0, output_descriptor=0x0, 
    num_input_ptr_pairs=0, num_output_ptr_pairs=0, ap=0x7ffffffead00, 
    input_ptr_pairs=0x0, output_ptr_pairs=0x0) at ../cli/Cli.cpp:3274
#11 0x00007ffff62030b4 in SQLCLI_Exec(CliGlobals *, SQLSTMT_ID *, SQLDESC_ID *, Lng32, typedef __va_list_tag __va_list_tag *, SQLCLI_PTR_PAIRS *) (
    cliGlobals=0xb909d0, statement_id=0x1459e50, input_descriptor=0x14214c0, 
    num_ptr_pairs=0, ap=0x7ffffffead00, ptr_pairs=0x0) at ../cli/Cli.cpp:3521
#12 0x00007ffff62701da in SQL_EXEC_Exec (statement_id=0x1459e50, 
    input_descriptor=0x14214c0, num_ptr_pairs=0) at ../cli/CliExtern.cpp:2062
#13 0x00007ffff50493d6 in ExeCliInterface::exec (this=0x7ffffffec650, 
    inputBuf=0x0, inputBufLen=0) at ../executor/ExExeUtilCli.cpp:599
#14 0x00007ffff504a41d in ExeCliInterface::fetchRowsPrologue (
    this=0x7ffffffec650, 
    sqlStrBuf=0x7ffffffeaff0 "select O.catalog_name, O.schema_name, O.object_name, I.keytag, I.is_unique, I.is_explicit, I.key_colcount, I.nonkey_colcount from TRAFODION.\"_MD_\".INDEXES I, TRAFODION.\"_MD_\".OBJECTS O where I.base_ta"..., noExec=0, monitorThis=0, stmtName=0x0) at ../executor/ExExeUtilCli.cpp:1033
#15 0x00007ffff504a6f5 in ExeCliInterface::fetchAllRows (this=0x7ffffffec650, 
    infoList=@0x7ffffffeca20, 
    query=0x7ffffffeaff0 "select O.catalog_name, O.schema_name, O.object_name, I.keytag, I.is_unique, I.is_explicit, I.key_colcount, I.nonkey_colcount from TRAFODION.\"_MD_\".INDEXES I, TRAFODION.\"_MD_\".OBJECTS O where I.base_ta"..., 
    inNumOutputEntries=0, varcharFormat=0, monitorThis=0, initInfoList=1)
    at ../executor/ExExeUtilCli.cpp:1107
#16 0x00007ffff127ef6a in CmpSeabaseDDL::getSeabaseUserTableDesc (
    this=0x7ffffffecde0, catName=..., schName=..., objName=..., 
    objType=0x7fffefd1883d "BT", includeInvalidDefs=0)
    at ../sqlcomp/CmpSeabaseDDLtable.cpp:5642
#17 0x00007ffff1281816 in CmpSeabaseDDL::getSeabaseTableDesc (
    this=0x7ffffffecde0, catName=..., schName=..., objName=..., 
    objType=0x7fffefd1883d "BT", includeInvalidDefs=0)
    at ../sqlcomp/CmpSeabaseDDLtable.cpp:6204
#18 0x00007fffef99db77 in NATableDB::get (this=0x7fffe85386a8, corrName=..., 
    bindWA=0x7fffffff0720, inTableDescStruct=0x0)
    at ../optimizer/NATable.cpp:7123
#19 0x00007fffef70420e in BindWA::getNATable (this=0x7fffffff0720, 
    corrName=..., catmanCollectTableUsages=1, inTableDescStruct=0x0)
    at ../optimizer/BindRelExpr.cpp:1443
#20 0x00007fffef72d499 in GenericUpdate::bindNode (this=0x7fffd8ad4f30, 
    bindWA=0x7fffffff0720) at ../optimizer/BindRelExpr.cpp:11104
#21 0x00007fffef722533 in Insert::bindNode (this=0x7fffd8ad4f30, 
    bindWA=0x7fffffff0720) at ../optimizer/BindRelExpr.cpp:8480
#22 0x00007fffef707693 in RelExpr::bindChildren (this=0x7fffd8ad5de0, 
    bindWA=0x7fffffff0720) at ../optimizer/BindRelExpr.cpp:2178
#23 0x00007fffef71338a in RelRoot::bindNode (this=0x7fffd8ad5de0, 
    bindWA=0x7fffffff0720) at ../optimizer/BindRelExpr.cpp:5015
#24 0x00007ffff1243f85 in CmpMain::compile (this=0x7fffffff2950, 
    input_str=0x7fffd8b1aff0 "insert into t019right values (1),(2),(3);", 
    charset=15, queryExpr=@0x7fffffff2858, gen_code=0x7fffd8af1858, 
    gen_code_len=0x7fffd8af1850, heap=0x7fffe90c9c18, phase=CmpMain::END, 
    fragmentDir=0x7fffffff2aa8, op=3004, useQueryCache=1, 
    cacheable=0x7fffffff2844, begTime=0x7fffffff2860, shouldLog=0)
    at ../sqlcomp/CmpMain.cpp:1799
#25 0x00007ffff1242fb5 in CmpMain::sqlcomp (this=0x7fffffff2950, 
    input_str=0x7fffd8b1aff0 "insert into t019right values (1),(2),(3);", 
    charset=15, queryExpr=@0x7fffffff2858, gen_code=0x7fffd8af1858, 
    gen_code_len=0x7fffd8af1850, heap=0x7fffe90c9c18, phase=CmpMain::END, 
    fragmentDir=0x7fffffff2aa8, op=3004, useQueryCache=1, 
    cacheable=0x7fffffff2844, begTime=0x7fffffff2860, shouldLog=0)
    at ../sqlcomp/CmpMain.cpp:1475
#26 0x00007ffff1241359 in CmpMain::sqlcomp (this=0x7fffffff2950, input=..., 
    gen_code=0x7fffd8af1858, gen_code_len=0x7fffd8af1850, heap=0x7fffe90c9c18, 
    phase=CmpMain::END, fragmentDir=0x7fffffff2aa8, op=3004)
    at ../sqlcomp/CmpMain.cpp:807
#27 0x00007ffff581bdd1 in CmpStatement::process (this=0x7fffd8aca298, 
    sqltext=...) at ../arkcmp/CmpStatement.cpp:487
#28 0x00007ffff581084b in CmpContext::compileDirect (this=0x7fffe8533090, 
    data=0x7fffd7c14f68 "\200", data_len=176, outHeap=0x7fffe9b39660, 
    charset=15, op=CmpMessageObj::SQLTEXT_COMPILE, gen_code=@0x7fffffff2fc0, 
    gen_code_len=@0x7fffffff2fcc, parserFlags=0, diagsArea=0x7fffd7c15020)
    at ../arkcmp/CmpContext.cpp:697
#29 0x00007ffff625585c in CliStatement::prepare2 (this=0x7fffe911d020, 
    source=0x7fffe9124d28 "insert into t019right values (1),(2),(3);", 
    diagsArea=..., passed_gen_code=0x0, passed_gen_code_len=0, charset=15, 
    unpackTdbs=1, cliFlags=129) at ../cli/Statement.cpp:1797
#30 0x00007ffff62546a2 in CliStatement::prepare (this=0x7fffe911d020, 
    source=0x7fffe9124d28 "insert into t019right values (1),(2),(3);", 
    diagsArea=..., passed_gen_code=0x0, passed_gen_code_len=0, charset=15, 
    unpackTdbs=1, cliFlags=129) at ../cli/Statement.cpp:1388
#31 0x00007ffff6208215 in SQLCLI_Prepare2 (cliGlobals=0xb909d0, 
    statement_id=0x1421980, sql_source=0x1420cc0, gencode_ptr=0x0, 
    gencode_len=0, ret_gencode_len=0x0, query_cost_info=0x7fffffff4620, 
    query_comp_stats_info=0x7fffffff3390, uniqueStmtId=0x7fffffff4490 "    ", 
    uniqueStmtIdLen=0x7fffffff46e0, flags=129) at ../cli/Cli.cpp:5904
#32 0x00007ffff62748e2 in SQL_EXEC_Prepare2 (statement_id=0x1421980, 
    sql_source=0x1420cc0, gencode_ptr=0x0, gencode_len=0, ret_gencode_len=0x0, 
    query_cost_info=0x7fffffff4620, comp_stats_info=0x7fffffff3390, 
    uniqueStmtId=0x7fffffff4490 "    ", uniqueStmtIdLen=0x7fffffff46e0, 
    flags=129) at ../cli/CliExtern.cpp:4913
#33 0x00007ffff7bb98c1 in SqlCmd::do_prepare (sqlci_env=0xb8f1a0, 
    prep_stmt=0x1421a40, 
    sqlStmt=0x1422040 "insert into t019right values (1),(2),(3);", 
    resetLastExecStmt=1, rsIndex=0, prepcode=0x7fffffff47cc, 
    statisticsType=0x7fffffff47c8) at ../sqlci/SqlCmd.cpp:892
#34 0x00007ffff7bbf403 in DML::process (this=0x1421930, sqlci_env=0xb8f1a0)
    at ../sqlci/SqlCmd.cpp:2800
#35 0x00007ffff7ba0a20 in Obey::process (this=0x1c4fc60, sqlci_env=0xb8f1a0)
    at ../sqlci/Obey.cpp:264
#36 0x00007ffff7ba9341 in SqlciEnv::run (this=0xb8f1a0, 
    in_filename=0x7fffffff5895 "TEST019.tmp", input_string=0x0)
    at ../sqlci/SqlciEnv.cpp:726
#37 0x0000000000401f20 in main (argc=2, argv=0x7fffffff4b48)
    at ../bin/SqlciMain.cpp:313
(gdb) p IdentifyMyself::myName_
$1 = I_AM_EMBEDDED_SQL_COMPILER



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