Skip to content

Fix: jobs stack trace object is not initialized properly#76191

Merged
yakov-olkhovskiy merged 3 commits intomasterfrom
fix-job-stack-trace
Feb 18, 2025
Merged

Fix: jobs stack trace object is not initialized properly#76191
yakov-olkhovskiy merged 3 commits intomasterfrom
fix-job-stack-trace

Conversation

@yakov-olkhovskiy
Copy link
Copy Markdown
Member

@yakov-olkhovskiy yakov-olkhovskiy commented Feb 15, 2025

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Fixed issue of stack traces from parent threads of a job (enable_job_stack_trace setting) are not printed out.
Fixed issue enable_job_stack_trace setting is not properly propagated to the threads resulting stack trace content not always respects this setting.

First issue was introduced by #67173.
The problem is that static thread_local members are lazy initialized, so ThreadFramePointers is never constructed because it's never accessed. Solved by introducing initializer function which should be called at least ones at the start of a thread.

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Feb 15, 2025

Workflow [PR], commit [5d74781]

@clickhouse-gh clickhouse-gh bot added the pr-bugfix Pull request with bugfix, not backported by default label Feb 15, 2025
@alexey-milovidov
Copy link
Copy Markdown
Member

Can we add a test?

@antonio2368 antonio2368 self-assigned this Feb 17, 2025
@yakov-olkhovskiy yakov-olkhovskiy added this pull request to the merge queue Feb 18, 2025
Merged via the queue into master with commit 7c9b8d8 Feb 18, 2025
116 of 117 checks passed
@yakov-olkhovskiy yakov-olkhovskiy deleted the fix-job-stack-trace branch February 18, 2025 00:55
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants