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

ntsu_socketutil.t 18 hangs on ::recvmsg if executed in a loop #36

Open
smtrfnv opened this issue Apr 30, 2023 · 0 comments
Open

ntsu_socketutil.t 18 hangs on ::recvmsg if executed in a loop #36

smtrfnv opened this issue Apr 30, 2023 · 0 comments

Comments

@smtrfnv
Copy link
Contributor

smtrfnv commented Apr 30, 2023

Describe the bug
Repetative execution of test case 18 in ntsu_socketutil.t leads to the process being blocket on ::recvmsg

To Reproduce
for i in {1..100000}; do echo "Iteration $i" && ./ntsu_socketutil.t 18; done | tee out.txt

Expected behavior
All iterations are passed without an error

gdb output

(gdb) bt
#0  __recvmsg_syscall (flags=0, msg=0x7ffe56e5d240, fd=3) at ../sysdeps/unix/sysv/linux/recvmsg.c:27
#1  __libc_recvmsg (fd=3, msg=0x7ffe56e5d240, flags=0) at ../sysdeps/unix/sysv/linux/recvmsg.c:41
#2  0x000056050110bc33 in BloombergLP::ntsu::SocketUtil::receive (context=0x7ffe56e5d910, buffer=0x7ffe56e5dab0,
    options=..., socket=3) at /home/kot/bloomberg/ntf-core/groups/nts/ntsu/ntsu_socketutil.cpp:2364
#3  0x000056050110d16f in BloombergLP::ntsu::SocketUtil::receive (context=0x7ffe56e5d910, data=0x7ffe56e5dab0,
    options=..., socket=3) at /home/kot/bloomberg/ntf-core/groups/nts/ntsu/ntsu_socketutil.cpp:2943
#4  0x00005605010eee00 in runTestCase18 () at /home/kot/bloomberg/ntf-core/groups/nts/ntsu/ntsu_socketutil.t.cpp:5877
#5  0x00005605010f110a in runTest (testCase=18, verbosity=0)
    at /home/kot/bloomberg/ntf-core/groups/nts/ntsu/ntsu_socketutil.t.cpp:6075
#6  0x00005605010f1301 in main (argc=2, argv=0x7ffe56e5e0f8)
    at /home/kot/bloomberg/ntf-core/groups/nts/ntsu/ntsu_socketutil.t.cpp:6077

ntsu_socketutil.cpp:2364 is

ntsa::Error SocketUtil::receive(ntsa::ReceiveContext*       context,
                                ntsa::MutableBuffer*        buffer,
                                const ntsa::ReceiveOptions& options,
                                ntsa::Handle                socket)
....
    ssize_t recvmsgResult =
        ::recvmsg(socket, &msg, NTSU_SOCKETUTIL_RECVMSG_FLAGS);
....

Environment:
I am able to reproduce it using:

  • Ubuntu 22.04 WSL (Linux cn-0012 5.10.102.1-microsoft-standard-WSL2)
  • VirtualBox CentOS8 (Linux centos8.localdomain 4.18.0-448.el8.x86_64)

Additional context
Release 2.0.0 is used (efe90a2)
The issue happens even if RX timestamping test code is removed

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

No branches or pull requests

1 participant