Re: [Neo4j] [SPAM] Re: [SPAM] Re: EmbeddedGraphDatabase shutdown leaves a Timer thread running

2010-10-13 Thread Andreas Kollegger
Yes, that is correct. The task should have been explicitly spawned as a daemon 
(which would not prevent app from exiting), or canceled during graph shutdown. 
It has been fixed in trunk, and we're adding integration tests to check this 
kind of problem. We totally missed this with normal unit testing. Sorry about 
that. 

Also, we had some dangling RMI in neo4j-shell. Fixes for both should be 
available in snapshot artifacts and will be released with the next milestone, 
as Mattias mentioned.

Cheers,
Andreas

On Oct 13, 2010, at 5:11 PM, Chris Gioran wrote:

> On Wed, Oct 13, 2010 at 5:48 PM, Rick Bullotta
>  wrote:
>> Lucky guess. ;-)
> 
> It seems that the load() method of the UdcExtensionImpl creates a
> java.util.Timer to do its thing but I cannot find anywhere a call to
> the timer's cancel(). In that case (as per the javadoc) the Timer will
> take arbitrarily long to terminate. I think this explains the observed
> behavior.
> 
> cheers,
> CG
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] [SPAM] Re: [SPAM] Re: EmbeddedGraphDatabase shutdown leaves a Timer thread running

2010-10-13 Thread Chris Gioran
On Wed, Oct 13, 2010 at 5:48 PM, Rick Bullotta
 wrote:
> Lucky guess. ;-)

It seems that the load() method of the UdcExtensionImpl creates a
java.util.Timer to do its thing but I cannot find anywhere a call to
the timer's cancel(). In that case (as per the javadoc) the Timer will
take arbitrarily long to terminate. I think this explains the observed
behavior.

cheers,
CG
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] [SPAM] Re: [SPAM] Re: EmbeddedGraphDatabase shutdown leaves a Timer thread running

2010-10-13 Thread Rick Bullotta
Lucky guess. ;-)

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On
Behalf Of Adam Lehenbauer
Sent: Wednesday, October 13, 2010 10:44 AM
To: Neo4j user discussions
Subject: [SPAM] Re: [Neo4j] [SPAM] Re: EmbeddedGraphDatabase shutdown leaves
a Timer thread running

Excluding UDC fixes this for me.

On Wed, Oct 13, 2010 at 10:39 AM, Chris Gioran
wrote:

> On Wed, Oct 13, 2010 at 5:34 PM, Rick Bullotta
>  wrote:
> > Probably the recently added "phone home" functionality (UDC).  Just a
> guess,
> > though.
>
> in that case removing the dependency as per
>
> http://wiki.neo4j.org/content/UDC
>
> should make it work. My setup is the same bar a _21 JVM and 2 cores.
> All my tests terminate normally.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] [SPAM] Re: EmbeddedGraphDatabase shutdown leaves a Timer thread running

2010-10-13 Thread Adam Lehenbauer
Excluding UDC fixes this for me.

On Wed, Oct 13, 2010 at 10:39 AM, Chris Gioran wrote:

> On Wed, Oct 13, 2010 at 5:34 PM, Rick Bullotta
>  wrote:
> > Probably the recently added "phone home" functionality (UDC).  Just a
> guess,
> > though.
>
> in that case removing the dependency as per
>
> http://wiki.neo4j.org/content/UDC
>
> should make it work. My setup is the same bar a _21 JVM and 2 cores.
> All my tests terminate normally.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] [SPAM] Re: EmbeddedGraphDatabase shutdown leaves a Timer thread running

2010-10-13 Thread Chris Gioran
On Wed, Oct 13, 2010 at 5:34 PM, Rick Bullotta
 wrote:
> Probably the recently added "phone home" functionality (UDC).  Just a guess,
> though.

in that case removing the dependency as per

http://wiki.neo4j.org/content/UDC

should make it work. My setup is the same bar a _21 JVM and 2 cores.
All my tests terminate normally.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] [SPAM] Re: EmbeddedGraphDatabase shutdown leaves a Timer thread running

2010-10-13 Thread Rick Bullotta
Probably the recently added "phone home" functionality (UDC).  Just a guess,
though.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On
Behalf Of Adam Lehenbauer
Sent: Wednesday, October 13, 2010 9:49 AM
To: Neo4j user discussions
Subject: [SPAM] Re: [Neo4j] EmbeddedGraphDatabase shutdown leaves a Timer
thread running

I added:

Map map = new HashMap();
map.put("cache_type", "soft");

and  gave the map to the EmbeddedGraphDatabase constructor; no change in
behavior.

