[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR(S): JDK-8148104 HSDB could not terminate when launched on CLI.
From:       KUBOTA Yuji <kubota.yuji () gmail ! com>
Date:       2016-01-27 22:57:21
Message-ID: CABU-27Ocv-N1yhK4mheY36yLa+VZXi1NY39+ZWMu9rLaTY2aLQ () mail ! gmail ! com
[Download RAW message or body]

2016-01-26 19:56 GMT+09:00 Jaroslav Bachorik <jaroslav.bachorik@oracle.com>:
> On 26.1.2016 11:54, Dmitry Samersoff wrote:
>>
>> Yuji,
>>
>> I think both changes are good so I add this patch to webrev.
>>
>> see:
>>
>>
>> http://cr.openjdk.java.net/~dsamersoff/sponsorship/kubota.yuji/JDK-8148104/webrev.02/
>
>
> Thanks Yuji, Dmitry!
>
> Thumbs up!

Thanks Dmitry, Jaroslav !

Do I need more reviewer?

>
> -JB-
>
>
>>
>> -Dmitry
>>
>>
>> On 2016-01-25 13:57, KUBOTA Yuji wrote:
>>>
>>> Hi Dmitry and Jaroslav,
>>>
>>> 2016-01-25 18:11 GMT+09:00 Jaroslav Bachorik
>>> <jaroslav.bachorik@oracle.com>:
>>>>
>>>> On 23.1.2016 12:13, Dmitry Samersoff wrote:
>>>>>
>>>>> Solution:
>>>>>
>>>>> Create frame before we initialize agent.
>>>>
>>>>
>>>>
>>>> While this solution will work in this case I think it would be better to
>>>> daemonize the WorkerThread
>>>>
>>>> (hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/WorkerThread.java)
>>>> - that should ensure that the application will be allowed to terminate
>>>> even
>>>> though the worker thread is still running.
>>>
>>>
>>> It's reasonable for me. I could not come up with the reason why the
>>> WorkerThread is not daemonized, so I wrote simply.
>>> I think that WorkerThread can be abandoned when JVM halts, so
>>> recreated the patch to demonize as below.
>>>
>>> jdk9/hs-rt/hotspot (9982:91be2fb6db87)
>>> ----
>>> diff --git
>>> a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/WorkerThread.java
>>>
>>> b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/WorkerThread.java
>>> ---
>>> a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/WorkerThread.java
>>> +++
>>> b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/WorkerThread.java
>>> @@ -35,7 +35,11 @@
>>>     public WorkerThread() {
>>>       mqb = new MessageQueueBackend();
>>>       mq = mqb.getFirstQueue();
>>> -    new Thread(new MainLoop()).start();
>>> +
>>> +    // Enable to terminate this worker during runnning by daemonize.
>>> +    Thread mqthread = new Thread(new MainLoop());
>>> +    mqthread.setDaemon(true);
>>> +    mqthread.start();
>>>     }
>>>
>>>     /** Runs the given Runnable in the thread represented by this
>>> ----
>>>
>>> Sorry, Dmitry, could you please re-upload this patch if you agree with
>>> this idea?
>>>
>>> Thanks,
>>> Yuji
>>>
>>>> -JB-
>>>>
>>>>>
>>>>> -Dmitry
>>
>>
>>
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic