[Lldb-commits] [PATCH] D70238: [lldb] Allow loading of minidumps with no process id

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 10 02:35:19 PST 2020


labath added a comment.

In D70238#1813280 <https://reviews.llvm.org/D70238#1813280>, @clayborg wrote:

> The pid usually comes from the MinidumpMiscInfoFlags::ProcessID right? This is a minidump supported directory entry. We don't actually rely on /proc/%d/status right?


Actually, we are. :/ Breakpad does not emit the Misc stream on linux. It always tries to emit the "status" stream, but it seems to sometimes fail (we are getting a fair amount of minidumps like this). It's not fully clear why this happens, but our current hypothesis is file descriptor exhaustion (EMFILE).

Crashpad is always out of process (so it should not suffer from EMFILE), and it also always emits the Misc stream. Since crashpad is the future, and it should always be able to save the PID, this problem will hopefully go away in the future, so I agree it does not make sense to go out of our way (and introducing `LLDB_UNKNOWN_PROCESS_ID` may be just that) to support this use case. However, I still wanted to see how far I can take this, since the gdb-remote code has a similar problem (though talking to bare metal stubs is also somewhat "niche"). And I do agree with Jim that it we avoid lying to the user.

I think I'll just set the pid to 1 instead. I'll moderate the lying aspect by mentioning this explicitly in the error/warning message.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70238





More information about the lldb-commits mailing list