lksctp-tools icon indicating copy to clipboard operation
lksctp-tools copied to clipboard

test_tcp_style_v6 failed with setsockopt (11): Invalid argument

Open Mingli-Yu opened this issue 4 years ago • 3 comments

$ ./test_tcp_style_v6 test_tcp_style.c 1 PASS : accept on non-listening socket test_tcp_style.c 2 PASS : connect to non-listening socket test_tcp_style.c 3 PASS : connect to listening socket test_tcp_style.c 4 PASS : connect after max backlog test_tcp_style.c 5 PASS : accept from listening socket test_tcp_style.c 6 PASS : connect on an established socket test_tcp_style.c 7 PASS : accept on an established socket test_tcp_style.c 8 PASS : client sockets -> accepted sockets test_tcp_style.c 9 PASS : accepted sockets -> client sockets test_tcp_style.c 10 PASS : send on a listening socket test_tcp_style.c 11 PASS : recv on a listening socket test_tcp_style.c 12 BROK : setsockopt(11): Invalid argument DUMP_CORE ./sctputil.h: 257 [ 1277.011612] test_tcp_style_[1528]: segfault at 0 ip 0000560f4f6f8e4b sp 00007ffd578aded0 error 6 in test_tcp_style_v6[560f4f6f6000+4000] [ 1277.013442] Code: ff bf 0a 00 00 00 e8 24 d2 ff ff b9 01 01 00 00 bf 01 00 00 00 31 c0 48 8d 15 5b 1b 00 00 48 8d 35 f3 11 00 00 e8 25 d31 Segmentation fault

Mingli-Yu avatar Oct 26 '20 06:10 Mingli-Yu

test_tcp_style.c 12 BROK : setsockopt(11): Invalid argument DUMP_CORE ./sctputil.h: 257 [ 1277.011612] test_tcp_style_[1528]: segfault at 0 ip 0000560f4f6f8e4b sp 00007ffd578aded0 error 6 in test_tcp_style_v6[560f4f6f6000+4000] [ 1277.013442] Code: ff bf 0a 00 00 00 e8 24 d2 ff ff b9 01 01 00 00 bf 01 00 00 00 31 c0 48 8d 15 5b 1b 00 00 48 8d 35 f3 11 00 00 e8 25 d31 Segmentation fault

It broke like this here because there was a miscommunication with the kernel. Then lksctp tests core dump in order to ease the debugging. Which kernel are you using for these tests?

marceloleitner avatar Oct 26 '20 13:10 marceloleitner

The kernel version in my env is 5.4.69.

Mingli-Yu avatar Oct 27 '20 08:10 Mingli-Yu

Ok. That seems to be related to the changes applied to struct sctp_event_subscribe.

marceloleitner avatar Oct 27 '20 12:10 marceloleitner