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

1 curl https request strace #34

Closed
ddosoff opened this issue Feb 9, 2019 · 5 comments
Closed

1 curl https request strace #34

ddosoff opened this issue Feb 9, 2019 · 5 comments
Labels

Comments

@ddosoff
Copy link

ddosoff commented Feb 9, 2019

Hello Alex,

I tried to do 1 curl requst to SSLApp from examples/HelloWorlds.js:

$ curl -k https://localhost:9001/

It seems something wrong in the event loop request handling logic:

1549719277.970468 accept4(20, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = 21
1549719277.970569 epoll_ctl(3, EPOLL_CTL_ADD, 21, {EPOLLIN, {u32=4294967295, u64=1791001362431}}) = 0
1549719277.970664 epoll_ctl(3, EPOLL_CTL_DEL, 21, 0x7fffac471a20) = 0
1549719277.970690 ioctl(21, FIONBIO, [1]) = 0
1549719277.970713 epoll_ctl(3, EPOLL_CTL_DEL, 21, 0x7fffac471a40) = -1 ENOENT (No such file or directory)
1549719277.970737 setsockopt(21, SOL_TCP, TCP_NODELAY, [1], 4) = 0
1549719277.970776 accept4(20, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
1549719277.970813 epoll_ctl(3, EPOLL_CTL_ADD, 21, {EPOLLIN, {u32=21, u64=563242011197461}}) = 0
1549719277.970837 epoll_pwait(3, [{EPOLLIN, {u32=21, u64=563242011197461}}], 1024, 950, NULL, 8) = 1
1549719277.975440 recvfrom(21, "\26\3\1\0\317\1\0\0\313\3\3X\2776\256\234\356\22d\377t)\t9\\\352\216\3E\353Q\16"..., 524288, 0, NULL, NULL) = 212
...

After accept4 file descriptor 21 we do EPOLL_CTL_ADD then EPOLL_CTL_DEL twice, then accept4 again.

Please correct this behavior, this is not only waste of time. Some bigger problem inside.

@ddosoff
Copy link
Author

ddosoff commented Feb 9, 2019

In the end double DEL too:

1549719277.977965 recvfrom(21, "\25\3\3\0\32\370\207{\"\320\34\225u\340\3622\2672\2105v\310\5\317\250\355%2;\325\277", 524288, 0, NULL, NULL) = 31
1549719277.978002 epoll_ctl(3, EPOLL_CTL_DEL, 21, 0x7fffac471a50) = 0
1549719277.978024 epoll_ctl(3, EPOLL_CTL_DEL, 21, 0x7fffac471a50) = -1 ENOENT (No such file or directory)
1549719277.978046 close(21)             = 0

@ghost ghost transferred this issue from uNetworking/uWebSockets.js Feb 9, 2019
@ghost ghost added the invalid label Feb 9, 2019
@ghost
Copy link

ghost commented Feb 9, 2019

Maybe you shouldn't be so assertive about low level behavior when you're basically just guessing. This behavior is polling based, isolated to one single small file - and only affects libuv. So, let's debug and see if this is libuv behavior? Hmmmm... yes! It is. Closing this report as invalid. Two strikes now, do more research before yelling at everything you see.

@ghost ghost closed this as completed Feb 9, 2019
@ddosoff
Copy link
Author

ddosoff commented Feb 10, 2019

Why uWebSockets.js use libuv?

@rnbrady
Copy link

rnbrady commented Nov 3, 2020

@ddosoff may I ask which command you used to obtain such logs?

@ghost
Copy link

ghost commented Nov 3, 2020

Strace

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants