RFR: JDK-8055767: Sjavac is leaking servers

Joel Borggrén-Franck joel.franck at oracle.com
Fri Aug 22 07:24:47 UTC 2014


Looks good, ship it

cheers
/Joel

On 21 aug 2014, at 16:58, Erik Joelsson <erik.joelsson at oracle.com> wrote:

> Hello,
> 
> Please review this simple fix to a rather annoying problem. Since JDK-8044131, Sjavac is never shutting down the server, at least not on Unix platforms. I have just killed a big bunch of stale servers in JPRT.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8055767
> Patch inline:
> 
> 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;
>         }
> 
> /Erik



More information about the compiler-dev mailing list