harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Fedotov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1904) Signals interrupt hysock_select calls.
Date Mon, 30 Oct 2006 17:48:24 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1904?page=comments#action_12445664 ] 
            
Alexei Fedotov commented on HARMONY-1904:
-----------------------------------------

I read the code of corresponding class library files. We have the following code in classlib/trunk/modules/luni/src/main/native/luni/shared/socket.c:

          /*
           *  if interrupted (or a timeout) just retry
           */
          if (HYPORT_ERROR_SOCKET_TIMEOUT == result ||
                HYPORT_ERROR_SOCKET_INTERRUPTED == result)
            {
              goto select;
            }

It seems to me that handling for interruption is already correct oon class library side.

BTW, Ivan Volosyuk mentions that he know how to handle timeouts correctly:
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200610.mbox/%3c12385bbd0610260542o8b524edw218abd2518597031@mail.gmail.com%3e


> Signals interrupt hysock_select calls.
> --------------------------------------
>
>                 Key: HARMONY-1904
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1904
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: linux
>            Reporter: Artem Aliev
>         Attachments: hysock.diff
>
>
> DRLVM uses linux signals in thread suspend calls.
> The signals interrupt select() call in port lib. 
> This cause the JBoss failure with following stack trace:
> java.net.SocketException: The call was cancelled
>        at org.apache.harmony.luni.platform.OSNetworkSystem.availableStreamImpl(OSNetworkSystem.java)
>        at org.apache.harmony.luni.platform.OSNetworkSystem.availableStream(OSNetworkSystem.java:216)
>        at org.apache.harmony.luni.net.PlainSocketImpl.available(PlainSocketImpl.java:150)
>        at org.apache.harmony.luni.net.SocketInputStream.available(SocketInputStream.java:50)
>        at com.mysql.jdbc.util.ReadAheadInputStream.available(ReadAheadInputStream.java:212)
>        at com.mysql.jdbc.MysqlIO.clearInputStream(MysqlIO.java:774)
> See following mail thread for details
> http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200610.mbox/%3c4534F08F.9000208@pobox.com%3e

> Workaround is attached, but see the e-mail for complains on this workaround

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message