Bug 1584023
Summary: | systemctl start mariadb - hangs if sock file is used by another process [rhel-7.5.z] | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Oneata Mircea Teodor <toneata> |
Component: | mariadb | Assignee: | Michal Schorm <mschorm> |
Status: | CLOSED ERRATA | QA Contact: | Karel Volný <kvolny> |
Severity: | low | Docs Contact: | |
Priority: | high | ||
Version: | 7.1 | CC: | bblaskov, bgollahe, databases-maint, hhorak, kvolny, lmanasko, mmuzila, mschorm, vdanek |
Target Milestone: | rc | Keywords: | ZStream |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Previously, the mysqladmin tool waited for an inadequate length of time if the socket it listened on did not respond in a specific way. Consequently, when the socket was used while the MariaDB server was starting, the mariadb service became unresponsive for a long time. With this update, the mysqladmin timeout has been shortened to 2 seconds. As a result, the mariadb service either starts or fails but no longer hangs in the described situation.
|
Story Points: | --- |
Clone Of: | 1145455 | Environment: | |
Last Closed: | 2018-08-16 14:17:20 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1145455 | ||
Bug Blocks: |
Description
Oneata Mircea Teodor
2018-05-30 07:46:31 UTC
I cannot test this using the original reproducer because the initscript seems to exit as soon as it finds that another process is hanging on the socket ... any hints? now this is interesting - after modifying the reproducer to initialise the database at first, i.e. starting and stopping the daemon before, the daemon just starts, no matter that /var/lib/mysql/mysql.sock is used by nc ... to be precise: :: [ 12:25:38 ] :: [ PASS ] :: File /var/lib/mysql/mysql.sock should exist srwxr-xr-x. mysql mysql unconfined_u:object_r:mysqld_var_run_t:s0 /var/lib/mysql/mysql.sock :: [ 12:25:38 ] :: [ BEGIN ] :: Socket opened by nc should contain /var/lib/mysql/mysql.sock :: actually running 'lsof -U -a -c nc | grep '/var/lib/mysql/mysql.sock'' nc 4873 root 3u unix 0xffff99f38b7b6c00 0t0 63649 /var/lib/mysql/mysql.sock ... :: [ 12:25:43 ] :: [ FAIL ] :: Trying to start mariadb (should fail) (Expected 1, got 0) ... :: [ 12:25:53 ] :: [ FAIL ] :: Checking mariadb status (should not be running) (Expected 3, got 0) :: [ 12:25:53 ] :: [ PASS ] :: File /var/lib/mysql/mysql.sock should exist srwxrwxrwx. mysql mysql system_u:object_r:mysqld_var_run_t:s0 /var/lib/mysql/mysql.sock COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME nc 4873 root 3u unix 0xffff99f38b7b6c00 0t0 63649 /var/lib/mysql/mysql.sock mysqld 5168 mysql 15u unix 0xffff99f38ae99800 0t0 64204 /var/lib/mysql/mysql.sock so, obviously, mariadb overlays the socket file somehow ... in /usr/libexec/mariadb-wait-ready there is now connect-timeout added: RESPONSE=`/usr/bin/mysqladmin --no-defaults --connect-timeout=2 --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` re comment 7, 8 - there are a few other issues, e.g. bug 1598095 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:2439 |