Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4091117

JDK 1.2beta2 hang in socketWrite() from tcpServer test application

    XMLWordPrintable

Details

    • 1.2beta3
    • sparc
    • solaris_2.5.1
    • Not verified

    Description

      I have a TCP Client/Server Test Application that I was running against JDK1.2beta2 on Solaris 5.5.1. I was running on a SparcStation 5. When using
      a large buffer size for socket reads and writes the application eventially
      gets locked into a hung state. It is hung in socketWrite(). Below is a
      thread dump of the tcpClient and tcpServer Test Applications. The hang is
      in the tcpServer Test Application in socketWrite().

      The invocation of the TCP Client/Server Test Application was:

      lobo) java tcpServer -d -v -l 0
      lobo) java tcpClient -d -v -b 512 K -m 20 -c -l 1000

      Eventially this application will hang.

      There are two bugs similar to this that are already in bugtraq but I wasn't sure if this was the same condition. I think it is different. The two bug IDs were: 4041333 and 4071053.

      I ran the above tests on JDK1.1.4 and did not see the hang. It seems like it is a regression to me.

      If you need the TCP Client/Server Test Application you send EMAIL to me:
      alanf@East. I developed this test application and would be willing to sent it to whoever needs it to debug this problem.

      If you need any more information on this bug call me or EMAIL me at:
      EMAIL: alanf@East
      PHONE: 2-0723

      ---------------------
      tcpServer Thread Dump
      ---------------------
      Full thread dump:
          "Thread-16" (TID:0xee301350, sys_thread_t:0xe5940, state:CW) prio=5
              at java.net.SocketOutputStream.socketWrite(Native Method)
              at java.net.SocketOutputStream.write(SocketOutputStream.java:88)
              at tcpServer$ProcessClient.run(tcpServer.java:302)
          "Thread-6" (TID:0xee3016b8, sys_thread_t:0x1119d8, state:CW) prio=5
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Object.java:308)
              at tcpServer$ClientManager.run(tcpServer.java:240)
          "Thread-5" (TID:0xee301188, sys_thread_t:0x1106c0, state:CW) prio=5
              at java.net.PlainSocketImpl.socketAccept(Native Method)
              at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408)
              at java.net.ServerSocket.implAccept(ServerSocket.java:200)
              at java.net.ServerSocket.accept(ServerSocket.java:184)
              at tcpServer$Listener.run(tcpServer.java:137)
          "CachedReference sweeper" (TID:0xee300d70, sys_thread_t:0xd3060, state:CW) prio=9
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Object.java:308)
              at java.lang.Runtime.waitForMemoryAdvice(Runtime.java:566)
              at java.lang.ref.CachedReference$Sweeper.run(CachedReference.java:278)
              at java.lang.Thread.run(Thread.java:470)
          "Finalizer" (TID:0xee300368, sys_thread_t:0xb6e80, state:CW) prio=8
              at java.lang.Object.wait(Native Method)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:85)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:99)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:132)
          "Reference handler" (TID:0xee300418, sys_thread_t:0xc38d0, state:CW) prio=10
              at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:308)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:197)
          "Async Garbage Collector" (TID:0xee3001f8, sys_thread_t:0xbc000, state:CW) prio=1
          "Idle thread" (TID:0xee300240, sys_thread_t:0xbcca0, state:R) prio=0 *current thread*
          "Clock" (TID:0xee300088, sys_thread_t:0x826a8, state:CW) prio=12
          "main" (TID:0xee3000b0, sys_thread_t:0x209f8, state:CW) prio=5
              at java.lang.Object.wait(Native Method)
              at java.lang.Thread.join(Thread.java:845)
              at java.lang.Thread.join(Thread.java:896)
              at tcpServer.main(tcpServer.java:50)
      Monitor Cache Dump:
          java.net.PlainSocketImpl@EE301408/EE363A80: owner "Thread-5" (0x1106c0, 1 entry)
      Registered Monitor Dump:
          utf8 hash table: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class linking lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Monitor IO lock: <unowned>
          Child death monitor: <unowned>
          Event monitor: <unowned>
          I/O monitor: <unowned>
          Alarm monitor: <unowned>
              Waiting to be notified:
                  "Clock" (0x826a8)
          Sbrk lock: <unowned>
          Monitor cache expansion lock: <unowned>
          Thread queue lock: <unowned>
          Monitor registry: owner "Idle thread" (0xbcca0, 1 entry)
      Thread Alarm Q:
          sys_thread_t 0xbc000 [Timeout expired]

      ---------------------
      tcpClient Thread Dump
      ---------------------
      Full thread dump:
          "CachedReference sweeper" (TID:0xee300d78, sys_thread_t:0xd3060, state:CW) prio=9
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Object.java:308)
              at java.lang.Runtime.waitForMemoryAdvice(Runtime.java:566)
              at java.lang.ref.CachedReference$Sweeper.run(CachedReference.java:278)
              at java.lang.Thread.run(Thread.java:470)
          "Finalizer" (TID:0xee300368, sys_thread_t:0xb6e80, state:CW) prio=8
              at java.lang.Object.wait(Native Method)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:85)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:99)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:132)
          "Reference handler" (TID:0xee300418, sys_thread_t:0xc38d0, state:CW) prio=10
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Object.java:308)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:197)
          "Async Garbage Collector" (TID:0xee3001f8, sys_thread_t:0xbc000, state:CW) prio=1
          "Idle thread" (TID:0xee300240, sys_thread_t:0xbcca0, state:R) prio=0 *current thread*
          "Clock" (TID:0xee300088, sys_thread_t:0x826a8, state:CW) prio=12
          "main" (TID:0xee3000b0, sys_thread_t:0x209f8, state:CW) prio=5
              at java.net.SocketInputStream.socketRead(Native Method)
              at java.net.SocketInputStream.read(SocketInputStream.java:90)
              at tcpClient.<init>(tcpClient.java:139)
              at tcpClient.main(tcpClient.java:89)
      Monitor Cache Dump:
      Registered Monitor Dump:
          utf8 hash table: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class linking lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Monitor IO lock: <unowned>
          Child death monitor: <unowned>
          Event monitor: <unowned>
          I/O monitor: <unowned>
          Alarm monitor: <unowned>
              Waiting to be notified:
                  "Clock" (0x826a8)
          Sbrk lock: <unowned>
          Monitor cache expansion lock: <unowned>
          Thread queue lock: <unowned>
          Monitor registry: owner "Idle thread" (0xbcca0, 1 entry)
      Thread Alarm Q:
         sys_thread_t 0xbc000 [Timeout expired]


      Hello benjamin,

      I added a TAR file that contains the TCP Client/Server program that reproduces this problem. Within the TAR file is a README file that explains how this test application works. Using buffer sizes of > 64K will reproduce this problem. It will happen faster if the buffer size is bigger say 128 K or 512 K. You can use the example invocation in this bug report to run the test application to reproduce the problem. If you need anymore information let me know.

      alan frechette
      your friendly QA engineer

      Attachments

        Activity

          People

            brenaudsunw Benjamin Renaud (Inactive)
            afrechet Art Frechette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: