Skip to content

http-c-epoll: One of two messages is lostΒ #23

@razvand

Description

@razvand

When running the http-c-epoll example (PR #14), one of two echo messages does not issue a reply. This may be a problem with the implementation of epoll in Unikraft:

razvand@mantis:~/.../examples/http-c-epoll$ kraft cloud deploy -p 42424:42424/tls .
[+] pulling index.unikraft.io/official/base:latest
[+] building rootfs... done!
[+] packaging index.unikraft.io/razvan.unikraft.io/http-c-epoll:latest (oci)... done!
[+] pushing index.unikraft.io/razvan.unikraft.io/http-c-epoll:latest (feb56b5, 4c698dd)
[●] Deployed successfully!                                                                                             
 β”‚                                                                                                                     
 β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ name: http-c-epoll-uk4zz                                                                                       
 β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ uuid: 249f23d6-84f0-4ea8-8593-8e3075727557                                                                     
 β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ state: running                                                                                        
 β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ fqdn: ancient-sun-rux5q9me.dal0.kraft.cloud                                                                    
 β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€ image: razvan.unikraft.io/http-c-epoll@sha256:4c698dde2d78647b6485132718ff35eb694bc16cf88561d70efc0390b2bfa8ff 
 β”œβ”€β”€β”€β”€β”€ boot time: 6.26 ms                                                                                                  
 β”œβ”€β”€β”€β”€β”€β”€β”€β”€ memory: 128 MiB                                                                                                  
 β”œβ”€ service group: ancient-sun-rux5q9me                                                                                     
 └────────── args: /server                                                                                                  

razvand@mantis:~/.../examples/http-c-epoll$ openssl s_client -connect ancient-sun-rux5q9me.dal0.kraft.cloud:42424       
CONNECTED(00000003)
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
[...]
    Start Time: 1706216796
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: no
    Max Early Data: 0
---
read R BLOCK
a
b
b
c
d
d
e
f
f
g
h
h

A local run is OK:

razvand@mantis:~/.../examples/http-c-epoll$ make -C src
make: Entering directory '/home/razvand/unikraft/kraftcloud/examples/http-c-epoll/src'
cc -Wall -Wextra -fPIC -I.  -c -o epoll_echo_server.o epoll_echo_server.c 
cc -Wall -Wextra -fPIC -I.  -c -o utils/sock/sock_util.o utils/sock/sock_util.c
cc -Wall -Wextra -fPIC -I.  -c -o utils/log/log.o utils/log/log.c
cc -pie  epoll_echo_server.o utils/sock/sock_util.o utils/log/log.o   -o epoll_echo_server
make: Leaving directory '/home/razvand/unikraft/kraftcloud/examples/http-c-epoll/src'

razvand@mantis:~/.../examples/http-c-epoll$ ./src/epoll_echo_server 
23:10:26 INFO  epoll_echo_server.c:249: Server waiting for connections on port 42424

razvand@mantis:~/.../kraftcloud/catalog$ nc localhost 42424
a
a
b
b
c
c
d
d
e
e
f
f
g
g
h
h

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions