<?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>228129</bug_id>
          
          <creation_ts>2021-07-20 15:03:59 -0700</creation_ts>
          <short_desc>[SOUP] Network process crash in soup_message_headers_set</short_desc>
          <delta_ts>2021-07-21 05:54:29 -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>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <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="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1778289</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-07-20 15:03:59 -0700</bug_when>
    <thetext>I&apos;ve seen this crash several times recently, including twice this afternoon. It is a recent regression. This is using today&apos;s Ephy Tech Preview, so it&apos;s the very latest libsoup git master:

(gdb) bt full
#0  0x00007faf6190a4bb in raise () at /usr/lib/x86_64-linux-gnu/libc.so.6
#1  0x00007faf618f3867 in abort () at /usr/lib/x86_64-linux-gnu/libc.so.6
#2  0x00007faf61454c7c in g_assertion_message_expr.cold () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007faf614b554f in g_assertion_message_expr () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007faf5e11ef46 in soup_message_headers_set () at /usr/lib/x86_64-linux-gnu/libsoup-3.0.so.0
#5  0x00007faf5e11f11d in soup_message_headers_append_common () at /usr/lib/x86_64-linux-gnu/libsoup-3.0.so.0
#6  0x00007faf5e0fc626 in on_header_callback () at /usr/lib/x86_64-linux-gnu/libsoup-3.0.so.0
#7  0x00007faf5b628aba in session_call_on_header (nv=0x7fff35086b60, frame=0x55d2f29791c0, session=0x55d2f2979020)
    at ../../lib/nghttp2_session.c:3345
        rv = 0
        proclen = 20
        rv = &lt;optimized out&gt;
        inflate_flags = 2
        nv = {name = 0x7faf5b640ce0 &lt;static_table+3840&gt;, value = 0x55d2f297c6b0, token = 30, flags = 0 &apos;\000&apos;}
        stream = &lt;optimized out&gt;
        trailer = 0
        subject_stream = 0x55d2f27d7910
        hd_proclen = 24
        data_readlen = &lt;optimized out&gt;
        trail_padlen = &lt;optimized out&gt;
        final = &lt;optimized out&gt;
        first = 0x7fff35086bc0 &quot;&quot;
        last = 0x7fff35086c37 &quot;&quot;
        iframe = 0x55d2f29791c0
        readlen = 93
        padlen = &lt;optimized out&gt;
        rv = &lt;optimized out&gt;
        busy = &lt;optimized out&gt;
        cont_hd = 
          {length = 140734083140592, stream_id = 434582317, type = 175 &apos;\257&apos;, flags = 127 &apos;\177&apos;, reserved = 0 &apos;\000&apos;}
        stream = &lt;optimized out&gt;
        pri_fieldlen = &lt;optimized out&gt;
        mem = 0x55d2f29798b0
        __PRETTY_FUNCTION__ = &quot;nghttp2_session_mem_recv&quot;
#8  inflate_header_block
    (call_header_cb=1, final=1, inlen=69, in=0x7fff35086be1 &quot;\\\001\060\017\022\226\337i~\224\020\024\313m\n\b\002\n\202\r\306ݸ\027Tţ\177v\222\327\351\063\236\246\031]\325\006cΔ\326\303+\266\273_|\207\n\341Rc\236j\v@\205\035\tY\035Ʉ%\005\035\237&quot;, readlen_ptr=&lt;synthetic pointer&gt;, frame=0x55d2f29791c0, session=0x55d2f2979020)
    at ../../lib/nghttp2_session.c:3698
        proclen = 20
        rv = &lt;optimized out&gt;
        inflate_flags = 2
        nv = {name = 0x7faf5b640ce0 &lt;static_table+3840&gt;, value = 0x55d2f297c6b0, token = 30, flags = 0 &apos;\000&apos;}
        stream = &lt;optimized out&gt;
        trailer = 0
        subject_stream = 0x55d2f27d7910
        hd_proclen = 24
        data_readlen = &lt;optimized out&gt;
        trail_padlen = &lt;optimized out&gt;
        final = &lt;optimized out&gt;
        first = 0x7fff35086bc0 &quot;&quot;
        last = 0x7fff35086c37 &quot;&quot;
        iframe = 0x55d2f29791c0
        readlen = 93
        padlen = &lt;optimized out&gt;
        rv = &lt;optimized out&gt;
