Kdenlive   bug tracker Home page

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002388KdenliveUser Interfacepublic2011-11-05 20:442012-05-15 10:58
Reporterevorster 
Assigned Toj-b-m 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
Platformx86_64OSLinuxOS Version3.1.0
Product Version0.8.2 
Target VersionFixed in Version0.9 
Summary0002388: Loading a lot of HD clips crashes UI after a while.
DescriptionI realize you have a lot more important things to get to right now, but I would just like to let you know that I can crash the latest kdenlive pretty reliably if I try hard enough.
With my favorite workflow, I like to load all the clips of an event, and then just cherry pick the best bits of the best clips on the fly while editing.
Anyways, my current project involves 16Gb of *.mts files, produced by a Panasonic HDC-TM900. It's 1920x1088x50fps progressive. It comes down to about 268 seperate clips.
Steps To ReproduceLoad all 268 HD (16GB) clips in one go.
Wait.
Additional InformationI am currently working around it by disabling proxy clips, and just re-starting kdenlive and re-loading all the clips until all of them have thumbnails. Once this is done, kdenlive does not crash anymore.

Then I re-enable proxies for the clips, and re-load.
It will take a while for the proxy generator to chew through all the clips, so I'll hit the hay and tell you tomorrow if it crashes upon proxy generation of the clips.
My computer is an Asus laptop, 4GB RAM, 10GB swap and Core2 Duo CPU. All software compiled with -march=native -O2 where possible.
TagsNo tags attached.
Build/Install MethodManual build from release
Attached Files

- Relationships

-  Notes
(0007511)
j-b-m (administrator)
2011-11-06 00:27

A backtrace could be useful here (1), athough as you said I will not make it a top priority right now.

(1) http://kdenlive.org/bug-reports [^] , see step 4.
(0007514)
evorster (reporter)
2011-11-06 08:49

Hi there.

I think the reason kdenlive crashed upon loading the clips was a setup error on my computer in regards to how much ram to assign to each process. With more sane values, I can't crash kdenlive just by loading a lot of clips.

However, it still crashes if I have proxies enabled. All the clips load, and while that happens, one proxy starts to build, then the next and so on.

However, when the clips have finished loading, and it starts doing two proxies at once, kdenlive crashes.

Here is a backtrace for that:

[mpegts @ 0x7fff76cf9a40] max_analyze_duration 5000000 reached at 5000000
                                                                                                                  
Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 3526]
0x00007ffff6dcb7a0 in ?? () from /opt/kde4/lib64/libQtCore.so.4
(gdb) thread apply all bt

Thread 3 (LWP 3519):
#0 0x00007ffff12d46bc in ?? () from /lib64/libc.so.6
#1 0x00007ffff6dab559 in QListData::remove(int) () from /opt/kde4/lib64/libQtCore.so.4
0000002 0x00007ffff2683d16 in ?? () from /opt/kde4/lib64/libQtGui.so.4
0000003 0x00007ffff2682fdb in QTreeWidgetItemIterator::~QTreeWidgetItemIterator() ()
   from /opt/kde4/lib64/libQtGui.so.4
0000004 0x000000000049379d in ProjectList::setProxyStatus(QString, PROXYSTATUS, int) ()
0000005 0x0000000000494c3b in ProjectList::processLogInfo(QString const&, int*, QString const&) ()
0000006 0x00000000004a5b39 in ProjectList::slotGenerateProxy ()
0000007 0x00000000004a9696 in QtConcurrent::RunFunctionTask<void>::run() ()
0000008 0x00007ffff6d82995 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000009 0x00007ffff6d8db55 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000010 0x00007ffff5707e1c in ?? () from /lib64/libpthread.so.0
0000011 0x00007ffff1287fad in clone () from /lib64/libc.so.6

