Skip to content
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

Consider Increasing Thread Limit in CrashReport #533

Open
GLinnik21 opened this issue Jul 16, 2024 · 1 comment
Open

Consider Increasing Thread Limit in CrashReport #533

GLinnik21 opened this issue Jul 16, 2024 · 1 comment

Comments

@GLinnik21
Copy link
Collaborator

Currently, the KSMachineContext struct in CrashReport has a fixed limit of 100 threads. This limitation may be insufficient for some applications. Since dynamically sizing this array isn't feasible due to its use in UNIX signal handling and mach-Exception, we need to consider whether increasing this limit is necessary.

typedef struct KSMachineContext {
thread_t thisThread;
thread_t allThreads[100];
int threadCount;
bool isCrashedContext;
bool isCurrentThread;
bool isStackOverflow;
bool isSignalContext;
STRUCT_MCONTEXT_L machineContext;
} KSMachineContext;

  • Necessity: Is the current 100-thread limit adequate for most applications, or are there significant use cases where this limit is exceeded?
  • Increase Limit: If an increase is necessary, what should the new limit be? Options could include doubling the limit to 200 or selecting another appropriate number.

Would increasing the thread limit be beneficial, and if so, to what extent?

@DmT021
Copy link

DmT021 commented Jul 17, 2024

If we can't afford a really big array to guarantee all the threads will be captured, then we should at least guarantee that the crashed thread is in the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants