Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1, 3.1.1_b09
    • Fix Version/s: 3.1.2_b15, 4.0_b14
    • Component/s: ejb_container
    • Labels:
      None

      Description

      For quite some time, I observed the following warning in the GlassFish logs when using the EJBTimerService during app-server shutdown:

      WARNING: EJB5121:EJB Timer Service shutdown info
          [__timer_service_shutdown__.dat] not found or is corrupted.
          Shutdown time unknown.
      

      Then I found, that inside the domain-directory a new directory named "null" was available. I then debugged the timer service shutdown and traced the domain-dir (with inotifywait) to get to know if these are related and indeed they are.

      The reason for this is that the following call returns <null> (line 2619 in EJBTimerService):

      ConfigBeansUtilities.getLocation(appID);
      

      However, looking at the code and doing a bit of research I didn't find any place where that shutdown timestamp file is actually being used. So from a static code analysis point of view it is an obsolete thing.

        Activity

        Hide
        Dies Koper added a comment -

        We ran into the same issue. I've discussed it with Marina. As you found, it's not used - the implementation was never completed.
        I've attached a patch for Marina to review.

        Show
        Dies Koper added a comment - We ran into the same issue. I've discussed it with Marina. As you found, it's not used - the implementation was never completed. I've attached a patch for Marina to review.
        Hide
        marina vatkina added a comment -

        Dies, you need to check if the i18n messages need to be removed as well.

        Show
        marina vatkina added a comment - Dies, you need to check if the i18n messages need to be removed as well.
        Hide
        Dies Koper added a comment -

        updated patch that removes two i18n messages that will no longer be used

        Show
        Dies Koper added a comment - updated patch that removes two i18n messages that will no longer be used
        Hide
        Dies Koper added a comment -

        Fixed in trunk using the 2nd patch (i.e. removing the unused messages).

        Sending appserver\ejb\ejb-container\src\main\java\com\sun\ejb\containers\
        EJBTimerService.java
        Sending appserver\ejb\ejb-container\src\main\resources\com\sun\logging\en
        terprise\system\container\ejb\LogStrings.properties
        Transmitting file data ..
        Committed revision 51538.

        Marina, it's a few hours into SCF. Let me take this as an opportunity to initiate a bug fix approval process

        • What is the impact on the customer of the bug?

        An alarming message (about a file being corrupted!) is logged during container shutdown if the EJB Timer Service was used. The "file corruption" itself is not serious as the file content turned out not to be used.
        It is a regression as GF 2.x did not log this message.
        The fix takes out the reading and writing of the file, so actually reduces security and performance concerns.

        • What is the cost/risk of fixing the bug?

        Fix is simple as it removes code from private methods: the paths leading to the code are clearly visible.

        • Is there an impact on documentation or message strings?

        Not on documentation. Two messages, which are no longer used anywhere in the code, are removed from the message bundle as part of the fix.

        • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

        Tests using the EJB Timer Service and then shut the timer service down.

        • Which is the targeted build of 3.1.2 for this fix?

        First one in the SCF period, 3.1.2b15 if I am not mistaken.

        Show
        Dies Koper added a comment - Fixed in trunk using the 2nd patch (i.e. removing the unused messages). Sending appserver\ejb\ejb-container\src\main\java\com\sun\ejb\containers\ EJBTimerService.java Sending appserver\ejb\ejb-container\src\main\resources\com\sun\logging\en terprise\system\container\ejb\LogStrings.properties Transmitting file data .. Committed revision 51538. Marina, it's a few hours into SCF. Let me take this as an opportunity to initiate a bug fix approval process What is the impact on the customer of the bug? An alarming message (about a file being corrupted!) is logged during container shutdown if the EJB Timer Service was used. The "file corruption" itself is not serious as the file content turned out not to be used. It is a regression as GF 2.x did not log this message. The fix takes out the reading and writing of the file, so actually reduces security and performance concerns. What is the cost/risk of fixing the bug? Fix is simple as it removes code from private methods: the paths leading to the code are clearly visible. Is there an impact on documentation or message strings? Not on documentation. Two messages, which are no longer used anywhere in the code, are removed from the message bundle as part of the fix. Which tests should QA (re)run to verify the fix did not destabilize GlassFish? Tests using the EJB Timer Service and then shut the timer service down. Which is the targeted build of 3.1.2 for this fix? First one in the SCF period, 3.1.2b15 if I am not mistaken.
        Hide
        ancoron added a comment -

        Thank you very much!

        Show
        ancoron added a comment - Thank you very much!
        Hide
        Dies Koper added a comment -

        Ported to 3.1.2 branch.

        Sending main\java\com\sun\ejb\containers\EJBTimerService.java
        Sending main\resources\com\sun\logging\enterprise\system\container\ejb\Lo
        gStrings.properties
        Transmitting file data ..
        Committed revision 51548.

        Thanks for the detailed bug report Ancoron!

        Show
        Dies Koper added a comment - Ported to 3.1.2 branch. Sending main\java\com\sun\ejb\containers\EJBTimerService.java Sending main\resources\com\sun\logging\enterprise\system\container\ejb\Lo gStrings.properties Transmitting file data .. Committed revision 51548. Thanks for the detailed bug report Ancoron!
        Hide
        Dies Koper added a comment -

        Marking as resolved in 3.1.2 branch and trunk.

        Show
        Dies Koper added a comment - Marking as resolved in 3.1.2 branch and trunk.

          People

          • Assignee:
            Dies Koper
            Reporter:
            ancoron
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: