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



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to