Exceptions not caught on newer Intel CPU

83 views
Skip to first unread message

Marc Alexander

unread,
Aug 1, 2022, 2:51:15 AM8/1/22
to Google Breakpad Discuss
Hi all,

We've been using Breakpad for a while in our software to generate minidumps during application crashes (Windows, x64). So far this has worked fine and continues to work fine on computers on which this has worked on so far.

However, we have recently noticed that minidumps are not created on some of the machines we have recently introduced in our development team (Lenovo P15 Gen 2). These use the same standard setup of Core i7, 16 GB RAM, same Windows 10 version. The only bigger difference is that the laptops now have Intel Tiger Lake CPUs instead of the previous Intel Comet Lake.
None of the crashes that are reproducibly caught and result in dumps on other machines create a minidump or even a call to the filter callback even though the application does crash in the same way. The windows event viewer will also then show that the application has crashed. Exactly the same binaries are used so this shouldn't be a compilation issue.
So far, we were only able to create minidumps on these machines by using the windows functionality to collect user-mode dumps (https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps).

Does anyone have an idea on how this issue could be solved? As mentioned, my current theory is that this is related to the CPU used on the new machines but I could of course be way off. We have even run some tests on whether crashpad could solve this issue but the behavior is the same.

Thanks,
Marc

Milian Wolff

unread,
Aug 24, 2023, 8:46:28 AM8/24/23
to Google Breakpad Discuss
Hey there,

we recently stumbled over this too in a graphical Qt application. The reason is that the Intel GPU driver is overriding the call to `SetUnhandledExceptionFilter`, see also:

I think this is clearly a bug in the Intel GPU driver, it should not call this function. What's worse, this only happens asynchronously once the driver is initialized, making it hard to track down. That said, we found a workaround which seems to work for us now.

I'm unsure if we can add the hacky "blindly reapply the exception filter" code I added to the windows exception handler of breakpad, it really is just a matter of:

```
void ExceptionHandler::ReapplyExceptionHandler()
{
  if (handler_types_ & HANDLER_EXCEPTION)
    SetUnhandledExceptionFilter(HandleException);
}
```

Just call this after the Intel GPU driver is initialized, i.e. after showing your first UI window, then it should work again...
Reply all
Reply to author
Forward
0 new messages