kevinw@ubuntuvbx:/mnt/u/Docker/ppm$ sudo mkdir /mnt/m/testdir kevinw@ubuntuvbx:/mnt/u/Docker/ppm$ sudo docker run -v /mnt/m/testdir:/var/lib/mysql --cap-add CAP_SYS_PTRACE -ti quay.io/mar iadb-foundation/mariadb-debug:10.6 bash root@53a5df707bc7:/# apt-get update && apt-get install -y gdb Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB] Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Ign:3 https://ci.mariadb.org/19437/amd64-ubuntu-2004-deb-autobake/debs ./ InRelease Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] Ign:6 https://ci.mariadb.org/19437/amd64-ubuntu-2004-deb-autobake/debs ./ Release Get:7 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB] Get:8 https://ci.mariadb.org/19437/amd64-ubuntu-2004-deb-autobake/debs ./ Packages [14.6 kB] Get:9 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB] Get:10 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB] Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB] Get:12 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1636 kB] Get:13 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [679 kB] Get:14 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [33.4 kB] Get:15 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1085 kB] Get:16 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [6310 B] Get:17 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [2668 B] Get:18 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [801 kB] Get:19 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1183 kB] Get:20 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [30.1 kB] Get:21 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [628 kB] Fetched 19.5 MB in 2s (8495 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libbabeltrace1 libc6-dbg libcc1-0 libdw1 libglib2.0-0 libglib2.0-data libicu66 libpython3.8 libxml2 shared-mime-info xdg-user-dirs Suggested packages: gdb-doc The following NEW packages will be installed: gdb libbabeltrace1 libc6-dbg libcc1-0 libdw1 libglib2.0-0 libglib2.0-data libicu66 libpython3.8 libxml2 shared-mime-info xdg-user-dirs 0 upgraded, 12 newly installed, 0 to remove and 1 not upgraded. Need to get 26.7 MB of archives. After this operation, 136 MB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglib2.0-0 amd64 2.64.6-1~ubuntu20.04.4 [1287 kB] Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglib2.0-data all 2.64.6-1~ubuntu20.04.4 [6052 B] Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libicu66 amd64 66.1-2ubuntu2 [8520 kB] Get:4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libxml2 amd64 2.9.10+dfsg-5ubuntu0.20.04.1 [640 kB] Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 shared-mime-info amd64 1.15-1 [430 kB] Get:6 http://archive.ubuntu.com/ubuntu focal/main amd64 xdg-user-dirs amd64 0.17-2ubuntu1 [48.3 kB] Get:7 http://archive.ubuntu.com/ubuntu focal/main amd64 libdw1 amd64 0.176-1.1build1 [226 kB] Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 libbabeltrace1 amd64 1.5.8-1build1 [156 kB] Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8 amd64 3.8.10-0ubuntu1~20.04.1 [1625 kB] Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gdb amd64 9.2-0ubuntu1~20.04 [3221 kB] Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libcc1-0 amd64 10.3.0-1ubuntu1~20.04 [48.8 kB] Get:12 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libc6-dbg amd64 2.31-0ubuntu9.2 [10.5 MB] Fetched 26.7 MB in 1s (35.2 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libglib2.0-0:amd64. (Reading database ... 11064 files and directories currently installed.) Preparing to unpack .../00-libglib2.0-0_2.64.6-1~ubuntu20.04.4_amd64.deb ... Unpacking libglib2.0-0:amd64 (2.64.6-1~ubuntu20.04.4) ... Selecting previously unselected package libglib2.0-data. Preparing to unpack .../01-libglib2.0-data_2.64.6-1~ubuntu20.04.4_all.deb ... Unpacking libglib2.0-data (2.64.6-1~ubuntu20.04.4) ... Selecting previously unselected package libicu66:amd64. Preparing to unpack .../02-libicu66_66.1-2ubuntu2_amd64.deb ... Unpacking libicu66:amd64 (66.1-2ubuntu2) ... Selecting previously unselected package libxml2:amd64. Preparing to unpack .../03-libxml2_2.9.10+dfsg-5ubuntu0.20.04.1_amd64.deb ... Unpacking libxml2:amd64 (2.9.10+dfsg-5ubuntu0.20.04.1) ... Selecting previously unselected package shared-mime-info. Preparing to unpack .../04-shared-mime-info_1.15-1_amd64.deb ... Unpacking shared-mime-info (1.15-1) ... Selecting previously unselected package xdg-user-dirs. Preparing to unpack .../05-xdg-user-dirs_0.17-2ubuntu1_amd64.deb ... Unpacking xdg-user-dirs (0.17-2ubuntu1) ... Selecting previously unselected package libdw1:amd64. Preparing to unpack .../06-libdw1_0.176-1.1build1_amd64.deb ... Unpacking libdw1:amd64 (0.176-1.1build1) ... Selecting previously unselected package libbabeltrace1:amd64. Preparing to unpack .../07-libbabeltrace1_1.5.8-1build1_amd64.deb ... Unpacking libbabeltrace1:amd64 (1.5.8-1build1) ... Selecting previously unselected package libpython3.8:amd64. Preparing to unpack .../08-libpython3.8_3.8.10-0ubuntu1~20.04.1_amd64.deb ... Unpacking libpython3.8:amd64 (3.8.10-0ubuntu1~20.04.1) ... Selecting previously unselected package gdb. Preparing to unpack .../09-gdb_9.2-0ubuntu1~20.04_amd64.deb ... Unpacking gdb (9.2-0ubuntu1~20.04) ... Selecting previously unselected package libcc1-0:amd64. Preparing to unpack .../10-libcc1-0_10.3.0-1ubuntu1~20.04_amd64.deb ... Unpacking libcc1-0:amd64 (10.3.0-1ubuntu1~20.04) ... Selecting previously unselected package libc6-dbg:amd64. Preparing to unpack .../11-libc6-dbg_2.31-0ubuntu9.2_amd64.deb ... Unpacking libc6-dbg:amd64 (2.31-0ubuntu9.2) ... Setting up libdw1:amd64 (0.176-1.1build1) ... Setting up xdg-user-dirs (0.17-2ubuntu1) ... Setting up libglib2.0-0:amd64 (2.64.6-1~ubuntu20.04.4) ... No schema files found: doing nothing. Setting up libicu66:amd64 (66.1-2ubuntu2) ... Setting up libc6-dbg:amd64 (2.31-0ubuntu9.2) ... Setting up libglib2.0-data (2.64.6-1~ubuntu20.04.4) ... Setting up libpython3.8:amd64 (3.8.10-0ubuntu1~20.04.1) ... Setting up libbabeltrace1:amd64 (1.5.8-1build1) ... Setting up libxml2:amd64 (2.9.10+dfsg-5ubuntu0.20.04.1) ... Setting up libcc1-0:amd64 (10.3.0-1ubuntu1~20.04) ... Setting up gdb (9.2-0ubuntu1~20.04) ... Setting up shared-mime-info (1.15-1) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... root@53a5df707bc7:/# chown -R mysql: /var/lib/mysql root@53a5df707bc7:/# gosu mysql gdb --args mariadbd --bootstrap GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from mariadbd... Reading symbols from /usr/lib/debug/.build-id/0a/15ba14aa1a56e8b95156359cd6f9959c6fb891.debug... (gdb) r Starting program: /usr/sbin/mariadbd --bootstrap warning: Error disabling address space randomization: Operation not permitted [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 2021-10-29 11:47:02 0 [Note] /usr/sbin/mariadbd (server 10.6.5-MariaDB-1:10.6.5+maria~focal as 10.6.5-MariaDB-1193a793c40b806 c6f1f007bbd87f4d9a73e686d) starting as process 410 ... 2021-10-29 11:47:02 0 [Warning] Can't create test file /var/lib/mysql/53a5df707bc7.lower-test /usr/sbin/mariadbd: Can't change dir to '/var/lib/mysql/' (Errcode: 13 "Permission denied") 2021-10-29 11:47:02 0 [ERROR] Aborting [Inferior 1 (process 410) exited with code 01] (gdb) set print frame-arguments all (gdb) thread apply all bt full root@53a5df707bc7:/# exit exit kevinw@ubuntuvbx:/mnt/u/Docker/ppm$ df -h Filesystem Size Used Avail Use% Mounted on udev 2.9G 0 2.9G 0% /dev tmpfs 595M 1.4M 594M 1% /run /dev/mapper/ubuntu--vg-ubuntu--lv 20G 12G 6.9G 64% / tmpfs 3.0G 0 3.0G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 3.0G 0 3.0G 0% /sys/fs/cgroup /dev/loop0 33M 33M 0 100% /snap/snapd/12704 /dev/loop1 56M 56M 0 100% /snap/core18/2128 /dev/sda2 976M 107M 803M 12% /boot /dev/loop2 71M 71M 0 100% /snap/lxd/21029 /dev/loop3 33M 33M 0 100% /snap/snapd/13640 /dev/loop4 56M 56M 0 100% /snap/core18/2246 M_DRIVE 5.4T 2.5T 3.0T 46% /mnt/m U_DRIVE 2.0T 157G 1.8T 8% /mnt/u /dev/loop5 62M 62M 0 100% /snap/core20/1169 /dev/loop6 68M 68M 0 100% /snap/lxd/21545 tmpfs 595M 0 595M 0% /run/user/1000