[Webkit-unassigned] [Bug 257798] [GTK] Slow to create WebKitWebView (30 seconds delay) with sandbox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 15 13:31:48 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=257798

--- Comment #22 from Michael Catanzaro <mcatanzaro at redhat.com> ---
(In reply to roded from comment #21)
> Attaching gdb shows a trace of new threads being created and exiting.
> 
> Hoping I did this right:
> 
> After clicking the reply button and before the composer window has appeared
> bt full shows:
> 
> #0  0x00007fcd9b513c0f in poll () at /usr/lib/libc.so.6
> #1  0x00007fcda02d917f in  () at /usr/lib/libglib-2.0.so.0
> #2  0x00007fcda027bc7f in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
> #3  0x00007fcd9fbd8e4f in gtk_main () at /usr/lib/libgtk-3.so.0
> #4  0x000055ef0cd8957f in main ()

Well unfortunately that doesn't tell us anything.

> Once the composer window has appeared, but before the HTML is properly
> formatted, bt full shows:
> 
> #0  0x00007fcd9b513c0f in poll () at /usr/lib/libc.so.6
> #1  0x00007fcda02d917f in  () at /usr/lib/libglib-2.0.so.0
> #2  0x00007fcda027bc7f in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
> #3  0x00007fcd88a46ff5 in  () at
> /usr/lib/evolution/modules/module-webkit-editor.so
> #4  0x00007fcd88a47a95 in  () at
> /usr/lib/evolution/modules/module-webkit-editor.so
> #5  0x00007fcd88c04f5b in  () at
> /usr/lib/evolution/libevolution-mail-composer.so
> #6  0x00007fcd9f697a23 in g_simple_async_result_complete () at
> /usr/lib/libgio-2.0.so.0
> #7  0x00007fcd9f697aae in  () at /usr/lib/libgio-2.0.so.0
> #8  0x00007fcda027c53b in g_main_context_dispatch () at
> /usr/lib/libglib-2.0.so.0
> #9  0x00007fcda02d9219 in  () at /usr/lib/libglib-2.0.so.0
> #10 0x00007fcda027bc7f in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
> #11 0x00007fcd9fbd8e4f in gtk_main () at /usr/lib/libgtk-3.so.0
> #12 0x000055ef0cd8957f in main ()
> 
> Thanks!

Is this where the hang occurs?

Normally this is where I'd ask you to install debuginfo to get a better backtrace, but has to be coming from e-webkit-editor.c's webkit_editor_call_jsc_sync(). That's a nested main loop using the *default* GMainContext, so it's being iterated twice at the same time. Generally code does not expect this to happen, and all sorts of stuff can go wrong, so this is frowned upon.

I'd suggest, for starters, not doing that: create a new GMainContext instead, push thread-default, use it to create the GMainLoop, and pop thread-default when you're done. But I'm not sure if that's actually possible here, because if you *don't* iterate the default GMainContext here, then pearhps the call to webkit_web_view_run_javascript() will just not complete. Not sure. Anyway, that's the first thing I would try

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230615/fb2438ec/attachment.htm>


More information about the webkit-unassigned mailing list