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 773024 - Mulitiple pipelines stuck at main_loop_run
Mulitiple pipelines stuck at main_loop_run
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.8.3
Other Linux
: Normal critical
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-16 10:09 UTC by EduardS
Modified: 2016-11-11 11:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description EduardS 2016-10-16 10:09:40 UTC
We run many pipelines in different threads more than 50.

Once we hit ~30 threads we get this warning:
 
(java:10828): GStreamer-WARNING **: failed to create thread: Error creating thread: Resource temporarily unavailable

Once this warning appears g_main_loop_run stuck, pipeline not playing and we got no error indication.

We create a new context and a main loop for each thread.
Comment 1 Sebastian Dröge (slomo) 2016-10-16 17:37:47 UTC
You're probably running out of file descriptors. Try to increase the per-process limit.

Each main context has 2 fds, each bus has another one, each thread also, and there might be others for whatever is done in your pipeline.

It's generally not a good idea to have a new thread and main context per pipeline.
Comment 2 EduardS 2016-10-18 10:09:49 UTC
Hi Sebastian,

We have checked ulimit -a and got open files set to 1024, which seams high enough.
Do you mean that we should use the same context for all the main loops/piplines?

Thanks
Comment 3 Sebastian Dröge (slomo) 2016-10-18 10:29:17 UTC
Yes, and set a higher fd limit or otherwise confirm that you're actually running out of fds.
Comment 4 Tim-Philipp Müller 2016-11-11 11:44:22 UTC
Not sure what to do about this. Doesn't seem like a GStreamer bug. Please re-open if there's something specific you wanted fixed in GStreamer, thanks!