New issue
Advanced search Search tips

Issue 674435 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug

Blocking:
issue 674274



Sign in to add a comment

most tests fail on ClangToTMacASan tester

Project Member Reported by thakis@chromium.org, Dec 15 2016

Issue description

Started here https://build.chromium.org/p/chromium.fyi/builders/ClangToTMacASan%20tester/builds/3587

I had hoped that this is just some flake, but it happened again, and it also happened on my roll attempt here https://codereview.chromium.org/2580663002/

Literally everything else is happy, so probably something in the mac asan runtime.

Good r289651, bad llvm r289727.

`svn log -r289651:289727 https://nico@llvm.org/svn/llvm-project/compiler-rt` => probably r289690?
 

Comment 1 by thakis@chromium.org, Dec 15 2016

Maybe the additional instrumentation found a real bug that we can just fix or suppress?

Comment 2 by thakis@chromium.org, Dec 15 2016

As far as I can tell all these stacks start at net::X509Certificate::CreateOSCertHandleFromBytes and then end in mig_strncpy. Here's a stack:

==1502==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004 (pc 0x7fff8f42bd14 bp 0x7fff51c6e270 sp 0x7fff51c6e168 T0)
==1502==The signal is caused by a READ memory access.
==1502==Hint: address points to the zero page.
    #0 0x7fff8f42bd13 in mig_strncpy (in libsystem_kernel.dylib) + 17
    #1 0x7fff8c6f2edb in bootstrap_look_up3 (in liblaunch.dylib) + 59
    #2 0x7fff8c6f2f94 in bootstrap_look_up2 (in liblaunch.dylib) + 39
    #3 0x7fff90b0c4a7 in Security::MachPlusPlus::Bootstrap::lookup2(char const*) const (in Security) + 43
    #4 0x7fff90b241ad in Security::SecurityServer::ClientSession::findSecurityd() (in Security) + 159
    #5 0x7fff90b23fb6 in Security::SecurityServer::ClientSession::Global::Global() (in Security) + 70
    #6 0x7fff90b23f53 in Security::ModuleNexus\u003CSecurity::SecurityServer::ClientSession::Global>::make() (in Security) + 27
    #7 0x7fff90c80a48 in Security::ModuleNexusCommon::do_create(void* (*)()) (in Security) + 10
    #8 0x7fff8586828c in _dispatch_client_callout (in libdispatch.dylib) + 7
    #9 0x7fff858681fb in dispatch_once_f (in libdispatch.dylib) + 78
    #10 0x7fff90acd031 in Security::ModuleNexusCommon::create(void* (*)()) (in Security) + 101
    #11 0x7fff90ae3f0a in Security::ModuleNexus\u003CSecurity::SecurityServer::ClientSession::Global>::operator()() (in Security) + 42
    #12 0x7fff90ae3d80 in Security::SecurityServer::ClientSession::activate() (in Security) + 80
    #13 0x7fff90b23e2a in Security::MDSSession::DbOpen(char const*, cssm_net_address const*, unsigned int, Security::AccessCredentials const*, void const*, long&) (in Security) + 124
    #14 0x7fff90b23d32 in mds_DbOpen(long, char const*, cssm_net_address const*, unsigned int, cssm_access_credentials const*, void const*, long*) (in Security) + 210
    #15 0x7fff90ad02a6 in Security::MDSClient::Directory::cdsa() const (in Security) + 92
    #16 0x7fff90b8defa in Security::MDSClient::Directory::dlGetFirst(cssm_query const&, cssm_db_record_attribute_data&, cssm_data*, cssm_db_unique_record*&) (in Security) + 38
    #17 0x7fff90acfd81 in Security::CssmClient::Table\u003CSecurity::MDSClient::Common>::startQuery(Security::CssmQuery const&, bool) (in Security) + 233
    #18 0x7fff90acfa16 in Security::CssmClient::Table\u003CSecurity::MDSClient::Common>::fetch(Security::CssmClient::Query const&, int) (in Security) + 122
    #19 0x7fff90acf324 in MdsComponent::MdsComponent(Security::Guid const&) (in Security) + 208
    #20 0x7fff90acef77 in CssmManager::loadModule(Security::Guid const&, unsigned int, Security::ModuleCallback const&) (in Security) + 139
    #21 0x7fff90acee84 in CSSM_ModuleLoad (in Security) + 126
    #22 0x7fff90acea3a in Security::CssmClient::ModuleImpl::activate() (in Security) + 156
    #23 0x7fff90ace852 in Security::CssmClient::AttachmentImpl::activate() (in Security) + 92
    #24 0x7fff90ace765 in Security::KeychainCore::Certificate::clHandle() (in Security) + 151
    #25 0x7fff90af0835 in Security::KeychainCore::Certificate::copyFirstFieldValue(cssm_data const&) (in Security) + 45
    #26 0x7fff90be2e85 in Security::KeychainCore::Certificate::subjectName() (in Security) + 51
    #27 0x7fff90bffd0e in SecCertificateGetSubject (in Security) + 22
    #28 0x1145dde63 in net::X509Certificate::CreateOSCertHandleFromBytes(char const*, unsigned long) (in net_unittests) + 371
    #29 0x1144a5047 in net::X509Certificate::CreateCertificateListFromBytes(char const*, unsigned long, int) (in net_unittests) + 1415
    #30 0x114d15fdc in net::ImportCertFromFile(base::FilePath const&, std::__1::basic_string\u003Cchar, std::__1::char_traits\u003Cchar>, std::__1::allocator\u003Cchar> > const&) (in net_unittests) + 556
    #31 0x1120382f0 in net::SpdySessionTest::AddSSLSocketData() (in net_unittests) + 368
    #32 0x112137dfd in net::AltSvcFrameTest_ProcessAltSvcFrameOnActiveStream_Test::TestBody() (in net_unittests) + 1117
    #33 0x114f3dfa6 in testing::Test::Run() (in net_unittests) + 1046


