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

Galera: mysqld_safe fails to execute position recovery, server does not start

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.32-galera
    • Component/s: None
    • Labels:

      Description

      After installation e.g. from an RPM, server does not start, the error contains the following:

      130201 15:43:41 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
      130201 15:43:41 mysqld_safe WSREP: Running position recovery with --log_error=/tmp/tmp.6j0kAvgklV
      nohup: missing operand
      Try `nohup --help' for more information.
      130201 15:43:41 mysqld_safe WSREP: Failed to recover position: 
      

      Some digging shows that eval_log_error attempts to execute nohup without parameters instead of a full mysqld command, because the subroutine ignores all arguments except for the first one. The following patch seems to fix the issue, but please make sure that's the right way to do it, and that it's the only place where it should be fixed:

      --- ./mysqld_safe	2013-02-01 15:44:53.173436006 +0400
      +++ /usr/bin/mysqld_safe	2013-02-01 15:46:06.883696900 +0400
      @@ -147,7 +147,7 @@
       }
       
       eval_log_error () {
      -  local cmd="$1"
      +  local cmd="$*"
         case $logging in
           file) cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1" ;;
           syslog)
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Fixed by the merge:

            revno: 3405
            revision-id: seppo.jaakola@codership.com-20130615131545-6yxpifv94nk5wr6r
            parent: seppo.jaakola@codership.com-20130615131517-lgms4kgvv5t2eqp1
            committer: Seppo Jaakola <seppo.jaakola@codership.com>
            branch nick: maria-wsrep-5.5
            timestamp: Sat 2013-06-15 16:15:45 +0300
            message:
            References: MDEV-4572 - merge with lp:codership-mysql/5.5-23 revisions 3874..3878

            The fix is slightly different from the suggested one, instead of using all arguments in the subroutine, the parameters are quoted as a single string in the subroutine call, so at the end it's only one argument. It works too.

            Show
            elenst Elena Stepanova added a comment - Fixed by the merge: revno: 3405 revision-id: seppo.jaakola@codership.com-20130615131545-6yxpifv94nk5wr6r parent: seppo.jaakola@codership.com-20130615131517-lgms4kgvv5t2eqp1 committer: Seppo Jaakola <seppo.jaakola@codership.com> branch nick: maria-wsrep-5.5 timestamp: Sat 2013-06-15 16:15:45 +0300 message: References: MDEV-4572 - merge with lp:codership-mysql/5.5-23 revisions 3874..3878 The fix is slightly different from the suggested one, instead of using all arguments in the subroutine, the parameters are quoted as a single string in the subroutine call, so at the end it's only one argument. It works too.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Reopened to be able to move to correct fix version

            Show
            ratzpo Rasmus Johansson added a comment - Reopened to be able to move to correct fix version

              People

              • Assignee:
                seppo Seppo Jaakola
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: