SAP Knowledge Base Article - Preview

3618234 - Built-in function causes errors and 'SIGSEGV is caught by VEH_Optimize' - SAP ASE

Symptom

  • After upgrading a database to ASE 16.1
  • Executing built-in functions can result in unexpected errors
    • Known errors are 341 or 225
    • Other built-in function or errors are possible
  • It also raises a stack trace in ASE errorlog

  • Using SUBSTRING built-in causes error 341:

    select CT.col1 from test1 CT where CT.col2 ="0000000002" and substring(CT.col1,1,CHARINDEX('-',CT.col1)-1) = 'TEST'

    Msg 341, Level 18, State 1:
    Internal error: SIGSEGV happened, please refer this issue to SAP Technical Support.

  • Using TSEQUAL built-in causes error 225

    select 1 from t1 where (tsequal(c2, 0x000040105be3c53a))

    Msg 225, Level 16, State 4:
    Cannot run query--referenced object (name NAME NOT RECOVERABLE) dropped during query optimization.

  • The ASE stack trace does not show any ASE functions, but contains elements including

    SIGSEGV is caught by VEH_Optimize()
    ...
    Return VXACTION_CONTINUE from VEH_Optimize()
    The Adaptive Server will continue its execution as signal 11 is handled by vectored exception handler
    VEH re-optimization fails

  • With dbcc traceflag 16996 active
  • The stack trace is expanded and shows ASE functions including

    DBCC TRACEON 16996, SPID 28
    ...
    EvalConstExpr
    PescSingleColumnFilterPred::PeEvaluateExpression
    StMergeHistSargs::StmsInsertSarg
    StgStatPkg::StgStatPkgSecondaryInit

  • Full examples of both stack trace patterns are attached in file Errorlog_Full_Sequence_Example.txt


Read more...

Environment

  • SAP Adaptive Server Enterprise (ASE) 16.1

Product

SAP Adaptive Server Enterprise 16.1

Keywords

CR830834, CR#830834, #830834, 536, Error#536, Invalid length parameter with value of -1 passed to the substring function. , EvalConstExpr(tree*, proc_hdr*, proc_hdr*, int, int) , PescSingleColumnFilterPred::PeEvaluateExpression(AnyDataType*, int)+0x185() , StMergeHistSargs::StmsInsertSarg(OptPool*, PescSingleColumnFilterPred*)+0x49() ,  StgStatPkg::StgStatPkgSecondaryInit(OptBlock*)+0x902() ,  , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.