Andrew,

> I have my .bcast5 folder on relatively slow STA HDD (not SSD), formatted
> for /home
> as xfs. may be slow access to indexes caused/exaggregated this bug?
>
> Can you try with index placed into slow place/disk, or inside VM?
>
We were hoping your suggestion might show us the error as we tried using a
VM (xen which is quite slow).

>
> Also, is there anything I can poke with gdb?
>
1.  Can you apply the attached patch and see if that provides more helpful
information?
The patch was applied here on the cinelerra ffmpeg 4.2 version (but gg says
should work on any version).
You might want to redirect the output as it is voluminous on the print out.
The last thing you should see before cin hangs is "clear" and then "boom"
it is hung.  This last thing may give us a clue.
Please use the same 2 files as reported in your initial June 5th sample
(the hell and kara ones).

2. Can you send us a session file (using the same 2 input files) and your
.bcast5 file?
3. Are you using hardware (vaapi or vdpau)?  Are you using OpenGL or just
X11?

The 1 time gg finally managed to create the problem last week was with
4.2.3 from GIT and now he is no longer able to do so.  We have tried all
kinds of variations to exacerbate the problem and got nothing today.
Tried:  laptop, desktop, fewer cpus (down to 2), switched in settings to
x11 or OpenGL, tested with vdpau, put the cache in settings down to 256,
started out with no .bcast5, ran by exporting the Display and actually
running as an ordinary user without debug, ran with Valgrind (again to slow
things down), 2 different versions of Fedora, Debian 10 (since that is what
RafaMar's user was initially using), cut the end off of "hell...mkv" and
then redo and cut again over and over and over and over...
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 601f170447..48dc0796e0 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -139,12 +139,21 @@ typedef struct FrameThreadContext {
 
 #define THREAD_SAFE_CALLBACKS(avctx) \
 ((avctx)->thread_safe_callbacks || (avctx)->get_buffer2 == avcodec_default_get_buffer2)
+#include <execinfo.h>
 
 static void async_lock(FrameThreadContext *fctx)
 {
     pthread_mutex_lock(&fctx->async_mutex);
     while (fctx->async_lock)
         pthread_cond_wait(&fctx->async_cond, &fctx->async_mutex);
+{ void *buffer[100];
+int nptrs = backtrace(buffer, 100);
+char **trace = backtrace_symbols(buffer, nptrs);
+printf("set async lock\n");
+if( trace ) {
+  for( int i=0; i<nptrs; ) printf("%s\n", trace[i++]);
+  free(trace);
+}}
     fctx->async_lock = 1;
     pthread_mutex_unlock(&fctx->async_mutex);
 }
@@ -152,6 +161,14 @@ static void async_lock(FrameThreadContext *fctx)
 static void async_unlock(FrameThreadContext *fctx)
 {
     pthread_mutex_lock(&fctx->async_mutex);
+{ void *buffer[100];
+int nptrs = backtrace(buffer, 100);
+char **trace = backtrace_symbols(buffer, nptrs);
+printf("clr async lock\n");
+if( trace ) {
+  for( int i=0; i<nptrs; ) printf("%s\n", trace[i++]);
+  free(trace);
+}}
     av_assert0(fctx->async_lock);
     fctx->async_lock = 0;
     pthread_cond_broadcast(&fctx->async_cond);
@@ -787,6 +804,14 @@ int ff_frame_thread_init(AVCodecContext *avctx)
     pthread_cond_init(&fctx->async_cond, NULL);
 
     fctx->async_lock = 1;
+{ void *buffer[100];
+int nptrs = backtrace(buffer, 100);
+char **trace = backtrace_symbols(buffer, nptrs);
+printf("init async lock\n");
+if( trace ) {
+  for( int i=0; i<nptrs; ) printf("%s\n", trace[i++]);
+  free(trace);
+}}
     fctx->delaying = 1;
 
     if (codec->type == AVMEDIA_TYPE_VIDEO)
-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to