Issue #3032 has been updated by Daniel Pittman. Description updated Status changed from Unreviewed to Rejected
I don't think we presently have this issue, and if so it presents a different face. We generally prefer not to work around kernel bugs if we can avoid it, so I am rejecting this 'til we have a concrete and wide-spread enough failure to justify the overhead. ---------------------------------------- Bug #3032: Race condition in SELinux mount handling https://projects.puppetlabs.com/issues/3032 Author: Markus Roberts Status: Rejected Priority: Normal Assignee: Category: plumbing Target version: Affected Puppet version: 0.25.3 Keywords: Branch: There may be a race condition in read_mounts, where a signal (e.g. a timer or child terminating in another thread) causes an EINTR while waiting for the mounts in read_nonblock. This should be confirmed and, if present, fixed with something like: <pre> diff --git a/lib/puppet/util/selinux.rb b/lib/puppet/util/selinux.rb index 3801ecd..1d671b7 100644 --- a/lib/puppet/util/selinux.rb +++ b/lib/puppet/util/selinux.rb @@ -149,21 +149,25 @@ module Puppet::Util::SELinux end # Internal helper function to read and parse /proc/mounts def read_mounts mounts = "" begin if File.instance_methods.include? "read_nonblock" # If possible we use read_nonblock() in a loop rather than read() to work- # a linux kernel bug. See ticket #1963 for details. mountfh = File.open("/proc/mounts") - mounts += mountfh.read_nonblock(1024) while true + begin + mounts << mountfh.read_nonblock(1024) + rescue Errno::EINTR + # Popped out to process an unrelated signal, not because we're done + end while true else # Otherwise we shell out and let cat do it for us mountfh = IO.popen("/bin/cat /proc/mounts") mounts = mountfh.read end rescue EOFError # that's expected rescue return nil ensure </pre> -- 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://projects.puppetlabs.com/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.
