Bug #1703

Thread error in tagmail

Added by Martin Englund over 3 years ago. Updated about 2 years ago.

Status:Closed Start date:10/28/2008
Priority:Low Due date:
Assignee:Puppet Community % Done:

0%

Category:transactions
Target version:0.24.7
Affected Puppet version:0.24.6 Branch:
Keywords:
Votes: 0

Description

I’ve just upgraded to puppet 0.24.6 (using Ruby 1.8.7 p72 on Solaris 10 x86) from 0.24.5 and it gives me the following error trying to send emails (it occurred one time only).

/usr/ops/lib/ruby/site_ruby/1.8/puppet/reports/tagmail.rb:166:in `send': Could not send report emails via sendmail: Thread(#) not locked. (Puppet::Error)
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/reports/tagmail.rb:126:in `fork'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/reports/tagmail.rb:126:in `send'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/reports/tagmail.rb:121:in `process'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/network/handler/report.rb:66:in `process'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/network/handler/report.rb:59:in `each'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/network/handler/report.rb:59:in `process'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/network/handler/report.rb:33:in `report'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/network/handler/report.rb:2:in `to_proc'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/network/xmlrpc/processor.rb:52:in `call'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/network/xmlrpc/processor.rb:52:in `protect_service'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/network/xmlrpc/processor.rb:85:in `setup_processor'
      from /usr/ops/lib/ruby/1.8/xmlrpc/server.rb:336:in `call'
      from /usr/ops/lib/ruby/1.8/xmlrpc/server.rb:336:in `dispatch'
      from /usr/ops/lib/ruby/1.8/xmlrpc/server.rb:323:in `each'
      from /usr/ops/lib/ruby/1.8/xmlrpc/server.rb:323:in `dispatch'
      from /usr/ops/lib/ruby/1.8/xmlrpc/server.rb:366:in `call_method'
      from /usr/ops/lib/ruby/1.8/xmlrpc/server.rb:378:in `handle'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/network/xmlrpc/processor.rb:44:in `process'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet/network/xmlrpc/webrick_servlet.rb:68:in `service'
      from /usr/ops/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
      from /usr/ops/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
      from /usr/ops/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
      from /usr/ops/lib/ruby/1.8/webrick/server.rb:162:in `start'
      from /usr/ops/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
      from /usr/ops/lib/ruby/1.8/webrick/server.rb:95:in `start'
      from /usr/ops/lib/ruby/1.8/webrick/server.rb:92:in `each'
      from /usr/ops/lib/ruby/1.8/webrick/server.rb:92:in `start'
      from /usr/ops/lib/ruby/1.8/webrick/server.rb:23:in `start'
      from /usr/ops/lib/ruby/1.8/webrick/server.rb:82:in `start'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet.rb:293:in `start'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet.rb:144:in `newthread'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet.rb:143:in `initialize'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet.rb:143:in `new'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet.rb:143:in `newthread'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet.rb:291:in `start'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet.rb:290:in `each'
      from /usr/ops/lib/ruby/site_ruby/1.8/puppet.rb:290:in `start'
      from /usr/ops/bin/puppetmasterd:285

Related issues

related to Puppet - Bug #1704: report delivery succeeds even though puppetd thinks it fails Closed 10/28/2008
related to Puppet - Bug #2616: Locking error in tagmail Closed 09/09/2009

History

Updated by Luke Kanies over 3 years ago

  • Category set to transactions
  • Status changed from Unreviewed to Accepted
  • Assignee set to Puppet Community
  • Target version set to 0.24.7

I’m assuming that some part of Ruby is requiring that we lock the thread we’re in before we use IO.popen, or something like that.

It should be pretty straightforward to throw a semaphore around the code that actually sends the email.

Updated by Luke Kanies over 3 years ago

  • Status changed from Accepted to In Topic Branch Pending Review

Pushed a potential fix to the tickets/0.24.x/1703 branch in my repo.

Can someone who suffers from this problem test that my fix solves it? I can’t reproduce it.

Updated by Oliver Hookins over 3 years ago

I think I was getting these errors. I’ll see if I can reproduce it before and after the patch.

Updated by James Turnbull over 3 years ago

  • Status changed from In Topic Branch Pending Review to Closed

Pushed in commit:9ab3afb5423b406c661805946aac174f7f3e5674 in branch 0.24.x

Also available in: Atom PDF