Comments (7)
True, this issue has popped up here in LibP2P and other crates which uses this prometheus client
from client_rust.
Can I work on patching the issue ? @mxinden
from client_rust.
The Owning_Ref
library is used at the following files:
Histogram relevant files use this module, they cannot be used due to Security reasons! This needs to be patched where the usage of Owning_Ref is dropped!
from client_rust.
In other issues I see this being recommended. Haven't had a chance to look too deeply, but perhaps that is a suitable replacement?
from client_rust.
Can I work on patching the issue ? @mxinden
Yes, for sure. Help is very much appreciated.
In other issues I see this being recommended. Haven't had a chance to look too deeply, but perhaps that is a suitable replacement?
Can you tell whether it suffers the same unsoundness issues that owning_ref
does?
We need owning_ref
in wrapper style metrics (e.g. Family
), which internally use a Mutex
though want to give users access to a reference of the underlying wrapped metric (e.g. Counter
). Given that this reference depends on the MutexGuard
, we need to ensure that the MutexGuard
lives long enough, i.e. throughout the lifetime of the reference of the wrapped metric. Without keeping the MutexGuard
alive, we invalidate the properties of the Mutex
itself, namely mutual exclusive access to the wrapped metric.
Thus far owning_ref
offered a way to ship both the MutexGuard
and the reference to the user, thus enforcing the lifetime bound.
Alternative approaches I can see:
- Use
parking_lot
and itsRwLockGuard::map
method. - Take a
FnOnce
to access the wrapped metric, instead of returning a reference to the wrapped metric. - Clone the wrapped metric on each access.
from client_rust.
@mxinden I went through the solution parking_lot offers. I am unable to figure out how to deal with the MutexGuardedBuckets
and that is preventing me from fixing the solution. What should I do next?
from client_rust.
For the record, fix is released with v0.18.0
.
from client_rust.
Related Issues (20)
- Allow flattening of a struct through derive(EncodeLabelSet) at any position HOT 2
- Make `Descriptor::new` `const` HOT 1
- feat: derive register logic on struct of metrics
- Allow multiple labels in sub_registry_with_label method HOT 2
- Allow root registry creation with prefix AND label(s) HOT 1
- Implement native histograms HOT 1
- Escaping? HOT 3
- Public encoding functions? HOT 4
- Encoder without EOF HOT 5
- Custom Collector with `sub_registry_with_prefix` outputs name multiple times HOT 3
- Abstract key lookup into a trait for Family::get_or_create HOT 4
- Allow iterating the metrics on an registry HOT 1
- Allow construct a histogram family with a closure HOT 2
- mips: EncodeCounterValue implementation missing for u32?
- Histogram with empty family labels creates unparseable metrics output HOT 1
- text::DescriptorEncoder writes incorrect metric names HOT 2
- UTF-8: Implement support in Rust client library
- Implement Atomic for usize HOT 2
- Counter `HELP` and `TYPE` lack `_total` suffix HOT 5
- Provide a way to prevent unbounded metric growth HOT 3
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 client_rust.