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
Allow user reported exceptions to not suspend all threads #84
base: master
Are you sure you want to change the base?
Conversation
Hmm this could get a little dangerous. Trying to walk the stack trace of a running thread is just asking for trouble. Also, it would no longer be a snapshot of exactly where each thread was in relation to each other at the time of the crash. If it's just the user portion that's causing problems, maybe we can only suspend the threads while they are being traced and then turn them back on afterwards? |
I toyed with that but its a little tricky to allow the other sentries to still lock all the threads (which presumably they need to do in the event of a terminal crash?) Its easy to do if all sentries can rely on the threadwalker to lock the threads, but im not sure that's appropriate? I could possibly check to see if the threads are already locked further down and lock them if the usersentry has left the threads running? If you let me know what approach is best I can throw the code together. |
They only need to lock down the threads to ensure that the threads are all in the exact state they were in at the time of the crash. Technically, the threads only need to remain locked while the stack trace is generated. Once that's been saved, they can be restarted again. Probably the best way to tackle this would be to allow the sentries to lock the threads, as they do now. Then, in KSCrashReport.c, move the So then the order would be: lock threads (in the sentry), in |
1a9abf9
to
774b4fb
Compare
Gimme a few days to finish another feature I'm working on. This sort of change requires a level of thread safety that's not in the lower core yet. |
Basically a lot of things need to be changed from global allocation to stack allocation (or even heap, where possible). |
Hi, same issue for me. I have several custom errors (maybe 20 errors) fired in a short period time, and suspending all threads is visually noticable. Any advices? Is it worth to wait for you to take a look at this? |
I'm working on thread safety as we speak :) |
Really good news! Many thanks man! |
Suspending all threads for user reported exceptions in games can cause a noticeable lag while the report is being generated so I've added a flag to control that functionality.