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 788604 - x11: Applications abort due to _GTK_EDGE_CONSTRAINTS
x11: Applications abort due to _GTK_EDGE_CONSTRAINTS
Status: RESOLVED NOTGNOME
Product: gtk+
Classification: Platform
Component: .General
3.22.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-10-06 14:53 UTC by Iain Lane
Modified: 2017-10-17 14:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
x11: Precache _GTK_EDGE_CONSTRAINTS (853 bytes, patch)
2017-10-06 14:54 UTC, Iain Lane
none Details | Review

Description Iain Lane 2017-10-06 14:53:59 UTC
Since 3.22.24 we started seeing one of our regression tests ("software-properties") failing:

  Gdk-Message: setup.py: Fatal IO error 11 (Resource temporarily unavailable) on X server :99.

I bisected gtk3 and it told me that c415bef5deb533f3ef3e4b31a33821ef2f42ebda was the commit that made this test start failing. Some grubbing around showed me that it was the 'gdk_x11_get_xatom_by_name_for_display (display, "_GTK_EDGE_CONSTRAINTS")' call that was causing the error. I wondered why this wasn't happening for the previous calls to that function. Turns out that it's because those values are precached.

My knowledge in this area is rather sketchy, but is it OK to add _GTK_EDGE_CONSTRAINTS there too?
Comment 1 Iain Lane 2017-10-06 14:54:03 UTC
Created attachment 361049 [details] [review]
x11: Precache _GTK_EDGE_CONSTRAINTS

Since c415bef5deb533f3ef3e4b31a33821ef2f42ebda we always check
_GTK_EDGE_CONSTRAINTS.

This can lead to aborting applications in some circumstances.
Comment 2 Matthias Clasen 2017-10-07 17:44:16 UTC
precaching should not be necessary for this to work correctly.

It would be interesting to know more exactly what is going wrong there
Comment 3 Iain Lane 2017-10-09 12:32:28 UTC
Alright, can you give me some hints for what to look at please?
Comment 4 Iain Lane 2017-10-10 13:50:02 UTC
I saw bug #788666, which seemed a bit similar. Maybe comment #25 there is describing this bug.

Trapping the error (gdk_x11_display_error_trap_push / gdk_x11_display_error_trap_pop_ignored) around the call also works around the problem.

Is that more correct? Or otherwise, is there a way to avoid this call or the error?
Comment 5 Iain Lane 2017-10-10 14:15:16 UTC
(In reply to Iain Lane from comment #4)
> Trapping the error (gdk_x11_display_error_trap_push /
> gdk_x11_display_error_trap_pop_ignored) around the call also works around
> the problem.

Sorry, that was false, I'd messed up how I was running the tests. I also tried with gdk_x11_screen_supports_net_wm_hint and that doesn't work either.
Comment 6 Iain Lane 2017-10-17 14:32:30 UTC
OK, since I got no replies here I've changed the software-properties testsuite to avoid this.

It would be good to know what precaching is for though, and when it's appropriate (i.e. why it wasn't right here).