memory leak after repeated model creation/destruction
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Christian Muirhead |
Bug Description
I'm using a simple script to repeatedly create and destroy models on my local lxd provider:
http://
After about 1500 models, jujud's memory usage has gone from ~500M at the start to about ~8GB (RSS as shown by top). If I continue the test, juju starts getting errors for failure to allocate memory:
http://
Here it is using about 10G:
18126 165536 20 0 11.335g 9.978g 13916 R 650.7 63.9 153:23.76 jujud
Also for some reason I can't destroy the models I have left:
http://
This should be easy to reproduce - it takes about 30 minutes to get up to about 8GB on my laptop, but you can see the memory use growing much sooner than that.
This is with beta18.
summary: |
- memory leak and can't destroy models after repeated model - creation/destruction + memory leak after repeated model creation/destruction |
description: | updated |
description: | updated |
tags: | added: eda |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 2.0.0 |
Changed in juju: | |
assignee: | nobody → Alexis Bruemmer (alexis-bruemmer) |
Changed in juju: | |
assignee: | Alexis Bruemmer (alexis-bruemmer) → Christian Muirhead (2-xtian) |
Changed in juju: | |
status: | Triaged → In Progress |
tags: | added: uosci |
tags: | added: ateam |
Changed in juju: | |
milestone: | 2.0-rc3 → 2.0.0 |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
I can reproduce both the leak and the error destroying models for this. I've added an endpoint to the introspection worker to produce a heap dump so I can work out what it is that's being leaked. The tooling in this area of Go is a bit rough - I'm trying to use the hview tool linked to from this thread https:/ /github. com/golang/ go/issues/ 16410.
It doesn't work with Go 1.7 yet - I tried hacking it to ignore the version reported in the dump, but got errors about unrecognised record kind 101, so I'm trying again with a binary built with Go 1.6.