<div><br><div class="gmail_quote"><div dir="auto">On Wed, Oct 4, 2017 at 3:52 PM Jim Ingham &lt;<a href="mailto:jingham@apple.com">jingham@apple.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here&#39;s where we are asserting:<br>
<br>
* thread #1, queue = &#39;com.apple.main-thread&#39;, stop reason = signal SIGABRT<br>
    frame #0: 0x00007fff713bffce libsystem_kernel.dylib`__pthread_kill + 10<br>
    frame #1: 0x00007fff714fd150 libsystem_pthread.dylib`pthread_kill + 333<br>
    frame #2: 0x00007fff7131c32a libsystem_c.dylib`abort + 127<br>
    frame #3: 0x00007fff712e4380 libsystem_c.dylib`__assert_rtn + 320<br>
    frame #4: 0x000000010a29cae7 _lldb.so`swift::TargetClassMetadata&lt;swift::External&lt;swift::RuntimeTarget&lt;8u&gt; &gt; &gt;::getDescription(this=0x00007f8500e05bc0) const at Metadata.h:1469<br>
  * frame #5: 0x000000010a298ef1 _lldb.so`swift::remote::MetadataReader&lt;swift::External&lt;swift::RuntimeTarget&lt;8u&gt; &gt;, (anonymous namespace)::RemoteASTTypeBuilder&gt;::readAddressOfNominalTypeDescriptor(this=0x00007f8500e05a00, metadata=0x00007ffeeee83bd0, skipArtificialSubclasses=false) at MetadataReader.h:1192<br>
    frame #6: 0x000000010a291d63 _lldb.so`swift::remote::MetadataReader&lt;swift::External&lt;swift::RuntimeTarget&lt;8u&gt; &gt;, (anonymous namespace)::RemoteASTTypeBuilder&gt;::readNominalTypeFromMetadata(this=0x00007f8500e05a00, origMetadata=swift::remote::MetadataReader&lt;swift::External&lt;swift::RuntimeTarget&lt;8&gt; &gt;, (anonymous namespace)::RemoteASTTypeBuilder&gt;::MetadataRef @ 0x00007ffeeee83bf0, skipArtificialSubclasses=false) at MetadataReader.h:1308<br>
    frame #7: 0x000000010a28e81d _lldb.so`swift::remote::MetadataReader&lt;swift::External&lt;swift::RuntimeTarget&lt;8u&gt; &gt;, (anonymous namespace)::RemoteASTTypeBuilder&gt;::readTypeFromMetadata(this=0x00007f8500e05a00, MetadataAddress=4294976120, skipArtificialSubclasses=false) at MetadataReader.h:693<br>
    frame #8: 0x000000010a28b6a9 _lldb.so`(anonymous namespace)::RemoteASTContextConcreteImpl&lt;swift::External&lt;swift::RuntimeTarget&lt;8u&gt; &gt; &gt;::getTypeForRemoteTypeMetadata(this=0x00007f8500e059f0, metadata=(Data = 4294976120), skipArtificial=false) at RemoteAST.cpp:1031<br>
    frame #9: 0x000000010a264a2d _lldb.so`swift::remoteAST::RemoteASTContext::getTypeForRemoteTypeMetadata(this=0x00007f85009fa4f0, address=(Data = 4294976120), skipArtificial=false) at RemoteAST.cpp:1115<br>
    frame #10: 0x000000010bfcc877 _lldb.so`lldb_private::SwiftLanguageRuntime::MetadataPromise::FulfillTypePromise(this=0x00007f8500e059b0, error=0x0000000000000000) at SwiftLanguageRuntime.cpp:1424<br>
    frame #11: 0x000000010bfd7a99 _lldb.so`lldb_private::SwiftLanguageRuntime::GetDynamicTypeAndAddress_Archetype(this=0x00007f8500e042c0, in_value=&quot;self&quot;, use_dynamic=eDynamicDontRunTarget, class_type_or_name=0x00007ffeeee861d8, address=0x00007ffeeee861c0) at SwiftLanguageRuntime.cpp:2276<br>
    frame #12: 0x000000010bfdb137 _lldb.so`lldb_private::SwiftLanguageRuntime::GetDynamicTypeAndAddress(this=0x00007f8500e042c0, in_value=&quot;self&quot;, use_dynamic=eDynamicDontRunTarget, class_type_or_name=0x00007ffeeee861d8, address=0x00007ffeeee861c0, value_type=0x00007ffeeee861b8) at SwiftLanguageRuntime.cpp:2607<br>
    frame #13: 0x000000010c3da132 _lldb.so`lldb_private::ValueObjectDynamicValue::UpdateValue(this=0x00007f8501d8e600) at ValueObjectDynamicValue.cpp:168<br>
    frame #14: 0x000000010b7d6cc9 _lldb.so`lldb_private::ValueObject::UpdateValueIfNeeded(this=0x00007f8501d8e600, update_format=false) at ValueObject.cpp:211<br>
    frame #15: 0x000000010b7d977b _lldb.so`lldb_private::ValueObject::GetError(this=0x00007f8501d8e600) at ValueObject.cpp:404<br>
    frame #16: 0x000000010c8cd424 _lldb.so`lldb_private::SwiftUserExpression::ScanContext(this=0x00007f8500d522f0, exe_ctx=0x00007ffeeee89548, err=0x00007ffeeee877b0) at SwiftUserExpression.cpp:185<br>
    frame #17: 0x000000010c8cf762 _lldb.so`lldb_private::SwiftUserExpression::Parse(this=0x00007f8500d522f0, diagnostic_manager=0x00007ffeeee88768, exe_ctx=0x00007ffeeee89548, execution_policy=eExecutionPolicyOnlyWhenNeeded, keep_result_in_memory=true, generate_debug_info=false, line_offset=0) at SwiftUserExpression.cpp:450<br>
    frame #18: 0x000000010bf36302 _lldb.so`lldb_private::UserExpression::Evaluate(exe_ctx=0x00007ffeeee89548, options=0x00007f84f9a6d950, expr=(Data = &quot;self&quot;, Length = 4), prefix=(Data = 0x0000000000000000, Length = 0), result_valobj_sp=lldb_private::ConstString @ , error=0x00007ffeeee894d0, line_offset=0, fixed_expression=&quot;&quot;, jit_module_sp_ptr=&lt;parent is NULL&gt;) at UserExpression.cpp:247<br>
    frame #19: 0x000000010c21de19 _lldb.so`lldb_private::Target::EvaluateExpression(this=0x00007f84f807c000, expr=(Data = &quot;self&quot;, Length = 4), exe_scope=0x00007f84f9c020a0, result_valobj_sp=lldb_private::ConstString @ , options=0x00007f84f9a6d950, fixed_expression=&quot;&quot;) at Target.cpp:2297<br>
    frame #20: 0x000000010373eedd _lldb.so`lldb::SBFrame::EvaluateExpression(this=0x00007f84f9a6d840, expr=&quot;self&quot;, options=0x00007f84f7788b10) at SBFrame.cpp:1305<br>
    frame #21: 0x00000001038fe4f9 _lldb.so`_wrap_SBFrame_EvaluateExpression__SWIG_3((null)=0x0000000000000000, args=0x00000001017b9c80) at LLDBWrapPython.cpp:26687<br>
    frame #22: 0x000000010385113e _lldb.so`_wrap_SBFrame_EvaluateExpression(self=0x0000000000000000, args=0x00000001017b9c80) at LLDBWrapPython.cpp:26735<br>
