Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-1265

Debezium thread polling Postgres infinitely loops causing CPU to spike to 100% and is unresponsive

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • 0.9.0.Alpha2
    • embedded-engine
    • None
    • Hide

      Haven't been able to reproduce in a lower environment yet, this only occurs in Production.

      Show
      Haven't been able to reproduce in a lower environment yet, this only occurs in Production.

    Description

      Using the embedded version of Debezium for Postgres the thread that polls Postgres becomes "stuck" and infinitely loops causing CPU to spike and then pin at 100% until the application is restarted, at which point it continues to consume queued CDC events in the WAL.

      Taking thread dumps showed that the below is the culprit.

      debezium-postgresconnector-postgres-records-stream-producer
      priority:5 - threadId:0x00007f18a83e3000 - nativeId:0x6507 - nativeId (decimal):25863 - state:RUNNABLE
      stackTrace:
      java.lang.Thread.State: RUNNABLE
      at org.postgresql.core.v3.replication.V3PGReplicationStream.readInternal(V3PGReplicationStream.java:124)
      at org.postgresql.core.v3.replication.V3PGReplicationStream.read(V3PGReplicationStream.java:70)
      at io.debezium.connector.postgresql.connection.PostgresReplicationConnection$1.read(PostgresReplicationConnection.java:215)
      at io.debezium.connector.postgresql.RecordsStreamProducer.streamChanges(RecordsStreamProducer.java:128)
      at io.debezium.connector.postgresql.RecordsStreamProducer.lambda$start$0(RecordsStreamProducer.java:114)
      at io.debezium.connector.postgresql.RecordsStreamProducer$$Lambda$944/792355097.run(Unknown Source)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Locked ownable synchronizers:
      - <0x00000000845036e0> (a java.util.concurrent.ThreadPoolExecutor$Worker)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            nicpegg Nic Pegg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: