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

fix memory leak in post action #339

Merged
merged 1 commit into from
Mar 28, 2017
Merged

fix memory leak in post action #339

merged 1 commit into from
Mar 28, 2017

Conversation

mikz
Copy link
Contributor

@mikz mikz commented Mar 28, 2017

TEST_NGINX_CHECK_LEAK=1 prove t/009-apicast-caching.t
t/009-apicast-caching.t .. TEST 6: multi service configuration
LeakTest: [4340 4352 4352 4360 4360 4368 4376 4376 4376 4404 4404 4424 4440 4444 4444 4444 4448 4448 4448 4468 4468 4468 4488 4524 4524 4536 4536 4536 4536 4540 4548 4548 4548 4568 4568 4568 4600 4600 4600 4600 4628 4628 4628 4632 4636 4636 4636 4636 4644 4644 4644 4644 4660 4660 4660 4672 4676 4676 4676 4704 4704 4704 4704 4720 4720 4768 4768 4768 4768 4776 4776 4812 4812 4812 4812 4824 4824 4824 4824 4824 4824 4824 4824 4848 4848 4848 4848 4848 4880 4880 4880 4880 4880 4880 4880 4880 4888 4888 4888 4888]
LeakTest: k=5.8
t/009-apicast-caching.t .. 1/? TEST 7: call to backend is cached
LeakTest: [4328 4360 4376 4392 4396 4400 4400 4440 4452 4456 4456 4480 4480 4484 4512 4512 4512 4512 4556 4560 4560 4560 4584 4584 4584 4584 4628 4652 4652 4652 4652 4652 4652 4712 4716 4716 4720 4748 4748 4748 4748 4748 4752 4752 4752 4808 4808 4808 4808 4852 4852 4852 4852 4884 4884 4884 4884 4904 4904 4904 4904 4904 4948 4948 4948 4948 4972 4976 4976 4976 4976 5028 5028 5028 5028 5076 5076 5076 5080 5080 5140 5140 5140 5140 5140 5192 5192 5192 5192 5192 5208 5208 5208 5208 5208 5260 5260 5260 5260 5260]
LeakTest: k=9.2
t/009-apicast-caching.t .. 5/? TEST 5: call to backend is cached
LeakTest: [4244 4244 4280 4280 4284 4288 4304 4304 4304 4304 4304 4332 4332 4332 4332 4332 4332 4332 4368 4368 4368 4368 4400 4404 4404 4404 4404 4404 4404 4404 4404 4416 4440 4440 4440 4456 4456 4456 4456 4500 4500 4500 4500 4504 4504 4504 4504 4504 4512 4512 4512 4512 4532 4532 4532 4532 4532 4540 4540 4540 4540 4564 4564 4564 4564 4576 4576 4580 4580 4592 4604 4604 4604 4604 4620 4620 4620 4620 4632 4632 4632 4632 4664 4712 4712 4712 4712 4712 4712 4712 4712 4712 4724 4728 4728 4728 4728 4744 4748 4748]
LeakTest: k=4.8
t/009-apicast-caching.t .. ok
TEST_NGINX_CHECK_LEAK=1 prove t/009-apicast-caching.t
t/009-apicast-caching.t .. TEST 7: call to backend is cached
LeakTest: [4268 4268 4268 4268 4272 4272 4284 4284 4284 4284 4284 4284 4284 4284 4284 4296 4296 4296 4300 4300 4304 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4320 4320 4320 4320 4320 4320 4328 4328 4328 4328 4328 4328 4328 4328 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4336 4336 4336 4336 4336 4336 4336 4336 4336 4336 4336 4336 4336]
LeakTest: k=0.6
t/009-apicast-caching.t .. 1/? TEST 6: multi service configuration
LeakTest: [4204 4204 4204 4212 4212 4216 4220 4220 4228 4228 4232 4236 4236 4244 4244 4244 4248 4248 4260 4272 4288 4288 4288 4288 4288 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4296 4296 4296 4296 4296 4296 4296 4296 4296 4296 4296 4296 4296 4296 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300]
LeakTest: k=0.7
t/009-apicast-caching.t .. 4/? TEST 5: call to backend is cached
LeakTest: [4164 4172 4172 4176 4176 4192 4192 4192 4192 4192 4192 4196 4196 4200 4200 4200 4208 4208 4208 4208 4208 4208 4212 4212 4212 4212 4212 4212 4212 4212 4216 4216 4216 4216 4216 4216 4220 4220 4224 4224 4224 4224 4224 4224 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4236 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4244 4244 4244 4244 4244 4244 4244 4248 4248 4248 4248 4248 4248 4248 4248 4248 4248 4248 4248 4248]
LeakTest: k=0.7
t/009-apicast-caching.t .. ok

See how k dropped from 5~9 to < 1.

before:
TEST_NGINX_CHECK_LEAK=1 prove t/009-apicast-caching.t
t/009-apicast-caching.t .. TEST 6: multi service configuration
LeakTest: [4340 4352 4352 4360 4360 4368 4376 4376 4376 4404 4404 4424 4440 4444 4444 4444 4448 4448 4448 4468 4468 4468 4488 4524 4524 4536 4536 4536 4536 4540 4548 4548 4548 4568 4568 4568 4600 4600 4600 4600 4628 4628 4628 4632 4636 4636 4636 4636 4644 4644 4644 4644 4660 4660 4660 4672 4676 4676 4676 4704 4704 4704 4704 4720 4720 4768 4768 4768 4768 4776 4776 4812 4812 4812 4812 4824 4824 4824 4824 4824 4824 4824 4824 4848 4848 4848 4848 4848 4880 4880 4880 4880 4880 4880 4880 4880 4888 4888 4888 4888]
LeakTest: k=5.8
t/009-apicast-caching.t .. 1/? TEST 7: call to backend is cached
LeakTest: [4328 4360 4376 4392 4396 4400 4400 4440 4452 4456 4456 4480 4480 4484 4512 4512 4512 4512 4556 4560 4560 4560 4584 4584 4584 4584 4628 4652 4652 4652 4652 4652 4652 4712 4716 4716 4720 4748 4748 4748 4748 4748 4752 4752 4752 4808 4808 4808 4808 4852 4852 4852 4852 4884 4884 4884 4884 4904 4904 4904 4904 4904 4948 4948 4948 4948 4972 4976 4976 4976 4976 5028 5028 5028 5028 5076 5076 5076 5080 5080 5140 5140 5140 5140 5140 5192 5192 5192 5192 5192 5208 5208 5208 5208 5208 5260 5260 5260 5260 5260]
LeakTest: k=9.2
t/009-apicast-caching.t .. 5/? TEST 5: call to backend is cached
LeakTest: [4244 4244 4280 4280 4284 4288 4304 4304 4304 4304 4304 4332 4332 4332 4332 4332 4332 4332 4368 4368 4368 4368 4400 4404 4404 4404 4404 4404 4404 4404 4404 4416 4440 4440 4440 4456 4456 4456 4456 4500 4500 4500 4500 4504 4504 4504 4504 4504 4512 4512 4512 4512 4532 4532 4532 4532 4532 4540 4540 4540 4540 4564 4564 4564 4564 4576 4576 4580 4580 4592 4604 4604 4604 4604 4620 4620 4620 4620 4632 4632 4632 4632 4664 4712 4712 4712 4712 4712 4712 4712 4712 4712 4724 4728 4728 4728 4728 4744 4748 4748]
LeakTest: k=4.8
t/009-apicast-caching.t .. ok

after:
TEST_NGINX_CHECK_LEAK=1 prove t/009-apicast-caching.t
t/009-apicast-caching.t .. TEST 7: call to backend is cached
LeakTest: [4268 4268 4268 4268 4272 4272 4284 4284 4284 4284 4284 4284 4284 4284 4284 4296 4296 4296 4300 4300 4304 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4312 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4316 4320 4320 4320 4320 4320 4320 4328 4328 4328 4328 4328 4328 4328 4328 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4332 4336 4336 4336 4336 4336 4336 4336 4336 4336 4336 4336 4336 4336]
LeakTest: k=0.6
t/009-apicast-caching.t .. 1/? TEST 6: multi service configuration
LeakTest: [4204 4204 4204 4212 4212 4216 4220 4220 4228 4228 4232 4236 4236 4244 4244 4244 4248 4248 4260 4272 4288 4288 4288 4288 4288 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4292 4296 4296 4296 4296 4296 4296 4296 4296 4296 4296 4296 4296 4296 4296 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300 4300]
LeakTest: k=0.7
t/009-apicast-caching.t .. 4/? TEST 5: call to backend is cached
LeakTest: [4164 4172 4172 4176 4176 4192 4192 4192 4192 4192 4192 4196 4196 4200 4200 4200 4208 4208 4208 4208 4208 4208 4212 4212 4212 4212 4212 4212 4212 4212 4216 4216 4216 4216 4216 4216 4220 4220 4224 4224 4224 4224 4224 4224 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4232 4236 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4240 4244 4244 4244 4244 4244 4244 4244 4248 4248 4248 4248 4248 4248 4248 4248 4248 4248 4248 4248 4248]
LeakTest: k=0.7
t/009-apicast-caching.t .. ok

See how k dropped from 5~9 to < 1.
@mikz mikz force-pushed the post-action-memory-leak branch from 46c2c8a to 3acb7da Compare March 28, 2017 10:46
@mikz mikz merged commit 7c20c6c into master Mar 28, 2017
@mikz mikz deleted the post-action-memory-leak branch March 28, 2017 10:55
@mikz mikz removed the in progress label Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants