Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#40040 closed defect (fixed)

mysql55 @5.5.33_0, mysql56 @5.6.13_0, mariadb @5.5.32_0: Missing code in mysqld_safe

Reported by: stuchalk (Stuart Chalk) Owned by: pixilla (Bradley Giesbrecht)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: stefanvignir@…, cbsmith@…, jeff@…, joshua@…, doug.ransom@…
Port: mysql55 mysql56 mariadb

Description

When trying to run mysqld_safe an error in the script comes up for line 726. The answer is that the if statement on line 725 is missing the comparison/decision statement.

Add " ps -ef | grep -v mysqld_safe | grep -- $MYSQLD | grep $PID > /dev/null" (copied form mysqld_safe version 5.5.32_1 line 725)

It works after this fix.

Stuart

Change History (23)

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to pixilla@…
Port: mysql55 added; mysql55@5.5.33 removed
Summary: Missing code in mysqld_safemysql55 @5.5.33: Missing code in mysqld_safe

Thanks for the ticket. In the future, please Cc relevant port maintainers (port info --maintainers).

comment:2 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: stefanvignir@… added
Port: mysql55-server mysql56-server mariadb-server added; mysql55 removed
Summary: mysql55 @5.5.33: Missing code in mysqld_safemysql55-server @5.5.33_0, mysql56-server @5.6.13_0, mariadb-server @5.5.32_0: Missing code in mysqld_safe

Has duplicate #40209, also affecting mysql56-server and mariadb-server.

comment:3 Changed 11 years ago by pixilla (Bradley Giesbrecht)

schalk: Are you using port load?

sudo port load mariadb-server

comment:4 Changed 11 years ago by stuchalk (Stuart Chalk)

So, this is difficult to do because the server is live and I don't want to take it down. Sadly I forget what the error was that came up when I tried to run mysqld_safe but mysql would not load because of the lack of " ps -ef | grep -v mysqld_safe | grep -- $MYSQLD | grep $PID > /dev/null" on line 725. If you compare mysqld_safe from version 5.5.32 to that of version 5.5.33 you will see the difference - it looks like it was accidentally deleted when mysqld_safe was edited for the new version (5.5.33).

Sorry I cant be of more help.

comment:5 Changed 11 years ago by pixilla (Bradley Giesbrecht)

The mysql55-server ports primary purpose is to setup mysql servers directories and to start and stop the server using the port command:

sudo port load mysql55-server

If upstream introduced a bug I would prefer an upstream fix. My testing indicates that using mysql55-server as intended does function as expected so I am inclined to wait for an upstream fix.

Is there an upstream bug report for this?

comment:6 Changed 11 years ago by stuchalk (Stuart Chalk)

My fault. There is not a ticket on mysql55 because I put the ticket on mysql55-server thinking they were one and the same. Please transfer this ticket to mysql55 if that can be done, else close it and I will put a ticket in for mysql55. Sorry...

comment:7 Changed 11 years ago by pixilla (Bradley Giesbrecht)

Summary: mysql55-server @5.5.33_0, mysql56-server @5.6.13_0, mariadb-server @5.5.32_0: Missing code in mysqld_safemysql55 @5.5.33_0, mysql56 @5.6.13_0, mariadb @5.5.32_0: Missing code in mysqld_safe

comment:8 Changed 11 years ago by pixilla (Bradley Giesbrecht)

Port: mysql55 mysql56 mariadb added; mysql55-server mysql56-server mariadb-server removed

comment:9 Changed 11 years ago by cbsmith@…

This bug appears to be still open. I got bit pretty bad by it. What's needed to get this fixed/closed out?

comment:10 Changed 11 years ago by eric.lebigot@…

Cc: eric.lebigot@… added

Cc Me!

comment:11 Changed 11 years ago by eric.lebigot@…

Cc: eric.lebigot@… removed

Cc Me!

comment:12 Changed 11 years ago by jeff@…

Still happening for mysql55-server @5.5.33_0

Last edited 11 years ago by jeff@… (previous) (diff)

comment:13 Changed 11 years ago by pixilla (Bradley Giesbrecht)

Can someone look for an upstream bug report or demonstrate how the Portfile is causing the problem?

Does this issue exist on other platforms?

comment:14 Changed 11 years ago by joshua@…

Can we get a fix for this?

comment:15 Changed 11 years ago by doug.ransom@…

I too would benefit from a fix.

comment:16 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: cbsmith@… jeff@… joshua@… doug.ransom@… added

Then file a bug report with the developers of MySQL and ask them to fix it.

comment:17 in reply to:  16 Changed 11 years ago by cbsmith@…

Replying to ryandesign@…:

Then file a bug report with the developers of MySQL and ask them to fix it.

The MySQL developers use a macro FIND_PROC for selecting which mechanism to use. It appears to select the right mechanism when built outside of the Macports tree. I don't know the details, but the Macports build does appear to patch the CMake build a fair bit, so I'm guessing something in there is mucking up the build config so the macro isn't getting properly set.

comment:18 Changed 11 years ago by pixilla (Bradley Giesbrecht)

I am about to commit patches for all the effected mysql ports that fixes the problem by setting FIND_PROC. Eventually a better fix would be nice.

comment:19 Changed 11 years ago by pixilla (Bradley Giesbrecht)

Has duplicate #40673, #40273

Last edited 11 years ago by pixilla (Bradley Giesbrecht) (previous) (diff)

comment:20 Changed 11 years ago by pixilla (Bradley Giesbrecht)

Resolution: fixed
Status: newclosed

See r114690

comment:21 Changed 11 years ago by pixilla (Bradley Giesbrecht)

Thanks cbsmith and jakewendt.com from ticket #40673 for your help.

Shouldn't this block in mysql-5.5.33/scripts/CMakeLists.txt:103 be setting FIND_PROC:

IF(UNIX)
  # FIND_PROC and CHECK_PID are used by mysqld_safe
...
IF(NOT FIND_PROC)
  # SysV style
  EXECUTE_PROCESS(COMMAND ps -ef OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result)
  IF(result MATCHES 0)
    SET( FIND_PROC "ps -ef | grep -v mysqld_safe | grep -- $MYSQLD | grep $PID > /dev/null")
  ENDIF()
ENDIF()
...
ENDIF(UNIX)

comment:22 Changed 11 years ago by pixilla (Bradley Giesbrecht)

Perhaps the space after the open paren "SET( FIND_PROC" is the culprit?

comment:23 Changed 11 years ago by pixilla (Bradley Giesbrecht)

The SUID process /bin/ps is not in MacPorts sandbox causing the ps tests to fail.

Note: See TracTickets for help on using tickets.