I was able to finally reproduce the problem. Seems like it is the select_region call
is holding locks that are needed by the renderengine. I did try a simple fix but it did
not work on the first try. It is late here, and I can now reproduce a bug (hopefully
the only issue, there are other similar handlers in this callback). I will give this
problem priority tomorrow, and let you know how it goes. This is the traceback
for the gdb that I was trying to describe earlier. Thanks for you help and
perseverance. It would be very good to fix this bug, a real hazard.
gg
(gdb) p dump()
signal_entry: lock table size=29
0x65af7b0 VIconThread::draw_lock, VIconThread::run 0 0x7fff37fff700
0x6f1a6e0 CWindowTool::input_lock, CWindowTool::run 0x7fff10ff9700
0x7033cf0 BC_DialogThread::active_lock, BC_DialogThread::run 0x7ffee37fe700 *
0x7e08ad0 RecordSetChannel::change_channel, (null) 0x7ffde27fc700
0x7de2480 RecordCutAdsStatus::wait_lock, RecordCutAdsStatus::run 0x7ffde1ffb700
0x7f07cd0 ChannelInfo::scan_lock, (null) 0x7ffde17fa700
0x7f09530 SWindow::swin_lock, (null) 0x7ffde0ff9700
0x490e8a0 BC_Synchronous::next_command, BC_Synchronous::run 0x7fffc97fa700
0x490bbb0 MWindow::run_lock, MWindow::run 0x7ffff6d49840 *
0x7ffedc6b64e0 PlaybackEngine::output_lock, PlaybackEngine::run 0x7ffea4ff9700
0x85e6dc0 MainIndexes::input_lock, MainIndexes::run 1 0x7ffd997fa700
0x707b360 ResourceThread::draw_lock, ResourceThread::run 0x7ffe4f7fe700
0x7fffa8005fa0 BC_Xfer::Slicer::init, Slicer::run 0x7ffd7dfe3700
0x7fffa8005e10 BC_Xfer::Slicer::init, Slicer::run 0x7fffb2388700
0x687e848 Cinelerra: Compositor, BC_WindowBase::dispatch_event 1 0x7fff8ffff700 *
0x687e848 Cinelerra: Compositor, TimeBar::select_region 0x7fff8ffff700 *
0x687e848 Cinelerra: Compositor, VDeviceX11::open_output 0x7ffee3fff700
0x6ed27f0 Canvas::canvas_lock, Canvas::refresh 0x7fff8ffff700 0x7ffee3fff700
0x687e848 Cinelerra: Compositor, BC_Repeater::run 0x7fffb0ff9700
0x85e7da0 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7fffcaffd700
0x7f0d480 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7fffe0e98700
0x5f78d20 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7fff8f7fe700
0x7ffedc0028c0 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7ffee37fe700
0x7035980 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7ffff6d49840
0x7705950 BC_WindowBase::event_condition, BC_WindowBase::get_event 0x7ffde3fff700
lock_items: 25
lock_frees: 4
$1 = void
(gdb) thr find 0x7fff8ffff700
Thread 192 has target id 'Thread 0x7fff8ffff700 (LWP 2979)'
(gdb) thr 192
[Switching to thread 192 (Thread 0x7fff8ffff700 (LWP 2979))]
#0 0x00007ffff7cb4d45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) bt
#0 0x00007ffff7cb4d45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x0000000000d95f3a in Condition::lock (this=0x6ed27f0, location=0x2b19f64 "Canvas::refresh") at condition.C:64
#2 0x0000000000a2bbe6 in Canvas::lock_canvas (this=0x6ed64c0, loc=0x2b19f64 "Canvas::refresh") at canvas.C:92
#3 0x0000000000a2d560 in Canvas::refresh (this=0x6ed64c0, flush=0) at canvas.C:475
#4 0x0000000000a2d512 in Canvas::reposition_window (this=0x6ed64c0, edl=0x5f93d50, x=23, y=0, w=937, h=561) at canvas.C:465
#5 0x0000000000a2d3df in Canvas::update_geometry (this=0x6ed64c0, edl=0x5f93d50, x=23, y=0, w=937, h=561) at canvas.C:448
#6 0x0000000000a769ef in CWindow::update (this=0x608d5a0, dir=1, overlays=0, tool_window=0, operation=0, timebar=0) at cwindow.C:237
#7 0x0000000000c6a94b in TimeBar::select_region (this=0x6edb8c0, position=7.8278200000000009) at timebar.C:922
#8 0x0000000000c6a120 in TimeBar::button_press_event (this=0x6edb8c0) at timebar.C:753
#9 0x0000000000d84e34 in BC_WindowBase::dispatch_button_press (this=0x6edb8c0) at bcwindowbase.C:1584
#10 0x0000000000d84e0e in BC_WindowBase::dispatch_button_press (this=0x687e840) at bcwindowbase.C:1581
#11 0x0000000000d837a4 in BC_WindowBase::dispatch_event (this=0x687e840) at bcwindowbase.C:1056
#12 0x0000000000d82793 in BC_WindowBase::run_window (this=0x687e840) at bcwindowbase.C:741
#13 0x0000000000a7676c in CWindow::run (this=0x608d5a0) at cwindow.C:204
#14 0x0000000000da4f5d in Thread::entrypoint (parameters=0x608d5a0) at thread.C:65
#15 0x00007ffff7cae4e2 in start_thread () from /lib64/libpthread.so.0
#16 0x00007ffff7539693 in clone () from /lib64/libc.so.6
(gdb) up
#1 0x0000000000d95f3a in Condition::lock (this=0x6ed27f0, location=0x2b19f64 "Canvas::refresh") at condition.C:64
64 while(value <= 0) pthread_cond_wait(&cond, &mutex);
(gdb) p *this
$2 = {<trace_info> = {trace = 0x7ffe34000fc0, owner = 140732723623680}, cond = {__data = {{__wseq = 66, __wseq32 = {__low = 66, __high = 0}}, {__g1_start = 62, __g1_start32 = {__low = 62, __high = 0}}, __g_refs = {2, 0}, __g_size = {0, 0}, __g1_orig_size = 4, __wrefs = 8, __g_signals = {0, 0}}, __size = "B", __align = 66}, mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 1, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = "", __align = 0}, value = 0, init_value = 1, is_binary = 1, title = 0x2b19f50 "Canvas::canvas_lock"}
(gdb) p /x 140732723623680
$3 = 0x7ffee3fff700
(gdb) thr find 0x7ffee3fff700
Thread 81 has target id 'Thread 0x7ffee3fff700 (LWP 2868)'
(gdb) thr 81
[Switching to thread 81 (Thread 0x7ffee3fff700 (LWP 2868))]
#0 0x00007ffff7cb4d45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
(gdb) bt
#0 0x00007ffff7cb4d45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007ffff7e9c045 in _XDisplayLockWait () from /lib64/libX11.so.6
#2 0x00007ffff7e9c4ed in _XLockDisplay () from /lib64/libX11.so.6
#3 0x00007ffff7e9bebb in XLockDisplay () from /lib64/libX11.so.6
#4 0x0000000000d8a593 in BC_WindowBase::lock_window (this=0x687e840, location=0x2b97520 "VDeviceX11::open_output") at bcwindowbase.C:3322
#5 0x0000000000d8a545 in BC_WindowBase::lock_window (this=0x6ed2880, location=0x2b97520 "VDeviceX11::open_output") at bcwindowbase.C:3313
#6 0x0000000000a2bc10 in Canvas::lock_canvas (this=0x6ed64c0, loc=0x2b97520 "VDeviceX11::open_output") at canvas.C:94
#7 0x0000000000ca24f5 in VDeviceX11::open_output (this=0x7fffd00070e0) at vdevicex11.C:103
#8 0x0000000000ca63f9 in VideoDevice::open_output (this=0x7fffd0007900, config=0x7fffd000dca0, rate=29.9700298, out_w=1440, out_h=1080, output=0x6ed64c0, single_frame=1) at videodevice.C:689
#9 0x0000000000c23c76 in RenderEngine::open_output (this=0x7fffd000a2d0) at renderengine.C:328
#10 0x0000000000c2361c in RenderEngine::arm_command (this=0x7fffd000a2d0, command=0x6d7d910) at renderengine.C:180
#11 0x0000000000bc1553 in PlaybackEngine::arm_render_engine (this=0x6f3fff0) at playbackengine.C:147
#12 0x0000000000bc1f99 in PlaybackEngine::run (this=0x6f3fff0) at playbackengine.C:401
#13 0x0000000000da4f5d in Thread::entrypoint (parameters=0x6f3fff0) at thread.C:65
#14 0x00007ffff7cae4e2 in start_thread () from /lib64/libpthread.so.0
#15 0x00007ffff7539693 in clone () from /lib64/libc.so.6
(gdb) q
A debugging session is active.