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

create/insert into/drop columnar table has a memleak #730

Closed
sanikolaev opened this issue Mar 21, 2022 · 2 comments
Closed

create/insert into/drop columnar table has a memleak #730

sanikolaev opened this issue Mar 21, 2022 · 2 comments
Labels

Comments

@sanikolaev
Copy link
Collaborator

sanikolaev commented Mar 21, 2022

In this version:

Manticore 4.2.1 fa3ecbd@220319 dev (columnar 1.14.1 fce43f7@220203)  

if you:

  • create a simple table (f text, a int) engine='columnar'
  • put 1M docs into to
  • drop table

many times you'll end up with OOM.

The same happens in 4.2.0. I can't reproduce it without engine='columnar'. malloc_trim doesn't help.

Config

snikolaev@dev:~/memleak2$ cat configless.conf  
searchd {  
   listen = 127.0.0.1:9315:mysql  
   data_dir = data  
   pid_file = 9315.pid  
   log = searchd.log  
   binlog_path =  
   auto_optimize = 0  
   threads = 1  
   max_packet_size = 128M  
}  

Example

snikolaev@dev:~/memleak2$ while true; do mysql -P9315 -h0 -e "debug malloc_trim; drop table if exists t; create table t(f text, a int) engine='columnar'"; for m in `seq 1 1000`; do (echo -n "insert into t values "; for n in `seq 1 1000`; do echo -n "(0,'abc',34324324324324324)"; [ $n != 1000 ] && echo -n ","; done; echo ";")|mysql -P9315 -h0; done; cat /proc/`cat 9315.pid`/smaps|grep Anonymous|awk '{SUM =} END {print SUM/1024}'; done;  
 ------------- --------   
| command     | result |  
 ------------- --------   
| malloc_trim | 1      |  
 ------------- --------   
372.516  
 ------------- --------   
| command     | result |  
 ------------- --------   
| malloc_trim | 1      |  
 ------------- --------   
432.586  
...   
2366.6  
 ------------- --------   
| command     | result |  
 ------------- --------   
| malloc_trim | 1      |  
 ------------- --------   
2330.48  
 ------------- --------   
| command     | result |  
 ------------- --------   
| malloc_trim | 1      |  
 ------------- --------   
2406.43  
@sanikolaev sanikolaev added the bug label Mar 21, 2022
@githubmanticore
Copy link
Contributor

➤ Ilya Kuznetsov commented:

Fixed in 4031d38

@airolg
Copy link
Contributor

airolg commented Apr 15, 2022

done

@airolg airolg closed this as completed Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants