Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8055767

Sjavac is leaking servers

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b29
    • Verification:
      Not verified

      Backports

        Description

        In JDK-8044131 the sjavac server code got restructured. In the shutdown method there is a check to guard against calling it multiple times. This check will never return true and because of that, the server never quits. The fix is simple, just reversing the boolean arguments in the test:

        diff -r 4d1ea4477956 src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/SjavacServer.java
        --- a/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/SjavacServer.java
        +++ b/src/jdk.compiler/share/classes/com/sun/tools/sjavac/server/SjavacServer.java
        @@ -310,7 +310,7 @@
         
             @Override
             public void shutdown(String quitMsg) {
        - if (!keepAcceptingRequests.compareAndSet(false, true)) {
        + if (!keepAcceptingRequests.compareAndSet(true, false)) {
                     // Already stopped, no need to shut down again
                     return;
                 }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                alundblad Andreas Lundblad (Inactive)
                Reporter:
                erikj Erik Joelsson
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: