A failure in a single DB connection causes deadlock in Crowd

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 2.7.2
    • Affects Version/s: 2.7.1
    • Component/s: None
    • None

      Symptoms

      Crowd becomes unresponsive. A thread dump shows that all threads are in WAITING state, except one which is RUNNABLE and reading from the JDBC socket (SocketInputStream.read) while at the same time holding the WRITE lock in SwitchableTokenManagerImpl.

      Postgres logs contain "LOG: could not send data to client: Broken pipe".

      Steps to reproduce

      This issue is affecting some customers. I haven't been able to reproduce it locally. The key to reproduce this issue seems to be able to kill a connection between Crowd and Postgres in such way that Postgres believes it's closed ("broken pipe"), while Crowd keeps waiting to read from the socket.

      This issue seems to happen only when using database token storage.

            Assignee:
            Diego Berrueta
            Reporter:
            Diego Berrueta
            Votes:
            29 Vote for this issue
            Watchers:
            49 Start watching this issue

              Created:
              Updated:
              Resolved: