[MDEV-4661] Galera: mysqld_safe fails to execute position recovery, server does not start Created: 2013-06-14  Updated: 2013-08-28  Resolved: 2013-08-28

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.5.32-galera

Type: Bug Priority: Blocker
Reporter: Elena Stepanova Assignee: Seppo Jaakola
Resolution: Fixed Votes: 0
Labels: galera

Issue Links:
Relates

 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)



 Comments   
Comment by Elena Stepanova [ 2013-06-15 ]

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.

Comment by Rasmus Johansson (Inactive) [ 2013-08-28 ]

Reopened to be able to move to correct fix version

Generated at Thu Feb 08 06:58:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.