[ 
https://issues.apache.org/jira/browse/KUDU-3093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17069250#comment-17069250
 ] 

Adar Dembo commented on KUDU-3093:
----------------------------------

bq. So in RELEASE mode, we don't call the function SleeperThread()?

The code in SleeperThread() is executed regardless of mode. The issue is that 
in RELEASE mode, the compiler will be optimizing more aggressively (-O3 instead 
of -O0). One of the optimizations it performs inlines small functions inside 
other ones. In this particular case, it looks like SleeperThread() itself is 
being inlined into the lambda that wraps it. As a result, when we take a stack 
trace of the thread, there's no frame named SleeperThread, because its contents 
have been entirely inlined.

My guess is that when you added a LOG line, that had the side effect of forcing 
the function to NOT be inlined by the compiler, and it showed up in the stack 
trace.



> DebugUtilTest.TestSignalStackTrace of debug-util-test failed on aarch64
> -----------------------------------------------------------------------
>
>                 Key: KUDU-3093
>                 URL: https://issues.apache.org/jira/browse/KUDU-3093
>             Project: Kudu
>          Issue Type: Sub-task
>            Reporter: huangtianhua
>            Assignee: Adar Dembo
>            Priority: Major
>
> I test kudu on aarch64 server based on https://gerrit.cloudera.org/#/c/14964/ 
> , the test debug-util-test failed, for DEBUG build type, the test failed 
> sometimes, for RELEASE build type the test is hang on TestSignalStackTrace 
> testcase, I debug using gdb, get the error info as below:
> /home/jenkins/workspace/kudu/src/kudu/util/debug-util-test.cc:123: Failure
> Value of: DumpThreadStack(t->tid())
> Expected: has substring "SleeperThread"
>   Actual: "    @     0xffff7fa1c688  ([vdso]+0x687)\n    @     0xffff7f73d548 
>  __pthread_cond_timedwait\n    @      0xaaaab5f41e7c  
> kudu::ConditionVariable::WaitUntil()\n    @     0xaaaab5ef05a0  
> _ZNSt17_Function_handlerIFv 
> vEZN4kudu39DebugUtilTest_TestSignalStackTrace_Test8TestBodyEvEUlvE_E9_M_invokeERKSt9_Any_data\n
>     @     0xaaaa b5f95120  kudu::Thread::SuperviseThread()\n    @     
> 0xffff7f737088  start_thread\n    @     0xffff7f737088  st art_thread\n"
> /home/jenkins/workspace/kudu/src/kudu/util/test_util.cc:348: Failure
> Failed
> Timed out waiting for assertion to pass.
> I0327 07:46:04.605425 17375 test_util.cc:146] 
> -----------------------------------------------
> I0327 07:46:04.605443 17375 test_util.cc:147] Had fatal failures, leaving 
> test files at /tmp/kudutest-0/debug-u 
> til-test.DebugUtilTest.TestSignalStackTrace.1585295134509818-17375
> [  FAILED  ] DebugUtilTest.TestSignalStackTrace (30094 ms)
> [----------] 1 test from DebugUtilTest (30094 ms total)
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (30094 ms total)
> [  PASSED  ] 0 tests.
> [  FAILED  ] 1 test, listed below:
> [  FAILED  ] DebugUtilTest.TestSignalStackTrace
>  1 FAILED TEST
> Don't know why the result is defferent for DEBUG and RELEASE,  seems only 
> onething I can find: 
> https://github.com/apache/kudu/blob/master/src/kudu/gutil/once.cc#L21-L30 But 
> it looks no effect, right? Could someone help us to have a look for this? 
> Thanks very much.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to