[gtk3] freeze in gdk_x11_window_set_user_time()

RESOLVED FIXED in mozilla36

Status

()

Core
Widget: Gtk
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: stransky, Assigned: stransky)

Tracking

35 Branch
mozilla36
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

3 years ago
After some time running Firefox freezes in startup notification code, resp. in gdk_x11_window_set_user_time() where gdk_drawable_get_display() fails to get the display.

3716	void
3717	gdk_x11_window_set_user_time (GdkWindow *window,
3718	                              guint32    timestamp)
3719	{
3720	  GdkDisplay *display;
3721	  GdkDisplayX11 *display_x11;
3722	  GdkToplevelX11 *toplevel;
3723	  glong timestamp_long = (glong)timestamp;
3724	  Window xid;
3725	
3726	  if (GDK_WINDOW_DESTROYED (window) ||
3727	      !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
3728	    return;
3729	
3730	  display = gdk_drawable_get_display (window);
3731	  display_x11 = GDK_DISPLAY_X11 (display); <<< display is null here
(Assignee)

Comment 1

3 years ago
Created attachment 8521336 [details]
_back

backtrace
(Assignee)

Comment 2

3 years ago
The problem is PR_FindFunctionSymbolAndLibrary() in SetUserTimeAndStartupIDForActivatedWindow(). 

Sometimes a gtk2 library is choosen (like libflashplugin.so) so gdk_x11_window_set_user_time() from it freezes with null display.
(Assignee)

Comment 3

3 years ago
Created attachment 8522971 [details] [diff] [review]
patch
Attachment #8522971 - Flags: review?(karlt)
Comment on attachment 8522971 [details] [diff] [review]
patch

The change is good, thanks, but I don't know that it will fix all related problems.
PR_FindFunctionSymbolAndLibrary() only considers libraries already loaded.
If GTK2 and GTK3 libraries are both loaded in the process, then there may be other problems.  Or perhaps this works because ld.so always prefers symbols from the first library loaded.

Is this from loading libflashplugin.so in the main process to check its MIME type?  Is it not unloaded after that happens?
Bug 939796 may be relevant.
Attachment #8522971 - Flags: review?(karlt) → review+
(Assignee)

Comment 5

3 years ago
IMHO it comes from the Bug 939796 because mime types are still loaded in-process. But I haven't see any other conflicts yet.
Keywords: checkin-needed
Hi Martin,

could you post a link to  try run, thanks!
Assignee: nobody → stransky
Flags: needinfo?(stransky)
Keywords: checkin-needed
(Assignee)

Comment 7

3 years ago
The try is here: https://tbpl.mozilla.org/?tree=Try&rev=60e107e0dea0
Flags: needinfo?(stransky)
(Assignee)

Comment 8

3 years ago
Looks okay (at least the modified gtk parts).
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/de71b9d01773
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.