You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was incorrectly just shutting the sample collection thread down whenever an exception from ocaml was raised. Really what we want to log it and try again, since occasionally we may get a "stream corrupted" exception which just means some things in the ring buffer were overwritten. This ultimately isn't a big deal unless it happens a lot, but that will be obvious by a lot of missing samples.
## Test plan
I modified Example.ml to generate enough samples that occasionally this exception will pop up, and then I ran pyro caml and confirmed it no longer takes down the collection thread.
log::trace!(target:LOG_TAG,"acquiring backend config and cursor");
129
-
let backend_config = backend_config.lock()?;
129
+
let backend_config = backend_config
130
+
.lock()
131
+
.expect("Could not take backend config lock");// we only have one sampler thread and one reporting thread so this should never fail unless something is seriously wrong
let stack_trace = st + &ruleset.lock().expect("Failed to lock ruleset").clone();
156
+
buffer
157
+
.lock()
158
+
.expect("Failed to lock buffer")// we only have one sampler thread and one sending reports so we should never fail to obtain the lock unless something is seriously wrong
159
+
.record(stack_trace)
160
+
.expect("Failed to record stack traces to buffer");// So this seems to just be a result in the pyroscope sdk for no reason
0 commit comments