Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource temporarily unavailable / Protocol not available when running redis with app-elfloader #856

Closed
razvand opened this issue Apr 20, 2023 · 3 comments
Labels
kind/bug Something isn't working

Comments

@razvand
Copy link
Contributor

razvand commented Apr 20, 2023

Describe the bug

When using app-elfloader (via the run_app.sh script in run-app-elfloader) to run the redis dynamic build and redis static build, a Resource temporarily unavailable / Protocol not available issue appears.

Steps to reproduce

You can easily just use the ./do.sh script in the unikraft-upb/scripts repository:

$ ./do.sh setup
$ ./do.sh build
$ ./do.sh run_built redis

Then run:

$ redis-cli -h 172.44.0.2

And you'll get the error message.

Expected behavior

It should work to connect via redis-cli.

Which architectures were you using or does this bug affect?

x86_64

Which platforms were you using or does this bug affect?

kvm

Relevant log output

read(fd:3, <out>buf:0x4000efca7, 1) = Resource temporarily unavailable (-11)
gettimeofday(0x4000efcb0, 0x0, ...) = 0x0
epoll_wait(0x5, 0x10018f8000, ...) = 0x0
time(0x0, 0x10018f8000, ...) = 0x64416089
gettimeofday(0x4000efcb0, 0x0, ...) = 0x0
time(0x0, 0x0, ...) = 0x64416089
gettimeofday(0x4000efbe0, 0x0, ...) = 0x0
gettimeofday(0x4000efbd0, 0x0, ...) = 0x0
gettimeofday(0x4000efbd0, 0x0, ...) = 0x0
gettimeofday(0x4000efbd0, 0x0, ...) = 0x0
gettimeofday(0x4000efbd0, 0x0, ...) = 0x0
gettimeofday(0x4000efbd0, 0x0, ...) = 0x0
gettimeofday(0x4000efbd0, 0x0, ...) = 0x0
gettimeofday(0x4000efbd0, 0x0, ...) = 0x0
getpid() = pid:0
openat(AT_FDCWD, "/proc/0/stat", O_RDONLY) = fd:7
read(fd:7, <out>"16235 (bash) S 13550 162"..., 4096) = 353
close(fd:7) = OK
gettimeofday(0x4000efbd0, 0x0, ...) = 0x0
gettimeofday(0x4000efb50, 0x0, ...) = 0x0
gettimeofday(0x4000efb50, 0x0, ...) = 0x0
gettimeofday(0x4000efc60, 0x0, ...) = 0x0
gettimeofday(0x4000efc40, 0x0, ...) = 0x0
read(fd:3, <out>buf:0x4000efca7, 1) = Resource temporarily unavailable (-11)
gettimeofday(0x4000efcb0, 0x0, ...) = 0x0
epoll_wait(0x5, 0x10018f8000, ...) = 0x1
accept(0x6, 0x4000efb50, ...) = 0x7
fcntl(0x7, 0x3, ...) = 0x8002
fcntl(0x7, 0x4, ...) = 0x0
setsockopt(0x7, 0x6, ...) = 0x0
setsockopt(0x7, 0x1, ...) = 0x0
setsockopt(0x7, 0x6, ...) = Protocol not available (-92)
epoll_ctl(0x5, 0x1, ...) = 0x0
qemu-system-x86_64: terminating on signal 2
@razvand razvand added the kind/bug Something isn't working label Apr 20, 2023
@razvand razvand added this to the v0.13.0 (Atlas) milestone Apr 20, 2023
@marcrittinghaus
Copy link
Member

The static one works. I don't see the read-error and I can connect with redis-cli. Make sure you merge the lib-lwip PR

The dynamic redis-server from the dynamic-apps repo crashes for me with a stack corruption during startup

close(fd:3) = OK
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, fd:-1, 0) = va:0x1001111000
arch_prctl(0x1002, 0x1001111bc0, ...) = 0x0
mprotect(va:0x1001107000, 16384, PROT_READ) = OK
mprotect(va:0x1000d1a000, 4096, PROT_READ) = OK
mprotect(va:0x1000afd000, 8192, PROT_READ) = OK
mprotect(va:0x10008c9000, 4096, PROT_READ) = OK
mprotect(va:0x10006c3000, 4096, PROT_READ) = OK
mprotect(va:0x100030a000, 8192, PROT_READ) = OK
mprotect(va:0x40016e000, 4096, PROT_READ) = OK
set_tid_address(0x1001111e90, 0x4001bfe50, ...) = 0x0
set_robust_list(0x1001111ea0, 0x18, ...) = Function not implemented (-38)
rt_sigaction(0x20, 0x4001bfb90, ...) = 0x0
rt_sigaction(0x21, 0x4001bfb90, ...) = 0x0
rt_sigprocmask(0x1, 0x4001bfd08, ...) = 0x0
prlimit64(0x0, 0x3, ...) = 0x0

*** stack smashing detected ***: <unknown> terminated

writev(0x2, 0x4001bfb90, ...) = 0x36
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, fd:-1, 0) = va:0x1001113000
rt_sigprocmask(0x1, 0x4001bfa60, ...) = 0x0
rt_sigprocmask(0x0, 0x4001bf9c0, ...) = 0x0
getpid() = pid:0
gettid() = pid:0
tgkill(0x0, 0x0, ...) = Function not implemented (-38)
rt_sigprocmask(0x2, 0x4001bf940, ...) = 0x0
rt_sigaction(0x6, 0x4001bf910, ...) = 0x0
rt_sigprocmask(0x0, 0x4001bf9c0, ...) = 0x0
getpid() = pid:0
gettid() = pid:0
tgkill(0x0, 0x0, ...) = Function not implemented (-38)
rt_sigprocmask(0x2, 0x4001bf940, ...) = 0x0

@nderjung
Copy link
Member

unikraft/lib-lwip#33 is now merged. @razvand can you please re-check?

@razvand
Copy link
Contributor Author

razvand commented May 15, 2023

unikraft/lib-lwip#33

@razvand razvand closed this as completed May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: Done!
Development

No branches or pull requests

3 participants