[MDEV-2502] LP:685809 - Occasional failure to start mysqd seen in buildbot Created: 2010-12-06  Updated: 2015-02-02  Resolved: 2012-10-04

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

Type: Bug Priority: Minor
Reporter: Kristian Nielsen Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug685809.xml    

 Description   

Very occasionally, we see the following failure in the "install" tests for
.deb package builds in Buildbot:

Setting up mariadb-server-5.1 (5.1.51-mariadb94) ...
 * Stopping MariaDB database server mysqld
   ...done.
101123 12:02:59 [Note] Plugin 'PBXT' is disabled.
101123 12:02:59 [Note] Plugin 'InnoDB' is disabled.
 * Starting MariaDB database server mysqld
   ...fail!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mariadb-server-5.1 (--configure):
 subprocess installed post-installation script returned error exit status 1

It occurs quite rarely, maybe around 1% of runs or less, so quite difficult to
reproduce. Seen in both 5.1 and 5.2.

To proceed further understanding the problem, it would be very useful to have
access to log files after a test run, in particular /var/log/daemon.log in
this case.

One way to do this would be to archive the virtual image after each build or
test run (the image is currently discarded). This requires some disk space,
but should be otherwise reasonable simple to implement.



 Comments   
Comment by Kristian Nielsen [ 2010-12-06 ]

Re: Occasional failure to start mysqd seen in buildbot
One example is here, though this particular link will eventually be purged from the history:

http://buildbot.askmonty.org/buildbot/builders/kvm-deb-karmic-amd64/builds/602/steps/test/logs/stdio

Comment by Kristian Nielsen [ 2011-01-19 ]

Re: Occasional failure to start mysqd seen in buildbot
I now managed to repeat it locally (once), by repeatedly re-running the test thousand of times for >12 hours...

Will check logs and see what I come up with.

Comment by Kristian Nielsen [ 2011-01-19 ]

Re: Occasional failure to start mysqd seen in buildbot
I found the problem. The cause is high load on the test server causing the
mysqld server to take more than 14 seconds to start.

(This is not unexpected, as eg. innodb has to initialise all its log files and
table space, and the host is running 3+ busy virtual machines, so I/O can
easily be slow at times. It could also happen eg. if innodb would need to do
recovery; not something to be recommended during upgrade, but could
happen. Also if an existing config file with large innodb logs/tablespaces
exists, again initialisation could take a long time.)

The /etc/init.d/mysql script starts the server and waits for 14 seconds for it
to become available. If it does not within this timeout, it gives up with the
given error, causing install to fail.

I am considering two options for solving this:

1. Increase the timeout to much higher, maybe 60 or 120 seconds. Then after 14
seconds we could output a warning that mysql is slow to start, and that we are
still waiting 46 (/106/whatever) seconds for it to come up.

2. Keep the existing timeout by default, add an environment variable
STARTUP_TIMEOUT that the tests can set to get a higher timeout.

A disadvantage of (1) is that it is not uncommon for mysqld to fail to start
at all. Quite common for example is a mis-match of actual innodb log file size
vs. configured size. This would cause the user to sit and wait for 60/120
seconds before getting a reported failure.

Need to think about what to do, however I lean mostly towards (2) I think. It
seems quite rare in practise that mysqld would need more than 14 seconds to
start up.

Comment by Kristian Nielsen [ 2011-01-20 ]

Re: Occasional failure to start mysqd seen in buildbot
Fix pushed, will be in next MariaDB 5.1 and 5.2 release.

Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ]

Launchpad bug id: 685809

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