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

http_client test failing on mac with a segfault. #903

Closed
Lord-Kamina opened this issue Oct 10, 2018 · 6 comments
Closed

http_client test failing on mac with a segfault. #903

Lord-Kamina opened this issue Oct 10, 2018 · 6 comments

Comments

@Lord-Kamina
Copy link

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

@BillyONeal
Copy link
Member

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

@Lord-Kamina
Copy link
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.

@BillyONeal
Copy link
Member

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

@Lord-Kamina
Copy link
Author

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

@Lord-Kamina
Copy link
Author

95409c5 is passing all tests now on macOS 10.14

@BillyONeal
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants