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

Unable to connect using SSL and non-blocking API on slow network

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 2.3.1
    • None
    • None
    • None

    Description

      When on a "slow network" and trying to connect to a backend using SSL and non-blocking API (mysql_real_connect_start/mysql_real_connect_cont), it results in an error "2013: Lost connection to MySQL server at 'reading authorization packet'" , due to system error 11 (Resource temporarily unavailable).

      The issue seems caused by the fact that mthd_my_real_connect() calls run_plugin_auth() . This one calls net_safe_read(), that calls my_net_read() , and if this one returns "packet_error" the connection is immediatelyterminated .
      my_net_read() returns "packet_error" when there is no data to read from the socket: this shouldn't be considered an error during non-blocking calls.

      In other words, it seems that when establishing an SSL connection the library behaves correctly only on fast networks as data will be immediately available to read.

      Attachments

        Activity

          People

            georg Georg Richter
            rcannao René Cannaò
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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