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

Add option to jl_print_task_backtraces(bool) to control whether or not to print DONE tasks #47933

Merged
merged 2 commits into from
Dec 28, 2022

Conversation

NHDaly
Copy link
Member

@NHDaly NHDaly commented Dec 19, 2022

This lets you print all live tasks, with less noise in the logs, in case it's been a while since the last GC.

In some cases, we are seeing many thousands of DONE Tasks, which greatly increase the noise in the logs, and can overwhelm the DataDog logging.

This addresses part of the logging issues identified in #47932.

@vilterp and @msagarpatel for review.

This lets you print all live tasks, with less noise in the logs, in case
it's been a while since the last GC.

In some cases, we are seeing many thousands of DONE Tasks, which greatly
increase the noise in the logs, and can overwhelm the DataDog logging.
@NHDaly NHDaly requested a review from kpamnany December 19, 2022 22:04
src/stackwalk.c Outdated Show resolved Hide resolved
@vilterp
Copy link
Contributor

vilterp commented Dec 19, 2022

I kind of just want to change jl_print_backtraces to be this — i.e. to always skip tasks that are done. I can't think of a case where I'd want to see them 🤔

@kpamnany
Copy link
Contributor

I kind of just want to change jl_print_backtraces to be this — i.e. to always skip tasks that are done. I can't think of a case where I'd want to see them 🤔

Right now it's not very useful but I haven't given up on a task naming scheme; with that it would be possible to tell which task was completed and that could be useful information. For now though, you're right that having done tasks in this list don't really add value.

@NHDaly
Copy link
Member Author

NHDaly commented Dec 20, 2022

I just came back here to say the same thing as Pete. I was thinking about this when brushing my teeth just now, and indeed it seems like it'd be better to just always turn this off, without a parameter. And if we ever find some situation in the future, like named tasks, where we want it again, we could turn it back on or add a param?

But I'm open to keeping the param now if you do feel that there's value! But yeah, my gut leans the same as Pete's.

@kpamnany: what do you think for a final call?

@kpamnany
Copy link
Contributor

Yeah, I think an int parameter makes the interface a bit more future-proof.

@NHDaly NHDaly force-pushed the nhd-jl_print_task_backtraces-skip-done branch from 5f7beed to d8b0518 Compare December 27, 2022 22:21
@NHDaly
Copy link
Member Author

NHDaly commented Dec 27, 2022

Hokay, per popular consensus, i have switched to a boolean parameter. 0 means don't show the completed tasks. 1 means do show completed tasks. I think that in most cases, most users will want 0, but sometimes they may want 1 (such as to check for the pointer to a task that they expect to be there).

@NHDaly
Copy link
Member Author

NHDaly commented Dec 27, 2022

Please take a final look. This should be backported to 1.9, since it is modifying a not-yet-released feature.

@NHDaly NHDaly added the backport 1.9 Change should be backported to release-1.9 label Dec 27, 2022
@NHDaly NHDaly changed the title Add jl_print_task_backtraces_skip_done(), which skips done tasks. Add option to jl_print_task_backtraces(bool) to control whether or not to print DONE tasks Dec 28, 2022
@NHDaly NHDaly merged commit 8324512 into master Dec 28, 2022
@NHDaly NHDaly deleted the nhd-jl_print_task_backtraces-skip-done branch December 28, 2022 15:34
@NHDaly
Copy link
Member Author

NHDaly commented Dec 28, 2022

thanks, merged.

NHDaly added a commit to RelationalAI/julia that referenced this pull request Dec 28, 2022
Add option to `jl_print_task_backtraces(bool)` to control whether or not to print DONE tasks (JuliaLang#47933)
KristofferC pushed a commit that referenced this pull request Dec 28, 2022
…not to print DONE tasks (#47933)

Add option to `jl_print_task_backtraces(bool)` to control whether or not to print DONE tasks

This lets you print all live tasks, with less noise in the logs, in case
it's been a while since the last GC.

In some cases, we are seeing many thousands of DONE Tasks, which greatly
increase the noise in the logs, and can overwhelm the DataDog logging.

The API now takes a bool, which can allow us to control this setting, letting us print
the DONE tasks if the user wants to, but also hide them if desired.

(cherry picked from commit 8324512)
@KristofferC KristofferC mentioned this pull request Dec 28, 2022
14 tasks
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label Jan 2, 2023
NHDaly added a commit to RelationalAI/julia that referenced this pull request Jan 2, 2023
Add option to `jl_print_task_backtraces(bool)` to control whether or not to print DONE tasks (JuliaLang#47933)
kpamnany pushed a commit to RelationalAI/julia that referenced this pull request Mar 24, 2023
Add option to `jl_print_task_backtraces(bool)` to control whether or not to print DONE tasks (JuliaLang#47933)
kpamnany pushed a commit to RelationalAI/julia that referenced this pull request Apr 28, 2023
Add option to `jl_print_task_backtraces(bool)` to control whether or not to print DONE tasks (JuliaLang#47933)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants