Skip to content

"io_async_async_udp_socket_test.AsyncSocketIntegrationTest" tests crash intermittently #2364

Open
@sin-ack

Description

@sin-ack

The stack symbol points to:

callback->onListenStopped();
So I have a suspicion the problem lies in the notification arriving after acceptors_ is cleaned up in the UDPServer initialized at:
server = std::make_unique<UDPServer>(

1524/3375 Testing: io_async_async_udp_socket_test.AsyncSocketIntegrationTest.PingPongPauseResumeListening
1524/3375 Test: io_async_async_udp_socket_test.AsyncSocketIntegrationTest.PingPongPauseResumeListening
Command: "/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/io_async_async_udp_socket_test" "--gtest_filter=AsyncSocketIntegrationTest.PingPongPauseResumeListening"
Directory: /var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00
"io_async_async_udp_socket_test.AsyncSocketIntegrationTest.PingPongPauseResumeListening" start time: Jan 12 14:14 CET
Output:
----------------------------------------------------------
Note: Google Test filter = AsyncSocketIntegrationTest.PingPongPauseResumeListening
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from AsyncSocketIntegrationTest
[ RUN      ] AsyncSocketIntegrationTest.PingPongPauseResumeListening
I20250112 14:14:42.565850  8379 AsyncUDPSocketTest.cpp:463] Server listening=127.0.0.1:43185
*** Aborted at 1736687683 (Unix time, try 'date -d @1736687683') ***
*** Signal 11 (SIGSEGV) (0x7f11f8009) received by PID 8379 (pthread TID 0x7f11fe0532c0) (linux TID 8379) (code: address not mapped to object), stack trace: ***
/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/libfolly.so.0.58.0-dev(_ZN5folly10symbolizer17getStackTraceSafeEPmm+0x72) [0x7f11ff0b9982]
/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/libfolly.so.0.58.0-dev(_ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb+0x40) [0x7f11ff0bbe70]
/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/libfolly.so.0.58.0-dev(+0x2b8dd7) [0x7f11ff0b8dd7]
/lib64/libc.so.6(+0x40ccf) [0x7f11fe863ccf]
/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/io_async_async_udp_socket_test(_ZN5folly6detail8function5call_IZNS_20AsyncUDPServerSocket12onReadClosedEvEUlvE_Lb1ELb0EvJEEET2_DpT3_RNS1_4DataE+0x11) [0x56216ad542
31]
/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/libfolly.so.0.58.0-dev(_ZN5folly23AtomicNotificationQueueINS_8FunctionIFvvEEEE5driveIRNS_9EventBase10FuncRunnerEEEbOT_+0x1df) [0x7f11ff21e69f]
/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/libfolly.so.0.58.0-dev(_ZN5folly9EventBaseD1Ev+0xd3a) [0x7f11ff21a3ba]
/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/io_async_async_udp_socket_test(_ZN26AsyncSocketIntegrationTestD1Ev+0x9e) [0x56216ad9854e]
/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/io_async_async_udp_socket_test(_ZN60AsyncSocketIntegrationTest_PingPongPauseResumeListening_TestD0Ev+0x16) [0x56216ad98706]
/usr/lib64/libgtest.so.1.14.0(_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc+0x96) [0x7f11ff666f86]
/usr/lib64/libgtest.so.1.14.0(_ZN7testing8TestInfo3RunEv+0x125) [0x7f11ff64bd15]
/usr/lib64/libgtest.so.1.14.0(_ZN7testing9TestSuite3RunEv+0x2cc) [0x7f11ff64c07c]
/usr/lib64/libgtest.so.1.14.0(_ZN7testing8internal12UnitTestImpl11RunAllTestsEv+0x337) [0x7f11ff65a1c7]
/usr/lib64/libgtest.so.1.14.0(_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc+0x96) [0x7f11ff6676f6]
/usr/lib64/libgtest.so.1.14.0(_ZN7testing8UnitTest3RunEv+0x77) [0x7f11ff64c197]
/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/libfolly_test_support.so(main+0x5b) [0x7f11ff7079fb]
/lib64/libc.so.6(+0x2a3ed) [0x7f11fe84d3ed]
/lib64/libc.so.6(__libc_start_main+0x88) [0x7f11fe84d4a8]
/var/tmp/portage/dev-cpp/folly-2025.01.06.00/work/folly-2025.01.06.00_build/io_async_async_udp_socket_test(_start+0x24) [0x56216ad407b4]
(safe mode, symbolizer not available)
<end of output>
Test time =   0.56 sec
----------------------------------------------------------
Test Failed.
"io_async_async_udp_socket_test.AsyncSocketIntegrationTest.PingPongPauseResumeListening" end time: Jan 12 14:14 CET
"io_async_async_udp_socket_test.AsyncSocketIntegrationTest.PingPongPauseResumeListening" time elapsed: 00:00:00
----------------------------------------------------------

System information

OS: Gentoo Linux amd64 (x86_64-pc-linux-gnu)
Compiler: gcc (Gentoo Hardened 14.2.1_p20241221 p7) 14.2.1 20241221
C++ stdlib implementation: stdlibc++
Folly version: 2025.01.06.00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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