Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
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

Closed

Description

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

Activity

  1. BillyONeal commented on Oct 18, 2018

    @BillyONeal
    Member

    Does it still repro for you with master? I just merged a fix for a bunch of flaky test problems.

  2. Lord-Kamina commented on Oct 18, 2018

    @Lord-Kamina
    Author

    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.

  3. BillyONeal commented on Oct 18, 2018

    @BillyONeal
    Member

    Right, that's because there were product bugs; the tests were catching legitimate races and memory corruption bugs in cpprestsdk proper.

  4. Lord-Kamina commented on Oct 18, 2018

    @Lord-Kamina
    Author

    Will try them again tonight when I get off work then.

  5. Lord-Kamina commented on Oct 19, 2018

    @Lord-Kamina
    Author

    95409c5 is passing all tests now on macOS 10.14

  6. BillyONeal commented on Oct 19, 2018

    @BillyONeal
    Member

    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.

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