You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Geoff Cadien <gc...@gmail.com> on 2008/05/12 21:57:58 UTC

Problems Using apr-transport

Wondering if anyone else is successfully using MINA+APR.  I just tried
testing with the echoserver  example (just replaced NioSocketAcceptor with
AprSocketAcceptor) and the VM crashes when making more than a couple
concurrent connections.
I'm hoping I've simply done something stupid and someone with some more
experience using the apr-transport could point me in right direction.

Specifics:

geoff@jellikit:~$ uname -a
Linux jellikit 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686
GNU/Linux

geoff@jellikit:~$ java -version
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)

tomcat-native-1.1.13

apr-1.2.11

MINA trunk


#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x9065a71b, pid=30889, tid=2420497296
#
# Java VM: Java HotSpot(TM) Server VM (10.0-b22 mixed mode linux-x86)
# Problematic frame:
# C  [libapr-1.so.0+0x1b71b]  apr_pollset_remove+0x4b
#
# An error report file with more information is saved as:
# /home/geoff/src/mina-trunk/trunk/example/hs_err_pid30889.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#


Thanks,

-geoff

Re: Problems Using apr-transport

Posted by "이희승 (Trustin Lee)" <tr...@gmail.com>.
On Wed, 14 May 2008 07:13:53 +0900, Geoff Cadien <gc...@gmail.com> wrote:

> On Mon, May 12, 2008 at 12:57 PM, Geoff Cadien <gc...@gmail.com> wrote:
>
>> Wondering if anyone else is successfully using MINA+APR.  I just tried
>> testing with the echoserver  example (just replaced NioSocketAcceptor  
>> with
>> AprSocketAcceptor) and the VM crashes when making more than a couple
>> concurrent connections.
>> I'm hoping I've simply done something stupid and someone with some more
>> experience using the apr-transport could point me in right direction.
>>
>> Specifics:
>>
>> geoff@jellikit:~$ uname -a
>> Linux jellikit 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008  
>> i686
>> GNU/Linux
>>
>> geoff@jellikit:~$ java -version
>> java version "1.6.0_06"
>> Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
>> Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)
>>
>> tomcat-native-1.1.13
>>
>> apr-1.2.11
>>
>> MINA trunk
>
>
> Well I've discovered what is causing this problem (sort of).
> AprIoProcessor.destroy is being called twice.  AprIoProcessor.destroy
> removes the fd from the pollset and then closes it.  Either epoll or apr
> don't like trying to remove a closed fd from the pollset.  This is  
> happening
> because in my small test using the EchoServer Session.close is being  
> called
> from exceptionCaught, which causes destroy to be called, and then
> AprIoProcessor schedules the session for removal after firing
> exceptionCaught.
>
> My question is this a MINA bug, or an application bug, e.g.  
> session.close()
> should only be called if (!session.isClosing()) ?

It's a MINA bug.  If you have a reproduceable example application, please  
file a JIRA issue and attach it so we can test it and fix it.  :)

Thanks!
-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: Problems Using apr-transport

Posted by Geoff Cadien <gc...@gmail.com>.
On Mon, May 12, 2008 at 12:57 PM, Geoff Cadien <gc...@gmail.com> wrote:

> Wondering if anyone else is successfully using MINA+APR.  I just tried
> testing with the echoserver  example (just replaced NioSocketAcceptor with
> AprSocketAcceptor) and the VM crashes when making more than a couple
> concurrent connections.
> I'm hoping I've simply done something stupid and someone with some more
> experience using the apr-transport could point me in right direction.
>
> Specifics:
>
> geoff@jellikit:~$ uname -a
> Linux jellikit 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686
> GNU/Linux
>
> geoff@jellikit:~$ java -version
> java version "1.6.0_06"
> Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
> Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)
>
> tomcat-native-1.1.13
>
> apr-1.2.11
>
> MINA trunk


Well I've discovered what is causing this problem (sort of).
AprIoProcessor.destroy is being called twice.  AprIoProcessor.destroy
removes the fd from the pollset and then closes it.  Either epoll or apr
don't like trying to remove a closed fd from the pollset.  This is happening
because in my small test using the EchoServer Session.close is being called
from exceptionCaught, which causes destroy to be called, and then
AprIoProcessor schedules the session for removal after firing
exceptionCaught.

My question is this a MINA bug, or an application bug, e.g. session.close()
should only be called if (!session.isClosing()) ?

-geoff

Re: Problems Using apr-transport

Posted by "David M. Lloyd" <da...@redhat.com>.
I've only played with APR a little bit, but in my experiments I've found it 
to be unstable in JDK6 thus far.  JDK5 seems OK though.

- DML

On 05/12/2008 02:57 PM, Geoff Cadien wrote:
> Wondering if anyone else is successfully using MINA+APR.  I just tried
> testing with the echoserver  example (just replaced NioSocketAcceptor with
> AprSocketAcceptor) and the VM crashes when making more than a couple
> concurrent connections.
> I'm hoping I've simply done something stupid and someone with some more
> experience using the apr-transport could point me in right direction.
> 
> Specifics:
> 
> geoff@jellikit:~$ uname -a
> Linux jellikit 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686
> GNU/Linux
> 
> geoff@jellikit:~$ java -version
> java version "1.6.0_06"
> Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
> Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)
> 
> tomcat-native-1.1.13
> 
> apr-1.2.11
> 
> MINA trunk
> 
> 
> #
> # An unexpected error has been detected by Java Runtime Environment:
> #
> #  SIGSEGV (0xb) at pc=0x9065a71b, pid=30889, tid=2420497296
> #
> # Java VM: Java HotSpot(TM) Server VM (10.0-b22 mixed mode linux-x86)
> # Problematic frame:
> # C  [libapr-1.so.0+0x1b71b]  apr_pollset_remove+0x4b
> #
> # An error report file with more information is saved as:
> # /home/geoff/src/mina-trunk/trunk/example/hs_err_pid30889.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://java.sun.com/webapps/bugreport/crash.jsp
> # The crash happened outside the Java Virtual Machine in native code.
> # See problematic frame for where to report the bug.
> #
> 
> 
> Thanks,
> 
> -geoff
>