I'm running:

Java HotSpot, 1.6.0_18
64 bit

Ubuntu 10.04 (lucid)

I've got 4 AMD Phenom cores.

On Wed, Oct 13, 2010 at 9:34 AM, Chris Gioran wrote:

> On Wed, Oct 13, 2010 at 4:11 PM, Adam Lehenbauer 
> wrote:
> > I think I have the Getting Started example working, but after it creates
> the
> > nodes and shuts down, my JVM won't exit because there is a non-daemon
> Timer
> > thread running.
> >
> > I have an example class with a main() that is copied near-verbatim from
> > http://wiki.neo4j.org/content/Getting_Started_Guide except for the db
> path
> > and a few extra System.outs.
> >
> > Everything seems to work normally, but after shutting down
> > the EmbeddedGraphDatabase the JVM will not exit. A jstack shows a
running
> > java.util.TimerThread, which I assume is started by the database.
> >
> > Its stack is:
> >
> > ---
> > "Timer-0" prio=10 tid=0x7f59c0056800 nid=0xa29 in Object.wait()
> > [0x7f59bf6d5000]
> >   java.lang.Thread.State: TIMED_WAITING (on object monitor)
> >  at java.lang.Object.wait(Native Method)
> > - waiting on <0x7f5a1ed37270> (a java.util.TaskQueue)
> >  at java.util.TimerThread.mainLoop(Timer.java:509)
> > - locked <0x7f5a1ed37270> (a java.util.TaskQueue)
> >  at java.util.TimerThread.run(Timer.java:462)
> > ---
> >
> > I'm using the neo4j maven dependency: org.neo4j.neo4j, version=1.2.M01,
> > type=pom. When I changed this to neo4j-kernel, version=1.0 the JVM
exited
> as
> > expected (no code change on my end).
> >
> > Does anyone have any idea why this is happening?
> >
> > Adam
>
> Hi there,
>
> Could you run it with a configuration setting of "cache_type"="soft"
> and inform on the result?
> Also, describe a bit your environment (CPU, OS, JVM)
>
> cheers,
> CG
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] EmbeddedGraphDatabase shutdown leaves a Timer thread running

2010-10-13 Thread Adam Lehenbauer
I added:

Map map = new HashMap();
map.put("cache_type", "soft");

and  gave the map to the EmbeddedGraphDatabase constructor; no change in
behavior.

I'm running:

Java HotSpot, 1.6.0_18
64 bit

Ubuntu 10.04 (lucid)

I've got 4 AMD Phenom cores.

On Wed, Oct 13, 2010 at 9:34 AM, Chris Gioran wrote:

> On Wed, Oct 13, 2010 at 4:11 PM, Adam Lehenbauer 
> wrote:
> > I think I have the Getting Started example working, but after it creates
> the
> > nodes and shuts down, my JVM won't exit because there is a non-daemon
> Timer
> > thread running.
> >
> > I have an example class with a main() that is copied near-verbatim from
> > http://wiki.neo4j.org/content/Getting_Started_Guide except for the db
> path
> > and a few extra System.outs.
> >
> > Everything seems to work normally, but after shutting down
> > the EmbeddedGraphDatabase the JVM will not exit. A jstack shows a running
> > java.util.TimerThread, which I assume is started by the database.
> >
> > Its stack is:
> >
> > ---
> > "Timer-0" prio=10 tid=0x7f59c0056800 nid=0xa29 in Object.wait()
> > [0x7f59bf6d5000]
> >   java.lang.Thread.State: TIMED_WAITING (on object monitor)
> >  at java.lang.Object.wait(Native Method)
> > - waiting on <0x7f5a1ed37270> (a java.util.TaskQueue)
> >  at java.util.TimerThread.mainLoop(Timer.java:509)
> > - locked <0x7f5a1ed37270> (a java.util.TaskQueue)
> >  at java.util.TimerThread.run(Timer.java:462)
> > ---
> >
> > I'm using the neo4j maven dependency: org.neo4j.neo4j, version=1.2.M01,
> > type=pom. When I changed this to neo4j-kernel, version=1.0 the JVM exited
> as
> > expected (no code change on my end).
> >
> > Does anyone have any idea why this is happening?
> >
> > Adam
>
> Hi there,
>
> Could you run it with a configuration setting of "cache_type"="soft"
> and inform on the result?
> Also, describe a bit your environment (CPU, OS, JVM)
>
> cheers,
> CG
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] EmbeddedGraphDatabase shutdown leaves a Timer thread running

