JShellHeapDumpTest seems to uncover a number of JMap bugs that seem to be related to the underlying java program mutating while trying to produce the hprof file. See the parent of this CR. However, after fixes for
JDK-8228625 are done, you will no longer see these failures (or at best they will be very very rare) because the test will be allowing the jshell process to run until it reaches the user input prompt, thus the process will essentially be asleep, making for a safer state for JMap to work in. We need to add another test very similar to JShellHeapDumpTest, but without the 2 second delay, so these problems reproduce again. The test will need to be immediately problem listed because it will cause too many failures.