Thread 2 (LWP 3526):
#0 0x00007ffff6dcb7a0 in ?? () from /opt/kde4/lib64/libQtCore.so.4
#1 0x00007ffff6dcb807 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000002 0x00007ffff6dcec89 in QString::operator<(QString const&) const () from /opt/kde4/lib64/libQtCore.so.4
0000003 0x00000000004eb8d8 in QMap<QString, QString>::value(QString const&) const ()
0000004 0x00000000004fec40 in DocClipBase::getProperty(QString const&) const ()
0000005 0x00000000004937fe in ProjectList::setProxyStatus(QString, PROXYSTATUS, int) ()
0000006 0x0000000000494c3b in ProjectList::processLogInfo(QString const&, int*, QString const&) ()
0000007 0x00000000004a5b39 in ProjectList::slotGenerateProxy ()
0000008 0x00000000004a9696 in QtConcurrent::RunFunctionTask<void>::run() ()
0000009 0x00007ffff6d82995 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000010 0x00007ffff6d8db55 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000011 0x00007ffff5707e1c in ?? () from /lib64/libpthread.so.0
0000012 0x00007ffff1287fad in clone () from /lib64/libc.so.6

Thread 1 (LWP 3504):
#0 0x00007ffff127f343 in poll () from /lib64/libc.so.6
#1 0x00007ffff0675778 in g_main_context_iterate.isra.21 () from /usr/lib64/libglib-2.0.so.0
0000002 0x00007ffff0675c39 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
0000003 0x00007ffff6e9eaef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000004 0x00007ffff218a1de in ?? () from /opt/kde4/lib64/libQtGui.so.4
0000005 0x00007ffff6e731c2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
---Type <return> to continue, or q <return> to quit---
   from /opt/kde4/lib64/libQtCore.so.4
0000006 0x00007ffff6e733bf in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000007 0x00007ffff6e77567 in QCoreApplication::exec() () from /opt/kde4/lib64/libQtCore.so.4
0000008 0x00000000004527eb in main ()
(gdb)
(0007515)
evorster (reporter)
2011-11-06 12:41

Well, I recompiled qt-everywhere-opensource and kdenlive with -ggdb to see if I can get a more clear error report.

Also, my version og qt-everywhere-opensource is 4.7.3, I see there is a later version available. Which version of qt are you running?

Anyways, here is the crash report. I use webm to make the proxy clips. It has better quality at low bit rate, and I tried with the default mpeg for the proxies... it crashes even faster.

project monitor connected
clip monitor connected
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id: 0x3e03b69
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id: 0x3e01d8b
kdenlive(10599) Render::checkMaxThreads: // TRACTOR PROBLEM
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id: 0x3e07c2f
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Permission denied
QFileSystemWatcher: failed to add paths: /etc/fstab
[New LWP 10623]
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id: 0x3e08e98
[h264 @ 0x7fffb00e6080] insufficient thread locking around avcodec_open/close()
[ac3 @ 0x7fffb00e8c80] insufficient thread locking around avcodec_open/close()
[pgssub @ 0x7fffb00f1600] insufficient thread locking around avcodec_open/close()
[NULL @ 0x7fffc06bcf00] insufficient thread locking around avcodec_open/close()
[matroska,webm @ 0x7fff9bef4260] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fff78ffde00] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fff7155afc0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fff79000740] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffc860d980] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fff7a50a680] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffc0a1a200] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffca91b140] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x630c820] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x630c820] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0xb28d700] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x6201e20] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb01c0780] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb00eea20] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb3b9c180] Estimating duration from bitrate, this may be inaccurate
[New LWP 10620]
[matroska,webm @ 0xd19f680] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x29f9fa0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x5a3fc80] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb233da80] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb3fbbea0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb3ffdbc0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0xd19f680] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x5a3fc80] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x29f9fa0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb221fec0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb23408e0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb00a2720] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0xd19f680] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x29f9fa0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x5a3fc80] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb221fec0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb3ffc7c0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb3f12120] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0xd19f680] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x5a3fc80] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x29f9fa0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb25a34c0] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb3040e00] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x7fffb22c1300] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0xd19f680] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x5a3fc80] Estimating duration from bitrate, this may be inaccurate
[matroska,webm @ 0x29f9fa0] Estimating duration from bitrate, this may be inaccurate
kdenlive(10599) KSambaSharePrivate::findSmbConf: KSambaShare: Could not find smb.conf!
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id: 0x3e176fd

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 10623]
0x00007ffff6dcb7a0 in ?? () from /opt/kde4/lib64/libQtCore.so.4
(gdb) thread apply all bt

Thread 3 (LWP 10620):
#0 0x00007ffff12d46bc in ?? () from /lib64/libc.so.6
#1 0x00007ffff6dab559 in QListData::remove(int) () from /opt/kde4/lib64/libQtCore.so.4
0000002 0x00007ffff2683d16 in ?? () from /opt/kde4/lib64/libQtGui.so.4
0000003 0x00007ffff2682fdb in QTreeWidgetItemIterator::~QTreeWidgetItemIterator() ()
   from /opt/kde4/lib64/libQtGui.so.4
0000004 0x000000000049379d in setProxyStatus (progress=11, status=CREATINGPROXY, proxyPath=..., this=0xf99910)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2691
0000005 ProjectList::setProxyStatus (this=0xf99910, proxyPath=..., status=CREATINGPROXY, progress=11)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2688
0000006 0x0000000000494c3b in ProjectList::processLogInfo (this=0xf99910, path=..., duration=0x7fffc77fdd3c,
    log=<optimized out>) at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2527
0000007 0x00000000004a5b39 in ProjectList::slotGenerateProxy (this=0xf99910)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2489
0000008 0x00000000004a9696 in run (this=0x21b6d90) at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:120
0000009 QtConcurrent::RunFunctionTask<void>::run (this=0x21b6d90)
    at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:114
0000010 0x00007ffff6d82995 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000011 0x00007ffff6d8db55 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000012 0x00007ffff5707e1c in ?? () from /lib64/libpthread.so.0
0000013 0x00007ffff1287fad in clone () from /lib64/libc.so.6

Thread 2 (LWP 10623):
#0 0x00007ffff6dcb7a0 in ?? () from /opt/kde4/lib64/libQtCore.so.4
#1 0x00007ffff6dcb807 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000002 0x00007ffff6dcec89 in QString::operator<(QString const&) const () from /opt/kde4/lib64/libQtCore.so.4
0000003 0x00000000004eb8d8 in qMapLessThanKey<QString> (key2=..., key1=...) at /opt/kde4/include/QtCore/qmap.h:107
0000004 findNode (akey=..., this=0x28a9b60) at /opt/kde4/include/QtCore/qmap.h:484
0000005 QMap<QString, QString>::value (this=0x28a9b60, akey=...) at /opt/kde4/include/QtCore/qmap.h:499
0000006 0x00000000004fec40 in DocClipBase::getProperty (this=<optimized out>, prop=<optimized out>)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/docclipbase.cpp:211
0000007 0x00000000004937fe in setProxyStatus (progress=71, status=CREATINGPROXY, proxyPath=..., this=0xf99910)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2696
0000008 ProjectList::setProxyStatus (this=0xf99910, proxyPath=..., status=CREATINGPROXY, progress=71)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2688
0000009 0x0000000000494c3b in ProjectList::processLogInfo (this=0xf99910, path=..., duration=0x7fffc4dcbd3c,
    log=<optimized out>) at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2527
0000010 0x00000000004a5b39 in ProjectList::slotGenerateProxy (this=0xf99910)
---Type <return> to continue, or q <return> to quit---
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2489
0000011 0x00000000004a9696 in run (this=0x1e5cd00) at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:120
0000012 QtConcurrent::RunFunctionTask<void>::run (this=0x1e5cd00)
    at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:114
0000013 0x00007ffff6d82995 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000014 0x00007ffff6d8db55 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000015 0x00007ffff5707e1c in ?? () from /lib64/libpthread.so.0
0000016 0x00007ffff1287fad in clone () from /lib64/libc.so.6

Thread 1 (LWP 10599):
#0 0x00007ffff127f343 in poll () from /lib64/libc.so.6
#1 0x00007ffff0675778 in g_main_context_iterate.isra.21 () from /usr/lib64/libglib-2.0.so.0
0000002 0x00007ffff0675c39 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
0000003 0x00007ffff6e9eaef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000004 0x00007ffff218a1de in ?? () from /opt/kde4/lib64/libQtGui.so.4
0000005 0x00007ffff6e731c2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000006 0x00007ffff6e733bf in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000007 0x00007ffff6e77567 in QCoreApplication::exec() () from /opt/kde4/lib64/libQtCore.so.4
0000008 0x00000000004527eb in main (argc=1, argv=0x7fffffffe2a8)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/main.cpp:89
(0007516)
j-b-m (administrator)
2011-11-06 13:09

I am running on QT 4.7.4... If it's not too complicated for you, might be worth trying to upgrade. I fixed several small issues that will improve proxy creation, but couldn't reproduce your problem until now.
(0007517)
yellow (reporter)
2011-11-06 20:53

I had a very similar problem crashing on proxy creation with large amount of clips.

The solution I found was to disable hyper threading in the machines bios.

Basically kdenlive / Linux was detecting hyper threading virtual processors as real ones and assigning an ffmpeg proxy build for each 'processor' so I had four simultaneous ffmpeg proxy building runs going with what I think was insufficient RAM to keep them all going.
(0007521)
evorster (reporter)
2011-11-07 19:32

I installed qt 4.7.4, and recompiled kdenlive, just for good measure.

The bug still persists.

I don't know about the memory thing. When I watch memory usage on top while the proxies are generating, my memory slowly counts down until there is just 200mb left free. This number then stays constant as proxies are being generated.
After about ten to twenty minutes of working, it segfaults again.

To me it feels like a process is timing out. I can see that all the thumbnail creation is waiting until the proxy creation is done. When I turn off proxy creation, I can load arbitrary amounts of clips.

Anyways, here is my latest crash backtrace:

[matroska,webm @ 0x7fffcbad9b60] Estimating duration from bitrate, this may be inaccurate
[New LWP 2636]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6e85493 in ?? () from /opt/kde4/lib64/libQtCore.so.4
(gdb) thread apply all bt

Thread 3 (LWP 2636):
#0 0x00007ffff1275893 in select () from /lib64/libc.so.6
#1 0x00007ffff6e9b89f in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000002 0x00007ffff6e51cd8 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000003 0x00007ffff6e53505 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000004 0x00007ffff6e140fe in QProcess::waitForFinished(int) () from /opt/kde4/lib64/libQtCore.so.4
0000005 0x00000000004a5b53 in ProjectList::slotGenerateProxy (this=0xf42a50)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2491
0000006 0x00000000004a9696 in run (this=0x7fffb00080b0) at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:120
0000007 QtConcurrent::RunFunctionTask<void>::run (this=0x7fffb00080b0)
    at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:114
0000008 0x00007ffff6d82af5 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000009 0x00007ffff6d8dc85 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000010 0x00007ffff5705e1c in ?? () from /lib64/libpthread.so.0
0000011 0x00007ffff127bfad in clone () from /lib64/libc.so.6

Thread 2 (LWP 2647):
#0 0x00007ffff12c86a4 in ?? () from /lib64/libc.so.6
#1 0x00007ffff6dab689 in QListData::remove(int) () from /opt/kde4/lib64/libQtCore.so.4
0000002 0x00007ffff267d156 in ?? () from /opt/kde4/lib64/libQtGui.so.4
0000003 0x00007ffff267c41b in QTreeWidgetItemIterator::~QTreeWidgetItemIterator() ()
   from /opt/kde4/lib64/libQtGui.so.4
0000004 0x000000000049379d in setProxyStatus (progress=70, status=CREATINGPROXY, proxyPath=..., this=0xf42a50)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2691
0000005 ProjectList::setProxyStatus (this=0xf42a50, proxyPath=..., status=CREATINGPROXY, progress=70)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2688
0000006 0x0000000000494c3b in ProjectList::processLogInfo (this=0xf42a50, path=..., duration=0x7fffbe7f9d3c,
    log=<optimized out>) at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2527
0000007 0x00000000004a5b39 in ProjectList::slotGenerateProxy (this=0xf42a50)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/projectlist.cpp:2489
0000008 0x00000000004a9696 in run (this=0x7fffb0002a90) at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:120
0000009 QtConcurrent::RunFunctionTask<void>::run (this=0x7fffb0002a90)
    at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:114
0000010 0x00007ffff6d82af5 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000011 0x00007ffff6d8dc85 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000012 0x00007ffff5705e1c in ?? () from /lib64/libpthread.so.0
0000013 0x00007ffff127bfad in clone () from /lib64/libc.so.6
---Type <return> to continue, or q <return> to quit---

Thread 1 (LWP 2611):
#0 0x00007ffff6e85493 in ?? () from /opt/kde4/lib64/libQtCore.so.4
#1 0x00007ffff6e86b17 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000002 0x00007ffff6e8a539 in QObject::event(QEvent*) () from /opt/kde4/lib64/libQtCore.so.4
0000003 0x00007ffff20dd2b4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /opt/kde4/lib64/libQtGui.so.4
0000004 0x00007ffff20e2141 in QApplication::notify(QObject*, QEvent*) () from /opt/kde4/lib64/libQtGui.so.4
0000005 0x00007ffff68e24b6 in KApplication::notify(QObject*, QEvent*) () from /opt/kde4/lib64/libkdeui.so.5
0000006 0x00007ffff6e7402c in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000007 0x00007ffff6ea0a32 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000008 0x00007ffff6e9e234 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000009 0x00007ffff066926d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
0000010 0x00007ffff0669a68 in g_main_context_iterate.isra.21 () from /usr/lib64/libglib-2.0.so.0
0000011 0x00007ffff0669c39 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
0000012 0x00007ffff6e9ebbf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000013 0x00007ffff21803ee in ?? () from /opt/kde4/lib64/libQtGui.so.4
0000014 0x00007ffff6e73232 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000015 0x00007ffff6e7342f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /opt/kde4/lib64/libQtCore.so.4
0000016 0x00007ffff6e775d7 in QCoreApplication::exec() () from /opt/kde4/lib64/libQtCore.so.4
0000017 0x00000000004527eb in main (argc=1, argv=0x7fffffffe2a8)
    at /usr/src/sorcery/compile/kdenlive/kdenlive-0.8.2/src/main.cpp:89
(0007524)
evorster (reporter)
2011-11-08 05:37

I got my kdenlive into an uncrashable state.

I was running all my user processes under various cgroups. Once I disabled cgroups on this machine, kdenlive used up all of the available ram, and then a little of the swap, and then it was stable the whole time.

So, I don't know what it is about cgroups that it does not like, but kdenlive runs fine without it.
(0007538)
evorster (reporter)
2011-11-10 20:53

Hi there.

Is there any way I can limit proxy creation to just one at a time in my hunt for why kdenlive is crashing on me?

Cgroups are pretty integral to Sorcerer, and I am still trying to get a solution where I can run both cgroups and kdenlive together.
(0007542)
evorster (reporter)
2011-11-11 06:52

I recompiled glibc with -ggdb, here is another backtrace.

Any chance of just running one proxy generator?

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 21484]
0x00007fffd9f882de in avcodec_decode_video2 () from /usr/lib64/libavcodec.so.52
(gdb) thread apply all bt

Thread 3 (LWP 21484):
#0 0x00007fffd9f882de in avcodec_decode_video2 () from /usr/lib64/libavcodec.so.52
#1 0x00007fffdad3140d in producer_get_image (frame=0x7fffa9cf14b0, buffer=0x7fffc67fa3c0, format=0x7fffc67fa8bc, width=0x7fffc67fa3d0,
    height=0x7fffc67fa3d4, writable=0) at producer_avformat.c:1478
0000002 0x00007ffff7bc061a in mlt_frame_get_image (self=0x7fffa9cf14b0, buffer=0x7fffc67fa3c0, format=0x7fffc67fa8bc, width=0x7fffc67fa3d0,
    height=0x7fffc67fa3d4, writable=0) at mlt_frame.c:453
0000003 0x00007fffdca406bc in deinterlace_yadif (frame=0x7fffca043960, filter=0x7fffca93a120, image=0x7fffc67fa718, format=0x7fffc67fa8bc,
    width=0x7fffc67fa554, height=0x7fffc67fa558, mode=0) at filter_deinterlace.c:120
0000004 0x00007fffdca40dfb in filter_get_image (this=0x7fffca043960, image=0x7fffc67fa718, format=0x7fffc67fa8bc, width=0x7fffc67fa554,
    height=0x7fffc67fa558, writable=0) at filter_deinterlace.c:220
0000005 0x00007ffff7bc061a in mlt_frame_get_image (self=0x7fffca043960, buffer=0x7fffc67fa718, format=0x7fffc67fa8bc, width=0x7fffc67fa554,
    height=0x7fffc67fa558, writable=0) at mlt_frame.c:453
0000006 0x00007fffd332efe4 in filter_get_image (this=0x7fffca043960, image=0x7fffc67fa718, format=0x7fffc67fa8bc, width=0x7fffc67fa660,
    height=0x7fffc67fa664, writable=0) at filter_rescale.c:215
0000007 0x00007ffff7bc061a in mlt_frame_get_image (self=0x7fffca043960, buffer=0x7fffc67fa718, format=0x7fffc67fa8bc, width=0x7fffc67fa660,
    height=0x7fffc67fa664, writable=0) at mlt_frame.c:453
0000008 0x00007fffd332f506 in filter_get_image (this=0x7fffca043960, image=0x7fffc67fa718, format=0x7fffc67fa8bc, width=0x7fffc67fa8b4,
    height=0x7fffc67fa8b8, writable=0) at filter_resize.c:267
0000009 0x00007ffff7bc061a in mlt_frame_get_image (self=0x7fffca043960, buffer=0x7fffc67fa718, format=0x7fffc67fa8bc, width=0x7fffc67fa8b4,
    height=0x7fffc67fa8b8, writable=0) at mlt_frame.c:453
0000010 0x00007ffff79aa20d in Mlt::Frame::get_image(mlt_image_format&, int&, int&, int) () from /usr/lib64/libmlt++.so.3
0000011 0x000000000056c106 in KThumb::getFrame (frame=0x7fffa3eff6e0, frameWidth=64, displayWidth=64, height=36)
    at /usr/src/sorcery/compile/kdenlive/kdenlive/src/kthumb.cpp:216
0000012 0x00000000004cab60 in Render::processFileProperties (this=0xfa15f0) at /usr/src/sorcery/compile/kdenlive/kdenlive/src/renderer.cpp:779
0000013 0x00000000004a9696 in run (this=0x1aad300) at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:120
0000014 QtConcurrent::RunFunctionTask<void>::run (this=0x1aad300) at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:114
0000015 0x00007ffff6d82af5 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000016 0x00007ffff6d8dc85 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000017 0x00007ffff5705e1c in ?? () from /lib64/libpthread.so.0
0000018 0x00007ffff127bfad in clone () from /lib64/libc.so.6

Thread 2 (LWP 21495):
#0 0x00007ffff1275893 in select () from /lib64/libc.so.6
#1 0x00007ffff6e9b89f in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /opt/kde4/lib64/libQtCore.so.4
0000002 0x00007ffff6e51cd8 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000003 0x00007ffff6e53505 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000004 0x00007ffff6e140fe in QProcess::waitForFinished(int) () from /opt/kde4/lib64/libQtCore.so.4
0000005 0x00000000004a5b53 in ProjectList::slotGenerateProxy (this=0xe27810) at /usr/src/sorcery/compile/kdenlive/kdenlive/src/projectlist.cpp:2491
0000006 0x00000000004a9696 in run (this=0x1dc9470) at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:120
---Type <return> to continue, or q <return> to quit---
0000007 QtConcurrent::RunFunctionTask<void>::run (this=0x1dc9470) at /opt/kde4/include/QtCore/qtconcurrentrunbase.h:114
0000008 0x00007ffff6d82af5 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000009 0x00007ffff6d8dc85 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000010 0x00007ffff5705e1c in ?? () from /lib64/libpthread.so.0
0000011 0x00007ffff127bfad in clone () from /lib64/libc.so.6

Thread 1 (LWP 21468):
#0 0x00007ffff570706f in pthread_join () from /lib64/libpthread.so.0
#1 0x00007fffd74253e7 in consumer_stop (parent=<optimized out>) at consumer_sdl_preview.c:255
0000002 0x00007ffff7bcfc29 in mlt_consumer_stop (self=0x10d0bf0) at mlt_consumer.c:1386
0000003 0x00000000004bff89 in Render::setProducer (this=0xc31a30, producer=0x1632210, position=0)
    at /usr/src/sorcery/compile/kdenlive/kdenlive/src/renderer.cpp:1022
0000004 0x000000000045efd7 in MainWindow::slotUpdateClip (this=0xb222c0, id=...) at /usr/src/sorcery/compile/kdenlive/kdenlive/src/mainwindow.cpp:885
0000005 0x0000000000480305 in MainWindow::qt_metacall (this=0xb222c0, _c=QMetaObject::InvokeMetaMethod, _id=22, _a=0x7fffffffcb10)
    at /usr/src/sorcery/compile/kdenlive/kdenlive/build/src/cmake_bindir/mainwindow.moc:411
0000006 0x00007ffff6e86c5a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/kde4/lib64/libQtCore.so.4
0000007 0x0000000000494253 in ProjectList::clipNeedsReload (this=<optimized out>, _t1=<optimized out>)
    at /usr/src/sorcery/compile/kdenlive/kdenlive/build/src/cmake_bindir/projectlist.moc:405
0000008 0x00000000004a1163 in ProjectList::slotReplyGetFileProperties (this=<optimized out>, clipId=..., producer=<optimized out>,
    properties=<optimized out>, metadata=..., replace=<optimized out>) at /usr/src/sorcery/compile/kdenlive/kdenlive/src/projectlist.cpp:1852
0000009 0x00000000004a8e0c in ProjectList::qt_metacall (this=0xe27810, _c=QMetaObject::InvokeMetaMethod, _id=21, _a=0x7fffc95999e0)
    at /usr/src/sorcery/compile/kdenlive/kdenlive/build/src/cmake_bindir/projectlist.moc:286
0000010 0x00007ffff6e8a80a in QObject::event(QEvent*) () from /opt/kde4/lib64/libQtCore.so.4
0000011 0x00007ffff212d35b in QWidget::event(QEvent*) () from /opt/kde4/lib64/libQtGui.so.4
0000012 0x00007ffff20dd2b4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/kde4/lib64/libQtGui.so.4
0000013 0x00007ffff20e2141 in QApplication::notify(QObject*, QEvent*) () from /opt/kde4/lib64/libQtGui.so.4
0000014 0x00007ffff68e24b6 in KApplication::notify(QObject*, QEvent*) () from /opt/kde4/lib64/libkdeui.so.5
0000015 0x00007ffff6e7402c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /opt/kde4/lib64/libQtCore.so.4
0000016 0x00007ffff6e773e8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /opt/kde4/lib64/libQtCore.so.4
0000017 0x00007ffff6e9e763 in ?? () from /opt/kde4/lib64/libQtCore.so.4
0000018 0x00007ffff066926d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
0000019 0x00007ffff0669a68 in g_main_context_iterate.isra.21 () from /usr/lib64/libglib-2.0.so.0
0000020 0x00007ffff0669c39 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
0000021 0x00007ffff6e9ebbf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib64/libQtCore.so.4
0000022 0x00007ffff21803ee in ?? () from /opt/kde4/lib64/libQtGui.so.4
0000023 0x00007ffff6e73232 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib64/libQtCore.so.4
0000024 0x00007ffff6e7342f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib64/libQtCore.so.4
0000025 0x00007ffff6e775d7 in QCoreApplication::exec() () from /opt/kde4/lib64/libQtCore.so.4
0000026 0x00000000004527eb in main (argc=1, argv=0x7fffffffe2a8) at /usr/src/sorcery/compile/kdenlive/kdenlive/src/main.cpp:89
(gdb)
(0007543)
evorster (reporter)
2011-11-11 20:22

What does this error mean?

[NULL @ 0x1076e0e0] insufficient thread locking around avcodec_open/close()
[NULL @ 0x33ee820] insufficient thread locking around avcodec_open/close()
[vp8 @ 0x7fffa505d160] insufficient thread locking around avcodec_open/close()
(0007545)
evorster (reporter)
2011-11-12 06:12

I'm _still_ hacking away at this.

From yellow's comment, and also my own experimentation, it seems that kdenlive has problems with concurrency and memory allocation.

So, I have a few questions.
How does kdenlive know how many ffmpeg proxy makers to launch? I have limited kdenlive to a single cpu, but still it tries to launch two ffmpeg processes.

Sorcerer's distrobution maintainer has also looked at the backtraces, and he suspects that a malloc fails, and kdenlive does not check whether the malloc succeeded, and then segfaults.

Now, this may not even be in kdenlive's code, as it's calling ffmpeg. So, I would like to be able to limit the amount of proxies being created at the same time, and see if this eliminates or at least alleviates my problem.

I can see that there is a "Processing threads" switch in the settings menu. Mine is set to 1, but that does not seem to have any effect.
(0007737)
evorster (reporter)
2012-01-06 19:27

This bug is finally squashed.

Please set this report as resolved.

- Issue History
Date Modified Username Field Change
2011-11-05 20:44 evorster New Issue
2011-11-06 00:27 j-b-m Note Added: 0007511
2011-11-06 00:27 j-b-m Assigned To => j-b-m
2011-11-06 00:27 j-b-m Status new => feedback
2011-11-06 08:49 evorster Note Added: 0007514
2011-11-06 08:49 evorster Status feedback => assigned
2011-11-06 12:41 evorster Note Added: 0007515
2011-11-06 13:09 j-b-m Note Added: 0007516
2011-11-06 20:53 yellow Note Added: 0007517
2011-11-07 19:32 evorster Note Added: 0007521
2011-11-08 05:37 evorster Note Added: 0007524
2011-11-10 20:53 evorster Note Added: 0007538
2011-11-11 06:52 evorster Note Added: 0007542
2011-11-11 20:22 evorster Note Added: 0007543
2011-11-12 06:12 evorster Note Added: 0007545
2012-01-06 19:27 evorster Note Added: 0007737
2012-01-06 20:33 j-b-m Status assigned => resolved
2012-01-06 20:33 j-b-m Fixed in Version => Recent git
2012-01-06 20:33 j-b-m Resolution open => fixed
2012-05-15 10:57 j-b-m Fixed in Version Recent git => 0.9
2012-05-15 10:58 j-b-m Status resolved => closed


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker