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

sparkbar aggregate function causes server to be killed with OOM #44467

Closed
vzakaznikov opened this issue Dec 20, 2022 · 1 comment · Fixed by #44489
Closed

sparkbar aggregate function causes server to be killed with OOM #44467

vzakaznikov opened this issue Dec 20, 2022 · 1 comment · Fixed by #44489
Labels
bug Confirmed user-visible misbehaviour in official release memory When memory usage is higher than expected

Comments

@vzakaznikov
Copy link
Contributor

Describe what's wrong
Using sparkbar aggregate function on tables that contain large UInt64 values causes OOM (Out of Memory) Killer process to kill ClickHouse server irrespective of any memory usage restrictions set.

Does it reproduce on recent release?
Yes. Any version >=21.11 including the latest 22.12. Also reproducible on ClickHouse.Cloud.

How to reproduce

DROP TABLE IF EXISTS test; 
CREATE TABLE test (x UInt64, y UInt8) Engine=MergeTree ORDER BY tuple();
INSERT INTO test VALUES (18446744073709551615,255),(0,0),(0,0),(4036797895307271799,163)
SELECT sparkbar(9)(x,y) FROM test;

Expected behavior

Memory restrictions should be enforced and server should not be killed with OOM.

Error message and/or stacktrace

2022.12.20 01:48:30.983421 [ 1 ] {} <Fatal> Application: Child process was terminated by signal 9 (KILL). If it is not done by 'forcestop' command or manually, the possible cause is OOM Killer (see 'dmesg' and look at the '/var/log/kern.log' for the details).
@vzakaznikov vzakaznikov added the potential bug To be reviewed by developers and confirmed/rejected. label Dec 20, 2022
@filimonov filimonov added the memory When memory usage is higher than expected label Dec 21, 2022
@kitaisreal kitaisreal added bug Confirmed user-visible misbehaviour in official release and removed potential bug To be reviewed by developers and confirmed/rejected. labels Dec 21, 2022
@tavplubix
Copy link
Member

Ref: #27481
cc: @nicelulu, @evillique

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release memory When memory usage is higher than expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants