IBM Support

IV68216: DEADLOCK WHEN A FILEWRITER IS WORKED ON CONCURRENTLY BY MORE THA N ONE WRITER INSTANCES

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: Application hangs when two threads work on 2
    Writer instances with the same underlying FileWriter. An example
    scenario, one thread is working on a FileWriter while another
    thread is working on a PrintWriter instance which uses same
    FileWriter instance as the former thread.
    .
    Stack Trace: Blocked on: java/io/FileOutputStream@0x23144B88
    Owned by: "Thread-5"Java callstack:at
    java/io/OutputStreamWriter.write(OutputStreamWriter.java:212)at
    java/io/PrintWriter.write(PrintWriter.java:416)(entered lock:
    java/io/FileWriter@0x23144B60, entry count: 1)at
    testcase$bar.run(testcase.java:28)at
    java/lang/Thread.run(Thread.java:785)Blocked on:
    java/io/FileWriter@0x23144B60 Owned by: "Thread-6"Java
    callstack:at
    sun/nio/cs/StreamEncoder.write(StreamEncoder.java:129)at
    java/io/OutputStreamWriter.emptyBuffer(OutputStreamWriter.java:3
    02)(entered lock: java/io/FileOutputStream@0x23144B88, entry
    count: 2)at
    java/io/OutputStreamWriter.write(OutputStreamWriter.java:215)(en
    tered lock: java/io/FileOutputStream@0x23144B88, entry count:
    1)at testcase$bar.run(testcase.java:28)at
    java/lang/Thread.run(Thread.java:785)
    .
    

Local fix

Problem summary

  • The hang arises due to threads acquiring multiple locks related
    to Writer class in different order.
    

Problem conclusion

  • The locking sequences are streamlined to prevent the deadlocks
    in multi-threaded scenarios.
    .
    This APAR will be fixed in the following Java Releases:
       6    SR16 FP4  (6.0.16.4)
       8    SR1       (8.0.1.0)
       7 R1 SR3       (7.1.3.0)
       6 R1 SR8 FP4   (6.1.8.4)
       7    SR9       (7.0.9.0)
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the available
    Service Refreshes and Fix Packs can be found at:
               https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV68216

  • Reported component name

    JAVA CLASS LIBS

  • Reported component ID

    620700130

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-01-05

  • Closed date

    2015-04-08

  • Last modified date

    2015-04-08

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    JAVA CLASS LIBS

  • Fixed component ID

    620700130

Applicable component levels

  • R600 PSY

       UP

  • R800 PSY

       UP

  • R700 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCVQ3Y","label":"Java Class Libraries"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
08 April 2015