v1siuol opened a new issue #1533: URL: https://github.com/apache/incubator-brpc/issues/1533
**Describe the bug (描述bug)** `./bthread_fd_unittest --gtest_filter=FDTest.invalid_epoll_events* # failed test` **To Reproduce (复现方法)** I clone the latest project from master, following the instructions in docs, including installing the dependencies, compiling brpc using `config_brpc.sh`, and then running the tests. e.g. ``` git clone [email protected]:apache/incubator-brpc.git cd incubator-brpc sudo apt-get install -y git g++ make libssl-dev libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev sudo apt-get install -y libsnappy-dev sudo apt-get install -y libgoogle-perftools-dev sudo apt-get install -y cmake libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libgtest* /usr/lib/ && cd - $ sh config_brpc.sh --headers=/usr/include --libs=/usr/lib $ make $ cd test $ make $ sh run_tests.sh ``` **Expected behavior (期望行为)** test: pass **Versions (各种版本)** OS: Ubuntu 18.04.5 LTS (under WSL2) Compiler: `gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) # g++ -v` brpc: 74db116c9e9345a3712c26793883b18e2992d3ff protobuf: `libprotoc 3.0.0 # protoc --version` **Additional context/screenshots (更多上下文/截图)** #### log ``` $ ./bthread_fd_unittest --gtest_filter=FDTest.invalid_epoll_events* Running main() from gtest_main.cc Note: Google Test filter = FDTest.invalid_epoll_events* [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from FDTest [ RUN ] FDTest.invalid_epoll_events F0818 22:16:10.796807 14962 src/bthread/fd.cpp:433] Check failed: (uint32_t)poll_events == epoll_events (0 vs 2147483648). #0 0x7f50ccd37321 bthread::epoll_to_poll_events() #1 0x7f50ccd373ef bthread::pthread_fd_wait() #2 0x7f50ccd37501 bthread_fd_wait #3 0x5619a6cf1660 (anonymous namespace)::FDTest_invalid_epoll_events_Test::TestBody() #4 0x5619a6d21455 testing::internal::HandleSehExceptionsInMethodIfSupported<>() #5 0x5619a6d1b45d testing::internal::HandleExceptionsInMethodIfSupported<>() #6 0x5619a6cff36a testing::Test::Run() #7 0x5619a6cffca0 testing::TestInfo::Run() #8 0x5619a6d0032a testing::TestCase::Run() #9 0x5619a6d071f6 testing::internal::UnitTestImpl::RunAllTests() #10 0x5619a6d2261b testing::internal::HandleSehExceptionsInMethodIfSupported<>() #11 0x5619a6d1c299 testing::internal::HandleExceptionsInMethodIfSupported<>() #12 0x5619a6d05dba testing::UnitTest::Run() #13 0x5619a6d308b5 RUN_ALL_TESTS() #14 0x5619a6d30844 main #15 0x7f50cc1b3bf7 __libc_start_main #16 0x5619a6ced9ea _start I0818 22:16:10.809144 14970 src/bthread/fd.cpp:330] Use DEL+ADD instead of EPOLLONESHOT+MOD due to kernel bug. Performance will be much lower. F0818 22:16:10.983916 14962 src/bthread/fd.cpp:433] Check failed: (uint32_t)poll_events == epoll_events (1 vs 2147483649). #0 0x7f50ccd37321 bthread::epoll_to_poll_events() #1 0x7f50ccd373ef bthread::pthread_fd_wait() #2 0x7f50ccd37501 bthread_fd_wait #3 0x5619a6cf190f (anonymous namespace)::FDTest_invalid_epoll_events_Test::TestBody() #4 0x5619a6d21455 testing::internal::HandleSehExceptionsInMethodIfSupported<>() #5 0x5619a6d1b45d testing::internal::HandleExceptionsInMethodIfSupported<>() #6 0x5619a6cff36a testing::Test::Run() #7 0x5619a6cffca0 testing::TestInfo::Run() #8 0x5619a6d0032a testing::TestCase::Run() #9 0x5619a6d071f6 testing::internal::UnitTestImpl::RunAllTests() #10 0x5619a6d2261b testing::internal::HandleSehExceptionsInMethodIfSupported<>() #11 0x5619a6d1c299 testing::internal::HandleExceptionsInMethodIfSupported<>() #12 0x5619a6d05dba testing::UnitTest::Run() #13 0x5619a6d308b5 RUN_ALL_TESTS() #14 0x5619a6d30844 main #15 0x7f50cc1b3bf7 __libc_start_main #16 0x5619a6ced9ea _start bthread_fd_unittest.cpp:477: Failure Expected: (tm.m_elapsed()) < (20), actual: 185 vs 20 [ FAILED ] FDTest.invalid_epoll_events (373 ms) [----------] 1 test from FDTest (373 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (373 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] FDTest.invalid_epoll_events 1 FAILED TEST ``` #### kernel_version ``` sysname=Linux nodename=DESKTOP-bb release=5.4.72-microsoft-standard-WSL2 version=#1 SMP Wed Oct 28 23:40:43 UTC 2020 machine=x86_64 ``` 我感觉是我环境哪里出了问题,但我不知道.. 我之前提交过一个 PR,当时在本地写那个 PR 的时候这个测试就过不了了,但其实 CI 是过得去的。尝试过`make clean && make`但也没有成功。不知道大家有没有什么想法。 -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
