Details

      Description

      This is basically the same issue as ZOOKEEPER-888 and ZOOKEEPER-740 (the latter is open as I write this, but it was superseded by the fix that went in with 888). The problem still exists after the ZOOKEEPER-888 patch, however; it's just more difficult to trigger:

      1) Zookeeper notices connection loss, schedules watcher_dispatch
      2) Zookeeper notices session loss, schedules watcher_dispatch
      3) watcher_dispatch runs for connection loss
      4) pywatcher is freed due to is_unrecoverable being true
      5) watcher_dispatch runs for session loss
      6) PyObject_CallObject attempts to run freed pywatcher with varying bad results

      The fix is easy, the dispatcher should act on the state it is given, not the state of the world when it runs. (Patch attached). Reliably triggering the crash is tricky due to the race, but it's not theoretical.

        Activity

        Mike Lundy created issue -
        Mike Lundy made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Mike Lundy made changes -
        Attachment 0001-notify-on-event-state-not-current-state.patch [ 12515480 ]
        Mike Lundy made changes -
        Mike Lundy made changes -
        Attachment 0001-notify-on-event-state-not-current-state.patch [ 12515480 ]
        Patrick Hunt made changes -
        Assignee Mike Lundy [ novas0x2a ]
        Henry Robinson made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Patrick Hunt made changes -
        Fix Version/s 3.3.6 [ 12320172 ]
        Fix Version/s 3.4.4 [ 12319841 ]
        Fix Version/s 3.5.0 [ 12316644 ]

          People

          • Assignee:
            Mike Lundy
            Reporter:
            Mike Lundy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development