Bug #54432 MEB: innobackup terminates on Solaris when mysql fails
Submitted: 11 Jun 2010 15:12 Modified: 12 Oct 2011 18:33
Reporter: Ingo Strüwing Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S2 (Serious)
Version:3.1, 3.5 OS:Solaris
Assigned to: Satya B CPU Architecture:Any

[11 Jun 2010 15:12] Ingo Strüwing
Description:
On Solaris, when the mysql client detects an error (e.g. "no privileges"), writes to stderr, and terminates, innobackup receives SIGPIPE and terminates with status 29 (EPIPE, broken pipe).

Please note that I will soon add error 29 to the list of accepted errors from innobackup so that the test case innobackup1 passes in spite of this bug. Please remove error 29 from multiple places in that test case when this bug is fixed.

How to repeat:
Run innobackup1.test in mysql-3.1-meb. This test creates a user with password and runs innobackup with --user but without --password. On access of that user's resources, mysql fails with "no privileges".

When running innobackup1.test in mysql-3.1-meb, please note that I will soon add error 29 to the list of accepted errors from innobackup so that the test case passes in spite of this bug. Please remove error 29 from multiple places in that test case when this bug is fixed.

Suggested fix:
Catch or ignore SIGPIPE.
[11 Jun 2010 15:17] Ingo Strüwing
Defect serious: One does not receive an error message. Innobackup silently terminates. This is almost a crash.
Workaround none: The only workaround would be to avoid error messages from mysql...
Impact substantial: All Solaris users of innobackup are affected.
[17 Jun 2010 11:14] Ingo Strüwing
The bug (IMHO) is that innobackup terminates without a message. I think, it should give a reason, if it ends abnormally. Just setting a non-zero exit value is not enough. The user should get an idea, what he could change to avoid the error.

The particular exit value is of less importance. However, to support testability (and scripting) it should always be the same value for the same kind of error.

The reason, why I mentioned number 29, was just that it raised my suspect that is could have to do with a broken pipe.
[12 Oct 2010 6:01] Satya B
This bug is because of perl version.

perl 5.8.8 (and above)  returns 9, and perl 5.8.4 (or below?)  returns 29 for the same script.

How to run the test
============
I have created a test script which opens mysql client in a pipe and tries execute a
mysql command. (mysql_open and mysql_check from innobackup script are copied
to this sample.pl)

place bug54432.test in mysql-test/t/
place sample.pl mysql-test/include

./mtr bug54432.test

now run the test and note the status code after running perl script

On linux (perl version 5.8.8 , 5.8.10)
error: 2304, status: 9, errno: 0
On solaris( perl version 5.8.4)
error: 7424, status: 29, errno: 29
[12 Oct 2010 6:02] Satya B
sample test

Attachment: bug54432.test (application/octet-stream, text), 1.94 KiB.

[12 Oct 2010 6:03] Satya B
sample test

Attachment: sample.pl (application/x-perl, text), 3.19 KiB.

[12 Oct 2011 18:33] Sveta Smirnova
This bug is a Perl issue and since 3.6 MEB does not use Perl the bug is obsolete and would not be fixed.