Commit e97a9d59 authored by unknown's avatar unknown
Browse files

Bug #11749 No message slogan found for Signal 8 received. (need better message)

+ revised error messages after feedback
+ revides classifications and status
+ removed all progError(..0..) to make sure all error invocations have an error code
+ added some new error codes to replace some generic usage of SYSTEM_ERROR
+ removed some unused codes


configure.in:
  Bug #11749  	No message slogan found for Signal 8 received. (need better message)
ndb/include/kernel/signaldata/SystemError.hpp:
  + removed some unused codes
ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
  + removed all progError(..0..) to make sure all error invocations have an error code
ndb/src/kernel/main.cpp:
  Bug #11749  	No message slogan found for Signal 8 received. (need better message)
parent c54cb75c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1872,7 +1872,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
  realpath rename rint rwlock_init setupterm \
  shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
  sighold sigset sigthreadmask \
  snprintf socket stpcpy strcasecmp strerror strnlen strpbrk strstr strtol \
  snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr strtol \
  strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr)

#
+0 −3
Original line number Diff line number Diff line
@@ -41,10 +41,7 @@ public:
  STATIC_CONST( SignalLength = 4 );

  enum ErrorCode {
    ScanfragStateError = 1,
    ScanfragTimeout = 2,
    GCPStopDetected = 3,
    StartInProgressError = 4,
    CopyFragRefError = 5,
    TestStopOnError = 6
  };
+17 −8
Original line number Diff line number Diff line
@@ -44,8 +44,7 @@ typedef enum
  ndbd_exit_st_unknown = 1,
  ndbd_exit_st_permanent = 2,
  ndbd_exit_st_temporary = 3,
  ndbd_exit_st_temporary_i = 4,
  ndbd_exit_st_bug = 5
  ndbd_exit_st_filesystem_error = 4
} ndbd_exit_status_enum;

typedef enum
@@ -58,7 +57,8 @@ typedef enum
  ndbd_exit_cl_restart_error = 5,
  ndbd_exit_cl_resource_configuration_error = 6,
  ndbd_exit_cl_filesystem_full_error = 7,
  ndbd_exit_cl_filesystem_inconsistency_error = 8
  ndbd_exit_cl_filesystem_inconsistency_error = 8,
  ndbd_exit_cl_filesystem_limit = 9
} ndbd_exit_classification_enum;

typedef ndbd_exit_status_enum ndbd_exit_status;
@@ -93,15 +93,24 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
#define NDBD_EXIT_INVALID_CONFIG              2350
#define NDBD_EXIT_OUT_OF_LONG_SIGNAL_MEMORY   2351

/* VM 6000-> */
#define NDBD_EXIT_WATCHDOG_TERMINATE          6000
#define NDBD_EXIT_SIGNAL_LOST                 6001
#define NDBD_EXIT_SIGNAL_LOST_SEND_BUFFER_FULL 6002
#define NDBD_EXIT_ILLEGAL_SIGNAL              6003
#define NDBD_EXIT_OS_SIGNAL_RECEIVED          6000

/* VM 6050-> */
#define NDBD_EXIT_WATCHDOG_TERMINATE          6050
#define NDBD_EXIT_SIGNAL_LOST                 6051
#define NDBD_EXIT_SIGNAL_LOST_SEND_BUFFER_FULL 6052
#define NDBD_EXIT_ILLEGAL_SIGNAL              6053

/* NDBCNTR 6100-> */
#define NDBD_EXIT_RESTART_TIMEOUT             6100

/* TC  6200-> */
/* DIH 6300-> */
#define NDBD_EXIT_MAX_CRASHED_REPLICAS        6300
#define NDBD_EXIT_MASTER_FAILURE_DURING_NR    6301
#define NDBD_EXIT_LOST_NODE_GROUP             6302
#define NDBD_EXIT_NO_RESTORABLE_REPLICA       6303

/* ACC 6600-> */
#define NDBD_EXIT_SR_OUT_OF_INDEXMEMORY       6600
/* TUP 6800-> */
+1 −1
Original line number Diff line number Diff line
@@ -1071,7 +1071,7 @@ private:
  void seizeRootfragrec(Signal* signal);
  void seizeScanRec(Signal* signal);
  void seizeSrVerRec(Signal* signal);
  void sendSystemerror(Signal* signal);
  void sendSystemerror(Signal* signal, int line);
  void takeRecOutOfFreeOverdir(Signal* signal);
  void takeRecOutOfFreeOverpage(Signal* signal);
  void sendScanHbRep(Signal* signal, Uint32);
+21 −21
Original line number Diff line number Diff line
@@ -55,8 +55,7 @@ Dbacc::remainingUndoPages(){
  // There can not be more than cundopagesize remaining
  if (Remaining <= 0){
    // No more undolog, crash node
    progError(__LINE__,
	      NDBD_EXIT_NO_MORE_UNDOLOG,
    progError(__LINE__, NDBD_EXIT_NO_MORE_UNDOLOG,
	      "There are more than 1Mbyte undolog writes outstanding");
  }
  return Remaining;
@@ -5630,7 +5629,7 @@ Uint32 Dbacc::checkScanShrink(Signal* signal)
	  //-------------------------------------------------------------
        } else {
          jam();
          sendSystemerror(signal);
          sendSystemerror(signal, __LINE__);
          return TreturnCode;
        }//if
      }//if
@@ -6058,7 +6057,7 @@ void Dbacc::shrinkcontainer(Signal* signal)
  fragrecptr.p->expReceiveForward = tidrForward;
  if (tshrRemLen < tshrInc) {
    jam();
    sendSystemerror(signal);
    sendSystemerror(signal, __LINE__);
  }//if
  tshrRemLen = tshrRemLen - tshrInc;
  if (tshrRemLen != 0) {
@@ -6093,7 +6092,7 @@ void Dbacc::nextcontainerinfoExp(Signal* signal)
    cexcForward = cminusOne;
  } else {
    jam();
    sendSystemerror(signal);
    sendSystemerror(signal, __LINE__);
    cexcForward = 0;	/* DUMMY FOR COMPILER */
  }//if
  if (tnciNextSamePage == ZFALSE) {
@@ -6592,7 +6591,7 @@ void Dbacc::execACC_SAVE_PAGES(Signal* signal)
  ptrCheckGuard(lcpConnectptr, clcpConnectsize, lcpConnectrec);
  if (lcpConnectptr.p->lcpstate != LCP_ACTIVE) {
    jam();
    sendSystemerror(signal);
    sendSystemerror(signal, __LINE__);
    return;
  }//if
  if (ERROR_INSERTED(3000)) {
@@ -6778,7 +6777,7 @@ void Dbacc::saveOverPagesLab(Signal* signal)
	releaseOverpage(signal);
      } else {
        jam();
	sendSystemerror(signal);
	sendSystemerror(signal, __LINE__);
      }
    }//if
  }
@@ -6918,7 +6917,7 @@ void Dbacc::checkSyncUndoPagesLab(Signal* signal)
    break;
  default:
    jam();
    sendSystemerror(signal);
    sendSystemerror(signal, __LINE__);
    return;
    break;
  }//switch
@@ -7201,7 +7200,7 @@ void Dbacc::lcpCopyPage(Signal* signal)
    /*empty*/;
  } else {
    jam();
    sendSystemerror(signal);
    sendSystemerror(signal, __LINE__);
    return;
  }//if
  /*-----------------------------------------------------------------*/
@@ -7222,7 +7221,7 @@ void Dbacc::lcpCopyPage(Signal* signal)
    /*empty*/;
  } else {
    jam();
    sendSystemerror(signal);
    sendSystemerror(signal, __LINE__);
    return;
  }//if
  lcnCopyPageptr.p->word32[ZPOS_CHECKSUM] = tlcnChecksum;
@@ -7269,7 +7268,7 @@ void Dbacc::lcpUpdatePage(Signal* signal)
  }//while
  if (tlupConLen < ZCON_HEAD_SIZE) {
    jam();
    sendSystemerror(signal);
    sendSystemerror(signal, __LINE__);
  }//if
}//Dbacc::lcpUpdatePage()

