[MDEV-30192] Attempting to load ha_spider.so as an option to mariadb-install-db will cause the same to hang Created: 2022-12-10  Updated: 2022-12-26  Resolved: 2022-12-26

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Nayuta Yanagisawa (Inactive)
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-22979 "mysqld --bootstrap" / mysql_install_... Closed
Relates

 Description   

Attempting to load ha_spider.so as an option to mariadb-install-db will cause the same to hang (remove the data dir before starting mariadb-install-db):

$ /test/MD291122-mariadb-10.11.2-linux-x86_64-dbg/scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal --plugin-load-add=ha_spider.so --basedir=/test/MD291122-mariadb-10.11.2-linux-x86_64-dbg --datadir=/test/MD291122-mariadb-10.11.2-linux-x86_64-dbg/data

Leads to:

10.11.2 936436ef437c73911c18854a8ce8dad1216331b8 (Debug)

Installing MariaDB/MySQL system tables in '/test/MD291122-mariadb-10.11.2-linux-x86_64-dbg/data' ...

strace shows some wait happening/getting stuck (this is the tail of the strace log):

...
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3193720, si_uid=1344170783, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3193720
stat("/test/MD291122-mariadb-10.11.2-linux-x86_64-dbg/data", 0x7ffc5fba7a30) = -1 ENOENT (No such file or directory)
pipe([3, 4])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x14d6912a1850) = 3193721
close(4)                                = 0
read(3, "", 128)                        = 0
close(3)                                = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3193721, si_uid=1344170783, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3193721
stat("/usr/local/sbin/chmod", 0x7ffc5fba7ba0) = -1 ENOENT (No such file or directory)
stat("/usr/local/bin/chmod", 0x7ffc5fba7ba0) = -1 ENOENT (No such file or directory)
stat("/usr/sbin/chmod", 0x7ffc5fba7ba0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/chmod", 0x7ffc5fba7ba0)  = -1 ENOENT (No such file or directory)
stat("/sbin/chmod", 0x7ffc5fba7ba0)     = -1 ENOENT (No such file or directory)
stat("/bin/chmod", {st_mode=S_IFREG|0755, st_size=63864, ...}) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x14d6912a1850) = 3193722
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 3193722
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3193722, si_uid=1344170783, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 3193722
wait4(-1, 0x7ffc5fba7afc, WNOHANG, NULL) = -1 ECHILD (No child processes)
read(10, "&& \\\n    chmod 04755 \"$pamtooldi"..., 8192) = 6014
stat("/test/MD291122-mariadb-10.11.2-linux-x86_64-dbg/data/mysql/user.frm", 0x7ffc5fba7ae0) = -1 ENOENT (No such file or directory)
write(1, "Installing MariaDB/MySQL system "..., 101Installing MariaDB/MySQL system tables in '/test/MD291122-mariadb-10.11.2-linux-x86_64-dbg/data' ...
) = 101
pipe([3, 4])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x14d6912a1850) = 3193723
close(4)                                = 0
pipe([4, 5])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x14d6912a1850) = 3193725
close(3)                                = 0
close(5)                                = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x14d6912a1850) = 3193727
close(4)                                = 0
close(-1)                               = -1 EBADF (Bad file descriptor)
wait4(-1, _    # < end of log, cursor permanently blinks in location of '_'

CTRL+c will make no difference/not stop the hang, CTRL+z with kill %1 is needed to end/kill the process.



 Comments   
Comment by Elena Stepanova [ 2022-12-10 ]

The old infamous MDEV-22979.

Generated at Thu Feb 08 10:14:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.