<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""></div><div class=""><br class=""></div><div class="">thanks,</div><div class="">--steve</div><div class=""><br class=""></div><br class=""><div class="">
<div dir="auto" style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: "Courier New"; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: "Courier New"; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="margin: 0px; font-size: 14px; font-family: "Apple Garamond"; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="color: rgb(237, 113, 158); font-family: "Lucida Grande"; text-align: -webkit-auto;" class=""></span><span style="color: rgb(55, 69, 245); -webkit-text-stroke-color: rgb(55, 69, 245);" class=""><i class=""> </i></span><i class="">From the ashes of disaster grow the roses of success.</i></div><div class=""><br class=""></div></div></div></div></div></div></div></div></div></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Apr 17, 2018, at 11:27 AM, Jim Ingham <<a href="mailto:jingham@apple.com" class="">jingham@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">It is interesting that the stop reason on the thread that stopped is "trace".  That's what you would expect returning from the single-step to step over the breakpoint.  But it looks like we got a signal while single-stepping, but the stop reason was misreported by somebody.<br class=""><br class="">Jim<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Apr 17, 2018, at 6:00 AM, Pavel Labath via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a>> wrote:<br class=""><br class="">[+lldb-dev]<br class=""><br class="">Hello Steve,<br class=""><br class="">thanks for the report.<br class=""><br class="">The fact that you see the rendezvous breakpoint being hit many times is not<br class="">surprising. We get those every time the library is loaded (we need that to<br class="">load relevant debug info and set potential breakpoints). However, they<br class="">should generally not be surfaced to the user (unless you have the<br class="">stop-on-sharedlibrary-events setting set, which you don't).<br class=""><br class="">The part that is suspicious to me is that __restore_rt shows up on the top<br class="">of the backtrace. This is a trampoline used to return from signal handlers,<br class="">and it would seem to indicate that you got some sort of a signal while<br class="">loading the libraries. I don't know why this would happen, but it could be<br class="">that this is confusing lldb's auto-resume logic.<br class=""><br class="">The interesting part to see here is what lldb thinks are the stop reasons<br class="">for individual threads in the process (is the process multi-threaded?) for<br class="">the last couple of stops. The "lldb step" and "gdb-remote packets" log<br class="">categories are the most interesting to observe here. If you are able to<br class="">send me the log traces, I can help you interpret them.<br class=""><br class="">regards,<br class="">pavel<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">On Tue, 17 Apr 2018 at 02:27, Steve Ravet via llvm-dev <<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">Hello lldb developers, I am running into a problem with lldb on Linux.  I<br class=""></blockquote>am currently running llvm 6.0.0.<br class=""><br class=""><blockquote type="cite" class="">I have an executable that dynamically loads a large number of shared<br class=""></blockquote>libraries at runtime.  These are explicitly loaded via dlopen (they are<br class="">specified in a configuration file), and after loading a few (typically a<br class="">dozen or so, but the number varies) lldb will halt during dlopen.  If I<br class="">continue, it will load a few more then halt again, which makes debugging<br class="">from startup impractical since there are so many libraries to be loaded<br class="">(more than a hundred of them).<br class=""><br class=""><blockquote type="cite" class="">When I build and debug this same C++ on macOS, the debugger works fine.<br class=""></blockquote>I have verified that target.process.stop-on-sharedlibrary-events is false.<br class="">I turned on dyld logging and I see lots of log messages about<br class="">RendezvousBreakpoint being hit, but I don’t see anything that sheds light<br class="">on why some libraries load without stopping but others don’t.<br class=""><br class=""><blockquote type="cite" class="">I have tried to recreate this in a trivial program that calls dlopen in a<br class=""></blockquote>loop, but haven’t been able to reproduce.<br class=""><br class=""><blockquote type="cite" class="">Can your offer any suggestions for further debugging this?  More<br class=""></blockquote>supporting evidence follows.<br class=""><br class=""><blockquote type="cite" class="">Here is the message when the debugger stops:<br class=""></blockquote><br class=""><blockquote type="cite" class="">Process 120004 stopped<br class="">* thread #1, name = ‘xxxxxxxx', stop reason = trace<br class="">    frame #0: 0x00002aaaacfca6a0 libc.so.6`__restore_rt<br class="">libc.so.6`__restore_rt:<br class="">->  0x2aaaacfca6a0 <+0>: movq   $0xf, %rax<br class="">    0x2aaaacfca6a7 <+7>: syscall<br class="">    0x2aaaacfca6a9 <+9>: nopl   (%rax)<br class=""></blockquote><br class=""><blockquote type="cite" class="">libc.so.6`__libc_sigaction:<br class="">    0x2aaaacfca6b0 <+0>: subq   $0xd0, %rsp<br class=""></blockquote><br class=""><blockquote type="cite" class="">I do not have the stop on shared library events setting enabled:<br class=""></blockquote><br class=""><blockquote type="cite" class="">(lldb) settings show target.process.stop-on-sharedlibrary-events<br class="">target.process.stop-on-sharedlibrary-events (boolean) = false<br class=""></blockquote><br class=""><br class=""><br class=""><blockquote type="cite" class="">The backtrace goes back to dlopen:<br class=""></blockquote><br class=""><blockquote type="cite" class="">(lldb) bt<br class="">* thread #1, name = ‘xxxxx', stop reason = trace<br class="">  * frame #0: 0x00002aaaacfca6a0 libc.so.6`__restore_rt<br class="">    frame #1: 0x00002aaaaaab9eb0 ld-linux-x86-64.so.2<br class="">    frame #2: 0x00002aaaaaabdc53 ld-linux-x86-64.so.2`dl_open_worker + 499<br class="">    frame #3: 0x00002aaaaaab9286 ld-linux-x86-64.so.2`_dl_catch_error +<br class=""></blockquote>102<br class=""><blockquote type="cite" class="">    frame #4: 0x00002aaaaaabd63a ld-linux-x86-64.so.2`_dl_open + 186<br class="">    frame #5: 0x00002aaaac39df66 libdl.so.2`dlopen_doit + 102<br class="">    frame #6: 0x00002aaaaaab9286 ld-linux-x86-64.so.2`_dl_catch_error +<br class=""></blockquote>102<br class=""><blockquote type="cite" class="">    frame #7: 0x00002aaaac39e29c libdl.so.2`_dlerror_run + 124<br class="">    frame #8: 0x00002aaaac39dee1 libdl.so.2`__dlopen_check + 49<br class=""></blockquote><br class=""><blockquote type="cite" class="">the dyld debug log has a lot of this:<br class="">209 intern-state     DynamicLoaderPOSIXDYLD::RendezvousBreakpointHit pid<br class=""></blockquote>153501 stop_when_images_change=false<br class=""><blockquote type="cite" class="">210 intern-state     DynamicLoaderPOSIXDYLD::RendezvousBreakpointHit<br class=""></blockquote>called for pid 153501<br class=""><blockquote type="cite" class="">211 intern-state     DYLDRendezvous::Resolve address size: 8, padding 4<br class="">212 intern-state     DYLDRendezvous::Resolve cursor = 0x2aaaaaccc160<br class="">213 intern-state     DynamicLoaderPOSIXDYLD::RendezvousBreakpointHit pid<br class=""></blockquote>153501 stop_when_images_change=false<br class=""><blockquote type="cite" class="">214 intern-state     DynamicLoaderPOSIXDYLD::RendezvousBreakpointHit<br class=""></blockquote>called for pid 153501<br class=""><blockquote type="cite" class="">215 intern-state     DYLDRendezvous::Resolve address size: 8, padding 4<br class="">216 intern-state     DYLDRendezvous::Resolve cursor = 0x2aaaaaccc160<br class=""></blockquote><br class=""><br class=""><br class=""><blockquote type="cite" class="">thanks,<br class="">--steve<br class=""></blockquote><br class=""><br class=""><blockquote type="cite" class=""> In the woods too, a man casts off his years, as the snake his slough,<br class=""></blockquote>and at what period soever of life, is always a child.<br class=""><br class=""><br class=""><br class=""><blockquote type="cite" class="">_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></blockquote>_______________________________________________<br class="">lldb-dev mailing list<br class=""><a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev<br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></body></html>