2010-10-13 Thread Mattias Persson
This is an identified problem and it will be fixed soon, available in the
next milestone as well as snapshot builds.

Until then System.exit( 0 ) is your friend.

2010/10/13 Adam Lehenbauer 

> I think I have the Getting Started example working, but after it creates
> the
> nodes and shuts down, my JVM won't exit because there is a non-daemon Timer
> thread running.
>
> I have an example class with a main() that is copied near-verbatim from
> http://wiki.neo4j.org/content/Getting_Started_Guide except for the db path
> and a few extra System.outs.
>
> Everything seems to work normally, but after shutting down
> the EmbeddedGraphDatabase the JVM will not exit. A jstack shows a running
> java.util.TimerThread, which I assume is started by the database.
>
> Its stack is:
>
> ---
> "Timer-0" prio=10 tid=0x7f59c0056800 nid=0xa29 in Object.wait()
> [0x7f59bf6d5000]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>  at java.lang.Object.wait(Native Method)
> - waiting on <0x7f5a1ed37270> (a java.util.TaskQueue)
>  at java.util.TimerThread.mainLoop(Timer.java:509)
> - locked <0x7f5a1ed37270> (a java.util.TaskQueue)
>  at java.util.TimerThread.run(Timer.java:462)
> ---
>
> I'm using the neo4j maven dependency: org.neo4j.neo4j, version=1.2.M01,
> type=pom. When I changed this to neo4j-kernel, version=1.0 the JVM exited
> as
> expected (no code change on my end).
>
> Does anyone have any idea why this is happening?
>
> Adam
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] EmbeddedGraphDatabase shutdown leaves a Timer thread running

2010-10-13 Thread Chris Gioran
On Wed, Oct 13, 2010 at 4:11 PM, Adam Lehenbauer  wrote:
> I think I have the Getting Started example working, but after it creates the
> nodes and shuts down, my JVM won't exit because there is a non-daemon Timer
> thread running.
>
> I have an example class with a main() that is copied near-verbatim from
> http://wiki.neo4j.org/content/Getting_Started_Guide except for the db path
> and a few extra System.outs.
>
> Everything seems to work normally, but after shutting down
> the EmbeddedGraphDatabase the JVM will not exit. A jstack shows a running
> java.util.TimerThread, which I assume is started by the database.
>
> Its stack is:
>
> ---
> "Timer-0" prio=10 tid=0x7f59c0056800 nid=0xa29 in Object.wait()
> [0x7f59bf6d5000]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>  at java.lang.Object.wait(Native Method)
> - waiting on <0x7f5a1ed37270> (a java.util.TaskQueue)
>  at java.util.TimerThread.mainLoop(Timer.java:509)
> - locked <0x7f5a1ed37270> (a java.util.TaskQueue)
>  at java.util.TimerThread.run(Timer.java:462)
> ---
>
> I'm using the neo4j maven dependency: org.neo4j.neo4j, version=1.2.M01,
> type=pom. When I changed this to neo4j-kernel, version=1.0 the JVM exited as
> expected (no code change on my end).
>
> Does anyone have any idea why this is happening?
>
> Adam

Hi there,

Could you run it with a configuration setting of "cache_type"="soft"
and inform on the result?
Also, describe a bit your environment (CPU, OS, JVM)

cheers,
CG
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] EmbeddedGraphDatabase shutdown leaves a Timer thread running

2010-10-13 Thread Adam Lehenbauer
I think I have the Getting Started example working, but after it creates the
nodes and shuts down, my JVM won't exit because there is a non-daemon Timer
thread running.

I have an example class with a main() that is copied near-verbatim from
http://wiki.neo4j.org/content/Getting_Started_Guide except for the db path
and a few extra System.outs.

Everything seems to work normally, but after shutting down
the EmbeddedGraphDatabase the JVM will not exit. A jstack shows a running
java.util.TimerThread, which I assume is started by the database.

Its stack is:

---
"Timer-0" prio=10 tid=0x7f59c0056800 nid=0xa29 in Object.wait()
[0x7f59bf6d5000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
- waiting on <0x7f5a1ed37270> (a java.util.TaskQueue)
 at java.util.TimerThread.mainLoop(Timer.java:509)
- locked <0x7f5a1ed37270> (a java.util.TaskQueue)
 at java.util.TimerThread.run(Timer.java:462)
---

I'm using the neo4j maven dependency: org.neo4j.neo4j, version=1.2.M01,
type=pom. When I changed this to neo4j-kernel, version=1.0 the JVM exited as
expected (no code change on my end).

Does anyone have any idea why this is happening?

Adam
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user