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

mysqld hangs on startup when --init-file target does not exists

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 10.6.17, 10.5.25, 10.11.8, 10.5.26, 10.6.18, 10.11.9
    • 10.5.27, 10.6.20, 10.11.10, 11.2.6, 11.4.4
    • Server
    • None
    • Docker / Kubernetes

    Description

      Since 10.5.25, 10.6.18, 10.11.8 , MariaDB startup is stuck if --init-file target does not exists.

      mysqld waits forever on message:

      [Warning] Signal handler thread did not exit in a timely manner. Continuing to wait for it to stop..
      

      example testcase:

      ~

      $ sudo docker run --name mariadbtest \
      -e MYSQL_ROOT_PASSWORD=mypass \
      -p 3306:3306 \
      -d docker.io/library/mariadb:10.5.26 \
      --init-file=/var/lib/mysql/foo
      

      ~

      Resulting log:

      $ sudo docker logs mariadbtest
      ...
      2024-08-26 12:32:15 0 [Note] Starting MariaDB 10.5.26-MariaDB-ubu2004 source revision 7a5b8bf0f5470a13094101f0a4bdfa9e1b9ded02 server_uid KjyTHYnzkWxRQBEIh5uvt04ggeY= as process 94
      ...
      2024-08-26 12:32:15 0 [Note] Added new Master_info '' to hash table
      2024-08-26 12:32:15 0 [ERROR] mysqld: Can't create/write to file '/var/lib/mysql/foo' (Errcode: 2 "No such file or directory")
      2024-08-26 12:32:15 0 [ERROR] Aborting
      2024-08-26 12:32:25 0 [Warning] Signal handler thread did not exit in a timely manner. Continuing to wait for it to stop..
      ...
      

      The previous behaviour was an abort of mysqld (e.g. with 10.5.24):

      2024-08-26 12:59:19+00:00 [Note] [Entrypoint]: Database files initialized
      2024-08-26 12:59:19+00:00 [Note] [Entrypoint]: Starting temporary server
      2024-08-26 12:59:19+00:00 [Note] [Entrypoint]: Waiting for server startup
      2024-08-26 12:59:19 0 [Note] Starting MariaDB 10.5.24-MariaDB-1:10.5.24+maria~ubu2004 source revision 01f6abd1d4a929ee308f5b9287ac797a2e40d2b0 as process 94
      2024-08-26 12:59:19 0 [Note] InnoDB: Uses event mutexes
      ...
      2024-08-26 12:59:19 0 [Note] Reading of all Master_info entries succeeded
      2024-08-26 12:59:19 0 [Note] Added new Master_info '' to hash table
      2024-08-26 12:59:19 0 [ERROR] mysqld: Can't create/write to file '/var/lib/mysql/foo' (Errcode: 2 "No such file or directory")
      2024-08-26 12:59:19 0 [ERROR] Aborting
      Warning: Memory not freed: 272
      2024-08-26 12:59:50+00:00 [ERROR] [Entrypoint]: Unable to start server.
      
      

      I hoped MDEV-34129 would fix the issue but unfortunately it is not the case.

      Attachments

        Activity

          OLevesque Olivier Levesque created issue -
          OLevesque Olivier Levesque made changes -
          Field Original Value New Value
          Summary mysqld hang on startup when --init-file target does not exists mysqld hangs on startup when --init-file target does not exists
          OLevesque Olivier Levesque made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          serg Sergei Golubchik made changes -
          Assignee Dave Gosselin [ JIRAUSER52216 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.11 [ 27614 ]
          Gosselin Dave Gosselin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Gosselin Dave Gosselin added a comment -

          git bisect indicates that commit SHA cd0356a764d5cad5bb64479adb1a646283314f3c introduced this bug.

          Gosselin Dave Gosselin added a comment - git bisect indicates that commit SHA cd0356a764d5cad5bb64479adb1a646283314f3c introduced this bug.
          Gosselin Dave Gosselin made changes -
          Assignee Dave Gosselin [ JIRAUSER52216 ] Sergei Golubchik [ serg ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Dave Gosselin [ JIRAUSER52216 ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          Gosselin Dave Gosselin made changes -
          Assignee Dave Gosselin [ JIRAUSER52216 ] Sergei Golubchik [ serg ]
          Status Stalled [ 10000 ] In Review [ 10002 ]
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Dave Gosselin [ JIRAUSER52216 ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          serg Sergei Golubchik made changes -
          Priority Critical [ 2 ] Blocker [ 1 ]
          Gosselin Dave Gosselin made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          Gosselin Dave Gosselin made changes -
          Assignee Dave Gosselin [ JIRAUSER52216 ] Sergei Golubchik [ serg ]
          Status In Progress [ 3 ] In Review [ 10002 ]

          ok to push

          serg Sergei Golubchik added a comment - ok to push
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Dave Gosselin [ JIRAUSER52216 ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          Gosselin Dave Gosselin made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          Gosselin Dave Gosselin made changes -
          Status In Progress [ 3 ] In Testing [ 10301 ]
          Gosselin Dave Gosselin made changes -
          Fix Version/s 10.5.27 [ 29902 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.11 [ 27614 ]
          Resolution Fixed [ 1 ]
          Status In Testing [ 10301 ] Closed [ 6 ]
          JIraAutomate JiraAutomate made changes -
          Fix Version/s 10.6.20 [ 29903 ]
          Fix Version/s 10.11.10 [ 29904 ]
          Fix Version/s 11.2.6 [ 29906 ]
          Fix Version/s 11.4.4 [ 29907 ]

          People

            Gosselin Dave Gosselin
            OLevesque Olivier Levesque
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.