unikraft / catalog

Unikraft Applications & Examples Catalog
32 stars 31 forks source link

`mariadb:11.4`: Client connection doesn't work #72

Closed razvand closed 1 month ago

razvand commented 6 months ago

MariaDB (PR #40) cannot be connected with mysql. Use the following commands to replicate:

On another console run the mysql client:

wget https://raw.githubusercontent.com/unikraft/catalog-for-maintainers/main/utils/start-buildkit.sh
source start-buildkit.sh
git clone https://github.com/unikraft/catalog
cd catalog
git remote add unikraft-upb https://github.com/unikraft-upb/catalog
git fetch unikraft-upb
git checkout -b razvand/library/mariadb unikraft-upb/razvand/library/mariadb
cd library/mariadb/11.2
sed -i "s/# CONFIG_LIBSYSCALL_SHIM_STRACE: 'y'/CONFIG_LIBSYSCALL_SHIM_STRACE: 'y'/" Kraftfile
kraft build --no-cache --no-update --plat qemu --arch x86_64
kraft rm --all ; kraft run --rm --log-type basic --log-level debug -M 1024M -p 3306:3306 .

The output message is:

futex(va:0x1003c2b128, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x7fffffff) = OK
futex(va:0x1003c2b128, FUTEX_WAIT_BITSET|FUTEX_PRIVATE_FLAG|FUTEX_CLOCK_REALTIME) = OK
futex(va:0x1003c2b140, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x1) = OK
mprotect(va:0x1024021000, 319488, PROT_READ|PROT_WRITE) = OK
pwrite64(0x6, 0x100342a590, ...) = 0x2000
fdatasync(0x6, 0xa, ...) = 0x0
pwrite64(0x4, 0x10018f47c0, ...) = 0x16
fdatasync(0x4, 0xa, ...) = 0x0
newfstatat(0xffffff9c, 0x10018f44f0, ...) = 0x0
rt_sigprocmask(0x0, 0x10018f5f30, ...) = 0x0
madvise(0x10018e5000, 0xb000, ...) = 0x0
futex(va:0x10018f5910, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME) = OK
pwrite64(0x4, 0x429b7ce00, ...) = 0x16
fdatasync(0x4, 0xa, ...) = 0x0
pwrite64(0x6, 0x100352a877, ...) = 0x1e21
fdatasync(0x6, 0xa, ...) = 0x0
close(fd:6) = OK
close(fd:5) = OK
munmap(va:0x1001864000) = OK
munmap(va:0x100167e000) = OK
munmap(va:0x100bcc9000) = OK
munmap(va:0x10010bd000) = OK
fcntl(0x4, 0x7, ...) = 0x0
close(fd:4) = OK
munmap(va:0x1003cc8000) = OK
munmap(va:0x100a56f000) = OK
futex(va:0x1003cb8188, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x1) = OK
futex(va:0x1003cb8188, FUTEX_WAIT_BITSET|FUTEX_PRIVATE_FLAG|FUTEX_CLOCK_REALTIME) = OK
futex(va:0x1003cb81a0, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x1) = OK
rt_sigprocmask(0x0, 0x10010bcf30, ...) = 0x0
madvise(0x10010ac000, 0xb000, ...) = 0x0
futex(va:0x10010bc910, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME) = OK
futex(va:0x100074cba4, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x7fffffff) = OK
futex(va:0x100074c778, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x7fffffff) = OK
futex(va:0x100074ca00, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x7fffffff) = OK
futex(va:0x100074cba0, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x7fffffff) = OK
futex(va:0x100074cb9c, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x7fffffff) = OK
futex(va:0x100074c748, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x7fffffff) = OK
futex(va:0x100074cb98, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x7fffffff) = OK
clock_gettime(CLOCK_REALTIME, <out>timespec:{tv_sec=1709739106, tv_nsec=433225660}) = OK
futex(va:0x100074c4d0, FUTEX_WAKE|FUTEX_PRIVATE_FLAG, 0x7fffffff) = OK
en1: Set IPv4 address 10.0.2.15 mask 255.255.255.0 gw 10.0.2.2

The output message without logging is:

en1: Interface is up
Powered by Unikraft Telesto (0.16.2~dc729a07)
[    0.492453] ERR:  [libposix_process] Ignore updating resource 7: cur = 32183, max = 32183
2024-03-06 14:46:17 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 32183)
2024-03-06 14:46:17 0 [Warning] Changed limits: max_open_files: 1024  max_connections: 151 (was 151)  table_cache: 421 (was 2000)
2024-03-06 14:46:17 0 [Note] Starting MariaDB 11.2.2-MariaDB-1:11.2.2+maria~ubu2204-log source revision 929532a9426d085111c24c63de9c23cc54382259 as process 1
2024-03-06 14:46:17 0 [Warning] No argument was provided to --log-bin and neither --log-basename or --log-bin-index where used;  This may cause repliction to break when this server acts as a master and has its hostname changed! Please use
'--log-basename=unikraft' or '--log-bin=unikraft-bin' to avoid this problem.
2024-03-06 14:46:17 0 [Warning] WSREP: Failed to guess base node address. Set it explicitly via wsrep_node_address.
2024-03-06 14:46:17 0 [Warning] WSREP: Failed to guess base node address. Set it explicitly via wsrep_node_address.
2024-03-06 14:46:17 0 [Warning] WSREP: Guessing address for incoming client connections failed. Try setting wsrep_node_incoming_address explicitly.
2024-03-06 14:46:17 0 [Note] WSREP: Node addr:
2024-03-06 14:46:17 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2024-03-06 14:46:17 0 [Note] InnoDB: Number of transaction pools: 1
2024-03-06 14:46:17 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-03-06 14:46:17 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOSYS: check seccomp filters, and the kernel version (newer than 5.1 required)
2024-03-06 14:46:17 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
2024-03-06 14:46:17 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2024-03-06 14:46:17 0 [Note] InnoDB: Completed initialization of buffer pool
2024-03-06 14:46:17 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2024-03-06 14:46:17 0 [Note] InnoDB: End of log at LSN=47629
2024-03-06 14:46:17 0 [Note] InnoDB: Opened 3 undo tablespaces
2024-03-06 14:46:17 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
2024-03-06 14:46:17 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-03-06 14:46:17 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-03-06 14:46:17 0 [Note] InnoDB: log sequence number 47629; transaction id 14
2024-03-06 14:46:17 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-03-06 14:46:17 0 [Note] Plugin 'wsrep-provider' is disabled.
2024-03-06 14:46:17 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2024-03-06 14:46:17 0 [Note] InnoDB: Buffer pool(s) load completed at 240306 14:46:17
2024-03-06 14:46:17 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-03-06 14:46:17 0 [Warning] Failed to create a socket for IPv6 '::': errno: 97.
xxczxp commented 6 months ago

I have the similar issue using mariadb:10.11, issue #108