Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0b9a99db
Commit
0b9a99db
authored
Aug 30, 2004
by
tomas@poseidon.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
see resp. file
parent
7000ffde
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
3 deletions
+34
-3
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+11
-0
ndb/src/kernel/error/ErrorHandlingMacros.hpp
ndb/src/kernel/error/ErrorHandlingMacros.hpp
+2
-0
ndb/src/kernel/main.cpp
ndb/src/kernel/main.cpp
+8
-2
ndb/src/kernel/vm/Emulator.cpp
ndb/src/kernel/vm/Emulator.cpp
+12
-1
ndb/src/kernel/vm/Emulator.hpp
ndb/src/kernel/vm/Emulator.hpp
+1
-0
No files found.
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
View file @
0b9a99db
...
...
@@ -46,6 +46,7 @@
// Used here only to print event reports on stdout/console.
EventLogger
g_eventLogger
;
extern
int
simulate_error_during_shutdown
;
Cmvmi
::
Cmvmi
(
const
Configuration
&
conf
)
:
SimulatedBlock
(
CMVMI
,
conf
)
...
...
@@ -148,6 +149,16 @@ void Cmvmi::execNDB_TAMPER(Signal* signal)
if
(
ERROR_INSERTED
(
9997
)){
ndbrequire
(
false
);
}
if
(
ERROR_INSERTED
(
9996
)){
simulate_error_during_shutdown
=
SIGSEGV
;
ndbrequire
(
false
);
}
if
(
ERROR_INSERTED
(
9995
)){
simulate_error_during_shutdown
=
SIGSEGV
;
kill
(
getpid
(),
SIGABRT
);
}
}
//execNDB_TAMPER()
void
Cmvmi
::
execSET_LOGLEVELORD
(
Signal
*
signal
)
...
...
ndb/src/kernel/error/ErrorHandlingMacros.hpp
View file @
0b9a99db
...
...
@@ -22,6 +22,8 @@
extern
const
char
programName
[];
#define ERROR_SET_SIGNAL(messageCategory, messageID, problemData, objectRef) \
ErrorReporter::handleError(messageCategory, messageID, problemData, objectRef, NST_ErrorHandlerSignal)
#define ERROR_SET(messageCategory, messageID, problemData, objectRef) \
ErrorReporter::handleError(messageCategory, messageID, problemData, objectRef)
// Description:
...
...
ndb/src/kernel/main.cpp
View file @
0b9a99db
...
...
@@ -335,7 +335,13 @@ handler_error(int signum){
static
long
thread_id
=
0
;
if
(
thread_id
!=
0
&&
thread_id
==
my_thread_id
())
;
// Shutdown thread received signal
{
// Shutdown thread received signal
signal
(
signum
,
SIG_DFL
);
kill
(
getpid
(),
signum
);
while
(
true
)
NdbSleep_MilliSleep
(
10
);
}
if
(
theShutdownMutex
&&
NdbMutex_Trylock
(
theShutdownMutex
)
!=
0
)
while
(
true
)
NdbSleep_MilliSleep
(
10
);
...
...
@@ -344,5 +350,5 @@ handler_error(int signum){
// restart the system
char
errorData
[
40
];
snprintf
(
errorData
,
40
,
"Signal %d received"
,
signum
);
ERROR_SET
(
fatal
,
0
,
errorData
,
__FILE__
);
ERROR_SET
_SIGNAL
(
fatal
,
0
,
errorData
,
__FILE__
);
}
ndb/src/kernel/vm/Emulator.cpp
View file @
0b9a99db
...
...
@@ -61,6 +61,7 @@ Uint32 theEmulatedJamBlockNumber = 0;
EmulatorData
globalEmulatorData
;
NdbMutex
*
theShutdownMutex
=
0
;
int
simulate_error_during_shutdown
=
0
;
EmulatorData
::
EmulatorData
(){
theConfiguration
=
0
;
...
...
@@ -117,7 +118,8 @@ NdbShutdown(NdbShutdownType type,
}
}
if
(
NdbMutex_Trylock
(
theShutdownMutex
)
==
0
){
if
((
type
==
NST_ErrorHandlerSignal
)
||
// Signal handler has already locked mutex
(
NdbMutex_Trylock
(
theShutdownMutex
)
==
0
)){
globalData
.
theRestartFlag
=
perform_stop
;
bool
restart
=
false
;
...
...
@@ -145,6 +147,9 @@ NdbShutdown(NdbShutdownType type,
case
NST_ErrorHandler
:
ndbout
<<
"Error handler "
<<
shutting
<<
" system"
<<
endl
;
break
;
case
NST_ErrorHandlerSignal
:
ndbout
<<
"Error handler signal "
<<
shutting
<<
" system"
<<
endl
;
break
;
case
NST_Restart
:
ndbout
<<
"Restarting system"
<<
endl
;
break
;
...
...
@@ -175,6 +180,12 @@ NdbShutdown(NdbShutdownType type,
#endif
}
if
(
simulate_error_during_shutdown
)
{
kill
(
getpid
(),
simulate_error_during_shutdown
);
while
(
true
)
NdbSleep_MilliSleep
(
10
);
}
globalEmulatorData
.
theWatchDog
->
doStop
();
#ifdef VM_TRACE
...
...
ndb/src/kernel/vm/Emulator.hpp
View file @
0b9a99db
...
...
@@ -79,6 +79,7 @@ enum NdbShutdownType {
NST_Normal
,
NST_Watchdog
,
NST_ErrorHandler
,
NST_ErrorHandlerSignal
,
NST_Restart
,
NST_ErrorInsert
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment