Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] How to perform a heap dump before tests are killed after ${surefire.timeout}?

we *could* catch CommandLineTimeOutException and react on that.

Jan

From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Stéphane Bouchet
Sent: Dienstag, 19. Februar 2013 12:20
To: Tycho user list
Subject: Re: [tycho-user] How to perform a heap dump before tests are killed after ${surefire.timeout}?

The incrimined source code is the maven surefire plugin : 
http://grepcode.com/file/repo1.maven.org/maven2/org.codehaus.plexus/plexus-utils/2.1/org/codehaus/plexus/util/cli/CommandLineUtils.java#164

When the timeout is reached, it just throw an interrupted exception, without any info. You should drop a request to maven surefire mainteners, i don't think tycho can do anything for this.


Cheers,

2013/2/19 <Bernd.Vogt@xxxxxxxxxxxx>
Oops, of course ... I need a thread dump not a heap dump...

Unfortunately, the deadlocks are not reproducible, which makes it almost impossible to debug it manually. So, the ability to launch jstack before the test jvm is killed would be very helpfull ;)

Bernd

> -----Ursprüngliche Nachricht-----
> Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Sievers,
> Jan
> Gesendet: Dienstag, 19. Februar 2013 11:09
> An: Tycho user list
> Betreff: Re: [tycho-user] How to perform a heap dump before tests are killed after
> ${surefire.timeout}?
>
> not sure this is useful enough for a new tycho feature
>
> BTW don't know if a heapdump will help you in case of deadlocks.
>
> if the problems are reproducible, you are probably better off either manually debugging the test or
> using jstack to get a full VM stacktrace.
>
> Jan
>
> -----Original Message-----
> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of
> Bernd.Vogt@xxxxxxxxxxxx
> Sent: Dienstag, 19. Februar 2013 11:04
> To: tycho-user@xxxxxxxxxxx
> Subject: Re: [tycho-user] How to perform a heap dump before tests are killed after
> ${surefire.timeout}?
>
> Thanks for your reply.
>
> Unfortunately, we don't have OOM errors but deadlocks! So -XX:+HeapDumpOnOutOfMemoryError won't take
> effect here.
>
> In case of a deadlock, the test jvm is killed from outside by Tychos TestMojo after a specified period
> of time (${surefire.timeout}). Now we need the ability to get the JVM to produce a heap dump befor
> it's killed by Tycho.
>
> To do this, it would be nice to be able to specify a command line which is executed before the test
> process is killed. So, we could use jmap to perform the heap dump. If this is an appropriate feature
> for Tycho? I'll open a bugzilla for it. I'm also happy about any other solution...
>
> Thanks,
> Bernd
>
> > -----Ursprüngliche Nachricht-----
> > Von: tycho-user-bounces@xxxxxxxxxxx
> > [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Sievers, Jan
> > Gesendet: Dienstag, 19. Februar 2013 10:16
> > An: Tycho user list
> > Betreff: Re: [tycho-user] How to perform a heap dump before tests are
> > killed after ${surefire.timeout}?
> >
> > JVM option
> >
> > -XX:+HeapDumpOnOutOfMemoryError
> >
> > should do it [1]
> >
> > Jan
> >
> > [1]
> > http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-14010
> > 2.html
> >
> > -----Original Message-----
> > From: tycho-user-bounces@xxxxxxxxxxx
> > [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of
> > Bernd.Vogt@xxxxxxxxxxxx
> > Sent: Dienstag, 19. Februar 2013 10:11
> > To: tycho-user@xxxxxxxxxxx
> > Subject: [tycho-user] How to perform a heap dump before tests are killed after ${surefire.timeout}?
> >
> > Hello,
> >
> > we have problems with several non-deterministic unit tests. From time
> > to time some tests remain stuck and are killed after
> > ${surefire.timeout}. We believe that the cause is a classical deadlock
> > within our code. But to analyze the actual problem, we need a heap dump from the test jvm before it
> gets killed by Tycho.
> >
> > To do this, it would be nice to be able to specified a command line
> > which is executed before the test process is killed. So, we could use
> > jmap to perform the heap dump :)
> >
> > Is this an appropriate feature for Tycho? If yes I'll open a bugzilla for it.
> >
> > Is there any other appropriate solution to perform a heap dump before
> > the test jvm is killed from outside?
> >
> > Best regards
> >
> > Bernd Vogt
> > _______________________________________________
> > tycho-user mailing list
> > tycho-user@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/tycho-user
> > _______________________________________________
> > tycho-user mailing list
> > tycho-user@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/tycho-user
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/tycho-user
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top