LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 17946 - test_with_dwarf_and_run_command (TestExprDoesntBlock.ExprDoesntDeadlockTestCase) fails on FreeBSD with threaded inferior support
Summary: test_with_dwarf_and_run_command (TestExprDoesntBlock.ExprDoesntDeadlockTestCa...
Status: NEW
Alias: None
Product: lldb
Classification: Unclassified
Component: All Bugs (show other bugs)
Version: unspecified
Hardware: PC FreeBSD
: P normal
Assignee: emaste
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-15 09:43 PST by emaste
Modified: 2020-12-07 06:39 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emaste 2013-11-15 09:43:58 PST
Submitting a PR for this specific issue as I will soon commit the FreeBSD threaded inferior support and this testcase is one of 3 failures left.


['dotest.py', '--executable', '/tank/emaste/src/llvm/tools/lldb/test/../../../build-nodebug/bin/lldb', '-C', '/usr/bin/clang', '-v', '-t', '-f', 'ExprDoesntDeadlockTestCase.test_with_dwarf_and_run_command']
LLDB library dir: /tank/emaste/src/llvm/tools/lldb/test/../../../build-nodebug/bin
lldb version 3.4 (git@github.com:fbsd/lldb.git revision 901f2135a6c9f117d524447f95aba0b60cbeb6f9)
lldb.pre_flight: None
lldb.post_flight: None

Session logs for test failures/errors/unexpected successes will go into directory '2013-11-15-10_32_38'
Command invoked: python dotest.py --executable /tank/emaste/src/llvm/tools/lldb/test/../../../build-nodebug/bin/lldb -C /usr/bin/clang -v -t -f ExprDoesntDeadlockTestCase.test_with_dwarf_and_run_command (python2.7
compilers=['/usr/bin/clang']

Configuration: arch=amd64 compiler=/usr/bin/clang
----------------------------------------------------------------------
Collected 1 test

Change dir to: /tank/emaste/src/llvm/tools/lldb/test/functionalities/expr-doesnt-deadlock
1: test_with_dwarf_and_run_command (TestExprDoesntBlock.ExprDoesntDeadlockTestCase)
   Test that expr will time out and allow other threads to run if it blocks. ... 
os command: [['/bin/sh', '-c', 'gmake clean;gmake MAKE_DSYM=NO ARCH=amd64 CC=/usr/bin/clang']]
with pid: 65807
stdout: rm -rf "a.out" ""  locking.o locking.d   *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]
gmake: `a.out' is up to date.

stderr: 
retcode: 0


breakpoint: SBBreakpoint: id = 1, source regex = "Break here", locations = 1
FAILURE

os command: [['/usr/bin/clang', '-v']]
with pid: 65823
stdout: 
stderr: FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd9.2
Thread model: posix

retcode: 0


<bound method SBProcess.Kill of <lldb.SBProcess; proxy of <Swig Object of type 'lldb::SBProcess *' at 0x80c2be9f0> >>: success


os command: [['/bin/sh', '-c', 'gmake clean']]
with pid: 65824
stdout: rm -rf "a.out" ""  locking.o locking.d   *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]

stderr: 
retcode: 0


Restore dir to: /tank/emaste/src/llvm/tools/lldb/test

======================================================================
FAIL: test_with_dwarf_and_run_command (TestExprDoesntBlock.ExprDoesntDeadlockTestCase)
   Test that expr will time out and allow other threads to run if it blocks.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tank/emaste/src/llvm/tools/lldb/test/lldbtest.py", line 370, in wrapper
    return func(self, *args, **kwargs)
  File "/tank/emaste/src/llvm/tools/lldb/test/lldbtest.py", line 709, in wrapper
    func(*args, **kwargs)
  File "/tank/emaste/src/llvm/tools/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py", line 30, in test_with_dwarf_and_run_command
    self.expr_doesnt_deadlock()
  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
Config=amd64-/usr/bin/clang
----------------------------------------------------------------------
Ran 1 test in 5.099s

FAILED (failures=1)
Session logs for test failures/errors/unexpected successes can be found in directory '2013-11-15-10_32_38'
Comment 1 emaste 2013-11-15 09:45:23 PST
Note, this is currently skipped on Linux due to llvm.org/pr17946
Comment 2 emaste 2013-11-15 09:50:16 PST
Err, disabled on Linux due to:
llvm.org/pr15258: disabled due to assertion failure in ProcessMonitor::GetCrashReasonForSIGSEGV:
Comment 3 emaste 2020-11-04 09:54:34 PST
reported fixed on FreeBSD in https://reviews.llvm.org/D90757
Comment 4 emaste 2020-11-04 11:35:20 PST
Appears to be failing still when run manually:

$ bin/lldb-dotest -p TestExprDoesntBlock
/usr/local/bin/python3.7 /home/emaste/src/llvm-project/lldb/test/API/dotest.py --arch x86_64 -S nm -u CXXFLAGS -u CFLAGS --env ARCHIVER=/usr/bin/ar --env OBJCOPY=/usr/bin/objcopy -s /home/emaste/src/llvm-project/build/lldb-test-traces --build-dir /home/emaste/src/llvm-project/build/lldb-test-build.noindex --executable /home/emaste/src/llvm-project/build/./bin/lldb --compiler /home/emaste/src/llvm-project/build/./bin/clang --dsymutil /home/emaste/src/llvm-project/build/./bin/dsymutil --yaml2obj /home/emaste/src/llvm-project/build/./bin/yaml2obj --filecheck /home/emaste/src/llvm-project/build/./bin/FileCheck --lldb-libs-dir /home/emaste/src/llvm-project/build/./lib -p TestExprDoesntBlock
lldb version 12.0.0 (git@github.com:llvm/llvm-project.git revision f622fd1fcdd342bea4e024f617988c1e80dd018d)
  clang revision f622fd1fcdd342bea4e024f617988c1e80dd018d
  llvm revision f622fd1fcdd342bea4e024f617988c1e80dd018d
Libc++ tests will not be run because: Don't know how to build with libc++ on freebsd
libstdcxx tests will not be run because: Don't know how to build with libstdcxx on freebsd
Skipping following debug info categories: ['dwo', 'dsym', 'gmodules']

Session logs for test failures/errors/unexpected successes will go into directory '/home/emaste/src/llvm-project/build/lldb-test-traces'
UNSUPPORTED: LLDB (/home/emaste/src/llvm-project/build/bin/clang-x86_64) :: test_with_run_command_dsym (TestExprDoesntBlock.ExprDoesntDeadlockTestCase) (test case does not fall in any category of interest for this run) 
FAIL: LLDB (/home/emaste/src/llvm-project/build/bin/clang-x86_64) :: test_with_run_command_dwarf (TestExprDoesntBlock.ExprDoesntDeadlockTestCase)
UNSUPPORTED: LLDB (/home/emaste/src/llvm-project/build/bin/clang-x86_64) :: test_with_run_command_dwo (TestExprDoesntBlock.ExprDoesntDeadlockTestCase) (test case does not fall in any category of interest for this run) 
UNSUPPORTED: LLDB (/home/emaste/src/llvm-project/build/bin/clang-x86_64) :: test_with_run_command_gmodules (TestExprDoesntBlock.ExprDoesntDeadlockTestCase) (test case does not fall in any category of interest for this run) 
======================================================================
FAIL: test_with_run_command_dwarf (TestExprDoesntBlock.ExprDoesntDeadlockTestCase)
   Test that expr will time out and allow other threads to run if it blocks.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/emaste/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1823, in test_method
    return attrvalue(self)
  File "/usr/home/emaste/src/llvm-project/lldb/test/API/commands/expression/no-deadlock/TestExprDoesntBlock.py", line 57, in test_with_run_command
    self.assertEqual(var.GetValueAsSigned(0), 567)
AssertionError: 0 != 567
Config=x86_64-/home/emaste/src/llvm-project/build/bin/clang
----------------------------------------------------------------------
Ran 4 tests in 0.906s

RESULT: FAILED (0 passes, 1 failures, 0 errors, 3 skipped, 0 expected failures, 0 unexpected successes)
Comment 5 Michał Górny 2020-12-07 00:23:02 PST
Are you saying it doesn't fail when you run it via check-lldb-api-commands-expression-no-deadlock' target?
Comment 6 emaste 2020-12-07 06:39:07 PST
I believe I observed no failure when run as part of full check-lldb, but will check again.