You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/01/10 17:42:58 UTC

[jira] [Commented] (TRAFODION-2433) Logging function call trace upon internal assert failures.

    [ https://issues.apache.org/jira/browse/TRAFODION-2433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15815623#comment-15815623 ] 

ASF GitHub Bot commented on TRAFODION-2433:
-------------------------------------------

GitHub user prashanth-vasudev opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/909

    [TRAFODION-2433] Capture and log call trace upon internal assert failure.

    This is an attempt to capture and log the function call trace incase of internal assertion call failures. 
    Initial change takes care capturing and logging for executor and some scenarios in compiler. There are additional scenarios in compiler(like in unregistered call back case) this capture can be extended, but currently not included. Additional scenarios can be extended in future.
    
    For call trace functionality to  work, linux system calls such as backtrace and backtrace_symbols is used. These calls require  gcc compiler option "-rdynamic" be enabled. This compiler option does not generate debug symbols. More info on this is clearly articulated here for reference;
    http://stackoverflow.com/questions/8623884/gcc-debug-symbols-g-flag-vs-linkers-rdynamic-option?rq=1
    
    
    Sample output of assert failure call trace in logs as below.
    
    Executor assert:
    ============
    2017-01-10 03:16:21,973, FATAL, SQL.EXE, Node Number: 0, CPU: 0, PIN: 21080, Process Name: $Z000H7A,,,Process Stack Trace:
    ../lib/linux/64bit/debug/libtdm_sqlmxevents.so  : SQLMXLoggingArea::logSQLMXAssertionFailureEvent(char const*, int, char const*, char const*, int const*, char const*)+0x239
    ../lib/linux/64bit/debug/libtdm_sqlexport.so  : assert_botch_abend(char const*, int, char const*, char const*)+0x89
    ../lib/linux/64bit/debug/libsort.so  : Qsort::Qsort(unsigned int, unsigned int, unsigned int, int, unsigned int, SortScratchSpace*, int, NAMemory*, SortError*, int, SortUtil*)+0x159
    ../lib/linux/64bit/debug/libsort.so  : SortUtil::sortInitialize(SortUtilConfig&, unsigned int)+0x1e5
    ../lib/linux/64bit/debug/libexecutor.so  : ExSortTcb::workUp()+0x1a2
    ../lib/linux/64bit/debug/libexecutor.so  : ExSortTcb::sWorkUp(ex_tcb*)+0x18
    ../lib/linux/64bit/debug/libexecutor.so  : ExSubtask::work()+0x21
    ../lib/linux/64bit/debug/libexecutor.so  : ExScheduler::work(long)+0x5aa
    ../lib/linux/64bit/debug/libexecutor.so  : ex_root_tcb::execute(CliGlobals*, ExExeStmtGlobals*, Descriptor*, ComDiagsArea*&, int)+0x100c
    ../lib/linux/64bit/debug/libcli.so  : CliStatement::execute(CliGlobals*, Descriptor*, ComDiagsArea&, CliStatement::ExecState, int, unsigned int)+0x27ce
      ../lib/linux/64bit/debug/libcli.so : SQLCLI_PerformTasks+0xa6b
      ../lib/linux/64bit/debug/libcli.so : SQLCLI_Exec+0x8d
      ../lib/linux/64bit/debug/libcli.so : SQL_EXEC_Exec+0x14d
    ../lib/linux/64bit/debug/libexecutor.so  : ExeCliInterface::exec(char*, int)+0x122
    ../lib/linux/64bit/debug/libexecutor.so  : ExeCliInterface::fetchRowsPrologue(char const*, int, int, char*)+0x161
    ../lib/linux/64bit/debug/libexecutor.so  : ExeCliInterface::fetchAllRows(Queue*&, char const*, int, int, int, int)+0x81
    ../lib/linux/64bit/debug/libsqlcomp.so  : CmpSeabaseDDL::getSeabaseColumnInfo(ExeCliInterface*, long, NAString const&, NAString const&, NAString const&, char*, int*, int*, int*, ComTdbVirtTableColumnInfo**)+0xdd
    ../lib/linux/64bit/debug/libsqlcomp.so  : CmpSeabaseDDL::getSeabaseUserTableDesc(NAString const&, NAString const&, NAString const&, ComObjectType, int, int, int&)+0x83c
    ../lib/linux/64bit/debug/libsqlcomp.so  : CmpSeabaseDDL::getSeabaseTableDesc(NAString const&, NAString const&, NAString const&, ComObjectType, int)+0x60d
    
    
    Compiler Assert:
    ============
    2017-01-10 17:24:15,899, FATAL, SQL.EXE, Node Number: 0, CPU: 0, PIN: 18362, Process Name: $Z000EZM,,,Compiler Internal Assert Failure, FILE: ../sqlcomp/nadefaults.cpp, LINE: 5167  CONDITION: FALSE Process Stack Trace:
    ../lib/linux/64bit/debug/libarkcmplib.so  : CmpAssertInternal(char const*, char const*, int)+0x36
    ../lib/linux/64bit/debug/libsqlcomp.so  : NADefaults::isReadonlyAttribute(char const*) const+0x3f
    ../lib/linux/64bit/debug/liboptimizer.so  : ControlQueryDefault::bindNode(BindWA*)+0xf6
    ../lib/linux/64bit/debug/liboptimizer.so  : RelExpr::bindChildren(BindWA*)+0x115
    ../lib/linux/64bit/debug/liboptimizer.so  : RelRoot::bindNode(BindWA*)+0x2069
    ../lib/linux/64bit/debug/libsqlcomp.so  : CmpMain::compile(char const*, int, RelExpr*&, char**, unsigned int*, NAMemory*, CmpMain::CompilerPhase, FragmentDir**, int, int, int*, timeval*, int)+0xf2d
    ../lib/linux/64bit/debug/libsqlcomp.so  : CmpMain::sqlcomp(char const*, int, RelExpr*&, char**, unsigned int*, NAMemory*, CmpMain::CompilerPhase, FragmentDir**, int, int, int*, timeval*, int)+0xed
    ../lib/linux/64bit/debug/libsqlcomp.so  : CmpMain::sqlcomp(QueryText&, int, char**, unsigned int*, NAMemory*, CmpMain::CompilerPhase, FragmentDir**, int)+0x906
    ../lib/linux/64bit/debug/libarkcmplib.so  : CmpStatement::process(CmpMessageSQLText const&)+0x4ff
    ../lib/linux/64bit/debug/libarkcmplib.so  : CmpContext::compileDirect(char*, unsigned int, NAMemory*, int, CmpMessageObj::MessageTypeEnum, char*&, unsigned int&, unsigned int, char const*, int, ComDiagsArea*)+0x56b
    ../lib/linux/64bit/debug/libcli.so  : CliStatement::prepare2(char*, ComDiagsArea&, char*, unsigned int, int, int, unsigned int)+0xecb
    ../lib/linux/64bit/debug/libcli.so  : CliStatement::prepare(char*, ComDiagsArea&, char*, unsigned int, int, int, unsigned int)+0x17c
      ../lib/linux/64bit/debug/libcli.so : SQLCLI_Prepare2+0x4c4
      ../lib/linux/64bit/debug/libcli.so : SQL_EXEC_Prepare2+0xce
    ../lib/linux/64bit/debug/libsqlcilib.so  : SqlCmd::do_prepare(SqlciEnv*, PrepStmt*, char*, int, int, int*, int*)+0x726
    ../lib/linux/64bit/debug/libsqlcilib.so  : DML::process(SqlciEnv*)+0x20d
    ../lib/linux/64bit/debug/libsqlcilib.so  : SqlciEnv::executeCommands(InputStmt*&)+0x4ee
    ../lib/linux/64bit/debug/libsqlcilib.so  : SqlciEnv::run()+0x51
      sqlci : main+0x38b

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/prashanth-vasudev/incubator-trafodion btassert

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/909.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #909
    
----
commit 49a6bab2000eaf74336e4ea69b3fb75ccb7b6ff5
Author: Prashant Vasudev <pr...@esgyn.com>
Date:   2017-01-10T17:25:49Z

    [TRAFODION-2433] Capture and log call trace upon internal assert failure.

----


> Logging function call trace upon internal assert failures.
> ----------------------------------------------------------
>
>                 Key: TRAFODION-2433
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2433
>             Project: Apache Trafodion
>          Issue Type: Improvement
>          Components: sql-general
>            Reporter: Prashanth Vasudev
>            Assignee: Prashanth Vasudev
>
> Internal Asserts most of the time do not create core files nor return enough information to debug the issue. 
> This is an attempt to capture the function call trace and log it as part of assertion failure. 



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