<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I just added a section to ./docs/DebuggingTheCompiler.rst on how to get enable logging from LLDB.<div class=""><br class=""></div><div class="">Can you enable the logging there and add file an SR?</div><div class=""><br class=""></div><div class="">Michael</div><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Oct 7, 2017, at 11:27 AM, Edward Connell &lt;<a href="mailto:ewconnell@gmail.com" class="">ewconnell@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Michael,<div class="">No I am not evaluating an expression or anything. This all worked fine in past builds.</div><div class=""><br class=""></div><div class="">I simply set a breakpoint in a function and after stopping while gathering values for the debugger view, it crashes.</div><div class=""><br class=""></div><div class="">It doesn't crash in all functions, but it does crash when trying to stop in many different functions.</div><div class="">An example function signature where it crashes is (DataView is a concrete struct):<br class=""></div><div class=""><br class=""></div><div class=""><div class="">public func setupForward(mode: EvaluationMode, inData: DataView, labels: DataView?,</div><div class=""><span style="white-space:pre" class="">        </span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;outData: inout DataView, backData: inout DataView?) throws { ... }</div></div><div class=""><br class=""></div><div class="">Before calling the function, all of the parameters have valid values that I can examine. But as soon as I step into this function, LLDB crashes with that message. It behaves the same way with other functions that have different signatures.</div><div class=""><br class=""></div><div class="">I tried to create a very simple repro case using this signature, but it didn't crash. My project is on GitHub and this can be easily reproduced. The only pain is installing my project on your test machine.</div><div class=""><br class=""></div><div class="">Ubuntu 16.04</div><div class="">Swift 4.0 release</div><div class="">NVidia gpu</div><div class="">Netlib&nbsp;<a href="https://github.com/ewconnell/Netlib/wiki#installation" class="">https://github.com/ewconnell/Netlib/wiki#installation</a></div><div class="">CLion IDE with Swift plugin</div><div class=""><br class=""></div><div class="">1) do a debug build</div><div class="">2) set a breakpoint at&nbsp;CudaSoftmax.swift:44&nbsp; or any line in the function</div><div class="">3) run</div><div class="">4) when it stops LLDBFrontend crashes</div><div class=""><br class=""></div><div class=""><div class=""><i class="">LLDBFrontend: /home/buildnode/jenkins/workspace/oss-swift-4.0-package-linux-ubuntu-16_04/swift/lib/SILOptimizer/Mandatory/AccessEnforcementSelection.cpp:613: (anonymous namespace)::SourceAccess (anonymous namespace)::AccessEnforcementSelection::getSourceAccess(swift::SILValue): Assertion `isa&lt;AllocStackInst&gt;(address) || isa&lt;SILUndef&gt;(address)' failed.</i></div><div class=""><i class="">Stack dump:</i></div><div class=""><i class="">0.<span style="white-space:pre" class="">        </span>While running pass #10 SILModuleTransform ""Access Enforcement Selection"".</i></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Using the LLDB CLI I am able to stop there. If I try "fr var -O" with&nbsp;</div><div class=""><ul class=""><li class="">mode, inData, and labels, it prints their values no problem</li><li class="">outData and backData gives me a segmentation violation<br class=""></li></ul><div class="">The visible difference is the "inout"</div></div><div class=""><br class=""></div><div class="">Not sure what the problem is. It worked fine in the past.</div><div class=""><br class=""></div><div class="">If you can think of an experiment I can try to create a simple repro case, please let me know.</div><div class=""><br class=""></div><div class="">Thanks, Ed</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Oct 6, 2017 at 4:34 PM, Michael Gottesman <span dir="ltr" class="">&lt;<a href="mailto:mgottesman@apple.com" target="_blank" class="">mgottesman@apple.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">It looks like this is failing during guaranteed optimization. Are you running an expression in the debugger and we are crashing there?<div class=""><br class=""></div><div class="">Michael</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On Oct 6, 2017, at 11:53 AM, Edward Connell via swift-users &lt;<a href="mailto:swift-users@swift.org" target="_blank" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="m_1753879203729931118Apple-interchange-newline"></div></div><div class=""><div class=""><div class="h5"><div dir="ltr" class="">While trying to debug a Netlib function, LLDB is crashing<div class=""><br class=""></div><div class=""><div class="">I'm not sure what this assert means.</div></div><div class=""><br class=""></div><div class=""><div class=""><i class="">LLDBFrontend: /home/buildnode/jenkins/<wbr class="">workspace/oss-swift-4.0-<wbr class="">package-linux-ubuntu-16_04/<wbr class="">swift/lib/SILOptimizer/<wbr class="">Mandatory/<wbr class="">AccessEnforcementSelection.<wbr class="">cpp:613: (anonymous namespace)::SourceAccess (anonymous namespace)::<wbr class="">AccessEnforcementSelection::<wbr class="">getSourceAccess(swift::<wbr class="">SILValue): Assertion `isa&lt;AllocStackInst&gt;(address) || isa&lt;SILUndef&gt;(address)' failed.</i></div><div class=""><i class="">Stack dump:</i></div><div class=""><i class="">0.<span style="white-space:pre-wrap" class="">        </span>While running pass #10 SILModuleTransform ""Access Enforcement Selection"".</i></div></div><div class=""><br class=""></div><div class="">It fails every time and the same way in several functions, but not all functions.<br class=""></div><div class="">I tried to create a simple repro with the same function signature, but I can't get the simple case to fail.</div><div class="">A debug build isn't doing whole-module-optimization, so that's not it</div><div class=""><br class=""></div><div class="">Ideas anyone?</div><div class=""><br class=""></div><div class="">Who owns the LLDBFrontend?</div><div class=""><br class=""></div><div class="">Thanks, Ed</div></div></div></div>
______________________________<wbr class="">_________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" target="_blank" class="">swift-users@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank" class="">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-users</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div></body></html>