In the testcase TestExprDoesntBlock.py, the inferior sometimes (but not always) receives a SIGSEGV during expression evaluation. The siginfo structure that LLDB gets from the kernel has an invalid si_code value (128 == SI_KERNEL). According to siginfo docs, si_code == SI_KERNEL means that the signal was sent by the kernel -- but not because a protected or otherwise invalid address was accessed. Most likely this is happening because of some ptrace() mis-use somewhere. While it would be trivial to handle SI_KERNEL and add an appropriate exit-description string to ProcessMessage.[h|cpp] we want to find out why SI_KERNEL is being sent to this test case, and why it is not happening always. Skipping the test case until someone else has time to look at it further.
Addressed with r188075 though why we receive the signal spuriously is still unknown.
Should this test be reenabled on Linux now? It fails on FreeBSD with my threads WIP, with File "/tank/emaste/src/llvm/tools/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py", line 67, in expr_doesnt_deadlock self.assertTrue (var.GetValueAsSigned (0) == 567) AssertionError: False is not True
The crash is no longer happening on Linux, as far as I can tell. However, this test cannot be re-enabled because it fails intermittently on Linux at the same point as Ed reported. It looks like the expression that requires unblocking all the threads is failing to evaluate sometimes. It doesn't appear to be an issue of the threads being starved because bumping the timeout up (from the default 0.5s to 5s) does not have any effect on the test.
It now appears that this test passes on FreeBSD if run in isolation, but fails regularly if the whole test suite is run
Tested against top of tree lldb svn r202448. Ran TestExprDoesntBlock.py 10 times in a row, succeeded on Ubuntu 12.04 LTS x86_64, lldb built with gcc 4.8.2 and July 2013 libedit. Enabled with r202456.
r202517 - changed TestExprDoesntBlock.py to expected failure on Linux. I'm not sure how I got it running successfully before - I believe it must have been a bogus test run. This now consistently fails for me on Linux.
Given comment #6, I'm reopening this.
tested with x86_64 ubuntu 14.04 gcc/clang-3.5