Merged
Conversation
…ia into dcn-safe-crash-log-file
kpamnany
reviewed
Mar 22, 2024
kpamnany
left a comment
There was a problem hiding this comment.
jl_inside_signal_handler() will return 1 for the mutator threads when they're stopped for GC... do they ever call jl_safe_printf while they're waiting?
That's the only question I have about this... are there any other situations where we call jl_safe_printf in signal handler context besides when we're emitting a stack trace.
…nix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
…in.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
|
Comment for the future: Line 438 in ba5345f void jl_critical_error(int sig, int si_code, bt_context_t *context, jl_task_t *ct)which calls https://github.com/RelationalAI/julia/blob/v1.10.2%2BRAI/src/stackwalk.c#L658 void jl_print_bt_entry_codeloc(int sig, jl_bt_element_t *bt_entry) JL_NOTSAFEPOINT
We could work up in the stack to emit a single JSON line that includes all backtrace lines if we want to. |
kpamnany
approved these changes
Mar 22, 2024
kpamnany
left a comment
There was a problem hiding this comment.
I think this is okay. I don't much like the name --safe-crash-log-file, but no need for bike-shedding atm. :)
d-netto
added a commit
that referenced
this pull request
Apr 16, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
DelveCI
pushed a commit
that referenced
this pull request
Apr 23, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
DelveCI
pushed a commit
that referenced
this pull request
Apr 24, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
DelveCI
pushed a commit
that referenced
this pull request
Apr 30, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
DelveCI
pushed a commit
that referenced
this pull request
Apr 30, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
DelveCI
pushed a commit
that referenced
this pull request
May 2, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
DelveCI
pushed a commit
that referenced
this pull request
May 9, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
DelveCI
pushed a commit
that referenced
this pull request
May 19, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
3 tasks
DelveCI
pushed a commit
that referenced
this pull request
May 26, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
DelveCI
pushed a commit
that referenced
this pull request
May 28, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
DelveCI
pushed a commit
that referenced
this pull request
May 29, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
Drvi
pushed a commit
that referenced
this pull request
Jun 7, 2024
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
nickrobinson251
pushed a commit
that referenced
this pull request
Feb 26, 2025
* --safe-crash-log-file flag * Update init.c * json escape jl_safe_printf when safe crash log file * add timestamp to json logs * port it to aarch64 darwin * fix minor warning * missing double quote * Suggestion from code review: make sig_stack_size a const in signals-unix.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * Suggestion from code review: make sig_stack size a const in signals-win.c Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com> * more suggestions from Kiran's review * more suggestions from review --------- Co-authored-by: Malte Sandstede <malte@sandstede.com> Co-authored-by: Adnan Alhomssi <adnan.alhomssi@relational.ai> Co-authored-by: Kiran Pamnany <kpamnany@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Creates a
--safe-crash-log-filethat is used to redirect crash logs created while we were running the signal handler.For now it's only x86_64 Linux but shouldn't be that hard to port it to MacOS.
Example usage:
Which leads to:
Checklist
Requirements for merging:
port-to-*labels that don't apply.