unikraft / catalog

Unikraft Applications & Examples Catalog
23 stars 29 forks source link

`dragonfly:1.14`: Unable to run `redis-cli` commands #70

Open razvand opened 4 months ago

razvand commented 4 months ago

DragonflyDB (PR #50) is unable to handle redis-cli commands. 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/catalog
cd catalog
git remote add unikraft-upb https://github.com/unikraft-upb/catalog
git fetch unikraft-upb
git checkout -b razvand/library/dragonfly unikraft-upb/razvand/library/dragonfly
cd library/dragonfly/1.14
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 256M -p 3306:3306 .

On another console run the redis-cli client:

$ redis-cli 
127.0.0.1:6379> ping
Error: Server closed the connection
not connected> 

The output message is:

uname(<out>utsname:{sysname="Unikraft", nodename="unikraft", ...}) = OK
openat(AT_FDCWD, "/tmp//dragonfly.unikraft.uid0.log.ERROR.20240306-103011.1.log", O_RDONLY|O_CREAT|O_EXCL|0x1) = fd:10
fcntl(0xa, 0x2, ...) = 0x0
fcntl(0xa, 0x6, ...) = 0x0
fcntl(0xa, 0x3, ...) = 0x8081
fcntl(0xa, 0x4, ...) = 0x0
lseek(0xa, 0x0, ...) = 0x0
unlink(0x3be34310300, 0x6c666e6f67617264, ...) = No such file or directory (-2)
symlink(0x3be343202a6, 0x3be34310300, ...) = 0x0
fstat(fd:10, <out>stat:{st_size=0, st_mode=0100644, ...}) = OK
write(fd:10, "Log file created at: 202"..., 298) = 298
getpid() = pid:1
write(fd:4, "E20240306 10:30:11.86344"..., 120) = 120
getpid() = pid:1
E20240306 10:30:11.863443     2 epoll_socket.cc:296] sock[9] Unexpected error 95/Operation not supported 10.0.2.2:60878
write(fd:2, "E20240306 10:30:11.86344"..., 120) = 120
getpeername(0x9, 0x10040f2d40, ...) = 0x0
gettid() = pid:2
getpid() = pid:1
write(fd:4, "W20240306 10:30:11.89704"..., 161) = 161
getpid() = pid:1
epoll_ctl(0x6, 0x2, ...) = 0x0
close(fd:9) = OK
openat(AT_FDCWD, "/proc/self/status", O_RDONLY|O_CLOEXEC) = No such file or directory (-2)
openat(AT_FDCWD, "/proc/self/status", O_RDONLY|O_CLOEXEC) = No such file or directory (-2)
accept4(0x7, 0x10040d3440, ...) = 0x9
getsockopt(0x9, 0x1, ...) = Protocol not available (-92)
epoll_ctl(0x6, 0x1, ...) = 0x0
accept4(0x7, 0x10040d3440, ...) = Resource temporarily unavailable (-11)
setsockopt(0x9, 0x6, ...) = 0x0
getpeername(0x9, 0x10040f3450, ...) = 0x0
recvmsg(fd:9, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 0, MSG_EOR|MSG_OOB|0x392622) = OK
sendmsg(0x9, 0x10040f2b20, ...) = Operation not supported (-95)
gettid() = pid:2
getpeername(0x9, 0x10040f2bc0, ...) = 0x0
getpid() = pid:1
write(fd:10, "E20240306 10:30:13.18055"..., 120) = 120
getpid() = pid:1
write(fd:4, "E20240306 10:30:13.18055"..., 120) = 120
getpid() = pid:1
E20240306 10:30:13.180550     2 epoll_socket.cc:296] sock[9] Unexpected error 95/Operation not supported 10.0.2.2:60892
write(fd:2, "E20240306 10:30:13.18055"..., 120) = 120
getpeername(0x9, 0x10040f2d40, ...) = 0x0
gettid() = pid:2
getpid() = pid:1
write(fd:4, "W20240306 10:30:13.19793"..., 161) = 161
getpid() = pid:1
write(fd:3, "I20240306 10:30:07.06442"..., 512) = 512
epoll_ctl(0x6, 0x2, ...) = 0x0
close(fd:9) = OK
openat(AT_FDCWD, "/proc/self/status", O_RDONLY|O_CLOEXEC) = No such file or directory (-2)
openat(AT_FDCWD, "/proc/self/status", O_RDONLY|O_CLOEXEC) = No such file or directory (-2)

The output message without logging is:

en1: Interface is up                                                                                                   
Powered by Unikraft Telesto (0.16.2~f6ec140b)                                                                          
* Logs will be written to the first available of the following paths:                                                                                                                                                                          
/tmp/dragonfly.*                                                                                                                                                                                                                               
./dragonfly.*                                                                                                                                                                                                                                  
* For the available flags type dragonfly [--help | --helpfull]                                                         
* Documentation can be found at: https://www.dragonflydb.io/docs                                                                                                                                                                               
[    0.337824] ERR:  [libposix_process] Ignore updating resource 7: cur = 64150, max = 1024                                                                                                                                                    
en1: Set IPv4 address 10.0.2.15 mask 255.255.255.0 gw 10.0.2.2                                                         
E20240306 10:13:48.896750     2 epoll_socket.cc:296] sock[9] Unexpected error 95/Operation not supported 10.0.2.2:36450                                                                                                                        
E20240306 10:13:50.654150     2 epoll_socket.cc:296] sock[9] Unexpected error 95/Operation not supported 10.0.2.2:48168