martinzink commented on a change in pull request #994: URL: https://github.com/apache/nifi-minifi-cpp/pull/994#discussion_r572079690
########## File path: nanofi/tests/CSite2SiteTests.cpp ########## @@ -167,7 +173,9 @@ void different_version_bootstrap(minifi::io::BaseStream* stream, TransferState& } TEST_CASE("TestSiteToBootStrap", "[S2S3]") { - +#ifndef WIN32 + signal(SIGPIPE, SIG_IGN); Review comment: Sure, a SIGPIPE is sent to a process if it tried to write to a socket that had been shutdown for writing or isn't connected (anymore), this can easily happen in multithreaded enviroment. The issue is that on macOS the default sigpipe handler crashes the application. In production code we are already ignoring this signal by setting the sigpipe handle to nothing. see https://github.com/apache/nifi-minifi-cpp/blob/main/main/MiNiFiMain.cpp#L181 Given that in production code we are ignoring the signal, I think it would be best to ignore it here as well. I've tested this on my fork with custom CI, on both macos-xcode12.0 and macos-xcode11.2.1 with 200 runs `make test ARGS="--timeout 300 -j4 --output-on-failure -R CSite2SiteTests --repeat-until-fail 200` Without the fix both configuration failed (both around the 100th run), with the fix they passed 3 times (that's 1200 runs without failure) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org