IBM Support

IT06013: WMQ JAVA/JMS 7.5 APPLICATION HUNG WHEN CREATING A CONNECTION TO QUEUE MANAGER AND USING A DAEMON THREADGROUP

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A WebSphere MQ classes for Java/JMS 7.5 application created a
    connection to a queue manager, and the application threw an
    exception of the form:
    
    Exception in thread "JMSCCThreadPoolMaster"
    java.lang.IllegalThreadStateException
      at java.lang.ThreadGroup.checkNewThread(ThreadGroup.java:147)
      at java.lang.Thread.initialize(Thread.java:334)
      at java.lang.Thread.(Thread.java:267)
      at java.lang.Thread.(Thread.java:356)
      at
    com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManage
    rImplementationThreadPoolWorker.(WorkQueueManagerImplementation.
    java:950)
     at
    com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManage
    rImplementation.createNewThread(WorkQueueManagerImplementation.j
    ava:496)
     at
    com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManage
    rImplementation.getWorkerThread(WorkQueueManagerImplementation.j
    ava:433)
     at
    com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManage
    rImplementation.access$100(WorkQueueManagerImplementation.java:4
    6)
     at
    com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManage
    rImplementation$WorkQueueManagerThread.run(WorkQueueManagerImple
    mentation.java:848)
    
    After this, the application thread which was requesting the
    connection hung.
    
    Additional Symptom(s) Search Keyword(s):
    

Local fix

  • Ensure that the ThreadGroup which the application's queue
    manager connection requesting thread is not a part of a
    ThreadGroup which is of the daemon type.
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    Users of the WebSphere MQ classes for Java and WebSphere MQ
    classes for JMS, which are using an application thread which is
    part of a ThreadGroup which is of the daemon type.
    
    This does NOT affect users of the WebSphere Application Server,
    or other application servers where threads are provided to the
    WebSphere MQ classes for Java/JMS by the JEE environment.
    
    
    Platforms affected:
    AIX, MultiPlatform, HP-UX Itanium, HP-UX PA-RISC, IBM iSeries,
    Linux on Power, Linux on S390, Linux on x86, Linux on x86-64,
    Linux on zSeries, Solaris SPARC, Solaris x86-64, Windows, z/OS
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When using the WebSphere MQ classes for Java/JMS in a
    stand-alone Java environment, threads created by the WebSphere
    MQ classes for Java/JMS for its internal function will inherit
    properties from the application thread.
    
    One of these inherited properties is the daemon state of the
    "java.lang.ThreadGroup" which the thread belongs to. The daemon
    state of the ThreadGroup determines if the ThreadGroup should be
    destroyed once the last thread in the group ends or is
    destroyed. Once this happens - no further threads can be added
    to the ThreadGroup.
    
    
    If an application closes all connections to the queue manager,
    then all the threads will be removed from the ThreadGroup. If it
    has the daemon status, then the ThreadGroup will be marked as
    destroyed. If the application should then attempt to open a new
    connection to the queue manager, an exception will be thrown and
    the thread requesting the connection will hang. The exception is
    of the form (stack taken from the 7.5.0.3 version of the
    WebSphere MQ classes for Java/JMS):
    
    Exception in thread "JMSCCThreadPoolMaster"
    java.lang.IllegalThreadStateException
            at
    java.lang.ThreadGroup.checkNewThread(ThreadGroup.java:147)
            at java.lang.Thread.initialize(Thread.java:334)
            at java.lang.Thread.(Thread.java:267)
            at java.lang.Thread.(Thread.java:356)
            at
    com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManage
    rImplementation$ThreadPoolWorker.(WorkQueueManagerImplementation
    .java:950)
            at
    com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManage
    rImplementation.createNewThread(WorkQueueManagerImplementation.j
    ava:496)
            at
    com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManage
    rImplementation.getWorkerThread(WorkQueueManagerImplementation.j
    ava:433)
            at
    com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManage
    rImplementation.access$100(WorkQueueManagerImplementation.java:4
    6)
            at
    com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManage
    rImplementation$WorkQueueManagerThread.run(WorkQueueManagerImple
    mentation.java:848)
    

Problem conclusion

  • The WebSphere MQ classes for Java/JMS have been updated to
    ensure that regardless of the daemon status of the ThreadGroup
    which the application's thread belongs to - the ThreadGroup
    created by the WebSphere MQ classes for Java/JMS is not of the
    daemon type.
    
    This means that all the threads from this ThreadGroup can be
    created and stopped/destroyed, and new threads can be added to
    the ThreadGroup, resolving the issue.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v7.5       7.5.0.6
    v8.0       8.0.0.2
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT06013

  • Reported component name

    WMQ BASE MULTIP

  • Reported component ID

    5724H7241

  • Reported release

    750

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-12-10

  • Closed date

    2015-01-28

  • Last modified date

    2015-01-28

  • 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

    WMQ BASE MULTIP

  • Fixed component ID

    5724H7241

Applicable component levels

  • R750 PSY

       UP

[{"Line of Business":{"code":"LOB36","label":"IBM Automation"},"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5"}]

Document Information

Modified date:
24 September 2021