Issue #3013 has been updated by Markus Roberts.
I can not reproduce the select problem I was having initially; I though briefly
that it might have been associated with my experiments with setting
Fcntl::O_NONBLOCK on output_read via will_block = false (from the event-loop
extensions) but that didn't pan out.
Running the tests with the select in place of the timeout I get sporadic errors
such as:
1)
'Puppet::Util execute when readpartial is available should not miss output if
the other end doles it out bit at a time' FAILED
expected: "3937\n3937\n3937\n3937\n3937\n",
got: "3937\n3937\n3937\n3937\n" (using ==)
spec/unit/util.rb:115:
/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)
'Puppet::Util execute when readpartial is unavailable should be resilient to
asynchronous signals' FAILED
expected: >= 150,
got: 5
spec/unit/util.rb:107:
/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:
Setting the read size to 1-byte does not affect them or appear make them more
or less likely. Nor does setting output_read.will_block=false.
My bigger concern at this point is #3025; no matter how sure we are that it
_ought_ to work, if it reliably locks up in the real world, we'll have to
revert.
If I can find a way to resolve the dropped data problem with the select version
(I suspect it's a race condition with the waitpid) I'll post it here and ask
the user on #3025 to test that as well.
-- 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.
