This discussion is archived
1 Reply Latest reply: Mar 31, 2011 6:33 AM by 851938 RSS

Thread is blocked at SocketNativeIO.readBytesPinned

Junger He Explorer
Currently Being Moderated
I ran my tests with ant and used java to invoke ant targets at test code. In my test, I need to start our CEP servers frequently. To check the availability of the server, the server's URL is used. In the execution environment, the thread that was checking the condition was hanging. The stacktrace is as below. My question is: at which condition, readBytesPinned will hang without return? How to avoid this problem. By the way, the URL and the server was established up.

Thread-871" id=1702 idx=0x278 tid=15958 prio=5 alive, in native
at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
    at jrockit/net/SocketNativeIO.socketRead(SocketNativeIO.java:32)
    at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.java)
    at java/net/SocketInputStream.read(SocketInputStream.java:129)
    at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
    at java/io/BufferedInputStream.read1(BufferedInputStream.java:258)
    at java/io/BufferedInputStream.read(BufferedInputStream.java:317)
    ^-- Holding lock: java/io/BufferedInputStream@0x77a6c1a8[biased lock]
at sun/net/www/http/HttpClient.parseHTTPHeader(HttpClient.java:687)
at sun/net/www/http/HttpClient.parseHTTP(HttpClient.java:632)
at sun/net/www/http/HttpClient.parseHTTPHeader(HttpClient.java:766)
at sun/net/www/http/HttpClient.parseHTTP(HttpClient.java:632)
at sun/net/www/protocol/http/HttpURLConnection.getInputStream(HttpURLConnection.java:1072)
^-- Holding lock: sun/net/www/protocol/http/HttpURLConnection@0x77991950[biased lock]
at java/net/HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at org/apache/tools/ant/taskdefs/condition/Http.eval(Http.java:73)
at org/apache/tools/ant/taskdefs/WaitFor.execute(WaitFor.java:135)
at sun/reflect/GeneratedMethodAccessor123.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
    at sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java/lang/reflect/Method.invoke(Method.java:597)
    at org/apache/tools/ant/dispatch/DispatchUtils.execute(DispatchUtils.java:105)
    at org/apache/tools/ant/TaskAdapter.execute(TaskAdapter.java:134)
    at org/apache/tools/ant/UnknownElement.execute(UnknownElement.java:288)
    at sun/reflect/GeneratedMethodAccessor2.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
    at sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java/lang/reflect/Method.invoke(Method.java:597)
    at org/apache/tools/ant/dispatch/DispatchUtils.execute(DispatchUtils.java:105)
    at org/apache/tools/ant/Task.perform(Task.java:348)
    at org/apache/tools/ant/taskdefs/Sequential.execute(Sequential.java:62)
    at net/sf/antcontrib/logic/IfTask.execute(IfTask.java:197)
    at sun/reflect/GeneratedMethodAccessor43.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
    at sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java/lang/reflect/Method.invoke(Method.java:597)
    at org/apache/tools/ant/dispatch/DispatchUtils.execute(DispatchUtils.java:105)
    at org/apache/tools/ant/TaskAdapter.execute(TaskAdapter.java:134)
    at org/apache/tools/ant/UnknownElement.execute(UnknownElement.java:288)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  • 1. Re: Thread is blocked at SocketNativeIO.readBytesPinned
    851938 Newbie
    Currently Being Moderated
    We were faced with the same problem. We downgraded to an older java version and everythings works fine again. We had the problem only under linux x86_64. windows seems to work.

    This java version hangs:

    java version "1.6.0_22"
    Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
    Oracle JRockit(R) (build R28.1.1-14-139783-1.6.0_22-20101206-0241-linux-x86_64, compiled mode)

    This java version works:

    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Oracle JRockit(R) (build R28.0.1-21-133393-1.6.0_20-20100512-2126-linux-x86_64, compiled mode)

    This java version works:

    java version "1.6.0_22"
    Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
    Oracle JRockit(R) (build R28.1.1-14-139783-1.6.0_22-20101206-0241-windows-ia32, compiled mode)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points