<?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>176490</bug_id>
          
          <creation_ts>2017-09-06 18:31:51 -0700</creation_ts>
          <short_desc>[GTK] Crash in WebCore::PlatformDisplayWayland::~PlatformDisplayWayland</short_desc>
          <delta_ts>2018-04-08 18:36:04 -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://bugs.webkit.org/show_bug.cgi?id=157973</see_also>
    
    <see_also>https://bugzilla.gnome.org/show_bug.cgi?id=794228</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=184405</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>clopez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>magomez</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>wk</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1346192</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-09-06 18:31:51 -0700</bug_when>
    <thetext>This is an Epiphany search provider crash:

#0  0x00007f22ec477af7 in wl_list_insert_list (list=0x2524078, other=0x2524068)
    at /home/mcatanzaro/Projects/GNOME/wayland/src/wayland-util.c:89
No locals.
#1  0x00007f22e6e81389 in wl_priv_signal_emit (signal=0x2524068, data=0x2524000)
    at /home/mcatanzaro/Projects/GNOME/wayland/src/wayland-server.c:1955
        l = 0x2524000
        pos = 0x7f230640dfb0 &lt;initial+944&gt;
#2  0x00007f22e6e80215 in wl_display_destroy (display=0x2524000)
    at /home/mcatanzaro/Projects/GNOME/wayland/src/wayland-server.c:1077
        s = 0x7f2307aa8000
        next = 0x0
        global = 0x7f22e0ff7000
        gnext = 0x252c620
#3  0x00007f22fe89cf3c in WebCore::PlatformDisplayWayland::~PlatformDisplayWayland (
    this=0x7f22e0ff7000, __in_chrg=&lt;optimized out&gt;)
    at ../../Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp:71
No locals.
#4  0x00007f22fe89cf84 in WebCore::PlatformDisplayWayland::~PlatformDisplayWayland (
    this=0x7f22e0ff7000, __in_chrg=&lt;optimized out&gt;)
    at ../../Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp:72
No locals.
#5  0x00007f22feec6bf8 in std::default_delete&lt;WebCore::PlatformDisplay&gt;::operator() (
    this=0x7f2304293908 &lt;WebCore::PlatformDisplay::sharedDisplay()::display&gt;, __ptr=0x7f22e0ff7000)
    at /usr/include/c++/7/bits/unique_ptr.h:78
No locals.
#6  0x00007f22feec6869 in std::unique_ptr&lt;WebCore::PlatformDisplay, std::default_delete&lt;WebCore::PlatformDisplay&gt; &gt;::~unique_ptr (this=0x7f2304293908 &lt;WebCore::PlatformDisplay::sharedDisplay()::display&gt;, 
    __in_chrg=&lt;optimized out&gt;) at /usr/include/c++/7/bits/unique_ptr.h:268
        __ptr = @0x7f2304293908: 0x7f22e0ff7000
#7  0x00007f230607bc68 in __run_exit_handlers () from /lib64/libc.so.6
No symbol table info available.
#8  0x00007f230607bcba in exit () from /lib64/libc.so.6
No symbol table info available.
#9  0x00007f2306061511 in __libc_start_main () from /lib64/libc.so.6
No symbol table info available.
#10 0x00000000004041ca in _start ()
No symbol table info available.

I&apos;ll continue to vote in favor of getting rid of these buggy exit handlers altogether. I doubt we really need to be calling wl_display_destroy().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1347746</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-09-11 17:16:30 -0700</bug_when>
    <thetext>Unless graphics folks have any ideas, we need to remove the PlatformDisplay exit handlers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1364655</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-10-25 20:31:42 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #1)
&gt; Unless graphics folks have any ideas, we need to remove the PlatformDisplay
&gt; exit handlers.

The exit handlers are not needed for program correctness as far as I&apos;m aware, and they&apos;ve been causing many, many crashes over the years. So I think it&apos;s time for them to go. At least this particular one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1364772</commentid>
    <comment_count>3</comment_count>
      <attachid>324987</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-10-26 04:32:54 -0700</bug_when>
    <thetext>Created attachment 324987
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1364782</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-10-26 04:57:11 -0700</bug_when>
    <thetext>I think we need to understand why it&apos;s crashing and only if it&apos;s not possible to fix it we can remove the exit handlers. I don&apos;t remember why, but I think we shut down the egl displays for a reason. IIRC mesa has its own exit handlers to clean up stuff too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1365132</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-10-26 17:14:07 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #4)
&gt; I think we need to understand why it&apos;s crashing and only if it&apos;s not
&gt; possible to fix it we can remove the exit handlers. I don&apos;t remember why,
&gt; but I think we shut down the egl displays for a reason.

