Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v0.38.0-release) CRIU restore with -Xdump using CRIUSupport.registerRestoreOptionsFile() #16950

Merged
merged 2 commits into from
Mar 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions runtime/compiler/control/J9Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2883,12 +2883,20 @@ bool J9::Options::feLatePostProcess(void * base, TR::OptionSet * optionSet)
}

bool exceptionEventHooked = false;
#if defined(J9VM_OPT_CRIU_SUPPORT)
if (J9_EVENT_IS_HOOKED(javaVM->hookInterface, J9HOOK_VM_EXCEPTION_CATCH) || J9_EVENT_IS_RESERVED(javaVM->hookInterface, J9HOOK_VM_EXCEPTION_CATCH))
#else /* defined(J9VM_OPT_CRIU_SUPPORT) */
if ((*vmHooks)->J9HookDisable(vmHooks, J9HOOK_VM_EXCEPTION_CATCH))
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */
{
jitConfig->jitExceptionCaught = jitExceptionCaught;
exceptionEventHooked = true;
}
#if defined(J9VM_OPT_CRIU_SUPPORT)
if (J9_EVENT_IS_HOOKED(javaVM->hookInterface, J9HOOK_VM_EXCEPTION_THROW) || J9_EVENT_IS_RESERVED(javaVM->hookInterface, J9HOOK_VM_EXCEPTION_THROW))
#else /* defined(J9VM_OPT_CRIU_SUPPORT) */
if ((*vmHooks)->J9HookDisable(vmHooks, J9HOOK_VM_EXCEPTION_THROW))
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */
{
exceptionEventHooked = true;
}
Expand Down
14 changes: 12 additions & 2 deletions runtime/compiler/env/VMJ9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2961,8 +2961,18 @@ TR_J9VMBase::canExceptionEventBeHooked()
J9JavaVM * javaVM = _jitConfig->javaVM;
J9HookInterface * * vmHooks = javaVM->internalVMFunctions->getVMHookInterface(javaVM);

bool catchCanBeHooked = ((*vmHooks)->J9HookDisable(vmHooks, J9HOOK_VM_EXCEPTION_CATCH) != 0);
bool throwCanBeHooked = ((*vmHooks)->J9HookDisable(vmHooks, J9HOOK_VM_EXCEPTION_THROW) != 0);
bool catchCanBeHooked =
#if defined(J9VM_OPT_CRIU_SUPPORT)
J9_EVENT_IS_HOOKED(javaVM->hookInterface, J9HOOK_VM_EXCEPTION_CATCH) || J9_EVENT_IS_RESERVED(javaVM->hookInterface, J9HOOK_VM_EXCEPTION_CATCH);
#else /* defined(J9VM_OPT_CRIU_SUPPORT) */
((*vmHooks)->J9HookDisable(vmHooks, J9HOOK_VM_EXCEPTION_CATCH) != 0);
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */
bool throwCanBeHooked =
#if defined(J9VM_OPT_CRIU_SUPPORT)
J9_EVENT_IS_HOOKED(javaVM->hookInterface, J9HOOK_VM_EXCEPTION_THROW) || J9_EVENT_IS_RESERVED(javaVM->hookInterface, J9HOOK_VM_EXCEPTION_THROW);
#else /* defined(J9VM_OPT_CRIU_SUPPORT) */
((*vmHooks)->J9HookDisable(vmHooks, J9HOOK_VM_EXCEPTION_THROW) != 0);
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */

return (catchCanBeHooked || throwCanBeHooked);
}
Expand Down
10 changes: 9 additions & 1 deletion runtime/nls/j9vm/j9vm.nls
Original file line number Diff line number Diff line change
Expand Up @@ -2106,7 +2106,7 @@ J9NLS_VM_CRIU_SINGLETHREADMODE_JVMCRIUEXCEPTION.system_action=The JVM will throw
J9NLS_VM_CRIU_SINGLETHREADMODE_JVMCRIUEXCEPTION.user_response=View CRIU documentation to determine how to resolve the exception.
# END NON-TRANSLATABLE

J9NLS_VM_CRIU_RESTORE_INITIALIZE_TRACE_FAILED=The JVM could not initialize trace upon restoring the JVM
J9NLS_VM_CRIU_RESTORE_INITIALIZE_TRACE_FAILED=The JVM could not initialize Xtrace upon restoring the JVM
# START NON-TRANSLATABLE
J9NLS_VM_CRIU_RESTORE_INITIALIZE_TRACE_FAILED.sample_input_1=1
J9NLS_VM_CRIU_RESTORE_INITIALIZE_TRACE_FAILED.explanation=CRIUSupport::checkpointJVM failed.
Expand Down Expand Up @@ -2137,3 +2137,11 @@ J9NLS_VM_CRIU_RESTORE_RESEED_INVALID_VALUEOFFSET.explanation=CRIUSupport::checkp
J9NLS_VM_CRIU_RESTORE_RESEED_INVALID_VALUEOFFSET.system_action=The JVM will throw a JVMRestoreException.
J9NLS_VM_CRIU_RESTORE_RESEED_INVALID_VALUEOFFSET.user_response=View CRIU documentation to determine how to resolve the exception.
# END NON-TRANSLATABLE

J9NLS_VM_CRIU_RESTORE_INITIALIZE_DUMP_FAILED=The JVM could not initialize Xdump upon restoring the JVM
# START NON-TRANSLATABLE
J9NLS_VM_CRIU_RESTORE_INITIALIZE_DUMP_FAILED.sample_input_1=1
J9NLS_VM_CRIU_RESTORE_INITIALIZE_DUMP_FAILED.explanation=CRIUSupport::checkpointJVM failed.
J9NLS_VM_CRIU_RESTORE_INITIALIZE_DUMP_FAILED.system_action=The JVM will throw a JVMRestoreException.
J9NLS_VM_CRIU_RESTORE_INITIALIZE_DUMP_FAILED.user_response=Check documentation for CRIUSupport restore options.
# END NON-TRANSLATABLE
3 changes: 3 additions & 0 deletions runtime/oti/j9dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ typedef struct J9RASdumpFunctions {
omr_error_t (*setDumpOption)(struct J9JavaVM *vm, char *optionString) ;
omr_error_t (*resetDumpOptions)(struct J9JavaVM *vm) ;
omr_error_t (*queryVmDump)(struct J9JavaVM *vm, int buffer_size, void* options_buffer, int* data_size) ;
#if defined(J9VM_OPT_CRIU_SUPPORT)
IDATA (*criuReloadXDumpAgents)(struct J9JavaVM *vm, struct J9VMInitArgs *j9vm_args) ;
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */
} J9RASdumpFunctions;

#endif /* j9dump_h */
2 changes: 2 additions & 0 deletions runtime/oti/j9nonbuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,7 @@ typedef struct J9SharedCacheAPI {
U_8 sharedCacheEnabled;
U_8 inContainer; /* It is TRUE only when xShareClassesPresent is FALSE and J9_SHARED_CACHE_DEFAULT_BOOT_SHARING(vm) is TRUE and the JVM is running in container */
I_8 layer;
U_8 xShareClassCacheDisabledOnCRIURestore;
} J9SharedCacheAPI;

typedef struct J9SharedClassConfig {
Expand Down Expand Up @@ -1313,6 +1314,7 @@ typedef struct J9SharedClassConfig {
void (*storeGCHints)(struct J9VMThread* currentThread, UDATA heapSize1, UDATA heapSize2, BOOLEAN forceReplace);
IDATA (*findGCHints)(struct J9VMThread* currentThread, UDATA *heapSize1, UDATA *heapSize2);
void ( *updateClasspathOpenState)(struct J9JavaVM* vm, struct J9ClassPathEntry** classPathEntries, UDATA entryIndex, UDATA entryCount, BOOLEAN isOpen);
void ( *disableSharedClassCacheForCriuRestore)(struct J9JavaVM* vm);
struct J9MemorySegment* metadataMemorySegment;
struct J9Pool* classnameFilterPool;
U_32 softMaxBytes;
Expand Down
1 change: 1 addition & 0 deletions runtime/oti/jvminit.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ enum INIT_STAGE {
#define VMOPT_XXDISABLECRIU "-XX:-EnableCRIUSupport"
#define VMOPT_XXENABLECRIUNONPORTABLEMODE "-XX:+CRIURestoreNonPortableMode"
#define VMOPT_XXDISABLECRIUNONPORTABLEMODE "-XX:-CRIURestoreNonPortableMode"
#define VMOPT_XSHARECLASSES_DISABLEONRESTORE "-Xshareclasses:disableOnRestore"
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */

/*
Expand Down
64 changes: 48 additions & 16 deletions runtime/rasdump/dmpsup.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ static omr_error_t shutdownDumpAgents (J9JavaVM *vm);
static omr_error_t popDumpFacade (J9JavaVM *vm);
static omr_error_t installAbortHandler (J9JavaVM *vm);
static omr_error_t showDumpAgents (J9JavaVM *vm);
static IDATA configureDumpAgents (J9JavaVM *vm);
static IDATA configureDumpAgents(J9JavaVM *vm, J9VMInitArgs *j9vm_args, BOOLEAN isBootup);
#if defined(J9VM_OPT_CRIU_SUPPORT)
static IDATA criuReloadXDumpAgents(J9JavaVM *vm, J9VMInitArgs *j9vm_args);
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */
static omr_error_t printDumpUsage (J9JavaVM *vm);
static omr_error_t pushDumpFacade (J9JavaVM *vm);
static void abortHandler (int sig);
Expand Down Expand Up @@ -391,20 +394,46 @@ storeDefaultData(J9JavaVM *vm)
return OMR_ERROR_NONE;
}

/* Function for configuring the RAS dump agents. Since Java 6 SR2 (VMDESIGN 1477), in increasing
* order of precedence:
* Default agents
* DISABLE_JAVADUMP, IBM_HEAPDUMP, IBM_HEAP_DUMP
* IBM_JAVADUMP_OUTOFMEMORY, IBM_HEAPDUMP_OUTOFMEMORY
* JAVA_DUMP_OPTS environment variable (including dump count parameter)
* -Xdump command-line options
#if defined(J9VM_OPT_CRIU_SUPPORT)
/**
* CRIU restore loads dump agents using an option file.
*
* @param[in] vm pointer to the J9JavaVM
* @param[in] vmArgs a J9VMInitArgs
*
* @return return J9VMDLLMAIN_OK if success, otherwise failures
*/
static IDATA
criuReloadXDumpAgents(J9JavaVM *vm, J9VMInitArgs *vmArgs)
{
/* similar with startup except at CRIU restore */
IDATA result = configureDumpAgents(vm, vmArgs, FALSE);
unlockConfig();

return result;
}
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */

/**
* A helper method for configuring the RAS dump agents.
* Since Java 6 SR2 (VMDESIGN 1477), in increasing order of precedence:
* Default agents
* DISABLE_JAVADUMP, IBM_HEAPDUMP, IBM_HEAP_DUMP
* IBM_JAVADUMP_OUTOFMEMORY, IBM_HEAPDUMP_OUTOFMEMORY
* JAVA_DUMP_OPTS environment variable (including dump count parameter)
* -Xdump command-line options

* @param[in] vm pointer to the J9JavaVM
* @param[in] vmArgs a J9VMInitArgs
* @param[in] isBootup if this is bootup or CRIUR restore
*
* @return return J9VMDLLMAIN_OK if success, otherwise failures
*/
static IDATA
configureDumpAgents(J9JavaVM *vm)
configureDumpAgents(J9JavaVM *vm, J9VMInitArgs *j9vm_args, BOOLEAN isBootup)
{
PORT_ACCESS_FROM_JAVAVM(vm);

J9VMInitArgs *j9vm_args = vm->vmArgsArray;
IDATA i;
IDATA xdumpIndex = 0;
IDATA showAgents = 0;
Expand Down Expand Up @@ -571,7 +600,7 @@ configureDumpAgents(J9JavaVM *vm)
* Treat -XX:[+-]HeapDumpOnOutOfMemoryError as an alias of -Xdump.
*/

xdumpIndex = FIND_ARG_IN_VMARGS_FORWARD(OPTIONAL_LIST_MATCH, VMOPT_XDUMP, NULL);
xdumpIndex = FIND_ARG_IN_ARGS_FORWARD(j9vm_args, OPTIONAL_LIST_MATCH, VMOPT_XDUMP, NULL);
while (xdumpIndex >= 0)
{
if (agentNum >= MAX_DUMP_OPTS) {
Expand Down Expand Up @@ -599,7 +628,7 @@ configureDumpAgents(J9JavaVM *vm)
if (NULL != toolCursor) {
char *optionValue = NULL;
/* The mapped option specifies the tool command to run after the equals */
GET_OPTION_VALUE(xdumpIndex, '=', &optionValue);
GET_OPTION_VALUE_ARGS(j9vm_args, xdumpIndex, '=', &optionValue);

/* Move toolCursor past ":tool:" */
toolCursor += strlen(toolString);
Expand All @@ -623,10 +652,10 @@ configureDumpAgents(J9JavaVM *vm)
}
}
} else {
GET_OPTION_VALUE(xdumpIndex, ':', &optionString);
GET_OPTION_VALUE_ARGS(j9vm_args, xdumpIndex, ':', &optionString);
}
} else {
GET_OPTION_VALUE(xdumpIndex, ':', &optionString);
GET_OPTION_VALUE_ARGS(j9vm_args, xdumpIndex, ':', &optionString);
}
if (!optionString) {
/* ... silent option ... */
Expand Down Expand Up @@ -677,7 +706,7 @@ configureDumpAgents(J9JavaVM *vm)
CONSUME_ARG(j9vm_args, xdumpIndex);
}

xdumpIndex = FIND_NEXT_ARG_IN_VMARGS_FORWARD(OPTIONAL_LIST_MATCH, VMOPT_XDUMP, NULL, xdumpIndex);
xdumpIndex = FIND_NEXT_ARG_IN_ARGS_FORWARD(j9vm_args, OPTIONAL_LIST_MATCH, VMOPT_XDUMP, NULL, xdumpIndex);
}
/* handle the case of no -Xdump options */
if (processXXHeapDump) {
Expand Down Expand Up @@ -1086,6 +1115,9 @@ pushDumpFacade(J9JavaVM *vm)
queue->facade.setDumpOption = setDumpOption;
queue->facade.resetDumpOptions = resetDumpOptions;
queue->facade.queryVmDump = queryVmDump;
#if defined(J9VM_OPT_CRIU_SUPPORT)
queue->facade.criuReloadXDumpAgents = criuReloadXDumpAgents;
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */

/* Initialize default settings */
queue->settings = initDumpSettings(vm);
Expand Down Expand Up @@ -1461,7 +1493,7 @@ J9VMDllMain(J9JavaVM *vm, IDATA stage, void *reserved)

/* Swap in new dump facade */
if (OMR_ERROR_NONE == pushDumpFacade(vm)) {
retVal = configureDumpAgents(vm);
retVal = configureDumpAgents(vm, vm->vmArgsArray, TRUE);
/* Allow configuration updates now that we've done initial setup */
unlockConfig();
} else {
Expand Down
28 changes: 26 additions & 2 deletions runtime/shared_common/shrinit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1816,12 +1816,23 @@ j9shr_findSharedData(J9VMThread* currentThread, const char* key, UDATA keylen, U
U_64 localRuntimeFlags = sharedClassConfig->runtimeFlags;
UDATA localVerboseFlags = sharedClassConfig->verboseFlags;

if (!(localRuntimeFlags & J9SHR_RUNTIMEFLAG_CACHE_INITIALIZATION_COMPLETE) ||
(localRuntimeFlags & J9SHR_RUNTIMEFLAG_DENY_CACHE_ACCESS)) {
if (!(localRuntimeFlags & J9SHR_RUNTIMEFLAG_CACHE_INITIALIZATION_COMPLETE)) {
Trc_SHR_INIT_findSharedData_exit_Noop(currentThread);
return -1;
}

if (localRuntimeFlags & J9SHR_RUNTIMEFLAG_DENY_CACHE_ACCESS) {

/* if SCC has been disabled by CRIU restore options then behave as if the cache is empty rather than throwing an error */
if (vm->sharedCacheAPI->xShareClassCacheDisabledOnCRIURestore) {
Trc_SHR_INIT_findSharedData_exit_Noop(currentThread);
return 0;
} else {
Trc_SHR_INIT_findSharedData_exit_Noop(currentThread);
return -1;
}
}

/* jcl calls from shared.c set the vmState, but bootstrap calls do not */
if (*currentState != J9VMSTATE_SHAREDDATA_FIND) {
oldState = *currentState;
Expand Down Expand Up @@ -3517,6 +3528,7 @@ j9shr_init(J9JavaVM *vm, UDATA loadFlags, UDATA* nonfatal)
config->findGCHints = j9shr_findGCHints;
config->storeGCHints = j9shr_storeGCHints;
config->updateClasspathOpenState = j9shr_updateClasspathOpenState;
config->disableSharedClassCacheForCriuRestore = j9shr_disableSharedClassCacheForCriuRestore;

config->sharedAPIObject = initializeSharedAPI(vm);
if (config->sharedAPIObject == NULL) {
Expand Down Expand Up @@ -5344,4 +5356,16 @@ findExistingCacheLayerNumbers(J9JavaVM* vm, const char* ctrlDirName, const char*
return;
}

/**
* Disables reads/writes to the shared class cache and marks the shared class cache as disabled during a CRIU restore
*
* @param [in] vm The Java VM
**/
void
j9shr_disableSharedClassCacheForCriuRestore(J9JavaVM* vm)
{
vm->sharedClassConfig->runtimeFlags |= J9SHR_RUNTIMEFLAG_DENY_CACHE_ACCESS | J9SHR_RUNTIMEFLAG_DENY_CACHE_UPDATES;
vm->sharedCacheAPI->xShareClassCacheDisabledOnCRIURestore = TRUE;
}

} /* extern "C" */
1 change: 1 addition & 0 deletions runtime/shared_common/shrinit.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ IDATA j9shr_findGCHints(J9VMThread* currentThread, UDATA *heapSize1, UDATA *heap
const U_8* storeStartupHintsToSharedCache(J9VMThread* currentThread);
IDATA j9shr_getCacheDir(J9JavaVM* vm, const char* ctrlDirName, char* buffer, UDATA bufferSize, U_32 cacheType);
U_32 getCacheTypeFromRuntimeFlags(U_64 runtimeFlags);
void j9shr_disableSharedClassCacheForCriuRestore(J9JavaVM* vm);

typedef struct J9SharedClassesHelpText {
const char* option;
Expand Down
57 changes: 57 additions & 0 deletions runtime/vm/CRIUHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ static void initializeCriuHooks(J9VMThread *currentThread);
static BOOLEAN juRandomReseed(J9VMThread *currentThread, void *userData, const char **nlsMsgFormat);
static BOOLEAN criuRestoreInitializeTrace(J9VMThread *currentThread, void *userData, const char **nlsMsgFormat);
static BOOLEAN criuRestoreInitializeXrs(J9VMThread *currentThread, void *userData, const char **nlsMsgFormat);
static BOOLEAN criuRestoreDisableSharedClassCache(J9VMThread *currentThread, void *userData, const char **nlsMsgFormat);
static BOOLEAN criuRestoreInitializeDump(J9VMThread *currentThread, void *userData, const char **nlsMsgFormat);
static jvmtiIterationControl objectIteratorCallback(J9JavaVM *vm, J9MM_IterateObjectDescriptor *objectDesc, void *userData);

BOOLEAN
Expand Down Expand Up @@ -320,6 +322,58 @@ criuRestoreInitializeXrs(J9VMThread *currentThread, void *userData, const char *
return TRUE;
}

/**
* An internal JVM checkpoint hook to disable the shared class cache if the -Xshareclasses:disableOnRestore is present
*
* @param[in] currentThread vmThread token
* @param[in] userData J9InternalHookRecord pointer
*
* @return TRUE (there will never be an error in this function)
*/
static BOOLEAN
criuRestoreDisableSharedClassCache(J9VMThread *currentThread, void *userData, const char **nlsMsgFormat)
{
J9JavaVM *vm = currentThread->javaVM;

if (NULL != vm->checkpointState.restoreArgsList) {
if (FIND_AND_CONSUME_ARG(vm->checkpointState.restoreArgsList, EXACT_MATCH, VMOPT_XSHARECLASSES_DISABLEONRESTORE, NULL) >= 0) {
if (NULL != vm->sharedClassConfig) {
vm->sharedClassConfig->disableSharedClassCacheForCriuRestore(vm);
}
}
}

return TRUE;
}

/**
* An internal JVM checkpoint hook to initialize dump after restore.
*
* @param[in] currentThread vmThread token
* @param[in] userData J9InternalHookRecord pointer
* @param[in/out] nlsMsgFormat an NLS message
*
* @return BOOLEAN TRUE if no error, otherwise FALSE
*/
static BOOLEAN
criuRestoreInitializeDump(J9VMThread *currentThread, void *userData, const char **nlsMsgFormat)
{
BOOLEAN result = TRUE;
J9JavaVM *vm = currentThread->javaVM;

if (NULL != vm->checkpointState.restoreArgsList) {
if (FIND_ARG_IN_ARGS_FORWARD(vm->checkpointState.restoreArgsList, OPTIONAL_LIST_MATCH, VMOPT_XDUMP, NULL) >= 0) {
if (J9VMDLLMAIN_OK != vm->j9rasDumpFunctions->criuReloadXDumpAgents(vm, vm->checkpointState.restoreArgsList)) {
PORT_ACCESS_FROM_VMC(currentThread);
*nlsMsgFormat = j9nls_lookup_message(J9NLS_DO_NOT_PRINT_MESSAGE_TAG | J9NLS_DO_NOT_APPEND_NEWLINE,
J9NLS_VM_CRIU_RESTORE_INITIALIZE_DUMP_FAILED, NULL);
result = FALSE;
}
}
}
return result;
}

/**
* This cleans up the instanceObjects associated with each J9JavaVM->checkpointState.hookRecords,
* the hookRecords and classIterationRestoreHookRecords as well if checkpointState.isNonPortableRestoreMode is TRUE.
Expand Down Expand Up @@ -406,8 +460,11 @@ initializeCriuHooks(J9VMThread *currentThread)
}
addInternalJVMCheckpointHook(currentThread, TRUE, NULL, FALSE, criuRestoreInitializeTrace);
addInternalJVMCheckpointHook(currentThread, TRUE, NULL, FALSE, criuRestoreInitializeXrs);
addInternalJVMCheckpointHook(currentThread, TRUE, NULL, FALSE, criuRestoreInitializeDump);
}

addInternalJVMCheckpointHook(currentThread, TRUE, NULL, FALSE, criuRestoreDisableSharedClassCache);

done:
Trc_VM_criu_initHooks_Exit(currentThread, vm->checkpointState.hookRecords,
vm->checkpointState.classIterationRestoreHookRecords, vm->checkpointState.delayedLockingOperationsRecords);
Expand Down
17 changes: 17 additions & 0 deletions test/functional/cmdLineTests/criu/criu_nonPortable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -640,4 +640,21 @@
<!-- In the past, the failure below was caused by an issue where CRIU can't be found on the PATH. -->
<output type="failure" caseSensitive="yes" regex="no">Could not dump the JVM processes, err=-70</output>
</test>
<test id="Restore dump options test with no dump options specified before checkpoint">
<command>bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ DumpOptionsTest 1</command>
<output type="success" caseSensitive="no" regex="no">Killed</output>
<output type="required" caseSensitive="yes" regex="no">Pre-checkpoint</output>
<output type="success" caseSensitive="yes" regex="no">Processing dump event "vmstop"</output>
<output type="success" caseSensitive="yes" regex="no">Processing dump event "throw", detail "java/lang/OutOfMemoryError"</output>
<output type="success" caseSensitive="yes" regex="no">JVM requested Java dump</output>
<output type="success" caseSensitive="yes" regex="no">Post-checkpoint</output>
<output type="failure" caseSensitive="yes" regex="no">CRIU is not enabled</output>
<output type="failure" caseSensitive="yes" regex="no">Operation not permitted</output>
<!-- If CRIU can't acquire the original thread IDs, this test will fail. Nothing can be done about this failure. -->
<output type="success" caseSensitive="yes" regex="no">Thread pid mismatch</output>
<output type="success" caseSensitive="yes" regex="no">do not match expected</output>
<output type="success" caseSensitive="yes" regex="no">Unable to create a thread:</output>
<!-- In the past, the failure below was caused by an issue where CRIU can't be found on the PATH. -->
<output type="failure" caseSensitive="yes" regex="no">Could not dump the JVM processes, err=-70</output>
</test>
</suite>
Loading