You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
http_client test failing on mac with a segfault. #903
Making a macports portfile, on 2.10.6, testing has following output:
Running tests...
/opt/local/bin/ctest --force-new-ctest-process
Test project /opt/local/var/macports/build/_opt_portfiles_www_cpprestsdk/cpprestsdk/work/build
Start 1: httpclient_test
1/7 Test #1: httpclient_test ..................***Exception: SegFault 29.16 sec
All other tests pass.
Running those tests manually via test_runner, I get this:
Test case request_helper_tests:overwrite_user_agent PASSED
Starting test case request_stream_tests:set_body_stream_1...
/opt/local/var/macports/build/_opt_portfiles_www_cpprestsdk/cpprestsdk/work/cpprestsdk-2.10.6/Release/tests/functional/http/client/request_stream_tests.cpp:96: error: Failure in set_body_stream_1: Unhandled exception: No such file or directory: No such file or directory FAILED
Test case request_stream_tests:set_body_stream_1 FAILED
Starting test case request_stream_tests:set_body_stream_2...
/opt/local/var/macports/build/_opt_portfiles_www_cpprestsdk/cpprestsdk/work/cpprestsdk-2.10.6/Release/tests/functional/http/client/request_stream_tests.cpp:123: error: Failure in set_body_stream_2: Unhandled exception: No such file or directory: No such file or directory FAILED
Test case request_stream_tests:set_body_stream_2 FAILED
Starting test case request_stream_tests:without_content_length_1...
/opt/local/var/macports/build/_opt_portfiles_www_cpprestsdk/cpprestsdk/work/cpprestsdk-2.10.6/Release/tests/functional/http/client/request_stream_tests.cpp:193: error: Failure in without_content_length_1: Unhandled exception: No such file or directory: No such file or directory FAILED
libc++abi.dylib: terminating
Trace/BPT trap: 5
Unfortunately the tests remain a bit flaky because the experimental::asio_http_listener is used to test the client -- and that is full of race conditions and memory corruption bugs :(. The client is the thing we actually care about and I haven't found memory corruption bugs in that yet at least.
Since the specific easily reproducable problem is gone I'll close this for now.
Activity
BillyONeal commentedon Oct 18, 2018
Does it still repro for you with master? I just merged a fix for a bunch of flaky test problems.
Lord-Kamina commentedon Oct 18, 2018
I will check tonight but I'd say probably yes, from a quick look at your commit, it doesn't seem to touch the files mentioned in the log I posted.
BillyONeal commentedon Oct 18, 2018
Right, that's because there were product bugs; the tests were catching legitimate races and memory corruption bugs in cpprestsdk proper.
Lord-Kamina commentedon Oct 18, 2018
Will try them again tonight when I get off work then.
Lord-Kamina commentedon Oct 19, 2018
95409c5 is passing all tests now on macOS 10.14
BillyONeal commentedon Oct 19, 2018
Unfortunately the tests remain a bit flaky because the experimental::asio_http_listener is used to test the client -- and that is full of race conditions and memory corruption bugs :(. The client is the thing we actually care about and I haven't found memory corruption bugs in that yet at least.
Since the specific easily reproducable problem is gone I'll close this for now.