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

        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.
        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).......
        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
        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.
        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
        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.
        Hide
        Guido Schmetz added a comment -

        Example test project

        Show
        Guido Schmetz added a comment - Example test project

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development