@@ -7542,7 +7541,7 @@ void Dbacc::undoWritingProcess(Signal* signal)
      /* ONLY PAGE INFO AND OVERFLOW PAGE INFO CAN BE LOGGED BY THIS ROUTINE. A      */
      /* SERIOUS ERROR.                                                              */
      /* --------------------------------------------------------------------------- */
      sendSystemerror(signal);
      sendSystemerror(signal, __LINE__);
    }
  } else {
    if (fragrecptr.p->fragState == LCP_SEND_OVER_PAGES) {
@@ -8545,7 +8544,7 @@ void Dbacc::startActiveUndo(Signal* signal)
    /*---------------------------------------------------------------------------*/
    if (cfsFirstfreeconnect == RNIL) {
      jam();
      sendSystemerror(signal);
      sendSystemerror(signal, __LINE__);
    }//if
    seizeFsConnectRec(signal);
    cactiveSrFsPtr = fsConnectptr.i;
@@ -8722,7 +8721,8 @@ void Dbacc::srDoUndoLab(Signal* signal)
      ptrCheckGuard(fragrecptr, cfragmentsize, fragmentrec);
    } else {
      jam();
      progError(__LINE__, 0, "Invalid local fragment id in undo log");
      progError(__LINE__, NDBD_EXIT_SR_UNDOLOG,
		"Invalid local fragment id in undo log");
      return;
    }//if
  }//if
@@ -8899,7 +8899,7 @@ void Dbacc::srDoUndoLab(Signal* signal)

  default:
    jam();
    progError(__LINE__, 0, "Invalid pagetype in undo log");
    progError(__LINE__, NDBD_EXIT_SR_UNDOLOG, "Invalid pagetype in undo log");
    break;

  }//switch(tpageType)
@@ -9369,7 +9369,7 @@ void Dbacc::checkNextBucketLab(Signal* signal)
	    /* --------------------------------------------------------------------------------- */
            if (scanPtr.p->minBucketIndexToRescan != 0) {
              jam();
              sendSystemerror(signal);
              sendSystemerror(signal, __LINE__);
              return;
            }//if
            scanPtr.p->maxBucketIndexToRescan = fragrecptr.p->p + fragrecptr.p->maxp;
@@ -9534,7 +9534,7 @@ void Dbacc::checkNextFragmentLab(Signal* signal)
    } else {
      jam();
      /* ALL ELEMENTS ARE SENT */
      sendSystemerror(signal);
      sendSystemerror(signal, __LINE__);
    }//if
  }//if
  /* --------------------------------------------------------------------------------- */
@@ -10132,7 +10132,7 @@ void Dbacc::releaseScanContainer(Signal* signal)
  if (trscContainerlen < 4) {
    if (trscContainerlen != ZCON_HEAD_SIZE) {
      jam();
      sendSystemerror(signal);
      sendSystemerror(signal, __LINE__);
    }//if
    return;	/* 2 IS THE MINIMUM SIZE OF THE ELEMENT */
  }//if
@@ -10167,7 +10167,7 @@ void Dbacc::releaseScanContainer(Signal* signal)
  } while (trscElemlens > 1);
  if (trscElemlens != 0) {
    jam();
    sendSystemerror(signal);
    sendSystemerror(signal, __LINE__);
  }//if
}//Dbacc::releaseScanContainer()

@@ -11284,9 +11284,9 @@ void Dbacc::seizeSrVerRec(Signal* signal)
/* --------------------------------------------------------------------------------- */
/* SEND_SYSTEMERROR                                                                  */
/* --------------------------------------------------------------------------------- */
void Dbacc::sendSystemerror(Signal* signal) 
void Dbacc::sendSystemerror(Signal* signal, int line)
{
  progError(0, 0);
  progError(line, NDBD_EXIT_PRGERR);
}//Dbacc::sendSystemerror()

/* --------------------------------------------------------------------------------- */
Loading