Skip to content

Provide diagnostics on stack overflow#16346

Merged
alexey-milovidov merged 14 commits intomasterfrom
sigaltstack
Dec 17, 2020
Merged

Provide diagnostics on stack overflow#16346
alexey-milovidov merged 14 commits intomasterfrom
sigaltstack

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov commented Oct 25, 2020

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Provide diagnostics in server logs in case of stack overflow, send error message to clickhouse-client. This closes #14840

@robot-clickhouse robot-clickhouse added the pr-build Pull request with build/testing/packaging improvement label Oct 25, 2020
@alexey-milovidov alexey-milovidov marked this pull request as draft October 26, 2020 20:32
@alexey-milovidov alexey-milovidov marked this pull request as ready for review December 17, 2020 04:29
@alexey-milovidov
Copy link
Copy Markdown
Member Author

alexey-milovidov commented Dec 17, 2020

Now it works perfectly.

Tested manually with three ways:

  1. SELECT trap('read nullptr c++')
  2. SELECT trap('stack overflow')
  3. kill -11 $(pidof clickhouse-server)

I can confirm that this PR was rescued by ClickHouse/libunwind#7
Before this change, too large stack space was needed for unwinding and 4K alt. stack was not enough.

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

Labels

pr-build Pull request with build/testing/packaging improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Try capturing stack overflow errors?

2 participants