Openembedded Core Discussions
 help / color / mirror / Atom feed
* [meta-oe][PATCH] libx11: Add patch to fix hanging issue in _XReply
@ 2017-08-14  6:02 Jose Alarcon
  2017-08-14  7:01 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 3+ messages in thread
From: Jose Alarcon @ 2017-08-14  6:02 UTC (permalink / raw)
  To: openembedded-core

Assume event queue is empty if another thread is blocking waiting for event.

If one thread was blocking waiting for an event and another thread sent a
reply to the X server, both threads got blocked until an event was
received.
---
 .../libx11/Fix-hanging-issue-in-_XReply.patch      | 59 ++++++++++++++++++++++
 meta/recipes-graphics/xorg-lib/libx11_1.6.4.bb     |  1 +
 2 files changed, 60 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-lib/libx11/Fix-hanging-issue-in-_XReply.patch

diff --git a/meta/recipes-graphics/xorg-lib/libx11/Fix-hanging-issue-in-_XReply.patch b/meta/recipes-graphics/xorg-lib/libx11/Fix-hanging-issue-in-_XReply.patch
new file mode 100644
index 0000000..c3d9ba3
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/Fix-hanging-issue-in-_XReply.patch
@@ -0,0 +1,59 @@
+From 5235a7f3692a4c3c90dd4ac1be3c670388904bbe Mon Sep 17 00:00:00 2001
+From: Tatu Frisk <tatu.frisk@ge.com>
+Date: Tue, 14 Mar 2017 14:41:27 +0200
+Subject: [PATCH] Fix hanging issue in _XReply
+
+Assume event queue is empty if another thread is blocking waiting for event.
+
+If one thread was blocking waiting for an event and another thread sent a
+reply to the X server, both threads got blocked until an event was
+received.
+
+Upstream-Status: Submitted.
+
+This patch needs to be removed once the corresponding patch has been merged upstream.
+
+https://patchwork.freedesktop.org/patch/171458/
+
+Signed-off-by: Tatu Frisk <tatu.frisk@ge.com>
+---
+ src/xcb_io.c | 19 +++++++------------
+ 1 file changed, 7 insertions(+), 12 deletions(-)
+
+diff --git a/src/xcb_io.c b/src/xcb_io.c
+index 5987329..c64eb04 100644
+--- a/src/xcb_io.c
++++ b/src/xcb_io.c
+@@ -609,22 +609,17 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard)
+ 		 * letting anyone else process this sequence number, we
+ 		 * need to process any events that should have come
+ 		 * earlier. */
+-
+ 		if(dpy->xcb->event_owner == XlibOwnsEventQueue)
+ 		{
+ 			xcb_generic_reply_t *event;
+-			/* If some thread is already waiting for events,
+-			 * it will get the first one. That thread must
+-			 * process that event before we can continue. */
+-			/* FIXME: That event might be after this reply,
+-			 * and might never even come--or there might be
+-			 * multiple threads trying to get events. */
+-			while(dpy->xcb->event_waiter)
+-			{ /* need braces around ConditionWait */
+-				ConditionWait(dpy, dpy->xcb->event_notify);
++
++			/* Assume event queue is empty if another thread is blocking
++			 * waiting for event. */
++			if(!dpy->xcb->event_waiter)
++			{
++				while((event = poll_for_response(dpy)))
++					handle_response(dpy, event, True);
+ 			}
+-			while((event = poll_for_event(dpy)))
+-				handle_response(dpy, event, True);
+ 		}
+ 
+ 		req->reply_waiter = 0;
+-- 
+2.10.1
+
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.6.4.bb b/meta/recipes-graphics/xorg-lib/libx11_1.6.4.bb
index caa95fb..7ee51ad 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_1.6.4.bb
+++ b/meta/recipes-graphics/xorg-lib/libx11_1.6.4.bb
@@ -4,6 +4,7 @@ inherit gettext
 BBCLASSEXTEND = "native nativesdk"
 
 SRC_URI += "file://disable_tests.patch \
+            file://Fix-hanging-issue-in-_XReply.patch \
            "
 
 SRC_URI[md5sum] = "6d54227082f3aa2c596f0b3a3fbb9175"
-- 
2.10.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ patchtest: failure for libx11: Add patch to fix hanging issue in _XReply
  2017-08-14  6:02 [meta-oe][PATCH] libx11: Add patch to fix hanging issue in _XReply Jose Alarcon
@ 2017-08-14  7:01 ` Patchwork
  2017-08-14 15:47   ` Leonardo Sandoval
  0 siblings, 1 reply; 3+ messages in thread
From: Patchwork @ 2017-08-14  7:01 UTC (permalink / raw)
  To: Jose Alarcon; +Cc: openembedded-core

== Series Details ==

Series: libx11: Add patch to fix hanging issue in _XReply
Revision: 1
URL   : https://patchwork.openembedded.org/series/8209/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 5a25ed1071)

* Patch            [meta-oe] libx11: Add patch to fix hanging issue in _XReply
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")

* Patch            [meta-oe] libx11: Add patch to fix hanging issue in _XReply
 Issue             Series sent to the wrong mailing list [test_target_mailing_list] 
  Suggested fix    Check the project's README (meta-oe) and send the patch to the indicated list



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ✗ patchtest: failure for libx11: Add patch to fix hanging issue in _XReply
  2017-08-14  7:01 ` ✗ patchtest: failure for " Patchwork
@ 2017-08-14 15:47   ` Leonardo Sandoval
  0 siblings, 0 replies; 3+ messages in thread
From: Leonardo Sandoval @ 2017-08-14 15:47 UTC (permalink / raw)
  To: openembedded-core

On Mon, 2017-08-14 at 07:01 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: libx11: Add patch to fix hanging issue in _XReply
> Revision: 1
> URL   : https://patchwork.openembedded.org/series/8209/
> State : failure
> 
> == Summary ==
> 
> 
> Thank you for submitting this patch series to OpenEmbedded Core. This is
> an automated response. Several tests have been executed on the proposed
> series by patchtest resulting in the following failures:
> 
> 
> 
> * Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
>   Suggested fix    Rebase your series on top of targeted branch
>   Targeted branch  master (currently at 5a25ed1071)

master currently has libx11_1.6.5 and this path is based of 1.6.4 so you
may need to check if issue is present on latest version.


> 
> * Patch            [meta-oe] libx11: Add patch to fix hanging issue in _XReply
>  Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
>   Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")


> 
> * Patch            [meta-oe] libx11: Add patch to fix hanging issue in _XReply
>  Issue             Series sent to the wrong mailing list [test_target_mailing_list] 
>   Suggested fix    Check the project's README (meta-oe) and send the patch to the indicated list
> 

if some layer is included in the commit shortlog, patchtest will
indicate that patch went into the wrong mailing list. So remove the
meta-oe string on your next revision.

Leo

> 
> 
> If you believe any of these test results are incorrect, please reply to the
> mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
> Otherwise we would appreciate you correcting the issues and submitting a new
> version of the patchset if applicable. Please ensure you add/increment the
> version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
> [PATCH v3] -> ...).
> 
> ---
> Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
> Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-14 15:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-14  6:02 [meta-oe][PATCH] libx11: Add patch to fix hanging issue in _XReply Jose Alarcon
2017-08-14  7:01 ` ✗ patchtest: failure for " Patchwork
2017-08-14 15:47   ` Leonardo Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox