LingeredApp termination sequence

Gary Adams gary.adams at oracle.com
Fri Mar 29 17:12:33 UTC 2019


While running some bulk testing on jdk/sun/tools I've
come across some errors reported from the termination sequence
for LingeredApp debuggee process.

The main process creates a locking file, which the LingeredApp
sits in a loop updating the file modification date. When the main
test completes it stops the LingeredApp by removing the file.

The clean exit results when LingeredApp gets a NoSuchFileException.
I see a number of bugs filed that are getting a raw IOException
on the LingeredApp termination.

I'm going to attempt to get more specific information about the IOException.

diff --git a/test/lib/jdk/test/lib/apps/LingeredApp.java 
b/test/lib/jdk/test/lib/apps/LingeredApp.java
--- a/test/lib/jdk/test/lib/apps/LingeredApp.java
+++ b/test/lib/jdk/test/lib/apps/LingeredApp.java
@@ -504,6 +504,9 @@
          } catch (NoSuchFileException ex) {
              // Lock deleted while we are setting last modified time.
              // Ignore error and lets the app exits
+        } catch (IOException ioe) {
+            ioe.printStackTrace();
+            System.exit(3);
          } catch (Exception ex) {
              System.err.println("LingeredApp ERROR: " + ex);
              // Leave exit_code = 1 to Java launcher

Since the error is being detected as the test is terminating,
I think it would be possible to simply replace the NoSuchFileException,
and consider an IOException as the trigger for the clean exit sequence.

Anyone have experience with this corner of the swamp?



More information about the serviceability-dev mailing list