<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>160244</bug_id>
          
          <creation_ts>2016-07-27 06:52:10 -0700</creation_ts>
          <short_desc>[Wayland] PlatformDisplay crash when calling wl_proxy_destroy in exit handler</short_desc>
          <delta_ts>2016-09-02 22:52:14 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=1357119</see_also>
    
    <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=1325815</see_also>
    
    <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=1364284</see_also>
    
    <see_also>https://bugzilla.redhat.com/show_bug.cgi?id=1330116</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>81456</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1214875</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-07-27 06:52:10 -0700</bug_when>
    <thetext>I have one report (meaning it&apos;s very rare) of a crash when the PlatformDisplayWayland destructor is called in an exit handler, inside wl_proxy_destroy:

Thread 1 (Thread 0x7f3bca75dac0 (LWP 3269)):
#0  wl_proxy_destroy (proxy=0x7f3b00000000) at src/wayland-client.c:438
        display = &lt;optimized out&gt;
#1  0x00007f3bc968d8e0 in wl_webkitgtk_destroy (wl_webkitgtk=&lt;optimized out&gt;) at /usr/src/debug/webkitgtk-2.12.3/x86_64-redhat-linux-gnu/DerivedSources/WebCore/WebKitGtkWaylandClientProtocol.h:70
No locals.
#2  WebCore::PlatformDisplayWayland::~PlatformDisplayWayland (this=0x7f3b42aa06c0, __in_chrg=&lt;optimized out&gt;) at /usr/src/debug/webkitgtk-2.12.3/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp:111
No locals.
#3  0x00007f3bc968d929 in WebCore::PlatformDisplayWayland::~PlatformDisplayWayland (this=0x7f3b42aa06c0, __in_chrg=&lt;optimized out&gt;) at /usr/src/debug/webkitgtk-2.12.3/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp:118
No locals.
#4  0x00007f3bbe52a1e8 in __run_exit_handlers (status=status@entry=0, listp=0x7f3bbe8ad5d8 &lt;__exit_funcs&gt;, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
        atfct = &lt;optimized out&gt;
        onfct = &lt;optimized out&gt;
        cxafct = &lt;optimized out&gt;
        f = &lt;optimized out&gt;
#5  0x00007f3bbe52a235 in __GI_exit (status=status@entry=0) at exit.c:104
No locals.
#6  0x00007f3bc86346b3 in IPC::Connection::didFailToSendSyncMessage (this=this@entry=0x7f3bb4de9000) at /usr/src/debug/webkitgtk-2.12.3/Source/WebKit2/Platform/IPC/Connection.cpp:873
No locals.

Note it&apos;s triggered by didFailToSendSyncMessage. Full backtrace downstream.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1214876</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-07-27 06:56:06 -0700</bug_when>
    <thetext>I take that back, we have 13 reports of this. Still relatively rare.

I forgot to mention, this is very similar to bug #157973.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217872</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-08-05 07:55:44 -0700</bug_when>
    <thetext>Got two users who report this can be triggered by using Epiphany&apos;s bookmarks import feature. (Yeah....) It also crashes GNOME shell.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217873</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-08-05 08:01:25 -0700</bug_when>
    <thetext>Note that using exit-time destructors like this is a violation of our programming guidelines, and why we have NeverDestroyed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1220826</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-08-17 01:12:08 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; I take that back, we have 13 reports of this. Still relatively rare.

Now we&apos;re up to 271 reports</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1220828</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-08-17 01:14:51 -0700</bug_when>
    <thetext>This could be fixed by patch attached to bug #115803, since PlatformDisplayWayland no longer creates a wl_webkitgtk object.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1226089</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-09-02 22:52:14 -0700</bug_when>
    <thetext>Please, reopen this if it still fails after r205116</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>