Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942287 - dev-db/mariadb-connector-c: src_test() hangs (because of `mysqladmin ping` failing)
Summary: dev-db/mariadb-connector-c: src_test() hangs (because of `mysqladmin ping` fa...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 941482
  Show dependency tree
 
Reported: 2024-10-26 13:30 UTC by Michał Górny
Modified: 2025-01-09 07:58 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (cut out the repeating message) (build.log,198.65 KB, text/plain)
2024-10-26 13:34 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-10-26 13:30:41 UTC
src_test() contains:

	while ! mysqladmin ping --socket="${T}/mysql/mysql.sock" --silent ; do
		sleep 1
	done

However, it does not define any limiting conditions, so if `mysqladmin ping` keeps failing, the test phase hangs forever.


In this case, mysqladmin fails because of:

^Gmysqladmin: Can't read dir of '/etc/mysql/mysql.d' (Errcode: 2 "No such file or directory")
Fatal error in defaults handling. Program aborted


i.e. there are two issues here:

1) src_test() needs to fail after N unsuccessful attempts,

2) it needs to be fixed to work without /etc/mysql/mysql.d (or the directory needs to be guaranteed somehow?)
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-10-26 13:34:15 UTC
Created attachment 906854 [details]
build.log (cut out the repeating message)
Comment 2 Larry the Git Cow gentoo-dev 2025-01-09 03:21:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bed973615abf5005b8cd8ed73e64ebc01caed02

commit 4bed973615abf5005b8cd8ed73e64ebc01caed02
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-09 03:20:23 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-09 03:20:23 +0000

    dev-db/mariadb-connector-c: add limit to src_test ping attempts
    
    It's unacceptable to loop indefinitely as it'll hang the emerge process.
    
    Bug: https://bugs.gentoo.org/942287
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-09 03:23:33 UTC
(In reply to Michał Górny from comment #0)
> 2) it needs to be fixed to work without /etc/mysql/mysql.d (or the directory
> needs to be guaranteed somehow?)

--no-defaults is supposed to guarantee this..
Comment 4 Larry the Git Cow gentoo-dev 2025-01-09 03:26:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=506481663946acf3d4522593975a763cdaf0f5e0

commit 506481663946acf3d4522593975a763cdaf0f5e0
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-09 03:25:25 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-09 03:25:25 +0000

    dev-db/mariadb-connector-c: pass --no-defaults to mysqladmin too
    
    Closes: https://bugs.gentoo.org/942287
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild |  2 +-
 dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild  | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2025-01-09 07:57:57 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=227eaf7997e974de7ff0886d6a2762ec3f16a347

commit 227eaf7997e974de7ff0886d6a2762ec3f16a347
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-09 07:56:58 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-09 07:57:36 +0000

    Revert "dev-db/mariadb-connector-c: pass --no-defaults to mysqladmin too"
    
    This reverts commit 506481663946acf3d4522593975a763cdaf0f5e0.
    
    This doesn't work. Serves me right for a speculative fix.
    
    Bug: https://bugs.gentoo.org/942287
    Closes: https://bugs.gentoo.org/947756
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild |  2 +-
 dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild  | 11 ++---------
 2 files changed, 3 insertions(+), 10 deletions(-)