[DRE-maint] Bug#778303: chef: Memory leak
Piotr Pańczyk
piotr.panczyk at assecobs.pl
Fri Jan 8 14:46:04 UTC 2016
Hello again,
> I think that is a serious regression. If you manage to make it work
> correctly, please do get in touch and we can prepare a stable update for
> the memory leak.
I think I've done it, looking at the source of chef 11.12.8-2 (from
Jessie). I'm not a programmer and I know Ruby only a little, so it would
probably be possible to do it better, but it's been working fine on
about 150 nodes for over 5 months. The stacktrace is still visable in
the output (and also in logs), but the chef-stacktrace.out file is also
produced properly, including the forked client stacktrace. I attach the
patch and chef-stacktrace.out files to compare - from modified Wheezy
package and from Jessie.
Is the result satisfying?
> adding new features in a stable update is generally not a good idea,
> no matter what.
OK, I understand. However, I found another bug in the package, related
to FileEdit. Both the issue and the solution is here:
https://github.com/chef/chef/pull/754
Please let me know if it is possible to apply it together with the
forked runs (technically it is), or should I open another issue.
--
Greetings,
Piotr Pańczyk
________________________________
Asseco Business Solutions S.A.
ul. Konrada Wallenroda 4c
20-607 Lublin
tel.: +48 81 535 30 00
fax: +48 81 535 30 05
Sąd Rejonowy Lublin-Wschód w Lublinie z siedzibą w Świdniku
VI Wydział Gospodarczy Krajowego Rejestru Sądowego
KRS 0000028257
NIP 522-26-12-717
kapitał zakładowy 167 090 965,00 zł (w całości opłacony)
www.assecobs.pl
________________________________
Powyższa korespondencja przeznaczona jest wyłącznie dla osoby lub podmiotu, do którego jest adresowana i może zawierać informacje o charakterze poufnym lub zastrzeżonym. Nieuprawnione wykorzystanie informacji zawartych w wiadomości e-mail przez osobę lub podmiot nie będący jej adresatem jest zabronione odpowiednimi przepisami prawa. Odbiorca korespondencji, który otrzymał ją omyłkowo, proszony jest o niezwłoczne zawiadomienie nadawcy drogą elektroniczną lub telefonicznie i usunięcie tej treści z poczty elektronicznej. Dziękujemy. Asseco Business Solutions S.A.
________________________________
Weź pod uwagę ochronę środowiska, zanim wydrukujesz ten e-mail.
________________________________
This information is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Unauthorized use of this information by person or entity other than the intended recipient is prohibited by law. If you received this by mistake, please immediately contact the sender by e-mail or by telephone and delete this information from any computer. Thank you. Asseco Business Solutions S.A.
________________________________
Please consider your environmental responsibility before printing this e-mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: forked_client_runs.diff
Type: text/x-patch
Size: 6969 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20160108/bd9ca261/attachment.bin>
-------------- next part --------------
Generated at 2016-01-08 15:18:41 +0100
RuntimeError: ruby_block[fail the run] (test::default line 22) had an error: RuntimeError: deliberately fail the run
/var/chef/cache/cookbooks/test/recipes/default.rb:24:in `block (2 levels) in from_file'
/usr/lib/ruby/vendor_ruby/chef/provider/ruby_block.rb:33:in `call'
/usr/lib/ruby/vendor_ruby/chef/provider/ruby_block.rb:33:in `block in action_run'
/usr/lib/ruby/vendor_ruby/chef/mixin/why_run.rb:52:in `call'
/usr/lib/ruby/vendor_ruby/chef/mixin/why_run.rb:52:in `add_action'
/usr/lib/ruby/vendor_ruby/chef/provider.rb:155:in `converge_by'
/usr/lib/ruby/vendor_ruby/chef/provider/ruby_block.rb:32:in `action_run'
/usr/lib/ruby/vendor_ruby/chef/provider.rb:120:in `run_action'
/usr/lib/ruby/vendor_ruby/chef/resource.rb:637:in `run_action'
/usr/lib/ruby/vendor_ruby/chef/runner.rb:49:in `run_action'
/usr/lib/ruby/vendor_ruby/chef/runner.rb:81:in `block (2 levels) in converge'
/usr/lib/ruby/vendor_ruby/chef/runner.rb:81:in `each'
/usr/lib/ruby/vendor_ruby/chef/runner.rb:81:in `block in converge'
/usr/lib/ruby/vendor_ruby/chef/resource_collection.rb:98:in `block in execute_each_resource'
/usr/lib/ruby/vendor_ruby/chef/resource_collection/stepable_iterator.rb:116:in `call'
/usr/lib/ruby/vendor_ruby/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/usr/lib/ruby/vendor_ruby/chef/resource_collection/stepable_iterator.rb:85:in `step'
/usr/lib/ruby/vendor_ruby/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/usr/lib/ruby/vendor_ruby/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/usr/lib/ruby/vendor_ruby/chef/resource_collection.rb:96:in `execute_each_resource'
/usr/lib/ruby/vendor_ruby/chef/runner.rb:80:in `converge'
/usr/lib/ruby/vendor_ruby/chef/client.rb:345:in `converge'
/usr/lib/ruby/vendor_ruby/chef/client.rb:431:in `do_run'
/usr/lib/ruby/vendor_ruby/chef/client.rb:213:in `block in run'
/usr/lib/ruby/vendor_ruby/chef/client.rb:207:in `fork'
/usr/lib/ruby/vendor_ruby/chef/client.rb:207:in `run'
/usr/lib/ruby/vendor_ruby/chef/application.rb:217:in `run_chef_client'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:328:in `block in run_application'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:317:in `loop'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:317:in `run_application'
/usr/lib/ruby/vendor_ruby/chef/application.rb:67:in `run'
/usr/bin/chef-client:25:in `<main>'
-------------- next part --------------
Generated at 2016-01-08 15:18:47 +0100
RuntimeError: ruby_block[fail the run] (test::default line 22) had an error: RuntimeError: deliberately fail the run
/var/chef/cache/cookbooks/test/recipes/default.rb:24:in `block (2 levels) in from_file'
/usr/lib/ruby/vendor_ruby/chef/provider/ruby_block.rb:28:in `call'
/usr/lib/ruby/vendor_ruby/chef/provider/ruby_block.rb:28:in `action_create'
/usr/lib/ruby/vendor_ruby/chef/resource.rb:472:in `run_action'
/usr/lib/ruby/vendor_ruby/chef/runner.rb:49:in `run_action'
/usr/lib/ruby/vendor_ruby/chef/runner.rb:85:in `block (2 levels) in converge'
/usr/lib/ruby/vendor_ruby/chef/runner.rb:85:in `each'
/usr/lib/ruby/vendor_ruby/chef/runner.rb:85:in `block in converge'
/usr/lib/ruby/vendor_ruby/chef/resource_collection.rb:94:in `block in execute_each_resource'
/usr/lib/ruby/vendor_ruby/chef/resource_collection/stepable_iterator.rb:116:in `call'
/usr/lib/ruby/vendor_ruby/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/usr/lib/ruby/vendor_ruby/chef/resource_collection/stepable_iterator.rb:85:in `step'
/usr/lib/ruby/vendor_ruby/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/usr/lib/ruby/vendor_ruby/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/usr/lib/ruby/vendor_ruby/chef/resource_collection.rb:92:in `execute_each_resource'
/usr/lib/ruby/vendor_ruby/chef/runner.rb:80:in `converge'
/usr/lib/ruby/vendor_ruby/chef/client.rb:333:in `converge'
/usr/lib/ruby/vendor_ruby/chef/client.rb:364:in `do_run'
/usr/lib/ruby/vendor_ruby/chef/client.rb:152:in `block in run'
/usr/lib/ruby/vendor_ruby/chef/client.rb:148:in `fork'
/usr/lib/ruby/vendor_ruby/chef/client.rb:148:in `run'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:260:in `block in run_application'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:247:in `loop'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:247:in `run_application'
/usr/lib/ruby/vendor_ruby/chef/application.rb:70:in `run'
/usr/bin/chef-client:25:in `<main>'
More information about the Pkg-ruby-extras-maintainers
mailing list