&lt;Lots of Python frames omitted&gt;<br>
<br>
This is all inside the swift::remoteAST &amp; swift::remote classes.  I wonder if you changed something the remoteAST code was implicitly relying on?<br>
</blockquote><div dir="auto"><br></div><div dir="auto">Interesting.  So, it’s failing to read the address of the nominal type descriptor (MetadataReader.h:1192).  It is looking at a class and reads the nominal type descriptor.  That changed to an absolute pointer.  It is now a ConstTargetMetadataPointer&lt;Runtime, TargetNominalTypeDescriptor&gt;.  The assertion which is failing is that the bottom bit is set for the metadata which cannot be true anymore as it is not an offset and we directly access it.  We do control the alignment so it is possible to restore that, but at the same time, that is also used as an ISA selector on some targets (e.g. ARM).  That can be pretty confusing.  I think that the simplest thing in the short term is to remove that assertion.  I’ll try that and upload a change.</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Jim<br>
<br>
<br>
&gt; On Oct 4, 2017, at 11:54 AM, Saleem Abdulrasool via swift-lldb-dev &lt;<a href="mailto:swift-lldb-dev@swift.org" target="_blank">swift-lldb-dev@swift.org</a>&gt; wrote:<br>
&gt;<br>
&gt; Just for those interested, this does not reproduce on a Linux host.  This seems to be specific to a macOS host.<br>
&gt;<br>
&gt; On Wed, Oct 4, 2017 at 11:00 AM Saleem Abdulrasool &lt;<a href="mailto:compnerd@compnerd.org" target="_blank">compnerd@compnerd.org</a>&gt; wrote:<br>
&gt; On Wed, Oct 4, 2017 at 10:57 AM Adrian Prantl &lt;<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; On Oct 4, 2017, at 10:54 AM, Saleem Abdulrasool &lt;<a href="mailto:compnerd@compnerd.org" target="_blank">compnerd@compnerd.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Does the lldb test suite not run as part of the CI builds?<br>
&gt;<br>
&gt; AFAIK it is currently not running as part of pull request testing. (Which is obviously not ideal).<br>
&gt;<br>
&gt; Getting some minimal coverage would be nice.  But I think that would be outside of the scope of my changes.  That can also be done subsequently to improve coverage.<br>
&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; It seems that in the mean time, at least two new regressions have been introduced into the Windows build.  That does make me slightly hesistent since it seems that it is more likely that other regressions will get introduced.<br>
&gt;&gt;<br>
&gt;&gt; In any case, I’m doing a build of lldb and will look into this once the build completes.  Hopefully the failures also reproduces on Linux.<br>
&gt;<br>
&gt; Thanks! Jim (<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>) should be able to help you with any LLDB-related questions.<br>
&gt;<br>
&gt; Awesome!  I might have to take you up on that offer :)<br>
&gt;<br>
&gt;<br>
&gt; -- adrian<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Saleem<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Oct 4, 2017 at 10:36 AM Adrian Prantl &lt;<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; On Oct 4, 2017, at 10:33 AM, Saleem Abdulrasool &lt;<a href="mailto:compnerd@compnerd.org" target="_blank">compnerd@compnerd.org</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Wed, Oct 4, 2017 at 10:29 AM Jim Ingham &lt;<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>&gt; wrote:<br>
&gt;&gt;&gt; Nothing significant has changed on the lldb side but we&#39;re getting a bunch of tests asserting here:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 21:01:25<br>
&gt;&gt;&gt; Assertion failed: (isTypeMetadata()), function getDescription, file /Users/buildslave/jenkins/workspace/lldb-master-tools_RA/swift/include/swift/Runtime/Metadata.h, line 1469.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Anybody got any clues of what might have changed on the Swift side to start tripping this assertion?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The type metadata layout has changed.  The value witness table reference is no longer an offset but rather a complete pointer.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; It is possible that lldb needs to be updated for that?<br>
&gt;&gt;<br>
&gt;&gt; That sounds plausible. Would it be possible to revert the commit until a solution is found? You can easily build lldb by checking it out next to swift and adding &quot;-l&quot; to the build script.<br>
&gt;&gt;<br>
&gt;&gt; -- adrian<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Jim<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt; On Oct 3, 2017, at 9:38 PM, <a href="mailto:no-reply@swift.org" target="_blank">no-reply@swift.org</a> wrote:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; [FAILURE] oss-lldb-incremental-osx [#230]<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Build URL:    <a href="https://ci.swift.org/job/oss-lldb-incremental-osx/230/" rel="noreferrer" target="_blank">https://ci.swift.org/job/oss-lldb-incremental-osx/230/</a><br>
&gt;&gt;&gt; &gt; Project:      oss-lldb-incremental-osx<br>
&gt;&gt;&gt; &gt; Date of build:        Tue, 03 Oct 2017 22:55:41 -0500<br>
&gt;&gt;&gt; &gt; Build duration:       43 min<br>
&gt;&gt;&gt; &gt; Identified problems:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Regression test failed: This build failed because a regression test in the test suite FAILed. Below is a list of all errors:<br>
&gt;&gt;&gt; &gt;               • Indication 1<br>
&gt;&gt;&gt; &gt;       • Assertion failure: This build failed because of an assertion failure. Below is a list of all errors in the build log:<br>
&gt;&gt;&gt; &gt;               • Indication 1<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Changes<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit 99e395b7e3f89b1f6f2874296a37add58aece6d6 by github:<br>
&gt;&gt;&gt; &gt; [APINotes] Add &#39;RetainCountConvention&#39; (#133)<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • edit: include/clang/APINotes/Types.h<br>
&gt;&gt;&gt; &gt;               • edit: lib/APINotes/APINotesWriter.cpp<br>
&gt;&gt;&gt; &gt;               • edit: test/APINotes/Inputs/roundtrip.apinotes<br>
&gt;&gt;&gt; &gt;               • edit: lib/APINotes/APINotesYAMLCompiler.cpp<br>
&gt;&gt;&gt; &gt;               • edit: lib/APINotes/APINotesReader.cpp<br>
&gt;&gt;&gt; &gt;               • add: test/APINotes/retain-count-convention.m<br>
&gt;&gt;&gt; &gt;               • edit: test/APINotes/Inputs/Frameworks/SimpleKit.framework/Headers/SimpleKit.h<br>
&gt;&gt;&gt; &gt;               • edit: lib/Sema/SemaAPINotes.cpp<br>
&gt;&gt;&gt; &gt;               • edit: test/APINotes/yaml-roundtrip.c<br>
&gt;&gt;&gt; &gt;               • edit: test/APINotes/Inputs/Frameworks/SimpleKit.framework/Headers/SimpleKit.apinotes<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit 969421f5ac164d98f4650ae0f1a4fd10409cabad by aprantl:<br>
&gt;&gt;&gt; &gt; [DebugInfo] Handle endianness when moving debug info for split integer<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • edit: lib/CodeGen/SelectionDAG/LegalizeTypes.cpp<br>
&gt;&gt;&gt; &gt;               • add: test/CodeGen/PowerPC/debuginfo-split-int.ll<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit e77f221279851c2406e824e75ae8904ba7d89ab5 by aprantl:<br>
&gt;&gt;&gt; &gt; Add a manpage for llvm-dwarfdump.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • edit: docs/CMakeLists.txt<br>
&gt;&gt;&gt; &gt;               • edit: docs/CommandGuide/llvm-dwarfdump.rst<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit 2850e656c89ac7c4837a01b57c52c036e88c81f7 by jingham:<br>
&gt;&gt;&gt; &gt; This test is passing everywhere I can see, so I&#39;m removing the xfail, to<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • edit: packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit 7e6b564bf551e1ccd4eaff2824d87dd89b71a686 by dgregor:<br>
&gt;&gt;&gt; &gt; Add fixed crasher from rdar://problem/33575781<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • add: validation-test/compiler_crashers_2_fixed/0125-rdar33575781.swift<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit 086c12114dfdff1b7b7179a6052f43a8d73557ed by compnerd:<br>
&gt;&gt;&gt; &gt; IRGen: switch to absolute pointers for nominal type descriptors<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • edit: include/swift/Runtime/Metadata.h<br>
&gt;&gt;&gt; &gt;               • edit: lib/IRGen/ConstantBuilder.h<br>
&gt;&gt;&gt; &gt;               • edit: stdlib/public/runtime/Metadata.cpp<br>
&gt;&gt;&gt; &gt;               • edit: unittests/runtime/Metadata.cpp<br>
&gt;&gt;&gt; &gt;               • edit: lib/IRGen/GenMeta.cpp<br>
&gt;&gt;&gt; &gt;               • edit: stdlib/public/runtime/ProtocolConformance.cpp<br>
&gt;&gt;&gt; &gt;               • edit: test/IRGen/foreign_types.sil<br>
&gt;&gt;&gt; &gt;               • edit: test/IRGen/objc_attr_NSManaged.sil<br>
&gt;&gt;&gt; &gt;               • edit: include/swift/Remote/MetadataReader.h<br>
&gt;&gt;&gt; &gt;               • edit: stdlib/public/runtime/Casting.cpp<br>
&gt;&gt;&gt; &gt;               • edit: test/IRGen/field_type_vectors.sil<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit 2645a6a4b9cf2df212da6db9a41b3363ff44de56 by dgregor:<br>
&gt;&gt;&gt; &gt; [Deserialization] Configure protocol before loading requirement<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • add: test/Serialization/recursive_protocol_merge.swift<br>
&gt;&gt;&gt; &gt;               • add: test/Serialization/Inputs/recursive_protocol_merge_b.swift<br>
&gt;&gt;&gt; &gt;               • add: test/Serialization/Inputs/recursive_protocol_merge_a.swift<br>
&gt;&gt;&gt; &gt;               • edit: lib/Serialization/Deserialization.cpp<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit 610aa582ce9647ad377812355d8ae36ec5cf0e31 by shajrawi:<br>
&gt;&gt;&gt; &gt; Fixes (another) IRGen compiler crash caused by the new large types ABI<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • edit: test/IRGen/big_types_corner_cases.sil<br>
&gt;&gt;&gt; &gt;               • edit: lib/IRGen/LoadableByAddress.cpp<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit 77554c1ae2b3b2de16b803409d9f7085ad186562 by ghoare:<br>
&gt;&gt;&gt; &gt; [Stats] Fix typo.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • edit: lib/Basic/Statistic.cpp<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit 0e5b982d2561bc7c102e2abe984e19241735aaa2 by ghoare:<br>
&gt;&gt;&gt; &gt; [Stats] Only use input filename, not mangled path, in stats file name.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • edit: lib/Basic/Statistic.cpp<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;       • Commit c1a4bb490bcdf8d20c962ab43249eaee44ee037f by github:<br>
&gt;&gt;&gt; &gt; [test] Define out part of this test that&#39;s crashing on Linux (#12258)<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;               • edit: test/ClangImporter/clang_builtins.swift<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Saleem Abdulrasool<br>
&gt;&gt;&gt; compnerd (at) compnerd (dot) org<br>
&gt;&gt; --<br>
&gt;&gt; Saleem Abdulrasool<br>
&gt;&gt; compnerd (at) compnerd (dot) org<br>
&gt; --<br>
&gt; Saleem Abdulrasool<br>
&gt; compnerd (at) compnerd (dot) org<br>
&gt; --<br>
&gt; Saleem Abdulrasool<br>
&gt; compnerd (at) compnerd (dot) org<br>
&gt; _______________________________________________<br>
&gt; swift-lldb-dev mailing list<br>
&gt; <a href="mailto:swift-lldb-dev@swift.org" target="_blank">swift-lldb-dev@swift.org</a><br>
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-lldb-dev" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-lldb-dev</a><br>
<br>
</blockquote></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>