RFR: 8233185: HttpServer.stop() blocks indefinitely when called on dispatch thread

2019-11-26 Thread Julia Boes

Hi,

When HttpServer.stop(int delay) is called on the dispatcher thread of 
the server, the call blocks indefinitely as the thread is waiting for 
itself to die. The proposed fix in this case is to skip the join() and 
let the thread return immediately.


Bug: https://bugs.openjdk.java.net/browse/JDK-8233185

Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8233185/webrev.00/


Regards,

Julia



Re: RFR: 8233185: HttpServer.stop() blocks indefinitely when called on dispatch thread

2019-11-26 Thread Daniel Fuchs

Hi Julia,

Looks good to me!

Good work with the test :-)

best regards,

-- daniel

On 26/11/2019 16:27, Julia Boes wrote:

Hi,

When HttpServer.stop(int delay) is called on the dispatcher thread of 
the server, the call blocks indefinitely as the thread is waiting for 
itself to die. The proposed fix in this case is to skip the join() and 
let the thread return immediately.


Bug: https://bugs.openjdk.java.net/browse/JDK-8233185

Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8233185/webrev.00/


Regards,

Julia





Re: RFR: 8233185: HttpServer.stop() blocks indefinitely when called on dispatch thread

2019-11-26 Thread Vyom Tewari26
Hi Julia,
 
thanks for looking into  this issue, it looks like regression, in JDK8  we  don't do join() on "dispatcherThread" in stop().  We need to find out why we introduce the below code.
 

if (dispatcherThread != null) {    try {    dispatcherThread.join();    } catch (InterruptedException e) {    Thread.currentThread().interrupt();    logger.log (Level.TRACE, "ServerImpl.stop: ", e);    }    }
#
 
Thanks,
Vyom
 
- Original message -From: Julia Boes Sent by: "net-dev" To: OpenJDK Network Dev list Cc:Subject: [EXTERNAL] RFR: 8233185: HttpServer.stop() blocks indefinitely when called on dispatch threadDate: Tue, Nov 26, 2019 9:58 PM 
Hi,When HttpServer.stop(int delay) is called on the dispatcher thread ofthe server, the call blocks indefinitely as the thread is waiting foritself to die. The proposed fix in this case is to skip the join() andlet the thread return immediately.Bug: https://bugs.openjdk.java.net/browse/JDK-8233185 Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8233185/webrev.00/ Regards,Julia