Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-955

LP Bug: 1415196 - Alter volatile table add column cores sqlci at CmpSeabaseDDL::alterSeabaseTableAddColumn()



    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.1 (pre-incubation)
    • sql-cmu
    • None


      In the old days, alter volatile table add column was not allowed. But in Trafodion, instead of returning a proper error like error 1280 ‘A regular DDL statement cannot be used on volatile objects.’, it crashes sqlci with a core at CmpSeabaseDDL::alterSeabaseTableAddColumn().

      This is seen on the v1.0.0 rc2 build.


      Here is the entire script to reproduce it:

      create schema mytest;
      set schema mytest;
      create volatile table myvt (a int);
      alter volatile table myvt add column b int;
      drop schema mytest cascade;


      Here is the execution output:

      >>create schema mytest;

      — SQL operation complete.
      >>set schema mytest;

      — SQL operation complete.
      >>create volatile table myvt (a int);

      — SQL operation complete.
      >>alter volatile table myvt add column b int;

      1. A fatal error has been detected by the Java Runtime Environment:
      2. SIGSEGV (0xb) at pc=0x00007fffeffbe85b, pid=5209, tid=140737353873440
      3. JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build 1.7.0_67-b01)
      4. Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
      5. Problematic frame:
      6. C [libsqlcomp.so+0x11f85b] CmpSeabaseDDL::alterSeabaseTableAddColumn(StmtDDLAlterTableAddColumn*, NAString&, NAString&)+0x6db
      7. Core dump written. Default location: /opt/home/trafodion/v1.0.0rc2/sql/scripts/core or core.5209
      8. An error report file with more information is saved as:
      9. /opt/home/trafodion/v1.0.0rc2/sql/scripts/hs_err_pid5209.log
      10. If you would like to submit a bug report, please visit:
      11. http://bugreport.sun.com/bugreport/crash.jsp
      12. The crash happened outside the Java Virtual Machine in native code.
      13. See problematic frame for where to report the bug.
        Aborted (core dumped)


      Here is the stack trace of the sqlci 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 0x00007fffeffbe85b in CmpSeabaseDDL::alterSeabaseTableAddColumn (
      this=0x7fffffff2db0, alterAddColNode=0x7fffd5532540,
      currCatName=<value optimized out>, currSchName=<value optimized out>)
      at ../sqlcomp/CmpSeabaseDDLtable.cpp:3283
      #7 0x00007fffeff768f0 in CmpSeabaseDDL::executeSeabaseDDL (
      this=0x7fffffff2db0, ddlExpr=0x7fffd5532970, ddlNode=0x7fffd5532540,
      currCatName=..., currSchName=...)
      at ../sqlcomp/CmpSeabaseDDLcommon.cpp:6705
      #8 0x00007ffff4abc85c in CmpStatement::process (this=<value optimized out>,
      statement=<value optimized out>) at ../arkcmp/CmpStatement.cpp:931
      #9 0x00007ffff4ab0546 in CmpContext::compileDirect (this=0x7fffe5eaa090,
      data=0x7fffe6a61728 "\200", data_len=200, outHeap=0x7ffff7ee2128,
      charset=15, op=CmpMessageObj::PROCESSDDL, gen_code=@0x7fffffff37b0,
      gen_code_len=@0x7fffffff37bc, parserFlags=0, diagsArea=0x7fffe6a617f8)
      at ../arkcmp/CmpContext.cpp:717
      #10 0x00007ffff3e2e0a6 in ExDDLTcb::work (this=0x7fffe6a56cd0)
      at ../executor/ex_ddl.cpp:265
      #11 0x00007ffff3f5cbb3 in ExScheduler::work (this=0x7fffe6a56838,
      prevWaitTime=<value optimized out>) at ../executor/ExScheduler.cpp:328
      #12 0x00007ffff3e8a4b2 in ex_root_tcb::execute (this=0x7fffe6a572a8,
      cliGlobals=0xb7e200, glob=0x7fffe6a610f0, input_desc=0x7fffe6a8c580,
      diagsArea=@0x7fffffff4ee0, reExecute=0) at ../executor/ex_root.cpp:1055
      #13 0x00007ffff549c554 in CliStatement::execute (this=0x7fffe6a35bd0,
      cliGlobals=0xb7e200, input_desc=0x7fffe6a8c580,
      diagsArea=<value optimized out>, execute_state=<value optimized out>,
      fixupOnly=0, cliflags=0) at ../cli/Statement.cpp:4812
      #14 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=0xb7e200, tasks=4882,
      statement_id=0x1fd31c0, input_descriptor=0x1f9f280, output_descriptor=0x0,
      num_input_ptr_pairs=0, num_output_ptr_pairs=0, ap=0x7fffffff5080,
      input_ptr_pairs=0x0, output_ptr_pairs=0x0) at ../cli/Cli.cpp:3284
      #15 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
      #16 0x00007ffff54ab10a in SQL_EXEC_Exec (statement_id=0x1fd31c0,
      input_descriptor=0x1f9f280, num_ptr_pairs=0) at ../cli/CliExtern.cpp:2071
      #17 0x00007ffff77ae39b in SqlCmd::doExec (sqlci_env=0xb7cfb0, stmt=0x1fd31c0,
      prep_stmt=<value optimized out>, numUnnamedParams=<value optimized out>,
      unnamedParamArray=<value optimized out>,
      unnamedParamCharSetArray=<value optimized out>, handleError=1)
      at ../sqlci/SqlCmd.cpp:1706
      #18 0x00007ffff77aed92 in SqlCmd::do_execute (sqlci_env=0xb7cfb0,
      prep_stmt=0x1fcc880, numUnnamedParams=0, unnamedParamArray=0x0,
      unnamedParamCharSetArray=0x0, prepcode=0) at ../sqlci/SqlCmd.cpp:2042
      #19 0x00007ffff77af4bd in DML::process (this=0x1fb3930, sqlci_env=0xb7cfb0)
      at ../sqlci/SqlCmd.cpp:2816
      #20 0x00007ffff7795ad4 in Obey::process (this=0x1c5e8f0,
      sqlci_env=<value optimized out>) at ../sqlci/Obey.cpp:264
      #21 0x00007ffff779bff6 in SqlciEnv::executeCommands (this=0xb7cfb0,
      input_stmt=@0x7fffffff6b08) at ../sqlci/SqlciEnv.cpp:847
      #22 0x00007ffff779e09b in SqlciEnv::run (this=0xb7cfb0)
      at ../sqlci/SqlciEnv.cpp:656
      #23 0x0000000000401ad9 in main (argc=1, argv=0x7fffffff6cd8)
      at ../bin/SqlciMain.cpp:328




            rmarton Roberta Marton
            WTsai Weishiun Tsai
            0 Vote for this issue
            3 Start watching this issue