Issue #3013 has been updated by Markus Roberts.

I've updated the branch with the changes above and improved tests.

On the basis of those tests, I'm reluctantly leaning towards saying we should 
remove the whole pipe based communication patch to produce 0.25.3.

The problem is that, with or without readpartial it still hangs when the child 
process is misbehaved (see ticket #1563 comment #7 for the real world case):


Puppet::Util execute when readpartial is available
- should be resilient to asynchronous signals
- should not mind if the other end closes the pipe before completing
- should not hang if the child process is misbehaved (FAILED - 1)

Puppet::Util execute when readpartial is unavailable
- should be resilient to asynchronous signals
- should not mind if the other end closes the pipe before completing
- should not hang if the child process is misbehaved (FAILED - 2)

1)
Timeout::Error in 'Puppet::Util execute when readpartial is available should 
not hang if the child process is misbehaved'
execution expired
spec/unit/util.rb:91:
spec/unit/util.rb:90:
/Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'
spec/unit/util.rb:5:

2)
Timeout::Error in 'Puppet::Util execute when readpartial is unavailable should 
not hang if the child process is misbehaved'
execution expired
spec/unit/util.rb:91:
spec/unit/util.rb:90:
/Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in
 `run'
/Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `each'
/Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in
 `run'
spec/unit/util.rb:5:

The file version passes these tests (but does drop some signals--haven't worked 
out why in detail yet, but I suspect it's a granularity issue).

I'm not seeing any good way around this.  I'm not giving up, but I'm not 
optimistic either.

-- Markus
----------------------------------------
Bug #3013: util.rb:execute broken on Ruby <1.8.3
http://projects.reductivelabs.com/issues/3013

Author: Ricky Zhou
Status: Ready for Testing
Priority: Urgent
Assigned to: Markus Roberts
Category: exec
Target version: 0.25.3
Affected version: 0.25.2
Keywords: 
Branch: http://github.com/MarkusQ/puppet/tree/ticket/0.25.x/3013


Apparently the patch in ticket #2731 introduced one more issue by using 
readpartial, which isn't available until ruby 1.8.3 (RHEL4 at least is 
affected).  I'm not sure how this is normally handled in ruby, but if the 
readpartial function is not available, the code should fall back to sysread 
(along with some code for handling EINTR).

Anybody with better ruby knowledge know how this should be done?


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account
--
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to