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

Keep 'class' method to avoid error with Sigdump.dump on server stop. #2186

Merged
merged 1 commit into from
Nov 22, 2018

Conversation

sugi
Copy link
Contributor

@sugi sugi commented Nov 22, 2018

When stopping fluentd, sometime I get follwoing error message on stderr;

Unexpected error undefined method `class' for #<Fluent::Plugin::RecordTransformerFilter::RubyPlaceholderExpander::CleanroomExpander:0x00007f7f1aca50d0>
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:74:in `block in dump_object_count'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:73:in `each_object'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:73:in `dump_object_count'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:18:in `block in dump'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:136:in `open'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:136:in `_open_dump_path'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:14:in `dump'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/serverengine-2.0.7/lib/serverengine/server.rb:74:in `dump'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/serverengine-2.0.7/lib/serverengine/server.rb:112:in `block (2 levels) in install_signal_handlers'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/serverengine-2.0.7/lib/serverengine/signal_thread.rb:96:in `main'

This cause by Sigdump.dump fails with CleanroomExpander because it will call class method for all objects to gathering stats.

This patch just keep class method to avoid error.

@sugi sugi force-pushed the fix-sigdump-error branch from c7df9e6 to 81ac6e1 Compare November 22, 2018 04:28
When stopping fluentd, sometime I get follwoing error message on stderr;

```
Unexpected error undefined method `class' for #<Fluent::Plugin::RecordTransformerFilter::RubyPlaceholderExpander::CleanroomExpander:0x00007f7f1aca50d0>
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:74:in `block in dump_object_count'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:73:in `each_object'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:73:in `dump_object_count'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:18:in `block in dump'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:136:in `open'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:136:in `_open_dump_path'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/sigdump-0.2.4/lib/sigdump.rb:14:in `dump'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/serverengine-2.0.7/lib/serverengine/server.rb:74:in `dump'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/serverengine-2.0.7/lib/serverengine/server.rb:112:in `block (2 levels) in install_signal_handlers'
  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/serverengine-2.0.7/lib/serverengine/signal_thread.rb:96:in `main'
```

This cause Sigdump.dump fails with CleanroomExpander because it will
call `class` method for all objects to gathering stats.

This patch just keep `class` method to avoid error.

Signed-off-by: Tatsuki Sugiura <[email protected]>
@sugi sugi force-pushed the fix-sigdump-error branch from 81ac6e1 to c4d0a88 Compare November 22, 2018 04:29
@repeatedly repeatedly merged commit 2be8387 into fluent:master Nov 22, 2018
@repeatedly
Copy link
Member

Thanks!

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