You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Stefan Seelmann <se...@apache.org> on 2010/11/28 19:34:44 UTC
AddIT.testAddPDUExceedingMaxSizeLdapApi hangs on Windows Hudson (was: Build failed in Hudson: dir-apacheds-jdk16-win » ApacheDS Server Integration #53)
Hi guys,
I reactivated the ApacheDS Windows build on Hudson, after I have
tested extensively on my Windows7 virtual machine. Unfortunately the
build failed again with hanging server-integ tests. Niklas Gustavsson
was so kind to create a thread dump of the hanging surefire process
[1], the relevant part is:
"main" prio=6 tid=0x000000000177c800 nid=0x1e94 in Object.wait()
[0x0000000002c7d000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000087d35a0> (a
org.apache.mina.core.future.DefaultWriteFuture)
at org.apache.mina.core.future.DefaultIoFuture.await0(DefaultIoFuture.java:189)
- locked <0x00000000087d35a0> (a
org.apache.mina.core.future.DefaultWriteFuture)
at org.apache.mina.core.future.DefaultIoFuture.awaitUninterruptibly(DefaultIoFuture.java:150)
at org.apache.directory.ldap.client.api.LdapNetworkConnection.modifyAsync(LdapNetworkConnection.java:2134)
at org.apache.directory.ldap.client.api.LdapNetworkConnection.modify(LdapNetworkConnection.java:2045)
at org.apache.directory.ldap.client.api.LdapNetworkConnection.modify(LdapNetworkConnection.java:2020)
at org.apache.directory.ldap.client.api.LdapNetworkConnection.modify(LdapNetworkConnection.java:2029)
at org.apache.directory.server.operations.add.AddIT.testAddPDUExceedingMaxSizeLdapApi(AddIT.java:1180)
Any idea what's the cause?
Kind Regards,
Stefan
[1] http://people.apache.org/~ngn/ads-dump.txt
On Sun, Nov 28, 2010 at 1:18 PM, Apache Hudson Server
<hu...@hudson.apache.org> wrote:
> See <https://hudson.apache.org/hudson/job/dir-apacheds-jdk16-win/org.apache.directory.server$apacheds-server-integ/53/>
>
> ------------------------------------------
> [INFO] ------------------------------------------------------------------------
> [INFO] Building ApacheDS Server Integration
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [remote-resources:process {execution: default}]
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] Copying 3 resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 1 source file to C:\hudson\hudson-slave\workspace\dir-apacheds-jdk16-win\trunk\server-integ\target\classes
> [INFO] [resources:testResources {execution: default-testResources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 6 resources
> [INFO] Copying 3 resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Compiling 52 source files to C:\hudson\hudson-slave\workspace\dir-apacheds-jdk16-win\trunk\server-integ\target\test-classes
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: C:\hudson\hudson-slave\workspace\dir-apacheds-jdk16-win\trunk\server-integ\target\surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running org.apache.directory.server.suites.StockServerISuite
> Process 1290945764334 is killed.
> [HUDSON] Recording test results
> [HUDSON] Archiving disabled - not archiving C:\hudson\hudson-slave\workspace\dir-apacheds-jdk16-win\trunk\server-integ\pom.xml
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error while executing forked tests.; nested exception is org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.CommandLineTimeOutException: Error while executing external command, process killed.
>
> Process timeout out after 900 seconds
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 98 minutes 23 seconds
> [INFO] Finished at: Sun Nov 28 12:17:44 GMT 2010
> [INFO] Final Memory: 132M/494M
> [INFO] ------------------------------------------------------------------------
>
>
Re: AddIT.testAddPDUExceedingMaxSizeLdapApi hangs on Windows Hudson (was: Build failed in Hudson: dir-apacheds-jdk16-win » ApacheDS Server Integration #53)
Posted by Emmanuel Lecharny <el...@gmail.com>.
On 11/28/10 7:34 PM, Stefan Seelmann wrote:
> Hi guys,
>
> I reactivated the ApacheDS Windows build on Hudson, after I have
> tested extensively on my Windows7 virtual machine. Unfortunately the
> build failed again with hanging server-integ tests. Niklas Gustavsson
> was so kind to create a thread dump of the hanging surefire process
> [1], the relevant part is:
I have changed the timeout. It won't fix the problem, but at least, it
may not stay blocked.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: AddIT.testAddPDUExceedingMaxSizeLdapApi hangs on Windows Hudson (was: Build failed in Hudson: dir-apacheds-jdk16-win » ApacheDS Server Integration #53)
Posted by Emmanuel Lecharny <el...@gmail.com>.
On 11/28/10 7:34 PM, Stefan Seelmann wrote:
> Hi guys,
>
> I reactivated the ApacheDS Windows build on Hudson, after I have
> tested extensively on my Windows7 virtual machine. Unfortunately the
> build failed again with hanging server-integ tests. Niklas Gustavsson
> was so kind to create a thread dump of the hanging surefire process
> [1], the relevant part is:
The way it works on the client side is that when w write some data to
the server we create a WriteFuture, and wait on it :
// Send the request to the server
WriteFuture writeFuture = ldapSession.write( modRequest );
// Wait for the message to be sent to the server
if ( !writeFuture.awaitUninterruptibly( getTimeout( 0 ) ) )
The client then write the request into the channel to the server, and
when done, we notify the future while processing the MessageSent event.
Here, it seems that we never get notified. The reason not to be notified
are limited :
- we don't see the SelectionKey as ready for Write (the socket is full)
- the Future we use to get notified has changed (very unlikely)
- the messageSent event is never fired
I would rather expect that the issue is #3, which can occurs when there
are some remaining bytes in the buffer to send :
if (!buf.hasRemaining() || !hasFragmentation &&
localWrittenBytes != 0) {
// Buffer has been sent, clear the current request.
int pos = buf.position();
buf.reset();
fireMessageSent(session, req);
// And set it back to its position
buf.position(pos);
}
We need to add some log to detect this problem; What could happen is
that we can't send all the bytes to the server, so the buffer remains
with pending bytes, and for some reason, we don't send them to the server.
In any case, we need to set some timeout on the client to get out of
this blockage. The "if ( !writeFuture.awaitUninterruptibly( getTimeout(
0 ) ) )" is not a good idea, we must replace 0 by some decent value.
That will not solve the issue, but at least, we won't block for ever.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: AddIT.testAddPDUExceedingMaxSizeLdapApi hangs on Windows Hudson (was: Build failed in Hudson: dir-apacheds-jdk16-win » ApacheDS Server Integration #53)
Posted by Emmanuel Lecharny <el...@gmail.com>.
On 11/28/10 7:34 PM, Stefan Seelmann wrote:
> Hi guys,
>
> I reactivated the ApacheDS Windows build on Hudson, after I have
> tested extensively on my Windows7 virtual machine. Unfortunately the
> build failed again with hanging server-integ tests. Niklas Gustavsson
> was so kind to create a thread dump of the hanging surefire process
> [1], the relevant part is:
>
> "main" prio=6 tid=0x000000000177c800 nid=0x1e94 in Object.wait()
> [0x0000000002c7d000]
> java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on<0x00000000087d35a0> (a
> org.apache.mina.core.future.DefaultWriteFuture)
> at org.apache.mina.core.future.DefaultIoFuture.await0(DefaultIoFuture.java:189)
> - locked<0x00000000087d35a0> (a
> org.apache.mina.core.future.DefaultWriteFuture)
> at org.apache.mina.core.future.DefaultIoFuture.awaitUninterruptibly(DefaultIoFuture.java:150)
> at org.apache.directory.ldap.client.api.LdapNetworkConnection.modifyAsync(LdapNetworkConnection.java:2134)
> at org.apache.directory.ldap.client.api.LdapNetworkConnection.modify(LdapNetworkConnection.java:2045)
> at org.apache.directory.ldap.client.api.LdapNetworkConnection.modify(LdapNetworkConnection.java:2020)
> at org.apache.directory.ldap.client.api.LdapNetworkConnection.modify(LdapNetworkConnection.java:2029)
> at org.apache.directory.server.operations.add.AddIT.testAddPDUExceedingMaxSizeLdapApi(AddIT.java:1180)
>
>
> Any idea what's the cause?
It's complicated. It seems like we are never waken up while waiting on a
lock. This lock is supposed to be notified when the data are completely
written in the socket, which is not the case.
We have to investigate the MINA code in this area to see if there is a
race condition. Not fun :/
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com