If nobody knows why, we should stop doing it and see if anyone notices a problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1365994</commentid>
    <comment_count>6</comment_count>
    <who name="Christian Stadelmann">wk</who>
    <bug_when>2017-10-30 05:52:32 -0700</bug_when>
    <thetext>I am seeing this crash with liferea when running liferea headless to get GIR symbols, see https://github.com/lwindolf/liferea/issues/552 for details.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1401773</commentid>
    <comment_count>7</comment_count>
      <attachid>324987</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-02-23 11:10:37 -0800</bug_when>
    <thetext>Comment on attachment 324987
Patch

Carlos, I don&apos;t understand why it&apos;s crashing, and the graphics people don&apos;t seem to have been able to debug it. Strongly suggest pushing this in now. If the exit handlers are needed to work around OS or driver bugs, then they should be reintroduced once they can be done without crashing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403597</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-05 05:15:59 -0800</bug_when>
    <thetext>Crash stats:

https://retrace.fedoraproject.org/faf/problems/bthash/?bth=7712e893327fdae3c939ee81aa54d082ebbdc717

https://retrace.fedoraproject.org/faf/problems/bthash/?bth=8adf67e9e11bb1765726e37b1f3d7028ca66a8db</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403600</commentid>
    <comment_count>9</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2018-03-05 05:29:00 -0800</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #4)
&gt; I think we need to understand why it&apos;s crashing and only if it&apos;s not
&gt; possible to fix it we can remove the exit handlers. I don&apos;t remember why,
&gt; but I think we shut down the egl displays for a reason. IIRC mesa has its
&gt; own exit handlers to clean up stuff too.

Does http://trac.webkit.org/r201595 help remembering?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403601</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-05 05:39:39 -0800</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #9)
&gt; Does http://trac.webkit.org/r201595 help remembering?

Note: it was an exit-time destructor before that patch, too (since the PlatformDisplay was not NeverDestroyed). The goal there was to move it to run earlier at exit time, to avoid a specific crash. But as long as we do work at exit time, there will always be more crashes....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405484</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-10 09:51:53 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #8)
&gt; Crash stats:
&gt; 
&gt; https://retrace.fedoraproject.org/faf/problems/bthash/
&gt; ?bth=7712e893327fdae3c939ee81aa54d082ebbdc717
&gt; 
&gt; https://retrace.fedoraproject.org/faf/problems/bthash/
&gt; ?bth=8adf67e9e11bb1765726e37b1f3d7028ca66a8db

I really underestimated the total number of crashes here. Those links are currently showing 704 total crashes. I missed this one:

https://retrace.fedoraproject.org/faf/reports/1793321/

which shows 2024 reports. That&apos;s 2728 total reports of this crash from Fedora alone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405486</commentid>
    <comment_count>12</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-10 10:16:24 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #11)
&gt; which shows 2024 reports. That&apos;s 2728 total reports of this crash from
&gt; Fedora alone.

I should add: only 688 unique reports (reports from users who haven&apos;t reported the crash before). So about four reports per unique user.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405513</commentid>
    <comment_count>13</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-10 17:24:35 -0800</bug_when>
    <thetext>ephy-search-provider crashes 100% for me... I didn&apos;t notice for so long because the search provider was broken for most of the 3.26 cycle, and the update fixing it just hit Fedora 27.

Some debugging:

Since this is the search provider, we wind up taking this path in PlatformDisplay::createPlatformDisplay:

#if PLATFORM(WAYLAND)
    if (auto platformDisplay = PlatformDisplayWayland::create())
        return platformDisplay;
#endif

Notably, that&apos;s the only path where m_nativeDisplayOwned is true, so it&apos;s the only path where the native display is destroyed. That&apos;s why the crash only occurs for the search provider. So we destroy it here:

PlatformDisplayWayland::~PlatformDisplayWayland()
{
    if (m_nativeDisplayOwned == NativeDisplayOwned::Yes)
        wl_display_destroy(m_display);
}

That&apos;s definitely wrong, because this wl_display was created with wl_display_connect(), which is Wayland client API, but wl_display_destroy() is Wayland server API. So we must never call wl_display_destroy(). The right function to use is wl_display_disconnect(), which parallels the call to wl_display_connect() that we used to create the wl_display in PlatformDisplayWayland::create. It&apos;s confusing, though, because the UI process is both a Wayland client of the desktop compositor, and also and a Wayland server for the web process.

