karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Grzybek (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-3648) should zero out instance pid in instance.properties when we shutdown an instance from shell
Date Wed, 17 Jun 2015 14:52:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589879#comment-14589879
] 

Grzegorz Grzybek commented on KARAF-3648:
-----------------------------------------

The "shutdown an instance from shell" works fine, but now we have 30 second long (by default)
deadlock between root and child container in case root container shuts down child container.
Root container sends shutdown message when holding lock on {{instance.properties}} file. It
then waits for 30 second for {{!process.isRunning()}} to be true than quits and releases the
lock. Only then child's container {{main}} thread, which waits like this:
{noformat}
"main@1" prio=5 tid=0x1 nid=NA runnable
  java.lang.Thread.State: RUNNABLE
	  at sun.nio.ch.FileDispatcherImpl.lock0(FileDispatcherImpl.java:-1)
	  at sun.nio.ch.FileDispatcherImpl.lock(FileDispatcherImpl.java:90)
	  at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1052)
	  at java.nio.channels.FileChannel.lock(FileChannel.java:1052)
	  at org.apache.karaf.main.util.FileLockUtils.execute(FileLockUtils.java:52)
	  at org.apache.karaf.main.util.FileLockUtils.execute(FileLockUtils.java:79)
	  at org.apache.karaf.main.Main.updateInstancePid(Main.java:635)
	  at org.apache.karaf.main.Main.main(Main.java:570)
{noformat}
may finally obtain a lock, update {{instance.properties}} (which is updated by root container
as well) and finally quit.

> should zero out instance pid in instance.properties when we shutdown an instance from
shell
> -------------------------------------------------------------------------------------------
>
>                 Key: KARAF-3648
>                 URL: https://issues.apache.org/jira/browse/KARAF-3648
>             Project: Karaf
>          Issue Type: Bug
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 2.4.2, 3.0.4, 4.0.0.M3
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message