Create table like view cores sqlci at hbaseCreateOptions()

Bug #1412983 reported by Weishiun Tsai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Released
High
Hans Zeller

Bug Description

A create table … like view … statement currently crashes sqlci and generates a core at hbaseCreateOptions(). This is seen on the v0117 build.

-----------------------------------------------------

Here is the entire script to reproduce this problem:

create schema mytest;
set schema mytest;

create table mytab1 (a int);
create view myview1 as select a from mytab1;
create table mytab2 like myview1;

drop schema mytest cascade;

-----------------------------------------------------

Here is the execution output:

>>create schema mytest;

--- SQL operation complete.
>>set schema mytest;

--- SQL operation complete.
>>
>>create table mytab1 (a int);

--- SQL operation complete.
>>create view myview1 as select a from mytab1;

--- SQL operation complete.
>>create table mytab2 like myview1;
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fffeff24d85, pid=18522, tid=140737353869344
#
# JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build 1.7.0_67-b01)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libsqlcomp.so+0x84d85] CmpDescribeSeabaseTable(CorrName const&, short, char*&, unsigned int&, NAMemory*, char const*, int, int, int, int)+0x1635
#
# Core dump written. Default location: /opt/home/trafodion/v0117/sql/scripts/core or core.18522
#
# An error report file with more information is saved as:
# /opt/home/trafodion/v0117/sql/scripts/hs_err_pid18522.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)

-----------------------------------------------------

Here is the stack trace of the core

(gdb) bt
#0 0x00007ffff57108a5 in raise () from /lib64/libc.so.6
#1 0x00007ffff571200d in abort () from /lib64/libc.so.6
#2 0x00007ffff6f04a55 in os::abort(bool) ()
   from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
#3 0x00007ffff7084f87 in VMError::report_and_die() ()
   from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
#4 0x00007ffff6f0996f in JVM_handle_linux_signal ()
   from /usr/java/jdk1.7.0_67/jre/lib/amd64/server/libjvm.so
#5 <signal handler called>
#6 0x00007fffeff24d85 in hbaseCreateOptions (dtName=..., type=3,
    outbuf=@0x7ffffffef860, outbuflen=@0x7ffffffef86c, heap=0x7fffd5364e80,
    pkeyStr=0x0, withPartns=0, withoutSalt=0, withoutDivisioning=0,
    noTrailingSemi=1) at ../optimizer/NAFileSet.h:169
#7 hbaseCreateOptions (dtName=..., type=3, outbuf=@0x7ffffffef860,
    outbuflen=@0x7ffffffef86c, heap=0x7fffd5364e80, pkeyStr=0x0, withPartns=0,
    withoutSalt=0, withoutDivisioning=0, noTrailingSemi=1)
    at ../optimizer/NATable.h:774
#8 CmpDescribeSeabaseTable (dtName=..., type=3, outbuf=@0x7ffffffef860,
    outbuflen=@0x7ffffffef86c, heap=0x7fffd5364e80, pkeyStr=0x0, withPartns=0,
    withoutSalt=0, withoutDivisioning=0, noTrailingSemi=1)
    at ../sqlcomp/CmpDescribe.cpp:2790
#9 0x00007fffeffcf5f6 in CmpSeabaseDDL::createSeabaseTableLike (
    this=<value optimized out>, createTableNode=<value optimized out>,
    currCatName=<value optimized out>, currSchName=<value optimized out>)
    at ../sqlcomp/CmpSeabaseDDLtable.cpp:295
#10 0x00007fffeffd14e2 in CmpSeabaseDDL::createSeabaseTable (
    this=0x7fffffff2f80, createTableNode=0x7fffd53232c0, currCatName=...,
    currSchName=...) at ../sqlcomp/CmpSeabaseDDLtable.cpp:1081
#11 0x00007fffeff7776b in CmpSeabaseDDL::executeSeabaseDDL (
    this=0x7fffffff2f80, ddlExpr=0x7fffd5322868, ddlNode=0x7fffd53232c0,
    currCatName=..., currSchName=...)
    at ../sqlcomp/CmpSeabaseDDLcommon.cpp:6649
#12 0x00007ffff4abc85c in CmpStatement::process (this=<value optimized out>,
    statement=<value optimized out>) at ../arkcmp/CmpStatement.cpp:931
#13 0x00007ffff4ab0546 in CmpContext::compileDirect (this=0x7fffe5eab090,
    data=0x7fffe6a51f70 "\200", data_len=192, outHeap=0x7ffff7ee1128,
    charset=15, op=CmpMessageObj::PROCESSDDL, gen_code=@0x7fffffff3980,
    gen_code_len=@0x7fffffff398c, parserFlags=0, diagsArea=0x7fffe6a52038)
    at ../arkcmp/CmpContext.cpp:717
#14 0x00007ffff3e2f056 in ExDDLTcb::work (this=0x7fffe6a57cd0)
    at ../executor/ex_ddl.cpp:265
#15 0x00007ffff3f5d553 in ExScheduler::work (this=0x7fffe6a57838,
    prevWaitTime=<value optimized out>) at ../executor/ExScheduler.cpp:328
#16 0x00007ffff3e8b462 in ex_root_tcb::execute (this=0x7fffe6a582a8,
    cliGlobals=0xb7de80, glob=0x7fffe6a51938, input_desc=0x7fffe6a9aba8,
    diagsArea=@0x7fffffff50b0, reExecute=0) at ../executor/ex_root.cpp:1055
#17 0x00007ffff549c554 in CliStatement::execute (this=0x7fffe6a36bd0,
    cliGlobals=0xb7de80, input_desc=0x7fffe6a9aba8,
    diagsArea=<value optimized out>, execute_state=<value optimized out>,
    fixupOnly=0, cliflags=0) at ../cli/Statement.cpp:4812
#18 0x00007ffff5444d0a 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=0xb7de80, tasks=4882,
    statement_id=0x148c1b0, input_descriptor=0xf0c450, output_descriptor=0x0,
    num_input_ptr_pairs=0, num_output_ptr_pairs=0, ap=0x7fffffff5250,
    input_ptr_pairs=0x0, output_ptr_pairs=0x0) at ../cli/Cli.cpp:3284
#19 0x00007ffff5445a32 in SQLCLI_Exec(CliGlobals *, SQLSTMT_ID *, SQLDESC_ID *, Lng32, typedef __va_list_tag __va_list_tag *, SQLCLI_PTR_PAIRS *) (
    cliGlobals=<value optimized out>, statement_id=<value optimized out>,
    input_descriptor=<value optimized out>,
    num_ptr_pairs=<value optimized out>, ap=<value optimized out>,
    ptr_pairs=<value optimized out>) at ../cli/Cli.cpp:3531
#20 0x00007ffff54ab10a in SQL_EXEC_Exec (statement_id=0x148c1b0,
    input_descriptor=0xf0c450, num_ptr_pairs=0) at ../cli/CliExtern.cpp:2071
#21 0x00007ffff77ae39b in SqlCmd::doExec (sqlci_env=0xb7cc30, stmt=0x148c1b0,
    prep_stmt=<value optimized out>, numUnnamedParams=<value optimized out>,
    unnamedParamArray=<value optimized out>,
    unnamedParamCharSetArray=<value optimized out>, handleError=1)
    at ../sqlci/SqlCmd.cpp:1706
#22 0x00007ffff77aed92 in SqlCmd::do_execute (sqlci_env=0xb7cc30,
    prep_stmt=0x1fe84e0, numUnnamedParams=0, unnamedParamArray=0x0,
    unnamedParamCharSetArray=0x0, prepcode=0) at ../sqlci/SqlCmd.cpp:2042
#23 0x00007ffff77af4bd in DML::process (this=0x1e2ba30, sqlci_env=0xb7cc30)
    at ../sqlci/SqlCmd.cpp:2816
#24 0x00007ffff7795ad4 in Obey::process (this=0x1ffb900,
    sqlci_env=<value optimized out>) at ../sqlci/Obey.cpp:264
#25 0x00007ffff779bff6 in SqlciEnv::executeCommands (this=0xb7cc30,
    input_stmt=@0x7fffffff6cd8) at ../sqlci/SqlciEnv.cpp:847
#26 0x00007ffff779e09b in SqlciEnv::run (this=0xb7cc30)
    at ../sqlci/SqlciEnv.cpp:656
#27 0x0000000000401ad9 in main (argc=1, argv=0x7fffffff6ea8)
    at ../bin/SqlciMain.cpp:328

Tags: sql-cmu
Revision history for this message
Hans Zeller (hans-zeller) wrote :

The problem is that a view doesn't have a clustering index, and the HBase create options hang off the clustering index. Need to skip the HBase table options case when we are describing a view (describe is internally used by create table like).

Changed in trafodion:
assignee: nobody → Hans Zeller (hans-zeller)
status: New → In Progress
Revision history for this message
Hans Zeller (hans-zeller) wrote :

Fix committed into R1.0 branch: https://review.trafodion.org/#/c/1006/

Changed in trafodion:
status: In Progress → Fix Committed
Revision history for this message
Paul Low (paul-low-x) wrote :

Need to re-open this case. The sequence fails on 20150117 build.

SQL>create schema sch999;

--- SQL operation complete.

SQL>set schema sch999;

--- SQL operation complete.

SQL>create table tab999(a int, b int);

--- SQL operation complete.

SQL>create view view999 as select a from tab999;

--- SQL operation complete.

SQL>create table tab888 like view999;

*** ERROR[1] The message id: problem_with_server_read
*** ERROR[1] The message id: header_not_long_enough
*** ERROR[1] The message id: problem_with_server_read
*** ERROR[1] The message id: header_not_long_enough

SQL>

Changed in trafodion:
status: Fix Committed → In Progress
Revision history for this message
Weishiun Tsai (wei-shiun-tsai) wrote :

Verified on the r1.0.0 rc2 build, both scenarios described in this report are now fixed:

>>create schema mytest;

--- SQL operation complete.
>>set schema mytest;

--- SQL operation complete.
>>
>>create table mytab1 (a int);

--- SQL operation complete.
>>create view myview1 as select a from mytab1;

--- SQL operation complete.
>>create table mytab2 like myview1;

--- SQL operation complete.
>>showddl mytab2;

CREATE TABLE TRAFODION.MYTEST.MYTAB2
  (
    A INT DEFAULT NULL
  )
;

--- SQL operation complete.
>>
>>drop schema mytest cascade;

--- SQL operation complete.

>>create schema sch999;

--- SQL operation complete.
>>set schema sch999;

--- SQL operation complete.
>>create table tab999(a int, b int);

--- SQL operation complete.
>>create view view999 as select a from tab999;

--- SQL operation complete.
>>create table tab888 like view999;

--- SQL operation complete.
>>showddl tab888;

CREATE TABLE TRAFODION.SCH999.TAB888
  (
    A INT DEFAULT NULL
  )
;

--- SQL operation complete.
>>drop schema sch999 cascade;

--- SQL operation complete.

Changed in trafodion:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.