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 30285 - Various (previously silently ignored?) unittest failures since r280455
Summary: Various (previously silently ignored?) unittest failures since r280455
Status: RESOLVED WONTFIX
Alias: None
Product: compiler-rt
Classification: Unclassified
Component: compiler-rt (show other bugs)
Version: unspecified
Hardware: PC MacOS X
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-05 15:39 PDT by Ahmed Bougacha
Modified: 2018-06-11 20:15 PDT (History)
6 users (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 Ahmed Bougacha 2016-09-05 15:39:18 PDT
Some of them appear to be previously undetected problems with bad RPATHs for asan (this should be fixed by https://reviews.llvm.org/D24184), but I've been investigating a different error with asan unittests on OS X.

See http://lists.llvm.org/pipermail/llvm-dev/2016-September/104431.html for more details.
Comment 1 Ahmed Bougacha 2016-09-05 16:00:24 PDT
Downgraded to a warning in:
  [llvm] r280674 - [lit] Downgrade error to warning on gtest crashes during discovery.
Comment 2 Ahmed Bougacha 2016-09-08 13:14:30 PDT
Minor update: I was able to reproduce the asan unittest error I was hitting, but only on OS X 10.10 machines, not 10.11 or 10.12.

This seems related to r241487:  for some reason, we don't DYLD_INSERT_LIBRARIES the asan dylib in the unittests, and on 10.10, that disables interception, causing inconsistent asan errors.
Manually adding it lets the unittests run successfully.

I suspect we need OS X DYLD_INSERT_LIBRARIES logic similar to LD_LIBRARY_PATH in the asan lit config.
Comment 3 Ahmed Bougacha 2016-09-15 12:36:52 PDT
I narrowed the asan problem down to r263695: it disabled the re-exec support for all unittests (it previously was only disabled for noinst tests).
Comment 4 Kuba Mracek 2016-09-15 12:45:30 PDT
Can you tell me what exactly is failing?  The mentioned email thread discusses a failure on a Linux bot, but here you’re saying that this is a OS X 10.10-specific failure.  I do have a 10.10 machine and it “check-all” seems to work fine.
Comment 5 Ahmed Bougacha 2016-09-15 12:53:39 PDT
Lit used to ignore crashing unittests, but now errors out.  This masked several different issues.  I downgraded the lit error to a warning in r280674, so we're back to masking the test failures.  This is why check-all passes.

The various Linux bot failures should all have been fixed by r280791.  The asan 10.10 issue is different, and is not fixed yet.  For check-asan, you'll see lit warnings with "unable to discover google-tests" with cryptic asan errors.

I believe that's caused by r263695 disabling the re-exec on missing DYLD_INSERT_LIBRARIES for the instrumented tests.  Does that make sense?
Comment 6 Kuba Mracek 2016-09-17 03:51:07 PDT
You’re right, I can reproduce this. It’s a bit unfortunate that the instrumented and non-instrumented tests work very differently. Submitted <https://reviews.llvm.org/D24699> for review.
Comment 7 Vitaly Buka 2018-06-11 20:15:00 PDT
I assume this is fixed or obsolete?