glassfish
  1. glassfish
  2. GLASSFISH-20390

Possible concurrency issue in AsyncClientShutdownTask.run() in the MDB container

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.0_b85
    • Fix Version/s: 4.0_b87_RC3
    • Component/s: jca
    • Labels:
      None

      Description

      While trying to verify GLASSFISH-20296, we found that endpointDeactivation may not be called during application undeployment intermittently.

      We (Jagadish and I) think this could be due to a concurrency issue in AsynClientShutdownTask in
      https://svn.java.net/svn/glassfish~svn/trunk/main/appserver/ejb/ejb-full-container/src/main/java/org/glassfish/ejb/mdb/MessageBeanContainer.java.

      To reproduce:

      • In a multi-core laptop (Dell XPS) run the following
        Uncomment the lookup logic in endpointDeactivation in ra/src/connector/SimpleResourceAdapterImpl.java of https://svn.java.net/svn/glassfish~svn/trunk/v2/appserv-tests/devtests/connector/v3/connector1.6, and run the test "ant all".
      • observe that the endpointDeactivation is not called.
        [actually you should be able to use any MDB test that uses a resource adapter to deliver messages. Undeploy the application that uses the RA, and check if endpointDeactivation is called.]

      If you set a breakpoint in AsyncClientShutdownTask.run() you can observe that the MessageBeanCllient.close() – which would actually call the RA's endpointDeactivation in the connector's code – is not called intermittently.

      Making the "done" local variable in AsyncClientShutdownTask "volatile" appears to fix the issue.

      If you can't seem to reproduce the issue, and would like to have us (Jagadish/I) verify your fixes, please let us know. We can reproduce this issue fairly reguarly.

        Activity

        Hide
        Sivakumar Thyagarajan added a comment -

        Marking this issue as closed, as we couldn't reproduce it anymore on trunk.

        Show
        Sivakumar Thyagarajan added a comment - Marking this issue as closed, as we couldn't reproduce it anymore on trunk.
        Hide
        marina vatkina added a comment -
        • What is the impact on the customer of the bug?
          It is reported to be seen on a multi-core device
        • How likely is it that a customer will see the bug and how serious is the bug?
          Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?
          What CTS failures are caused by this bug?
          Not a regression, but the endpoint remains active until the server shutdown. May cause problems with redeployment.
        • What is the cost/risk of fixing the bug?
          Very low

        How risky is the fix? How much work is the fix? Is the fix complicated?
        Very low

        • Is there an impact on documentation or message strings?
          No
        • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
          Connector, EJB
        • Which is the targeted build of 4.0 for this fix?
          Next
        • If this an integration of a new version of a component from another project,
          what are the changes that are being brought in? This might be list of
          Jira issues from that project or a list of revision messages.
          No.
        Show
        marina vatkina added a comment - What is the impact on the customer of the bug? It is reported to be seen on a multi-core device How likely is it that a customer will see the bug and how serious is the bug? Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)? What CTS failures are caused by this bug? Not a regression, but the endpoint remains active until the server shutdown. May cause problems with redeployment. What is the cost/risk of fixing the bug? Very low How risky is the fix? How much work is the fix? Is the fix complicated? Very low Is there an impact on documentation or message strings? No Which tests should QA (re)run to verify the fix did not destabilize GlassFish? Connector, EJB Which is the targeted build of 4.0 for this fix? Next If this an integration of a new version of a component from another project, what are the changes that are being brought in? This might be list of Jira issues from that project or a list of revision messages. No.
        Hide
        Sivakumar Thyagarajan added a comment -

        Marina: This issue is not related to GLASSFISH-20389. Infact that issue is now fixed with rev 61615, but you should still be able to reproduce this issue. If you can't reproduce and want us to run a diagnostic patch, please provide us a patch.

        Transferring this to you.

        Show
        Sivakumar Thyagarajan added a comment - Marina: This issue is not related to GLASSFISH-20389 . Infact that issue is now fixed with rev 61615, but you should still be able to reproduce this issue. If you can't reproduce and want us to run a diagnostic patch, please provide us a patch. Transferring this to you.
        Hide
        marina vatkina added a comment -

        activeRar is also null when undeploying ejb/ejb32/mdb test

        Show
        marina vatkina added a comment - activeRar is also null when undeploying ejb/ejb32/mdb test
        Hide
        marina vatkina added a comment -

        The endpoint is not called because activeRar in ConnectorMessageBeanClient.close is null. Is it the same as GLASSFISH-20389?

        Show
        marina vatkina added a comment - The endpoint is not called because activeRar in ConnectorMessageBeanClient.close is null. Is it the same as GLASSFISH-20389 ?
        Hide
        marina vatkina added a comment -

        It's not called on undeploy on my mac as well

        Show
        marina vatkina added a comment - It's not called on undeploy on my mac as well

          People

          • Assignee:
            marina vatkina
            Reporter:
            Sivakumar Thyagarajan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: