unikraft / catalog

Unikraft Applications & Examples Catalog
23 stars 29 forks source link

mariadb: `readlink` error #41

Closed razvand closed 4 months ago

razvand commented 5 months ago

There is a readlink system call error when running MariaDB (PR #40 ). Use the following commands to replicate:

wget https://raw.githubusercontent.com/unikraft/catalog-for-maintainers/main/utils/start-buildkit.sh
source start-buildkit.sh
git clone https://github.com/unikraft-upb/catalog
cd catalog
git checkout -b razvand/library/mariadb origin/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
qemu-system-x86_64 -m 1024M -kernel .unikraft/build/mariadb_qemu-x86_64 -append "/usr/sbin/mariadbd --user=root" -nographic -cpu max

The output shown will have something like this:

[...]
getcwd(0x409e77bd0, 0x400, ...) = 0x10      
readlink("//var/lib/mysql/mysql", <out>buf:0x409e77770, 1023) = Invalid argument (-22)                                 
readlink("//var/lib/mysql/mysql/plugin.MAI", <out>buf:0x409e77770, 1023) = Invalid argument (-22)                      
newfstatat(0xffffff9c, 0x409e79bf0, ...) = 0x0
clock_gettime(CLOCK_REALTIME, <out>timespec:{tv_sec=1706028458, tv_nsec=864441836}) = OK                               
2024-01-23 16:47:38 0 [ERROR] Could not open mysql.plugin table: "Can't find file: './mysql/plugin.MAI' (errno: 2 "No such file or directory")". Some plugins may be not loaded
write(fd:2, "2024-01-23 16:47:38 0 [E"..., 176) = 176
[...]
razvand commented 4 months ago

This has been solved and superseded by #72