glassfish
  1. glassfish
  2. GLASSFISH-10763

hang (infinite loop) when having big min or max pool size

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: V3
    • Fix Version/s: 3.1
    • Component/s: ejb_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      10,763
    • Status Whiteboard:
      Hide

      v3_exclude

      Show
      v3_exclude

      Description

      Encountered on GFv2.1 but same issue in source remains in V3:

      GlassFish gets stuck in an infinite loop when specifying a huge minimum (steady)
      or maximum pool size in the EJB container settings and using a SLSB->BMP
      application.

      The problem is in the following while-loop in NonBlockingPool.java:

      while ((curSize + populateCount) < steadyPoolSize)

      { populateCount += resizeQuantity; }

      populateCount is an int, so when steadyPoolSize and/or resizeQuantity are big it
      will overflow, leading to a negative number, satisfying the while clause's
      condition endlessly.

      Simple fix is to change populateCount's type to a long.

        Activity

        Hide
        Dies Koper added a comment -

        Created an attachment (id=3729)
        proposed patch (GFv3)

        Show
        Dies Koper added a comment - Created an attachment (id=3729) proposed patch (GFv3)
        Hide
        ksak added a comment -

        Marked v3_exclude

        Show
        ksak added a comment - Marked v3_exclude
        Hide
        kumara added a comment -

        Setting target release for unresolved issues submitted on v3 release to the next release. Not changing
        issues submitted on v2.x release because they might not apply to v3.next release.

        Show
        kumara added a comment - Setting target release for unresolved issues submitted on v3 release to the next release. Not changing issues submitted on v2.x release because they might not apply to v3.next release.
        Hide
        Dies Koper added a comment -

        Fixed in V3.next:

        Sending
        ejb\ejb-container\src\main\java\com\sun\ejb\containers\util\pool\NonBlockingPool.java
        Transmitting file data .
        Committed revision 35397.

        Show
        Dies Koper added a comment - Fixed in V3.next: Sending ejb\ejb-container\src\main\java\com\sun\ejb\containers\util\pool\NonBlockingPool.java Transmitting file data . Committed revision 35397.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: