Wicket
  1. Wicket
  2. WICKET-5316

Wicket Atmosphere CouldNotLockPageException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.9.1
    • Fix Version/s: 6.11.0, 7.0.0-M1
    • Component/s: wicket-atmosphere
    • Labels:
      None

      Description

      CouldNotLockPageException after 1 minute in case of posting from multiple threads.

        Activity

        Guido Schmetz created issue -
        Hide
        Guido Schmetz added a comment -

        Example test project

        Show
        Guido Schmetz added a comment - Example test project
        Guido Schmetz made changes -
        Field Original Value New Value
        Attachment wicket-atmosphere-locker.zip [ 12597927 ]
        Hide
        Emond Papegaaij added a comment -

        Your quickstart is posting messages to the pages at a rate of 500 events per second (which crashes the chrome process btw). Processing of a single event takes a little over 2ms on my machine, which is quite fast, but not fast enough to keep up with the endless stream of events, causing starvation on some threads. This is triggering the page lock exceptions.

        Show
        Emond Papegaaij added a comment - Your quickstart is posting messages to the pages at a rate of 500 events per second (which crashes the chrome process btw). Processing of a single event takes a little over 2ms on my machine, which is quite fast, but not fast enough to keep up with the endless stream of events, causing starvation on some threads. This is triggering the page lock exceptions.
        Emond Papegaaij made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Hide
        Guido Schmetz added a comment -

        Also on a much lower rate the application will crash. Just try it. You sometimes have to wait a bit longer, but in the end it will crash. It's just not stable enough for a production environment.

        Show
        Guido Schmetz added a comment - Also on a much lower rate the application will crash. Just try it. You sometimes have to wait a bit longer, but in the end it will crash. It's just not stable enough for a production environment.
        Hide
        Martijn Dashorst added a comment -

        Critical is only for wicket-core functionality that blocks normal processing. Unsupported, experimental features never get a priority of anything higher than minor.

        Show
        Martijn Dashorst added a comment - Critical is only for wicket-core functionality that blocks normal processing. Unsupported, experimental features never get a priority of anything higher than minor.
        Martijn Dashorst made changes -
        Priority Critical [ 2 ] Minor [ 4 ]
        Hide
        Guido Schmetz added a comment -

        Thanks. I'll keep that in mind next time.

        Show
        Guido Schmetz added a comment - Thanks. I'll keep that in mind next time.
        Hide
        Emond Papegaaij added a comment -

        Further testing shows that PageAccessSynchronizer is not always able to lock a page when multiple threads acquire and release locks at a very high rate. This is what happens:
        thread B putIfAbsent(1) -> null
        thread A putIfAbsent(2) -> 1
        thread B remove(1)
        thread B notifyAll(1)
        thread A wait(1).......

        Show
        Emond Papegaaij added a comment - Further testing shows that PageAccessSynchronizer is not always able to lock a page when multiple threads acquire and release locks at a very high rate. This is what happens: thread B putIfAbsent(1) -> null thread A putIfAbsent(2) -> 1 thread B remove(1) thread B notifyAll(1) thread A wait(1).......
        Emond Papegaaij made changes -
        Resolution Invalid [ 6 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Emond Papegaaij added a comment -

        The releasing issue is fixed by adding an additional check before waiting for the lock to be released.

        Show
        Emond Papegaaij added a comment - The releasing issue is fixed by adding an additional check before waiting for the lock to be released.
        Emond Papegaaij made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 7.0.0 [ 12322958 ]
        Fix Version/s 6.11.0 [ 12324874 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Emond Papegaaij
            Reporter:
            Guido Schmetz
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development