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 761257 - multisocketsink: doesn't handle client close and EWOULDBLOCK
multisocketsink: doesn't handle client close and EWOULDBLOCK
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.6.3
Other Linux
: Normal blocker
: 1.6.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
1.6.4
Depends on:
Blocks:
 
 
Reported: 2016-01-28 15:47 UTC by Tom Deseyn
Modified: 2016-04-14 17:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for 1.6 branch (1.20 KB, patch)
2016-01-28 15:47 UTC, Tom Deseyn
committed Details | Review
Patch for master (1.96 KB, patch)
2016-01-28 15:48 UTC, Tom Deseyn
committed Details | Review

Description Tom Deseyn 2016-01-28 15:47:13 UTC
Created attachment 319947 [details] [review]
Patch for 1.6 branch

This change http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/gst/tcp/gstmultisocketsink.c?id=6db2ee56b6e862f54c479e553f179daf2056da74 rendered the 'client close'-handling inert (navail == 0).

The change was made to fix: https://bugzilla.gnome.org/show_bug.cgi?id=743834. The use case here lead to navail==0 and EWOULDBLOCK.

The attached patch re-enables client close handling and also handle EWOULDBLOCK. I've verified both the 'client close'-case and the 'EWOULDBLOCK'-case are properly handled with the patch on 1.6.
Comment 1 Tom Deseyn 2016-01-28 15:48:14 UTC
Created attachment 319948 [details] [review]
Patch for master

Applied logic of 1.6 patch to master branch (untested)
Comment 2 Tim-Philipp Müller 2016-03-01 13:26:29 UTC
Thanks, pushed to master with minor indentation changes. Will pick into 1.6 if nothing comes up:

commit 8c4d3c6aa9fd0816210ac8b03d958647208bf589
Author: Tom Deseyn <tom.deseyn@gmail.com>
Date:   Thu Jan 28 16:26:47 2016 +0100

    multisocketsink: handle client close correctly and EWOULDBLOCK
    
    Fixes 100% cpu usage when client disconnects. Commit 6db2ee56
    would just make multisocketsink ignore reads of 0 bytes without
    removing the client, so we'd get woken up over and over again
    for the client.
    
    Fix the original issue differently by handling the non-fatal error code.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761257
    https://bugzilla.gnome.org/show_bug.cgi?id=743834
Comment 3 Tom Deseyn 2016-03-01 14:24:08 UTC
Thanks Tim!