--Type &lt;RET&gt; for more, q to quit, c to continue without paging--c
        busy = &lt;optimized out&gt;
        cont_hd = {length = 140734083140592, stream_id = 434582317, type = 175 &apos;\257&apos;, flags = 127 &apos;\177&apos;, reserved = 0 &apos;\000&apos;}
        stream = &lt;optimized out&gt;
        pri_fieldlen = &lt;optimized out&gt;
        mem = 0x55d2f29798b0
        __PRETTY_FUNCTION__ = &quot;nghttp2_session_mem_recv&quot;
#9  nghttp2_session_mem_recv (session=0x55d2f2979020, in=&lt;optimized out&gt;, inlen=119) at ../../lib/nghttp2_session.c:6201
        hd_proclen = 24
        data_readlen = &lt;optimized out&gt;
        trail_padlen = &lt;optimized out&gt;
        final = &lt;optimized out&gt;
        first = 0x7fff35086bc0 &quot;&quot;
        last = 0x7fff35086c37 &quot;&quot;
        iframe = 0x55d2f29791c0
        readlen = 93
        padlen = &lt;optimized out&gt;
        rv = &lt;optimized out&gt;
        busy = &lt;optimized out&gt;
        cont_hd = {length = 140734083140592, stream_id = 434582317, type = 175 &apos;\257&apos;, flags = 127 &apos;\177&apos;, reserved = 0 &apos;\000&apos;}
        stream = &lt;optimized out&gt;
        pri_fieldlen = &lt;optimized out&gt;
        mem = 0x55d2f29798b0
        __PRETTY_FUNCTION__ = &quot;nghttp2_session_mem_recv&quot;
#10 0x00007faf5e0fd314 in io_read () at /usr/lib/x86_64-linux-gnu/libsoup-3.0.so.0
#11 0x00007faf5e0fd44a in io_read_ready () at /usr/lib/x86_64-linux-gnu/libsoup-3.0.so.0
#12 0x00007faf6148b601 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007faf6148bae8 in g_main_context_iterate.constprop () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007faf6148bdf3 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007faf6109ed80 in WTF::RunLoop::run() () at ../Source/WTF/wtf/glib/RunLoopGLib.cpp:108
        runLoop = @0x7faf5a7f9000: {&lt;WTF::FunctionDispatcher&gt; = {&lt;WTF::ThreadSafeRefCounted&lt;WTF::FunctionDispatcher, (WTF::DestructionThread)0&gt;&gt; = {&lt;WTF::ThreadSafeRefCountedBase&gt; = {m_refCount = {&lt;std::__atomic_base&lt;unsigned int&gt;&gt; = {static _S_alignment = 4, _M_i = 23}, static is_always_lock_free = true}}, &lt;No data fields&gt;}, _vptr.FunctionDispatcher = 0x7faf614142b8 &lt;vtable for WTF::RunLoop+16&gt;}, m_currentIteration = {m_start = 1, m_end = 1, m_buffer = {&lt;WTF::VectorBufferBase&lt;WTF::Function&lt;void()&gt;, WTF::FastMalloc&gt;&gt; = {m_buffer = 0x7faf092a6d00, m_capacity = 16, m_size = 0}, &lt;No data fields&gt;}}, m_nextIterationLock = {static isHeldBit = 1 &apos;\001&apos;, static hasParkedBit = 2 &apos;\002&apos;, m_byte = {value = {&lt;std::__atomic_base&lt;unsigned char&gt;&gt; = {static _S_alignment = 1, _M_i = 0 &apos;\000&apos;}, static is_always_lock_free = true}}}, m_nextIteration = {m_start = 0, m_end = 0, m_buffer = {&lt;WTF::VectorBufferBase&lt;WTF::Function&lt;void()&gt;, WTF::FastMalloc&gt;&gt; = {m_buffer = 0x0, m_capacity = 0, m_size = 0}, &lt;No data fields&gt;}}, m_isFunctionDispatchSuspended = false, m_hasSuspendedFunctions = false, static s_runLoopSourceFunctions = {prepare = 0x0, check = 0x0, dispatch = 0x7faf6109ebe0 &lt;_FUN(GSource*, GSourceFunc, gpointer)&gt;, finalize = 0x0, closure_callback = 0x0, closure_marshal = 0x0}, m_mainContext = {m_ptr = 0x55d2f23e68b0}, m_mainLoops = {&lt;WTF::VectorBuffer&lt;WTF::GRefPtr&lt;_GMainLoop&gt;, 0, WTF::FastMalloc&gt;&gt; = {&lt;WTF::VectorBufferBase&lt;WTF::GRefPtr&lt;_GMainLoop&gt;, WTF::FastMalloc&gt;&gt; = {m_buffer = 0x7faf5a7f8000, m_capacity = 16, m_size = 1}, &lt;No data fields&gt;}, &lt;No data fields&gt;}, m_source = {m_ptr = 0x55d2f23e7a80}, m_observers = {m_set = {m_impl = {{m_table = 0x0, m_tableForLLDB = 0x0}}}}}
        mainContext = 0x55d2f23e68b0
        innermostLoop = 0x55d2f23e7a60
        nestedMainLoop = &lt;optimized out&gt;
#16 0x00007faf623ba4e2 in WebKit::AuxiliaryProcessMainBase&lt;WebKit::NetworkProcess, false&gt;::run(int, char**) (argc=3, argv=0x7fff35088f38, this=0x7fff35088db0) at ../Source/WebKit/Shared/AuxiliaryProcessMain.h:70
        auxiliaryMain = {m_storage = {__data = &quot;@\277\ne\257\177&quot;, &apos;\000&apos; &lt;repeats 34 times&gt;, &quot;\267\003\000\000\000\000\000\000\001\000\000\000\000\000\000\000\022&quot;, &apos;\000&apos; &lt;repeats 15 times&gt;, &quot;\001\000\000\000\000\000\000\000\000P\177Z\257\177\000&quot;, __align = {&lt;No data fields&gt;}}}
#17 WebKit::AuxiliaryProcessMainBase&lt;WebKit::NetworkProcess, false&gt;::run(int, char**) (argv=0x7fff35088f38, argc=3, this=0x7fff35088db0) at ../Source/WebKit/Shared/AuxiliaryProcessMain.h:57
        auxiliaryMain = {m_storage = {__data = &quot;@\277\ne\257\177&quot;, &apos;\000&apos; &lt;repeats 34 times&gt;, &quot;\267\003\000\000\000\000\000\000\001\000\000\000\000\000\000\000\022&quot;, &apos;\000&apos; &lt;repeats 15 times&gt;, &quot;\001\000\000\000\000\000\000\000\000P\177Z\257\177\000&quot;, __align = {&lt;No data fields&gt;}}}
#18 WebKit::AuxiliaryProcessMain&lt;WebKit::NetworkProcessMainSoup&gt;(int, char**) (argc=3, argv=0x7fff35088f38) at ../Source/WebKit/Shared/AuxiliaryProcessMain.h:96
        auxiliaryMain = {m_storage = {__data = &quot;@\277\ne\257\177&quot;, &apos;\000&apos; &lt;repeats 34 times&gt;, &quot;\267\003\000\000\000\000\000\000\001\000\000\000\000\000\000\000\022&quot;, &apos;\000&apos; &lt;repeats 15 times&gt;, &quot;\001\000\000\000\000\000\000\000\000P\177Z\257\177\000&quot;, __align = {&lt;No data fields&gt;}}}
#19 0x00007faf618f4b90 in __libc_start_main () at /usr/lib/x86_64-linux-gnu/libc.so.6
#20 0x000055d2f196e74e in _start () at ../sysdeps/x86_64/start.S:120

Unfortunately, for some reason the debuginfo for libsoup and glib both appear to be corrupted. I don&apos;t know why that might be. That&apos;s very unfortunate and not helping.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778387</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2021-07-21 04:09:08 -0700</bug_when>
    <thetext>This doesn&apos;t look like a WebKit bug, but libsoup. I haven&apos;t seen this, so I&apos;ll need more debug information or a reproducer. From the bt, I think we are hitting the g_assert (content_type != NULL) in soup_message_headers_set() so, for some reason we are failing to parse the given content type. We need the value of the Content-Type header.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778388</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2021-07-21 04:12:10 -0700</bug_when>
    <thetext>hmm, I see that parse_content_foo was modified by patrick in https://gitlab.gnome.org/GNOME/libsoup/-/commit/d9f97292b71e7f14f91158750c81f33bb8386973 so that likely introduced the regression. Let&apos;s move this to libsoup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778400</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-07-21 05:54:29 -0700</bug_when>
    <thetext>https://gitlab.gnome.org/GNOME/libsoup/-/issues/232</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>