Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • libX11 libX11
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 71
    • Issues 71
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Admin message

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • xorgxorg
  • lib
  • libX11libX11
  • Issues
  • #93

Hanging on recursive _XReply() invocation

Hello,

I'm experiencing window manager (kwin) hanging on a recursive invocation of _XReply() that happens like this _XReply()->handle_error()->...->_XSeqSyncFunction()->_XReply()->ConditionWait(), see https://bugs.kde.org/show_bug.cgi?id=405592 for some stacktraces. This happens on an ARM device and somehow this is only reproducible when using touchscreen as the input. To be clear the hanging also happens using any desktop environment (checked XFCE, LXDE.. etc), so libx11 is likely to be the offender.

I made a dumb hack to libx11 to avoid the recursive _XReply() invocation and it 100% fixes the problem.

diff --git a/src/XlibInt.c b/src/XlibInt.c
index a0b2ed2f..a2b92493 100644
--- a/src/XlibInt.c
+++ b/src/XlibInt.c
@@ -211,11 +211,7 @@ void _XSeqSyncFunction(
     xGetInputFocusReply rep;
     _X_UNUSED register xReq *req;
 
-    if ((X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy)) >= (65535 - BUFSIZE/SIZEOF(xReq))) {
-       GetEmptyReq(GetInputFocus, req);
-       (void) _XReply (dpy, (xReply *)&rep, 0, xTrue);
-       sync_while_locked(dpy);
-    } else if (sync_hazard(dpy))
+    if (sync_hazard(dpy))
        _XSetPrivSyncFunction(dpy);
 }

Any thoughts / comments?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking