Comments (10)
I think I figured this one out. If I wrap the call to .fetch around a mutex, it works fine. Is this obvious and I just missed it, or should it be documented?
from rrd-ffi.
Sorry for the delay.
A mutex shouldn't be needed, supposing rrd_fetch function from librrd is thread safe. I will check librrd for a thread safe function, I know some functions have both thread-safe ad non thread-safe versions.
You said it was not happening in one specific step, but can you check if it has something to do with get_array_of_string or from_string methods? Also, which version of ffi are you using?
from rrd-ffi.
It breaks on the same line every time without the mutex, wrapper.rb line 121. Using ffi 1.0.7. Thanks for looking into it.
from rrd-ffi.
I was referring to the order of RRDs accessed when I mentioned it didn't happen at any specific step. The segfault is in the same place.
from rrd-ffi.
I'm encountering the same segfault in get_array_of_string. Did you find a resolution for this issue?
from rrd-ffi.
Looks like there haven't been any code changes since I opened this issue. My code works by wrapping the call to .fetch with a mutex: http://www.ruby-doc.org/core/classes/Mutex.html
from rrd-ffi.
Sorry guys, I didn't have enough time to look into this issue
from rrd-ffi.
As I could see. There seems to be a thread safe version of the function. I will code based on it. The function is the following:
int rrd_fetch_r (
const char _filename,
const char *cf,
time_t *start,
time_t *end,
unsigned long *step,
unsigned long *ds_cnt,
char *__ds_namv,
rrd_value_t *_data);
from rrd-ffi.
Hi Guys, I just implemented the fetch using rrd_fetch_r. Could you checkout from the master and test if the issue continues?
from rrd-ffi.
Well, I will close this issue. If needed please open a new one.
from rrd-ffi.
Related Issues (20)
- Memory leak HOT 6
- I18n dependency HOT 1
- Dependency problem with ActiveSupport > 3.0.9? HOT 2
- Variable as datasource name HOT 3
- :start not working? HOT 4
- Stack graph HOT 2
- SyntaxError: rrd.rb:47 during require HOT 13
- Undefined constant RRD_FILE in example HOT 1
- Option for using wrapper bang methods HOT 3
- RRD::Wrapper.graph PRINTs HOT 4
- generating graph sometimes loops glib on OSX 10.7.5 HOT 10
- add HRULE
- Exception: FFI::NotFoundError when rrdtool was compiled without graphics support
- Add support for "--daemon" option
- RRD::Base#fetch returns different values in the "time" column than 'rrdtool fetch' HOT 1
- Fetching data from a rrd HOT 2
- Support for rrdtool 1.6? HOT 1
- Opening an existing RRD HOT 3
- RRD database Archive with 1 year problem real number 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 rrd-ffi.