[PATCH] D60001: Allow partial UUID matching in Minidump core file plug-in

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 03:09:32 PDT 2019


labath added a comment.

In D60001#1453457 <https://reviews.llvm.org/D60001#1453457>, @clayborg wrote:

> ok, so I think I figured out what was going on: I had the .so files still in my build packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new directory. They didn't show up in the "svn stat" command because they are ignored!!! arg! That is what was causing problems when testing on my machine.


Yeah, I can imagine this being very annoying to track down. This is very unfortunate. I remember looking at this problem a some time ago because it was causing failures on one of the bots, and not being able to conclude where this ignore is coming from. It looks like svn just doesn't like .so files altogether. Well.. I guess that's one more thing that will be solved be the impending switch to github.

Does this mean the direcotory-clearing part can be removed now? I've tried the test on a mac and it still succeeds for me. If it doesn't work for you, it looks like we still have some kind of nondeterminism in here, and I'd like to get to the bottom of that. FTR: this is the stack trace of the point where lldb find the module for me:

  (lldb) bt
  * thread #1, queue = 'com.apple.main-thread', stop reason = step over
    * frame #0: 0x00000001062ce59e _lldb.so`lldb_private::ModuleList::GetSharedModule(module_spec=0x00007ffeefbfbef0, module_sp=nullptr, module_search_paths_ptr=0x0000000100204c80, old_module_sp_ptr=0x00007ffeefbfc9f0, did_create_ptr=0x00007ffeefbfc9ef, always_create=false) at ModuleList.cpp:862:19
      frame #1: 0x00000001067432c9 _lldb.so`lldb_private::Platform::GetSharedModule(this=0x0000000100606f38, spec=0x00007ffeefbfcbe0)::$_0::operator()(lldb_private::ModuleSpec const&) const at Platform.cpp:245:15
      frame #2: 0x00000001067430d4 _lldb.so`decltype(__f=0x0000000100606f38, __args=0x00007ffeefbfcbe0)::$_0&>(fp)(std::__1::forward<lldb_private::ModuleSpec const&>(fp0))) std::__1::__invoke<lldb_private::Platform::GetSharedModule(lldb_private::ModuleSpec const&, lldb_private::Process*, std::__1::shared_ptr<lldb_private::Module>&, lldb_private::FileSpecList const*, std::__1::shared_ptr<lldb_private::Module>*, bool*)::$_0&, lldb_private::ModuleSpec const&>(lldb_private::Platform::GetSharedModule(lldb_private::ModuleSpec const&, lldb_private::Process*, std::__1::shared_ptr<lldb_private::Module>&, lldb_private::FileSpecList const*, std::__1::shared_ptr<lldb_private::Module>*, bool*)::$_0&, lldb_private::ModuleSpec const&) at type_traits:4339:1
      frame #3: 0x0000000106743054 _lldb.so`lldb_private::Status std::__1::__invoke_void_return_wrapper<lldb_private::Status>::__call<lldb_private::Platform::GetSharedModule(__args=0x0000000100606f38, __args=0x00007ffeefbfcbe0)::$_0&, lldb_private::ModuleSpec const&>(lldb_private::Platform::GetSharedModule(lldb_private::ModuleSpec const&, lldb_private::Process*, std::__1::shared_ptr<lldb_private::Module>&, lldb_private::FileSpecList const*, std::__1::shared_ptr<lldb_private::Module>*, bool*)::$_0&, lldb_private::ModuleSpec const&) at __functional_base:318:16
      frame #4: 0x0000000106742218 _lldb.so`std::__1::__function::__func<lldb_private::Platform::GetSharedModule(lldb_private::ModuleSpec const&, lldb_private::Process*, std::__1::shared_ptr<lldb_private::Module>&, lldb_private::FileSpecList const*, std::__1::shared_ptr<lldb_private::Module>*, bool*)::$_0, std::__1::allocator<lldb_private::Platform::GetSharedModule(lldb_private::ModuleSpec const&, lldb_private::Process*, std::__1::shared_ptr<lldb_private::Module>&, lldb_private::FileSpecList const*, std::__1::shared_ptr<lldb_private::Module>*, bool*)::$_0>, lldb_private::Status (lldb_private::ModuleSpec const&)>::operator(this=0x0000000100606f30, __arg=0x00007ffeefbfcbe0)(lldb_private::ModuleSpec const&) at functional:1562:12
      frame #5: 0x0000000106739f37 _lldb.so`std::__1::function<lldb_private::Status (lldb_private::ModuleSpec const&)>::operator(this=0x00007ffeefbfc570, __arg=0x00007ffeefbfcbe0)(lldb_private::ModuleSpec const&) const at functional:1913:12
      frame #6: 0x000000010673301f _lldb.so`lldb_private::Platform::GetRemoteSharedModule(this=0x000000010045b210, module_spec=0x00007ffeefbfcbe0, process=0x0000000101063418, module_sp=nullptr, module_resolver=0x00007ffeefbfc570, did_create_ptr=0x00007ffeefbfc9ef)> const&, bool*) at Platform.cpp:1593:16
      frame #7: 0x0000000106732c7f _lldb.so`lldb_private::Platform::GetSharedModule(this=0x000000010045b210, module_spec=0x00007ffeefbfcbe0, process=0x0000000101063418, module_sp=nullptr, module_search_paths_ptr=0x0000000100204c80, old_module_sp_ptr=0x00007ffeefbfc9f0, did_create_ptr=0x00007ffeefbfc9ef) at Platform.cpp:254:10
      frame #8: 0x00000001067faed1 _lldb.so`lldb_private::Target::GetSharedModule(this=0x0000000100806800, module_spec=0x00007ffeefbfcbe0, error_ptr=0x00007ffeefbfccf8) at Target.cpp:2040:34
      frame #9: 0x0000000107061f36 _lldb.so`lldb_private::minidump::ProcessMinidump::ReadModuleList(this=0x0000000101063418) at ProcessMinidump.cpp:402:31
      frame #10: 0x00000001070617cc _lldb.so`lldb_private::minidump::ProcessMinidump::DoLoadCore(this=0x0000000101063418) at ProcessMinidump.cpp:218:3
      frame #11: 0x000000010675aec5 _lldb.so`lldb_private::Process::LoadCore(this=0x0000000101063418) at Process.cpp:2629:18
      frame #12: 0x0000000105e045e7 _lldb.so`lldb::SBTarget::LoadCore(this=0x000000010020b590, core_file="linux-arm-partial-uuids-match.dmp", error=0x00007ffeefbfd430) at SBTarget.cpp:277:34
      frame #13: 0x0000000105e041a2 _lldb.so`lldb::SBTarget::LoadCore(this=0x000000010020b590, core_file="linux-arm-partial-uuids-match.dmp") at SBTarget.cpp:262:10
      frame #14: 0x000000010616a9ed _lldb.so`_wrap_SBTarget_LoadCore__SWIG_0((null)=0x0000000000000000, args=0x000000011ddc8710) at LLDBWrapPython.cpp:51384:22
      frame #15: 0x0000000106106d31 _lldb.so`_wrap_SBTarget_LoadCore(self=0x0000000000000000, args=0x000000011ddc8710) at LLDBWrapPython.cpp:51467:16
  (lldb) fr var module_spec.m_file
  (lldb_private::FileSpec) module_spec.m_file = {
    m_directory = (m_string = "/invalid/path/on/current/system")
    m_filename = (m_string = "libuuidmatch.so")
    m_is_resolved = true
    m_style = posix
  }
  (lldb) fr var resolved_module_spec.m_file
  (lldb_private::FileSpec) resolved_module_spec.m_file = {
    m_directory = (m_string = "/Users/labath/ll/build/dbg/lldb-test-build.noindex/functionalities/postmortem/minidump-new/TestMiniDumpUUID.test_partial_uuid_match")
    m_filename = (m_string = "libuuidmatch.so")
    m_is_resolved = false
    m_style = posix
  }

As you can see, the code happily constructs the right path based on the exec-search-path setting even though we are setting the full path on the input file spec. Can you please check why your lldb fails to reach this place?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60001/new/

https://reviews.llvm.org/D60001





More information about the llvm-commits mailing list