Verbose GC CRIU Support - #6850
Conversation
|
Please review @amicic @dmitripivkine cc @tajila |
dd2f2f9 to
b7b686b
Compare
|
Other verbose GC related CRIU work (e.g Reprinting the Initialized header) will be done in subsequent PRs. This PR only addresses the immediate issues with VerboseGC + CRIU. |
This seems like the correct approach to me, but I can also see verbose restore act as a fresh init (e.g truncate existing file and reinit params for rotation logs). With the approach implemented, in a rotating log scenario, we would start from the same file opened at the time of checkpoint. For example, if we're rotating between 4 logs and vgc is on log 3 at the time of checkpoint, then restore will start at 3 again and append to that. If at the time of restore, none of the logs are present it will create log 3 |
b890e77 to
395f46d
Compare
What about a scenario where VGC was enabled at checkpoint VM, but files were physically removed before doing a restore.... will everything work as if VGC was never enabled, what will be the file index (in your example)? |
After re-reading, seems like you've already had an answer to my question. Anyhow, I'm a bit more inclined that
Also restore VM should be able to override rotating log parameters. @dmitripivkine and @tajila might have their own opinion.... In short, I'm just looking from a perspective that a user of a restore VM has no interest in the past (that there was some checkpoint VM and how it was configured etc). |
|
I think common behaviour would be GC verbose log has not been requested for snapshot creation but might be set up at restore. It means general expectation is GC verbose log after restore is brand new (initial reset), even it was requested for snapshot creation. Also it means GC verbose log options should be taken at restore. I think we should treat restore as a "new" JVM run from GC verbose log management point of view. |
From a user perspective I think the most useful data would be a verbose log that begins at restore. So agree with the comment above. That being said we should also be compatible with modes where verbose is requested from start-up. In this case I think it should capture both snapshot and restore data. If there are issues with elapsed time related data point we have ways to correct that. |
|
Discussed this with @amicic, we decided that both (checkpoint and restore) set of verbose logs should be kept only if the user doesn't specify file name, in which case the file name will default to |
|
When we have the capability to set a separate set of options for restore, the user should be able to specify a new verbose file name, different from the one inited at checkpoint run. This would be another way to keep the both set of logs. |
This PR doesn't implement this, I'm deferring this work, will revisit it when
|
|
looks good. approving, although a couple of minor comments should be addressed |
|
Sorry, I missed the latest review comments, they've been addressed now. @babsingh could you please proceed with review/merge |
Files opened by Verbose GC must be excluded from CRIU dump. Opened files can be problematic as the restore file validation can fail if the file changes in any way. e.g. file contents changed since the time of checkpoint or file not present at restore time (very typical for CRIU use cases). Hence, Verbose GC file writers/streams must be closed prior to creating a check point image and reopened for restore. Introduced openStream for Verbose Writers Used to openFile associated with file writers , only required for base class MM_VerboseWriterFileLogging Introduced openStreams for Verbose Manager To walk the set of verbose writers and open streams (complementary to existing closeStreams routine) Introduced prepareForCheckpoint and reinitializeForRestore for Verbose Manager Calls Manager's Close/OpenStreams Depends on: eclipse-openj9/openj9#16472 Signed-off-by: Salman Rana <salman.rana@ibm.com>
|
These changes are good, it seems to be OpenJ9 side of things. |
|
jenkins build all |
|
re #6850 (comment): @RSalman can you confirm that there are no other failures in the failed OSX PR build? |
Yup, not seeing anything other than the known socket test: |
Integrate CRIU support with new (OMR) Verbose GC APIs, invoke Verbose Manager to prepareForCheckpoint (close verbose log files) and reinitializeForRestore (reopen logs). For background, see eclipse-omr/omr#6850 Depends on: eclipse-omr/omr#6850 Fixes: eclipse-openj9#15858 Signed-off-by: Salman Rana <salman.rana@ibm.com>
Files opened by Verbose GC must be excluded from the CRIU dump. Opened logs can be problematic as the restore file validation can fail if the logs change between checkpoint and restore (e.g. file contents/metadata changed or file not available at restore time, which is typical for CRIU use cases). Hence, Verbose GC file writers/streams must be closed prior to creating a check point image and reopened for restore.
openStreamfor Verbose WritersMM_VerboseWriterFileLoggingopenStreamsfor Verbose ManagercloseStreamsroutine)prepareForCheckpointandreinitializeForRestorefor Verbose ManagerSigned-off-by: Salman Rana salman.rana@ibm.com