I don't see anything about bzero, bcopy, bcmp in there so not sure if this is due to http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20161212/412775.html

Suppressions apparently go to build/sanitizers/asan_suppressions.cc (not sure how that's different from the blacklist file in tools/memory/asan/blacklist.txt).

Comment 3 by thakis@chromium.org, Dec 15 2016

trying to add a suppression here for now https://codereview.chromium.org/2580663002 (\noideanico though)

Comment 4 by thakis@chromium.org, Dec 15 2016

Looks like that didn't help see ps 2. Maybe I did it wrong?

Comment 5 by thakis@chromium.org, Dec 15 2016

Labels: -Pri-3 Pri-1

Comment 6 by h...@chromium.org, Dec 15 2016

Cc: h...@chromium.org
Status: Assigned (was: Untriaged)
rnk isn't in yet

I'll try to repro locally, see if reverting r289690 helps and if so build new binaries.

Comment 8 by thakis@chromium.org, Dec 15 2016

See kubabrecka's comments on https://reviews.llvm.org/D27659

Comment 9 by h...@chromium.org, Dec 15 2016

Cc: r...@chromium.org
Owner: h...@chromium.org
Status: Started (was: Assigned)
Verified that reverting fixes net_unittests locally on my Mac. Reverted in r289864

Let me see if anything else is needed before building new packages.

Comment 10 by h...@chromium.org, Dec 15 2016

Packaging r289276 here: https://codereview.chromium.org/2581793002

We might want to wait for  Issue 674665  though.

Comment 11 by h...@chromium.org, Dec 15 2016

> Packaging r289276 here: https://codereview.chromium.org/2581793002

Wait, it's r289864 we want! Copy-paste fail :-/
Trying again
https://codereview.chromium.org/2585473003
Status: Fixed (was: Started)

Sign in to add a comment