Comments (5)
This was originally reported in https://puppet.atlassian.net/browse/PUP-11324. That issue tracker is now read-only, so please continue discussion here.
from puppet.
Thanks for letting us know @jstange We currently use the environment object to protect against concurrent access, such as
puppet/lib/puppet/pops/loaders.rb
Line 28 in b04e822
Loaders
instance methods that mutate state, like:
def [](loader_name)
environment.lock.synchronize do
loader = @loaders_by_name[loader_name]
if loader.nil?
# Unable to find the module private loader. Try resolving the module
loader = private_loader_for_module(loader_name[0..-9]) if loader_name.end_with?(' private')
raise Puppet::ParseError, _("Unable to find loader named '%{loader_name}'") % { loader_name: loader_name } if loader.nil?
end
loader
end
Alternatively you could only lock when loader.nil?
, but I think you need to relookup again inside the lock (double-checked lock)
def [](loader_name)
loader = @loaders_by_name[loader_name]
if loader.nil?
environment.lock.synchronize do
if loader.nil?
...
We don't have any immediate plans for working on this, but we welcome pull requests. I'll put the help wanted
label on for now.
from puppet.
After some poking I might have some vague idea how threading works in here. Seems like it's JRuby-specific, and in the case I care about it's probably instances of Puppet::Util::Autoload
that are competing to touch things in parallel.
[]
probably isn't the only method that needs a thread seatbelt put on it, but I don't want to blindly add stuff and create potential deadlock conditions.
I'll spend some time with my stack traces and see if there's anywhere else that looks thread-dangerous and deadlock-safe, wrap those in environment.lock.synchronize
, and submit a PR of it. Someone who knows what they're doing will have to review- my guesswork about threading in here may be wildly off base.
from puppet.
Migrated issue to PUP-12038
from puppet.
Finally got my corporate overlords to sign off on the CLA for the #9299. Our fix has been deployed locally for a while now and seems to solve the issue.
We've recently identified a similar, but distinct, threading issue, this one in Resource::Type
. I'll open a separate issue for it once I've made sure my report isn't duplicating someone else's.
from puppet.
Related Issues (20)
- Execution will fail on Windows if TMPDIR, TEMP or TMP refer to an invalid directory HOT 1
- https://forgeapi.puppet.com/private/versions/puppet-agent is outdated HOT 7
- rsync://rsync.puppet.com/ contains unreadable folders causing sync errors: rsync: opendir "/apt/work.520523.m2zydoT5pI" (in packages) failed: Permission denied (13) HOT 2
- [![CLA assistant check](https://cla-assistant.io/pull/badge/signed)](https://cla-assistant.io/puppetlabs/puppet?pullRequest=9356) <br/>All committers have signed the CLA.
- pip3 pkg provider on Python 3.11.2 fails without break-system-packages HOT 3
- Puppet 8.7.0 release archive is missing on downloads.puppet.com HOT 3
- lines in file resource content looking like a checksum throws an error
- Update splaylimit during daemon run HOT 4
- Add umask option to package resource type
- Deferred functions sometimes resolve too late with preprocess_deferred=false HOT 9
- systemd service provider does not recognize services that are starting up as 'running' HOT 6
- Does not work autosign.conf HOT 2
- Default file SELinux seltype is incorrect HOT 4
- Validation of Deferred multivalued parameters fails HOT 4
- exec resource: path param should default to the path fact HOT 3
- Latest tarball missing from downloads.puppet.com HOT 1
- Minitar v1 has been released HOT 3
- only first name server attempted in finding the puppet server HOT 4
- Warning: Facter: Unable to getenv for pid 1, 'uninitialized constant Facter::Util::Linux' HOT 1
- puppetserver error: cannot load such file -- puppetserver/ca/cli (LoadError) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet.