-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack overflow not sent to backend #977
Comments
Hi @pontusn, thanks for the report. Can you provide more information?
I am just asking because I can't reproduce this. I regularly test against stack overflows, and Sentry certainly receives stack overflows on Windows. Can you elaborate on your mitigations? Did any of them fix the failure to report (i.e., do you see In particular,
Can you explain what you mean by "naive" integrations? What do you expect from the Native SDK? |
The crash I was investigating happened inside MSFTEDIT_CLASS when handling WM_COPY for 260000 characters. I suspect some internal handling use We have been using Sentry Native SDK with great results for +3 years. The "naive" integrations is simply calling I'll try to investigate the problem deeper, but for some reason these crashes are nor uploaded.... |
I've now confirmed that usage of |
Thanks! With my question regarding other kinds of crashes, I want to ensure that stack-overflows specifically do not report instead of you experiencing a regression with crash reporting in general. Can I ask you to check a few things?
It's awesome that the Native SDK has given you value over the years. We'll try to keep it that way! None of the mentioned mitigations should be necessary for the Native SDK to detect the crash, so let's find out why it is not reporting the stack overflow. On the other hand, if you expect that some part of your application requires stack allocations of any considerable size and there is no way to change that to a heap allocation, then I think specifying larger stack commit/reserve values is the right approach, independent of your use of the Native SDK. |
I experimented a little more, and I can provoke stack overflows that hit your scenario. I seemingly have hit the At this point, the stack is exhausted enough that the cc @kahest, this is @pontusn, you don't need to do any more checks on your side. Thanks again for the report! |
Any information on when fix for this will be included in SDK? |
Not before next week. Other tasks, including precursors for this topic, are still in progress. After these tasks it will be the next thing I will work on. Just to be clear, we cannot provide a comprehensive fix for this problem because we don't own all threads. For these, it is mostly a case for the documentation. We will provide a fix for the thread that executes |
For our product, where the integration with Sentry is in a separate DLL, we hooked thread-level injection via DllMain:
I would assume you could use similar pattern for These articles provided me with interesting details: |
Thanks @pontusn. The problem with using
But I'll consider adding it, even if only as part of the documentation. |
Fair limitations, to my understanding there is no alternative method to inject code for thread initialization in Windows. For most applications I would assume Sentry is among first things to initialize on the start thread, hence all threads should be included for real world use cases. The static scenario could be handled by embedding a minimal DLL for this purpose that is exported to file and loaded dynamically. However, as you already mentioned, documentation is probably the key part of addressing this issue |
Description
We have discovered that crashes due to stack overflow are not uploaded to Sentry. The application silently crash without any additional details reported.
When does the problem happen
Environment
Steps To Reproduce
Generate stack overflow by allocating all available stack and then calling into any function.
Log output
None.
Mitigations
After discovering this issue we applied several mitigations:
SetThreadStackGuarantee
_resetstkoflw
to avoid subsequent crash in error handlingHowever, I would very much prefer that this situations was handled also with "naive" integration.
The text was updated successfully, but these errors were encountered: