Skip to content

Prevent unblocking a higher-level MemoryTracker and add some guard rails - #88483

Closed
azat wants to merge 3 commits into
ClickHouse:masterfrom
azat:memory-tracker-blocker-guard-rails
Closed

azat wants to merge 3 commits into
ClickHouse:masterfrom
azat:memory-tracker-blocker-guard-rails

Conversation

@azat

@azat azat commented Oct 13, 2025

Copy link
Copy Markdown
Member

Note, it is a draft for now since I want to test it first, and then I will replace abort with chassert

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

Prevent unblocking a higher-level MemoryTracker and add some guard rails

I'm debugging one problem where I see lots of allocations allocated with
memory_blocked_context == Global in trace_log (I've extened it recently
to include this information), I've looked into this a lot already and
don't have any other ideas, so let's catch them.

@al13n321 maybe you will be curios to look

@azat
azat marked this pull request as draft October 13, 2025 20:18
@azat azat changed the title DRAFT: Prevent unblocking a higher-level MemoryTracker and add some guard rails Prevent unblocking a higher-level MemoryTracker and add some guard rails Oct 13, 2025
@clickhouse-gh

clickhouse-gh Bot commented Oct 13, 2025 •

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Oct 13, 2025
@azat
azat force-pushed the memory-tracker-blocker-guard-rails branch 2 times, most recently from 3abc51b to 040fd86 Compare October 13, 2025 21:45
azat added 3 commits October 13, 2025 23:46
I'm debugging one problem where I see lots of allocations allocated with
memory_blocked_context == Global in trace_log (I've extened it recently
to include this information), I've looked into this a lot already and
don't have any other ideas, so let's catch them.
@azat
azat force-pushed the memory-tracker-blocker-guard-rails branch from 040fd86 to 707eab1 Compare October 13, 2025 21:46
@clickhouse-gh

clickhouse-gh Bot commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

Dear @azat, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

5 similar comments
@clickhouse-gh

clickhouse-gh Bot commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Dear @azat, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

@clickhouse-gh

clickhouse-gh Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Dear @azat, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

@clickhouse-gh

clickhouse-gh Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Dear @azat, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

@clickhouse-gh

clickhouse-gh Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Dear @azat, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

@clickhouse-gh

clickhouse-gh Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Dear @azat, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

@abashkeev abashkeev added the comp-memory Memory management infrastructure: allocators (Allocator, Arena, PODArray), memory tracking, memor... label Sep 3, 2026
@azat

azat commented Oct 11, 2026 •

Copy link
Copy Markdown
Member Author

I don't remember what it was, but, I've rechecked all the traces from ci-logs and all of them went from the logging

Details
SELECT arrayJoin(flameGraph(symbols))
FROM merge(default, '^trace_log_')
WHERE (repo = 'ClickHouse/ClickHouse') AND (event_date = today()) AND (event_time >= (now() - 600)) AND (pull_request_number = 0) AND empty(arrayFilter(x -> ((x LIKE '%OwnSplitChannel%') OR (x LIKE '%Poco::Message%') OR (x LIKE '%tryGetFormattedArgs%') OR (x LIKE '%fmt::%')), symbols)) AND (CAST(memory_blocked_context, 'Enum(\'Global\' = 0)') = 'Global')
SETTINGS merge_table_max_tables_to_look_for_schema_inference = 100
INTO OUTFILE '/tmp/global.tsv' TRUNCATE
SETTINGS allow_introspection_functions = 1

@azat azat closed this Oct 11, 2026
@azat
azat deleted the memory-tracker-blocker-guard-rails branch October 11, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-memory Memory management infrastructure: allocators (Allocator, Arena, PODArray), memory tracking, memor... pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants