RFR: JDK-8055767: Sjavac is leaking servers

Andreas Lundblad andreas.lundblad at oracle.com
Fri Aug 22 07:06:09 UTC 2014


On Thu, Aug 21, 2014 at 04:58:19PM +0200, Erik Joelsson 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

Good catch Erik. Looks like an obvious mixup of arguments to me. (I'm not a Reviewer though.)

-- Andreas


More information about the compiler-dev mailing list