Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-607

Infinite loop in pvio_socket_internal_connect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.1, 3.1.16
    • Fix Version/s: 3.3.2, 3.1.18
    • Component/s: Protocol
    • Labels:
      None

      Description

      (copied from PR-204) by Hugo Wen.

      There's an infinite loop in function pvio_socket_internal_connect to retry connection forever if receiving specific errno number:

      • No retry interval in the loop which will cause the process consuming all CPU usage and slowdown/stuck other processes.
      • Even if the timeout was set in mysqladmin command option, the function will retry forever in the infinite loop.

      The issue was seen a few times when MariaDB server was hanging and not accepting new connection correctly. When the issue happened mysqladmin process consumed 100% CPU usage and stack trace shows it stuck in the loop. Though --connect_timeout was set in command line, mysqladmin will never end until a force kill was executed.

        Attachments

          Activity

            People

            Assignee:
            georg Georg Richter
            Reporter:
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.