Uploaded image for project: 'Spymemcached Java Client'
  1. Spymemcached Java Client
  2. SPY-114

Thread.interrupt() of CacheLoader results in perpetual loop

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.7.3, 2.8.12
    • Fix Version/s: .next
    • Component/s: library
    • Security Level: Public
    • Labels:
      None

      Description

      I interrupted a Thread running CacheLoader.loadData(), and observe the behavior that it never finishes loadData(), but rather perpetually re-interrupts itself. I looked at the code and found the offending block in CacheLoader.push(), line 124. I believe it needs to break out of the loop.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        jonathaz Jonathan Leech created issue -
        jonathaz Jonathan Leech made changes -
        Field Original Value New Value
        Planned Start 2013-03-20 12:00 (initialized without having effort estimation)
        Planned End 2013-03-20 12:00 (initialized without having effort estimation)
        Hide
        jonathaz Jonathan Leech added a comment -

        I believe all that's necessary to fix it is a break; after line 124 on CacheLoader.java. It might make sense to abort the rest of the loadData, either by checking the interrupted status of the thread or to let the InterruptedException progagate out of push() and handle it in loadData.

        Show
        jonathaz Jonathan Leech added a comment - I believe all that's necessary to fix it is a break; after line 124 on CacheLoader.java. It might make sense to abort the rest of the loadData, either by checking the interrupted status of the thread or to let the InterruptedException progagate out of push() and handle it in loadData.
        Hide
        tgrall Tug Grall (Inactive) added a comment -
        Show
        tgrall Tug Grall (Inactive) added a comment - this is related to forum post : http://www.couchbase.com/forums/thread/cacheloader-bug-jira-broken
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.9.0 [ 10280 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.9.1 [ 10627 ]
        Fix Version/s 2.9.0 [ 10280 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.9.2 [ 10905 ]
        Fix Version/s 2.9.1 [ 10627 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.10.1 [ 11100 ]
        Fix Version/s 2.10.0 [ 10905 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.10.2 [ 11114 ]
        Fix Version/s 2.10.1 [ 11100 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.10.3 [ 11301 ]
        Fix Version/s 2.10.2 [ 11114 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.10.4 [ 11316 ]
        Fix Version/s 2.10.3 [ 11301 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.10.5 [ 11323 ]
        Fix Version/s 2.10.4 [ 11316 ]
        Hide
        jonathaz Jonathan Leech added a comment -

        Had this happen a couple more times recently in our production environment, can I submit a patch? This time, our glassfish container interrupted the threads after 2 hours of inactivity, so there's probably another issue lurking somewhere that caused CacheLoder.loadData to hang for 2 hours...

        Show
        jonathaz Jonathan Leech added a comment - Had this happen a couple more times recently in our production environment, can I submit a patch? This time, our glassfish container interrupted the threads after 2 hours of inactivity, so there's probably another issue lurking somewhere that caused CacheLoder.loadData to hang for 2 hours...
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.10.6 [ 11505 ]
        Fix Version/s 2.10.5 [ 11323 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.10.7 [ 11506 ]
        Fix Version/s 2.10.6 [ 11505 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.11.1 [ 11702 ]
        Fix Version/s 2.11.0 [ 11506 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.11.2 [ 11803 ]
        Fix Version/s 2.11.1 [ 11702 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.11.3 [ 11910 ]
        Fix Version/s 2.11.2 [ 11803 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.11.4 [ 12000 ]
        Fix Version/s 2.11.3 [ 11910 ]
        daschl Michael Nitschinger made changes -
        Fix Version/s 2.11.5 [ 12109 ]
        Fix Version/s 2.11.4 [ 12000 ]
        Hide
        daschl Michael Nitschinger added a comment -

        Sure, if you can provide a patch that would be great.

        Show
        daschl Michael Nitschinger added a comment - Sure, if you can provide a patch that would be great.
        daschl Michael Nitschinger made changes -
        Fix Version/s .next [ 10205 ]
        Fix Version/s 2.11.5 [ 12109 ]

          People

          • Assignee:
            daschl Michael Nitschinger
            Reporter:
            jonathaz Jonathan Leech
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Gerrit Reviews

              There are no open Gerrit changes