Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5479

mysqld daemon should check if any process uses the socket file before removing

    XMLWordPrintable

Details

    • Not for ES Release Notes

    Description

      Already reported to http://bugs.mysql.com/71194

      When running some MySQL daemon A and we are trying to run another instance B, while these conditions are met:

      • network ports are different for A and B
      • unix socket location is the same for A and B

      Then the new daemon B removes the unix socket file that is actually necessary for daemon A.

      How to repeat:
      Steps to reproduce:
      $ /usr/libexec/mysqld --port 13306 --datadir /var/lib/mysql/
      $ fuser /var/lib/mysql/mysql.sock
      $ /usr/libexec/mysqld --port 13307 --datadir /var/lib/mysql2/
      $ fuser /var/lib/mysql/mysql.sock

      Actual results:
      /var/lib/mysql/mysql.sock: 5683
      /var/lib/mysql/mysql.sock: 5717
      which means the first daemon is not able to accept connections on the unix socket

      Expected results:
      /var/lib/mysql/mysql.sock: 5683
      /var/lib/mysql/mysql.sock: 5683
      the second daemon shouldn't start at all

      Suggested fix:
      Either check if some proc is attached to the socket or (portable solution) having a lock file for the socket file, that would contain pid of the process using the socket file.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              hhorak Honza Horak
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1h
                  1h

                  Git Integration

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