Now, with that fixed locally, there&apos;s no longer any crash inside wl_display_destroy(), and wl_display_disconnect() works fine. But I&apos;m seeing a similar crash immediately after that, when the wl_compositor is destroyed. I suspect this indicates the root of the problem: we&apos;re trying to use the same wl_display as both a Wayland client and Wayland server, and I guess that isn&apos;t right. It doesn&apos;t happen when there&apos;s a GtkWindow because then GDK&apos;s wl_display is used as the client display instead.

Thread 1 &quot;epiphany-search&quot; received signal SIGSEGV, Segmentation fault.
0x00007fffed7fc919 in wl_map_insert_at (map=&lt;optimized out&gt;, 
    flags=&lt;optimized out&gt;, i=&lt;optimized out&gt;, data=&lt;optimized out&gt;)
    at src/wayland-util.c:247
247	src/wayland-util.c: No such file or directory.
(gdb) bt
#0  0x00007fffed7fc919 in wl_map_insert_at (map=&lt;optimized out&gt;, flags=&lt;optimized out&gt;, i=&lt;optimized out&gt;, data=&lt;optimized out&gt;) at src/wayland-util.c:247
#1  0x00007fffed7f8ad3 in proxy_destroy (proxy=0x5555557a2d60)
    at src/wayland-client.c:506
#2  0x00007fffed7f8ad3 in wl_proxy_destroy (proxy=0x5555557a2d60)
    at src/wayland-client.c:537
#3  0x00007ffff3c0c536 in wl_compositor_destroy (wl_compositor=&lt;optimized out&gt;) at /usr/include/wayland-client-protocol.h:1194
#4  0x00007ffff3c0c536 in WebCore::WlPtrDeleter&lt;wl_compositor&gt;::operator()(wl_compositor*) const (this=&lt;optimized out&gt;, ptr=&lt;optimized out&gt;)
    at /buildstream/build/Source/WebCore/platform/graphics/wayland/WlUniquePtr.h:55
#5  0x00007ffff3c0c536 in std::unique_ptr&lt;wl_compositor, WebCore::WlPtrDeleter&lt;wl_compositor&gt; &gt;::~unique_ptr() (this=0x7fffdf9f5040, __in_chrg=&lt;optimized out&gt;) at /usr/include/c++/7/bits/unique_ptr.h:268
#6  0x00007ffff3c0c536 in WebCore::PlatformDisplayWayland::~PlatformDisplayWayland() (this=0x7fffdf9f5000, __in_chrg=&lt;optimized out&gt;)
    at /buildstream/build/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp:68
#7  0x00007ffff3c0c569 in WebCore::PlatformDisplayWayland::~PlatformDisplayWayland() (this=0x7fffdf9f5000, __in_chrg=&lt;optimized out&gt;)
    at /buildstream/build/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp:72
#8  0x00007ffff6056248 in __run_exit_handlers (status=1, listp=0x7ffff63cf6f8 &lt;__exit_funcs&gt;, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:83
#9  0x00007ffff605629a in __GI_exit (status=&lt;optimized out&gt;) at exit.c:105
#10 0x00007ffff603ff31 in __libc_start_main (main=
    0x55555555d974 &lt;main&gt;, argc=1, argv=0x7fffffffea58, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7fffffffea48)
    at ../csu/libc-start.c:344
#11 0x00005555555599fa in _start ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405515</commentid>
    <comment_count>14</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-10 17:37:19 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #13)
&gt; we&apos;re trying to use the
&gt; same wl_display as both a Wayland client and Wayland server, and I guess
&gt; that isn&apos;t right.

That&apos;s not true, I got confused by wl_compositor. That&apos;s client API too. Perhaps it should be destroyed before its wl_display.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405525</commentid>
    <comment_count>15</comment_count>
      <attachid>335523</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-10 18:03:31 -0800</bug_when>
    <thetext>Created attachment 335523
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405526</commentid>
    <comment_count>16</comment_count>
      <attachid>335523</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-10 18:05:33 -0800</bug_when>
    <thetext>Comment on attachment 335523
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335523&amp;action=review

&gt; Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp:73
&gt; +        wl_display_disconnect(m_display);

Note: this does, in fact, destroy the wl_display.

WlUniquePtr&lt;wl_display&gt; is a bit of a footgun, as it&apos;s not safe to use on any wl_display created with wl_display_connect().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405598</commentid>
    <comment_count>17</comment_count>
      <attachid>335523</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-11 16:35:41 -0700</bug_when>
    <thetext>Comment on attachment 335523
Patch

(cq? for cgarcia)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405679</commentid>
    <comment_count>18</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-12 01:49:04 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #16)
&gt; Comment on attachment 335523 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=335523&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp:73
&gt; &gt; +        wl_display_disconnect(m_display);
&gt; 
&gt; Note: this does, in fact, destroy the wl_display.
&gt; 
&gt; WlUniquePtr&lt;wl_display&gt; is a bit of a footgun, as it&apos;s not safe to use on
&gt; any wl_display created with wl_display_connect().

Good catch! this is exactly what I wanted, once we understand the problem we can easily fix the actual bug. WlUniquePtr&lt;wl_display&gt; is only used once in Waylandcompositor, which is a singleton, so I think we can simply remove it to avoid confusions and use destroy/disconnect directly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405680</commentid>
    <comment_count>19</comment_count>
      <attachid>335523</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-12 01:49:34 -0700</bug_when>
    <thetext>Comment on attachment 335523
Patch

Thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405683</commentid>
    <comment_count>20</comment_count>
      <attachid>335523</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-03-12 02:14:23 -0700</bug_when>
    <thetext>Comment on attachment 335523
Patch

Clearing flags on attachment: 335523

Committed r229525: &lt;https://trac.webkit.org/changeset/229525&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1405684</commentid>
    <comment_count>21</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-03-12 02:14:25 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1407274</commentid>
    <comment_count>22</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-17 16:25:09 -0700</bug_when>
    <thetext>One week later, we&apos;re now up to 3958 reports. I think this might be our biggest WebKit crasher ever....</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>324987</attachid>
            <date>2017-10-26 04:32:54 -0700</date>
            <delta_ts>2018-03-10 18:03:29 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-176490-20171026063253.patch</filename>
            <type>text/plain</type>
            <size>4720</size>
            <attacher name="Michael Catanzaro">mcatanzaro</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjIzOTk5CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMDU5Y2MxZGMwYTRlNTE2
OWVkMDMyMzBmNzI3N2VlODNmOGM3NDExMS4uOTNmNzZkNDkwNGJkYTdmZmFkYjg5ODA1MmQ0MjI3
ZjM5YTUyOTM1OCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDI5IEBACisyMDE3LTEwLTI2ICBNaWNo
YWVsIENhdGFuemFybyAgPG1jYXRhbnphcm9AaWdhbGlhLmNvbT4KKworICAgICAgICBbV1BFXVtH
VEtdIENyYXNoIGluIFdlYkNvcmU6OlBsYXRmb3JtRGlzcGxheVdheWxhbmQ6On5QbGF0Zm9ybURp
c3BsYXlXYXlsYW5kCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNn
aT9pZD0xNzY0OTAKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAg
ICAgICBXZSBoYXZlIGEgcnVsZSBpbiBXZWJLaXQgdGhhdCBzdGF0aWMgb2JqZWN0cyBtdXN0IGJl
IE5ldmVyRGVzdHJveWVkIHRvIGVuc3VyZSBkZXN0cnVjdG9ycyBkbworICAgICAgICBub3QgcnVu
IGF0IGV4aXQgdGltZSwgaW4gb3JkZXIgdG8g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F5ID0gZWdsRGlzcGxheXMoKS50YWtlQW55
KCk7Ci0gICAgICAgIGRpc3BsYXktPnRlcm1pbmF0ZUVHTERpc3BsYXkoKTsKLSAgICB9Ci19Ci0K
ICNlbmRpZiAvLyBVU0UoRUdMKQogCiB9IC8vIG5hbWVzcGFjZSBXZWJDb3JlCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>335523</attachid>
            <date>2018-03-10 18:03:31 -0800</date>
            <delta_ts>2018-03-12 02:14:23 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-176490-20180310200330.patch</filename>
            <type>text/plain</type>
            <size>1890</size>
            <attacher name="Michael Catanzaro">mcatanzaro</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjI5NDQyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNTI2MWNjNjg4NDVlOTU2
YTg5ZWE1OTNkNDFhYmZkYTJhNmRhOTJlMy4uOWUyNzEyMzg0MzI5MGU2NDk0ZmQyZTYwZmFjNmQ2
MzViNTVmMmJjNiAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE3IEBACisyMDE4LTAzLTEwICBNaWNo
YWVsIENhdGFuemFybyAgPG1jYXRhbnphcm9AaWdhbGlhLmNvbT4KKworICAgICAgICBbR1RLXSBD
cmFzaCBpbiBXZWJDb3JlOjpQbGF0Zm9ybURpc3BsYXlXYXlsYW5kOjp+UGxhdGZvcm1EaXNwbGF5
V2F5bGFuZAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
MTc2NDkwCisKKyAgICAgICAgUmV2aWV3ZWQgY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