Uploaded image for project: 'Apache Trafodion'
  1. Apache Trafodion
  2. TRAFODION-1109

LP Bug: 1438775 - mxosrvr core in SRVR::FETCH2bulk when columns in particular order

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1 (pre-incubation)
    • Component/s: sql-exe
    • Labels:
      None

      Description

      First select crashes, but the second one works:

      Select exec_start_utc_ts, exec_end_utc_ts, query_id, query_text from “REPOS”.metric_query_table;
      Select query_text, exec_start_utc_ts, exec_end_utc_ts, query_id from “REPOS”.metric_query_table;

      This system had about 350 rows in metric_query_table. It worked ok on a system where metric_query_table had 40 rows.

      Stack trace:
      #0 0x00007ffff4829625 in raise () from /lib64/libc.so.6
      #1 0x00007ffff482ad8d in abort () from /lib64/libc.so.6
      #2 0x00007ffff4867537 in __libc_message () from /lib64/libc.so.6
      #3 0x00007ffff486ce66 in malloc_printerr () from /lib64/libc.so.6
      #4 0x00007ffff486f9b3 in _int_free () from /lib64/libc.so.6
      #5 0x00007ffff685f53b in SRVR::FETCH2bulk (pSrvrStmt=0x1ca8650) at sqlinterface.cpp:6111
      #6 0x00007ffff688dbda in odbc_SQLSrvr_FetchPerf_sme_ (objtag_=<optimized out>, call_id_=<optimized out>,
      returnCode=0x7fffe4fde67c, dialogueId=<optimized out>, stmtLabel=0xed7f04 "SQL_CUR_2", maxRowCnt=100, maxRowLen=0,
      sqlAsyncEnable=0, queryTimeout=0, rowsAffected=0x7fffe4fde678, outValuesFormat=0x7fffe4fde674,
      outputDataValue=0x7fffe4fde650, sqlWarningOrErrorLength=0x7fffe4fde670, sqlWarningOrError=@0x7fffe4fde668: 0x0)
      at srvrothers.cpp:5815
      #7 0x00000000004b6907 in odbc_SQLSrvr_Fetch_ame_ (objtag_=0xed8160, call_id_=0xed81b8, dialogueId=1449409261,
      operation_id=<optimized out>, sqlAsyncEnable=0, queryTimeout=0, stmtHandle=0, stmtLabel=0xed7f04 "SQL_CUR_2",
      maxRowCnt=100, maxRowLen=0) at SrvrConnect.cpp:7498
      #8 0x000000000048b852 in SQLFETCH_IOMessage (objtag_=0xed8160, call_id_=0xed81b8, operation_id=3009)
      at Interface/odbcs_srvr.cpp:1021
      #9 0x0000000000493d7e in DISPATCH_TCPIPRequest (objtag_=0xed8160, call_id_=0xed81b8, operation_id=<optimized out>)
      at Interface/odbcs_srvr.cpp:1803
      #10 0x0000000000433872 in BUILD_TCPIP_REQUEST (pnode=0xed8160) at ../Common/TCPIPSystemSrvr.cpp:603
      #11 0x000000000043420d in PROCESS_TCPIP_REQUEST (pnode=0xed8160) at ../Common/TCPIPSystemSrvr.cpp:581
      #12 0x00000000004623f6 in CNSKListenerSrvr::tcpip_listener (arg=0xda1a50) at Interface/linux/Listener_srvr_ps.cpp:400
      #13 0x00007ffff45dd290 in sb_thread_sthr_disp (pp_arg=0xed74d0) at threadl.cpp:253
      #14 0x00007ffff43a99d1 in start_thread () from /lib64/libpthread.so.0
      #15 0x00007ffff48df8fd in clone () from /lib64/libc.so.6

      According to Arvind, crash happens in this part of the code (sqlinterface.cpp):

      //Changes due to cursor issue
      if (pSrvrStmt->maxRowCnt > 0)
      {
      if (pSrvrStmt->outputDescVarBufferLen > 0)
      {
      if( srvrGlobal->m_FetchBufferSize/pSrvrStmt->outputDescVarBufferLen < pSrvrStmt->maxRowCnt )
      {
      if (pSrvrStmt->outputDescVarBuffer != NULL)
      delete pSrvrStmt->outputDescVarBuffer;
      pSrvrStmt->outputDescVarBuffer = NULL;
      markNewOperator,pSrvrStmt->outputDescVarBuffer =
      new BYTE[pSrvrStmt->maxRowCnt*pSrvrStmt->outputDescVarBufferLen];
      if (pSrvrStmt->outputDescVarBuffer == NULL)

        Attachments

          Activity

            People

            • Assignee:
              tharakc Tharak Capirala
              Reporter:
              saruna Aruna Sadashiva
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: