Sylwester Lachiewicz created THRIFT-6385:
--------------------------------------------

             Summary: TNonblockingServerTest 
allocation_failure_on_the_io_thread_does_not_end_the_process always fails on 
macOS
                 Key: THRIFT-6385
                 URL: https://issues.apache.org/jira/browse/THRIFT-6385
             Project: Thrift
          Issue Type: Bug
          Components: C++ - Library
    Affects Versions: 0.25.0
            Reporter: Sylwester Lachiewicz
             Fix For: 0.26.0


The case forks and caps the child's address space with {{setrlimit(RLIMIT_AS, 
...)}}, and the child exits with 2 when that call fails. macOS does not accept 
an RLIMIT_AS limit and returns EINVAL, so the child always exits 2 and the case 
fails:

{noformat}
TNonblockingServerTest.cpp:507: error: in 
"TNonblockingServerTest/allocation_failure_on_the_io_thread_does_not_end_the_process":
 check (((*(int *)&(status)) >> 8) & 0x000000ff) == 0 has failed [2 != 0]
{noformat}

Reproduced three times out of three with the autotools build of master on macOS 
27 (Apple clang 21, libevent 2.1.13); a standalone {{setrlimit(RLIMIT_AS, 
...)}} returns EINVAL there as well. The case is guarded by {{#ifndef _WIN32}} 
only, while another case in 
[lib/cpp/test/TNonblockingServerTest.cpp|https://github.com/apache/thrift/blob/master/lib/cpp/test/TNonblockingServerTest.cpp]
 is limited to {{__linux__}}. It came in with 
[0b9e7d808|https://github.com/apache/thrift/commit/0b9e7d808]. It is not the 
intermittent Windows failure of THRIFT-6244.

The case could report itself as skipped when the limit cannot be set, or be 
limited to platforms that support RLIMIT_AS.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to