-
Notifications
You must be signed in to change notification settings - Fork 30
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
liking the potential here seem to have found a potential issue with assert in evt_tls_feed_data #13
Comments
one note on the test_tls.c the on_write callback I commented out the uv_tls_close to have the echo server continue otherwise I couldn't load test and this exposed the large frames issue. Thx! |
Thanks for reporting this issue and description. |
apt get install tcpkali on 16.04 :) Will test the change thx. |
So looks better, the tcpkali test works well except it triggers a SIGPIPE which takes the process down. What is the best way to handle SIGPIPE so that the code doesn't go down after a disconnect...etc? Program received signal SIGPIPE, Broken pipe. |
Looks like as tcpkali has closed the socket and libuv is trying to write. This need to be handled.
|
actually I didn't I checked out master at 3c3175e41 i then just did ./configure and make/make install sorry thought it was apt get install ;) I do have the updated toolchain so that may explain a newer g++ ? I forget what the default is on 16.04 LTS http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu this is from the config log Target: x86_64-linux-gnu |
On SIGPIPE, libuv suggests to ignore it via So, we will ignore it and libuv will report |
looks like this issue is resolved going to close... Now onto handling many many concurrent conns.... |
The code for SIGPIPE is not committed yet. How does it resolved? |
you are welcome to keep the issue open as it is your project afterall, I added SIGPIPE ignore locally and that covers the issue for me :) |
if you test your libuv ./evt with openssl s_client or something like that it works fine however in trying to load test I get an assert and a program crash in debugging it appears the example code cannot handle when the stream is full right out of the gate?
repro with tcpkali util on ubuntu 16.04
tcpkali --workers 1 -c 1 -T 10s -1 "hello" -m "test" --ssl 127.0.0.1:8000
I added a bit of debug to on_tcp_read to see whats going on.... Seems like we need to feed another read/write to process the buffer and then consume the rest of the tls stream? Thx
Listening on 8000
on_tcp_read data len:65536 nrd:305
on_tcp_read data len:65536 nrd:318
on_tcp_read data len:65536 nrd:65536
evt: ../..//src/evt_tls.c:279: evt_tls_feed_data: Assertion `rv == sz' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff7178428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff7178428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007ffff717a02a in __GI_abort () at abort.c:89
#2 0x00007ffff7170bd7 in __assert_fail_base (fmt=, assertion=assertion@entry=0x41fe2d "rv == sz", file=file@entry=0x41fcb0 "../..//src/evt_tls.c", line=line@entry=279,
function=function@entry=0x41ff40 <PRETTY_FUNCTION.15415> "evt_tls_feed_data") at assert.c:92
#3 0x00007ffff7170c82 in __GI___assert_fail (assertion=0x41fe2d "rv == sz", file=0x41fcb0 "../..//src/evt_tls.c", line=279, function=0x41ff40 <PRETTY_FUNCTION.15415> "evt_tls_feed_data") at assert.c:101
#4 0x0000000000404ebd in evt_tls_feed_data (c=0x6483c0, data=0x654a70, sz=65536) at ../..//src/evt_tls.c:279
#5 0x0000000000405553 in on_tcp_read (stream=0x648280, nrd=65536, data=0x7fffffffaff0) at uv_tls.c:75
#6 0x0000000000411057 in uv__read (stream=0x648280) at ../src/unix/stream.c:1178
#7 0x0000000000411312 in uv__stream_io (loop=0x6286c0 <default_loop_struct>, w=0x648308, events=1) at ../src/unix/stream.c:1241
#8 0x00000000004166d6 in uv__io_poll (loop=0x6286c0 <default_loop_struct>, timeout=-1) at ../src/unix/linux-core.c:345
#9 0x0000000000408034 in uv_run (loop=0x6286c0 <default_loop_struct>, mode=UV_RUN_DEFAULT) at ../src/unix/core.c:341
#10 0x000000000040442e in main () at test_tls.c:64
(gdb) frame 4
#4 0x0000000000404ebd in evt_tls_feed_data (c=0x6483c0, data=0x654a70, sz=65536) at ../..//src/evt_tls.c:279
279 assert( rv == sz);
(gdb) print rv
$1 = 17408
The text was updated successfully, but these errors were encountered: