After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 662295 - Rendering freezing !
Rendering freezing !
Status: RESOLVED INCOMPLETE
Product: pitivi
Classification: Other
Component: Rendering
0.15
Other Linux
: Normal critical
: 0.91
Assigned To: Pitivi maintainers
Pitivi maintainers
Depends on:
Blocks:
 
 
Reported: 2011-10-20 13:52 UTC by 100domicil
Modified: 2014-11-06 20:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
PITIVI_DEBUG=*:5 GST_DEBUG=2 pitivi VideoTurquiePochoir.xptv -r VideoTurquiePochoir.mp4 > debug.log 2>&1 (198.89 KB, application/zip)
2011-10-20 14:02 UTC, 100domicil
Details

Description 100domicil 2011-10-20 13:52:38 UTC
Hello, 

I'm trying to make a video based on JPEG images and a few MP3s.
It lasts around 10 minutes.
Container : MP4
Video codec : x264enc
Audio codec : ffmpeg AAC
Size :640x480

After some time the rendering hangs with this message : 
 GStreamer-WARNING **: failed to create thread: Error creating thread: Resource temporarily unavailable
Then nothing happens anymore.

I tried with numerous containers/video code/audio codec. Some of them have this message. Some others just hang without messages. Some AVI can be read until the 7h minute. Usually the partially rendered file is unreadable (by VLC).

An example of free before the rendering :
[Oliv]$ free
             total       used       free     shared    buffers     cached
Mem:       1018800     706692     312108          0       5512     230428
-/+ buffers/cache:     470752     548048
Swap:      2064380     192620    1871760

After the freezing :
[Oliv]$ free
             total       used       free     shared    buffers     cached
Mem:       1018800     879436     139364          0       5164     241212
-/+ buffers/cache:     633060     385740
Swap:      2064380     316908    1747472


I tried to render with pitivi alone or pitivi with some other applications running (firefox, gedit etc...). Same results in each case. It always freezes.

My guess is that my 1GB netbook has not enough memory for the rendering. But I'm not sure. And I find it a bit strange. I'm not an expert in videos but this video doesn't look too big, too long or too complex (no videos clips, no effects etc...).
I think that Pitivi should be able to render such a video even on a relatively low capacity computer as mine...

Attached is the debug log.
Comment 1 100domicil 2011-10-20 14:02:25 UTC
Created attachment 199529 [details]
PITIVI_DEBUG=*:5 GST_DEBUG=2 pitivi VideoTurquiePochoir.xptv -r VideoTurquiePochoir.mp4  > debug.log 2>&1
Comment 2 100domicil 2011-11-09 13:29:49 UTC
I upgraded my computer to 2Gb in the hope that it will help on this issue... unfortunately no...

I looked a bit more at the process to see what's going on. I don't see anything obvious but maybe it will help... Here are the last moments of the rendering (from /proc/3314/status, ll and free) :

################
EVRYTHING IS STILL FINE :
################
Name:	python
State:	S (sleeping)
Tgid:	3314
Pid:	3314
PPid:	1659
TracerPid:	0
Uid:	500	500	500	500
Gid:	500	500	500	500
Utrace:	0
FDSize:	256
Groups:	500 
VmPeak:	 2975036 kB
VmSize:	 2974132 kB
VmLck:	       0 kB
VmHWM:	  321468 kB
VmRSS:	  316872 kB
VmData:	 2890308 kB
VmStk:	     224 kB
VmExe:	       4 kB
VmLib:	   78740 kB
VmPTE:	    1632 kB
VmSwap:	       0 kB
Threads:	318
SigQ:	0/15937
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000001001000
SigCgt:	0000000180000002
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000
CapBnd:	ffffffffffffffff
Cpus_allowed:	3
Cpus_allowed_list:	0-1
Mems_allowed:	1
Mems_allowed_list:	0
voluntary_ctxt_switches:	3460
nonvoluntary_ctxt_switches:	4382

-rw-rw-r--. 1 Oliv Oliv 59568128 Nov  9 14:06 VideoTurquiePochoir.mp4

             total       used       free     shared    buffers     cached
Mem:       2055068    1262080     792988          0      71872     631576
-/+ buffers/cache:     558632    1496436
Swap:      2064380          0    2064380
################
EVRYTHING IS STILL FINE :
################
Name:	python
State:	S (sleeping)
Tgid:	3314
Pid:	3314
PPid:	1659
TracerPid:	0
Uid:	500	500	500	500
Gid:	500	500	500	500
Utrace:	0
FDSize:	256
Groups:	500 
VmPeak:	 2975036 kB
VmSize:	 2970216 kB
VmLck:	       0 kB
VmHWM:	  321468 kB
VmRSS:	  316352 kB
VmData:	 2886392 kB
VmStk:	     224 kB
VmExe:	       4 kB
VmLib:	   78740 kB
VmPTE:	    1632 kB
VmSwap:	       0 kB
Threads:	318
SigQ:	0/15937
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000001001000
SigCgt:	0000000180000002
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000
CapBnd:	ffffffffffffffff
Cpus_allowed:	3
Cpus_allowed_list:	0-1
Mems_allowed:	1
Mems_allowed_list:	0
voluntary_ctxt_switches:	3460
nonvoluntary_ctxt_switches:	4382

-rw-rw-r--. 1 Oliv Oliv 59764736 Nov  9 14:06 VideoTurquiePochoir.mp4

             total       used       free     shared    buffers     cached
Mem:       2055068    1251292     803776          0      71880     622904
-/+ buffers/cache:     556508    1498560
Swap:      2064380          0    2064380

################
HERE IS THE INFAMOUS 
GStreamer-WARNING **: failed to create thread: Error creating thread: Resource temporarily unavailable :
################
Name:	python
State:	S (sleeping)
Tgid:	3314
Pid:	3314
PPid:	1659
TracerPid:	0
Uid:	500	500	500	500
Gid:	500	500	500	500
Utrace:	0
FDSize:	256
Groups:	500 
VmPeak:	 2975036 kB
VmSize:	 2970216 kB
VmLck:	       0 kB
VmHWM:	  321468 kB
VmRSS:	  316352 kB
VmData:	 2886392 kB
VmStk:	     224 kB
VmExe:	       4 kB
VmLib:	   78740 kB
VmPTE:	    1632 kB
VmSwap:	       0 kB
Threads:	318
SigQ:	0/15937
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000001001000
SigCgt:	0000000180000002
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000
CapBnd:	ffffffffffffffff
Cpus_allowed:	3
Cpus_allowed_list:	0-1
Mems_allowed:	1
Mems_allowed_list:	0
voluntary_ctxt_switches:	3460
nonvoluntary_ctxt_switches:	4382

-rw-rw-r--. 1 Oliv Oliv 59912192 Nov  9 14:06 VideoTurquiePochoir.mp4

             total       used       free     shared    buffers     cached
Mem:       2055068    1260212     794856          0      71888     629452
-/+ buffers/cache:     558872    1496196
Swap:      2064380          0    2064380

################
THEN PITIVI IS IN COMA :
################
Name:	python
State:	S (sleeping)
Tgid:	3314
Pid:	3314
PPid:	1659
TracerPid:	0
Uid:	500	500	500	500
Gid:	500	500	500	500
Utrace:	0
FDSize:	256
Groups:	500 
VmPeak:	 2975036 kB
VmSize:	 2965400 kB
VmLck:	       0 kB
VmHWM:	  321468 kB
VmRSS:	  311536 kB
VmData:	 2881576 kB
VmStk:	     224 kB
VmExe:	       4 kB
VmLib:	   78740 kB
VmPTE:	    1632 kB
VmSwap:	       0 kB
Threads:	318
SigQ:	0/15937
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000001001000
SigCgt:	0000000180000002
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000
CapBnd:	ffffffffffffffff
Cpus_allowed:	3
Cpus_allowed_list:	0-1
Mems_allowed:	1
Mems_allowed_list:	0
voluntary_ctxt_switches:	3464
nonvoluntary_ctxt_switches:	4389

-rw-rw-r--. 1 Oliv Oliv 59953152 Nov  9 14:06 VideoTurquiePochoir.mp4

             total       used       free     shared    buffers     cached
Mem:       2055068    1253144     801924          0      71896     629624
-/+ buffers/cache:     551624    1503444
Swap:      2064380          0    2064380


################
Name:	python
State:	S (sleeping)
Tgid:	3314
Pid:	3314
PPid:	1659
TracerPid:	0
Uid:	500	500	500	500
Gid:	500	500	500	500
Utrace:	0
FDSize:	256
Groups:	500 
VmPeak:	 2975036 kB
VmSize:	 2965400 kB
VmLck:	       0 kB
VmHWM:	  321468 kB
VmRSS:	  311536 kB
VmData:	 2881576 kB
VmStk:	     224 kB
VmExe:	       4 kB
VmLib:	   78740 kB
VmPTE:	    1632 kB
VmSwap:	       0 kB
Threads:	318
SigQ:	0/15937
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000001001000
SigCgt:	0000000180000002
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000
CapBnd:	ffffffffffffffff
Cpus_allowed:	3
Cpus_allowed_list:	0-1
Mems_allowed:	1
Mems_allowed_list:	0
voluntary_ctxt_switches:	3464
nonvoluntary_ctxt_switches:	4389

-rw-rw-r--. 1 Oliv Oliv 59953152 Nov  9 14:06 VideoTurquiePochoir.mp4

             total       used       free     shared    buffers     cached
Mem:       2055068    1257608     797460          0      71896     634352
-/+ buffers/cache:     551360    1503708
Swap:      2064380          0    2064380
Comment 3 100domicil 2011-11-15 10:47:16 UTC
After poking around I at last found a workaround...

I'm using Fedora (currently 16)

I was looking at the 'top' command and was surprised to see the Data field (data+stack) going over the top (if I may say). So I suspected something with the stack. 
As root I changed the stack limit to unlimited :
ulimit -s unlimited 

then logged as a normal user :
su User

then launch the rendering from the command line.

Magically the free and top commands were showing me a much lower memory usage. After a time all was finished. My video was rendered (the only problem is that I have to ctrl+c to finish the rendering, it doesn't stop alone).

I'm clearly not sure of what I did here... should I do it each time I want to render a video or should I set this limit at boot time for the whole system ? is it 'dangerous' (some instability problem maybe) ? is it normal for pitivi to seemingly use so much stack ? is it a problem with Fedora only ? 
Any hints are welcome...
Comment 4 Jean-François Fortin Tam 2011-11-15 15:59:44 UTC
Hi there,
that's quite interesting, your symptoms are similar to bug 634722 but your bug report here at least has some additional info/workaround. I'm not sure I understand how ulimit -S affects this, but I'm hoping others might comment on this.

This is not limited to Fedora, and I do not consider something like this to be "normal" for pitivi. Your help in investigating this is appreciated :)

P.s.: The ctrl+C problem is bug 659163
Comment 5 Jean-François Fortin Tam 2013-09-30 15:11:41 UTC
Hi there,

As Pitivi 0.91 has now been released, we would like to encourage you to test it.

It is quite possible that your issue is fixed in this version,
as it is a very significant technical overhaul compared to the 0.15 series.
Read more about the 0.91 release here: http://wiki.pitivi.org/wiki/0.91

If you can reproduce this bug against 0.91 or newer (such as the git version),
please update this bug report accordingly with detailed instructions to
reproduce the bug, updated sample files/projects in xges format, etc.

Drop by our IRC channel if you need help getting started or want to help out!

Thanks!
Comment 6 Jean-François Fortin Tam 2014-11-06 20:36:16 UTC
Closing this bug report as no further information has been provided.
Please feel free to reopen if the issue persists with 0.94 or newer
and if you can provide the information asked for. Thanks!