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] [Created] (KARAF-5327) Threads not stopped on karaf.restart + bundle(0).stop()
Date Wed, 30 Aug 2017 06:23:00 GMT
Grzegorz Grzybek created KARAF-5327:
---------------------------------------

             Summary: Threads not stopped on karaf.restart + bundle(0).stop()
                 Key: KARAF-5327
                 URL: https://issues.apache.org/jira/browse/KARAF-5327
             Project: Karaf
          Issue Type: Bug
          Components: karaf-core
    Affects Versions: 4.2.0
            Reporter: Grzegorz Grzybek
            Assignee: Grzegorz Grzybek


I was looking at:
{noformat}
karaf@root()> system:property karaf.restart true
karaf@root()> stop 0
{noformat}

I expected OSGi/Felix to be stopped, start-level go to 0 and all components/services/threads
be stopped.

However when Karaf came to:
{noformat}
"main@7301" prio=5 tid=0x1 nid=NA runnable
  java.lang.Thread.State: RUNNABLE
	  at org.apache.karaf.main.Main.main(Main.java:170)
{noformat}
i.e., when Karaf decided to loop instead of System.exit() (because of karaf.restart=true),
I saw the following threads remaining:

* jline
{noformat}
"JLine terminal non blocking reader thread@7394" daemon prio=5 tid=0x5e nid=NA runnable
  java.lang.Thread.State: RUNNABLE
	  at java.io.FileInputStream.readBytes(FileInputStream.java:-1)
	  at java.io.FileInputStream.read(FileInputStream.java:255)
	  at org.jline.utils.InputStreamReader.read(InputStreamReader.java:270)
	  - locked <0x1ce3> (a java.io.FileInputStream)
	  at org.jline.utils.InputStreamReader.read(InputStreamReader.java:200)
	  at org.jline.utils.NonBlockingReader.run(NonBlockingReader.java:276)
	  at java.lang.Thread.run(Thread.java:748)
{noformat}
* shutdown socket thread
{noformat}
"Karaf Shutdown Socket Thread@7393" daemon prio=5 tid=0x18 nid=NA runnable
  java.lang.Thread.State: RUNNABLE
	  at java.net.PlainSocketImpl.socketAccept(PlainSocketImpl.java:-1)
	  at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
	  at java.net.ServerSocket.implAccept(ServerSocket.java:545)
	  at java.net.ServerSocket.accept(ServerSocket.java:513)
	  at org.apache.karaf.main.ShutdownSocketThread.run(ShutdownSocketThread.java:57)
{noformat}

(In fabric8v1 I also saw jetty threads running, but it's pax-web fault).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message