ASF GitHub Bot logged work on TS-4916:

                Author: ASF GitHub Bot
            Created on: 12/Oct/16 20:13
            Start Date: 12/Oct/16 20:13
    Worklog Time Spent: 10m 
      Work Description: GitHub user gtenev opened a pull request:


    TS-4916: Fix for an H2-infinite-loop deadlock

    This is a fix to prevent destroying of the ``DLL<>`` structure and the 
following iteration over ``Http2ConnectionState::stream_list`` to fall into an 
infinite loop while holding a lock, which leads to cache updates to start 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gtenev/trafficserver TS-4916

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1099
commit d9b5237255ab86d9013a29562db6b839122cec23
Author: Phil Sorber <sor...@apache.org>
Date:   2016-04-18T04:58:51Z

    Mark proxy.config.ssl.SSLv2 and proxy.config.ssl.SSLv3 as deprecated in the 

commit bad058eb152772f1df0fe4c133f4ac62fa0eaa12
Author: Leif Hedstrom <zw...@apache.org>
Date:   2016-04-04T21:06:47Z

    TS-4318 Fix a regression in regex rules
    The refactoring done earlier broke the config loading of rules using
    the regular expressions. This restore that functionality, but cleaner.
    (cherry picked from commit 431a8f838e75338cb685b95c213a6140f5cbdcc7)

commit 8261836994bc74fd3f1a078c976082e91b4bc976
Author: Meera Mosale Nataraja <mech...@gmail.com>
Date:   2016-04-18T19:51:03Z

    TS-4147 Allow gzip plugin to be a remap plugin
    (cherry picked from commit 3d7cdbfa1dc52e81c2698dfbac526dec1d336246)

commit 12084df688483d939654dd53d3c82e5f3ccaaaa9
Author: Masaori Koshiba <masa...@apache.org>
Date:   2016-04-18T06:16:56Z

    TS-4361: Remove TS_FETCH_EVENT handlers from Http2ClientSession. This 
closes #581.
    (cherry picked from commit 3872a385cac3d43de25bdaf38c56bbcc2cb6f65b)

commit 377ffdc65978dd10344dd4a3bcef0677f8263a4e
Author: shinrich <shinr...@yahoo-inc.com>
Date:   2016-04-19T14:40:20Z

    TS-4364: Address remnants from HTTP/2 refactoring.  This closes #584.
    (cherry picked from commit 2a1c3996d1641bd246faf39a171b330ac33da34c)

commit 556a0f9717eb10cdd20d8659bc605bdb10c27ad0
Author: shinrich <shinr...@yahoo-inc.com>
Date:   2016-04-18T15:15:16Z

    TS-3429: Fix reference counting for TSContScheduleEvery.  This closes #576.
    (cherry picked from commit 3286600d90be4b6291b35867720adbd864f580ea)

commit 7bf73303bf325b83492c43b58d9241e20a71c475
Author: Masaori Koshiba <masa...@apache.org>
Date:   2016-04-25T02:12:17Z

    TS-4355: Change assert condition for TS-3612
    Originally, the condition of assert in HttpTunnel::main_handler(int event, 
void *data)
    was same to the condition in HttpTunnel::get_consumer(VIO *vio) before 
    This commit makes the condition in HttpTunnel::main_handler(int event, void 
    same as condition in HttpTunnel::get_consumer(VIO *vio).
    (cherry picked from commit 37f7c05de574458d2eff781d9f047673cda97a4e)

commit c754bc35de1ce5d5984990ab07f5ef8588743615
Author: shinrich <shinr...@yahoo-inc.com>
Date:   2016-04-26T20:33:10Z

    TS-4378:  Remove periodic warning.
    (cherry picked from commit 13a20c199803aae734b634da425340c72cf10b26)

commit af91bf80d8a6ca1a85056c1ff960f8848b7dfac3
Author: Thomas Jackson <jacksontj...@gmail.com>
Date:   2016-05-02T15:34:05Z

    TS-4403: Fix stale-while-revalidate on DNS lookup failures (#609)
    HostDB's "stale-while-revalidate" feature allows hostdb to return stale 
records while doing the DNS lookup in the background. This works properly in 
the case where the resolver goes away, but in the case that an error was 
returned from the resolver the record in cache was thrown away. This means that 
a transient error out in the DNS infrastructure would cause ATS to drop its 
stale record it would have contently served-- this patch simply makes hostdb 
honor its stale-while-revalidate contract (if configured). So, in the event 
that the DNS result comes back as `failed` hostdb will keep the old one if it 
is okay with being served stale.
    This closes #609
    (cherry picked from commit 131875cbe7b0975c8c3c4f3d20aa55a5c7caba86)

commit b5317c9ee8812f6be65c0b7f215393e62fb6fe2e
Author: Felix Bünemann <buenem...@louis.info>
Date:   2016-04-30T06:09:24Z

    TS-4397: Fix build on i386 caused by type mismatch
    It seems lua_Integer is 32-Bit on i386 while it's 54-Bit on x86-64
    causing the existing code to fail with:
    metrics.cc: In function ‘bool metrics_binding_initialize(BindingInstance&)’:
    metrics.cc:339:58: error: call of overloaded ‘bind_constant(const char 
[20], int64_t)’ is ambiguous
       binding.bind_constant("metrics.update.pass", int64_t(0));
    This closes #607
    (cherry picked from commit 81c395beb7ebd47c458e799927cac4414c8b5378)

commit 9f74372ceeecdb03bfd2315575c5edb10aa7f09a
Author: Susan Hinrichs <shinr...@draggingnagging.corp.ne1.yahoo.com>
Date:   2016-05-02T15:59:53Z

    TS-4406: Fix %<cqpv> tag. This closes #610.
    (cherry picked from commit 2e12b62b6e5af184ee507bc11746d991a61d8642)

commit 30b9b8da1accdbd79eb6e43e767e240726dd08ac
Author: Phil Sorber <sor...@apache.org>
Date:   2016-05-06T21:55:06Z

    TS-4418: Change .clang-format to allow 
    (cherry picked from commit 0c9115d327213b8b6f11c699b99c40393640c231)

commit 92e7859572653f9fa15025223c88fd5c72dc016b
Author: Phil Sorber <sor...@apache.org>
Date:   2016-05-06T22:19:02Z

    TS-4418: Update code with new .clang-format config change

commit 0d2214f022e3a27a28fde6f7e6f50370fa828d8e
Author: Leif Hedstrom <zw...@apache.org>
Date:   2016-04-19T01:28:01Z

    TS-4359 Deprecate the SPDY feature
    This marks the configuration options for SPDY as deprecated, as well
    as the help text for the SPDY option in configure.ac.
    (cherry picked from commit 9ebed0b37afe377151ac9e99adb24d8f158bdace)

commit 2bf7e5850b55bbb9eca388540c71e68d172c38ea
Author: Masaori Koshiba <masa...@apache.org>
Date:   2016-02-12T07:07:10Z

    TS-3535: Experimental Support of HTTP/2 Stream Priority feature
    - Add a option to enable this feature ( disabled in default ).
    - Parse priority parameters of HEADERS and PRIORITY frame correctly.
    - Add Http2DependencyTree and tests using `lib/ts/PriorityQueue.h`.
    - Create a dependency tree when clients send HEADERS frame with priority 
parameters or PRIORITY frame.
    - Separate `Http2ConnectionState::send_data_frame()` into 
      and `Http2ConnectionState::send_data_frames()`.
    - Schedule DATA frames using the WFQ algorithm.
    This closes #632
    (cherry picked from commit 16172a4e79865d1201a51e85aeb72df8b0609986)

commit 071853a28c5186e915ae28bce9e41ab440cbe749
Author: James Peach <jpe...@apache.org>
Date:   2016-04-27T19:19:57Z

    TS-4388: Add an API test for TSHttpTxnParentProxySet.
    Add an API test for TSHttpTxnParentProxySet. This test sends a
    request to the API test synserver, and expects a response. The quirk
    is that it can't get the right response unless TSHttpTxnParentProxySet()
    is called to parent proxy to the syn server.
    This test currently crashes, so it is only enabled at REGRESSION_TEST_FATAL
    (level 4).
    This closes #605.
    TSHttpTxnParentProxySet should take const arguments.
    (cherry picked from commit 600f4bc4d0754f7e028836f597a4a34f180be0c4)
    (cherry picked from commit 4c05b1cba0332347affa4596364d8e153bef32b7)

commit 751c3da7e00762cc8f1c7c4dc712cd105c22667e
Author: James Peach <jpe...@apache.org>
Date:   2016-04-27T18:20:25Z

    TS-4388: Remove unused HttpConfig::parent_proxy_routing_enable.
    (cherry picked from commit 0689f632cb40922b0c1aa5589f83059838d37047)

commit e7d515f445d4e502fdb40e0383b7362bc6f6c32e
Author: James Peach <jpe...@apache.org>
Date:   2016-04-28T20:02:38Z

    TS-4388: Fix global hook handling in API tests.
    Many of the API regression tests work by trampolining off a global
    hook (which is really what you have to do). However, there's no way
    to unregister a global hook, so once the test is done, it needs to
    be careful to co-operate with the remaining tests. We clear the
    continuation data, and if is is clear, we either ignore the event
    or re-enable the HTTP transaction.
    (cherry picked from commit 060b8e8bd0d794ee038595e42e3e104d6c89371a)

commit b0378ee621672a72111471f6828433f49cd8787c
Author: James Peach <jpe...@apache.org>
Date:   2016-04-30T03:04:20Z

    TS-4388: Rename ParentResult:r.
    A single-letter state variable name is hard to read and hard to
    search for. Rename this to result since it is the result of a parent
    proxy lookup.
    (cherry picked from commit 41e013db839c0ece543ddc854805fa59a731b0db)

commit ee5521dfc621a26ed2da20195bdb6108ea9e27c7
Author: James Peach <jpe...@apache.org>
Date:   2016-04-27T22:16:32Z

    TS-4388: TSHttpTxnParentProxySet crashes in parent selection.
    Fix ParentResult to handle the case where the parent is specified
    by the TSHttpTxnParentProxySet API. Encapsulate the internals of
    the result better so that it is easier for the HTTP state machine
    to do the right thing.
    (cherry picked from commit 7a590edc76843233524f6ba093e57e523d560ba3)

commit 584a5eb28008d7a1c08c3d800c853d5ed594be50
Author: James Peach <jpe...@apache.org>
Date:   2016-04-30T03:34:56Z

    TS-4388: Refactor ParentResult initialization.
    There are a couple of placed where ParentResult objects are
    reinitialized. Refactor this into ParentResult::reset() so avoid
    duplicated code.
    (cherry picked from commit 2bf1a31cc95a2ffb1404d0a53e37190243c0aa1d)

commit 69ad8fe673ebb6950ced372afd08829f99fbd1f8
Author: John J. Rushford <john_rushf...@cable.comcast.com>
Date:   2016-05-03T15:05:28Z

    TS-4413: Fix potential consistent hash iterator race.
    (cherry picked from commit d01dc00218566e3e41b504de41a655cb80cf423b)

commit 8e2e4e3fe52c9b37c91a60be7d3ff05f2c7d380d
Author: Peter Chou <pbc...@labs.att.com>
Date:   2016-05-02T18:44:24Z

    TS-4410 : Fixed compiler warning on i386 builds
    This is for unsigned-vs-signed int comparison.
    This closes #611
    (cherry picked from commit fc2a6feff5f866740f9297467c2850120b793b9a)

commit 3a8a3c2c5340b8b403c07a258e202f6fc03769c0
Author: David Calavera <david.calav...@gmail.com>
Date:   2016-05-13T21:12:22Z

    Remove double call to NetVConnection->do_io_read.
    Signed-off-by: David Calavera <david.calav...@gmail.com>
    (cherry picked from commit 58d4a14046d992487c5873a679125f8257f0ed79)

commit c5cfb5bbc670c3c877d941932b737a78753a11fb
Author: shinrich <shinr...@ieee.org>
Date:   2016-05-03T23:02:00Z

    TS-3485: Remove Warning message about ip-allow enforcement not being 
present for HTTP2.
    (cherry picked from commit 2dd1c4f02414f7639e6cddc580d26f1bc5f1502c)

commit 2a000a764ae0ab2e011f9f6679500b7c23399e05
Author: Susan Hinrichs <shinr...@ieee.org>
Date:   2016-05-04T01:49:30Z

    TS-3485: Support ip_allow config for HTTP2.  This closes #614.
    (cherry picked from commit 5ce103e889ef2eec9216ec06ae681916cb6e2298)

commit 7fedb23bdf897781f832b2fc8faff43e082c8bdf
Author: Oknet <xuc...@gmail.com>
Date:   2015-12-14T12:00:45Z

    TS-4075: add a state check for sslHandshakeHookState after 
PreAcceptHookState checking.  This closes #374.
    (cherry picked from commit 19cc051bb9e803855d2fb424ccf8a4b9546dc49d)

commit 8750db6e9cc67d3989f4588075a16a4218a0f8d7
Author: Brian Geffon <bri...@apache.org>
Date:   2016-05-09T08:56:54Z

    TS-4431: ATSCPPAPI needs a mutex for intercept plugins
    (cherry picked from commit d363b83410e2a2790af03201b0cd6ab8a507769c)

commit c250469344439a25666abd6dc3058a2c182cdfcc
Author: shinrich <shinrich@localhost.localdomain>
Date:   2016-05-05T02:07:49Z

    Fix clang build errors.
    (cherry picked from commit 43337d3b95c23276204d267b8f49a65804de1717)

commit 1df7e4b04a930b936b3185bcf2b3f88d8694cf08
Author: Susan Hinrichs <shinr...@ieee.org>
Date:   2016-04-15T16:34:25Z

    TS-4187: Keep the currently_open connections in sync with the number of 
sockets open. This closes #583.
    (cherry picked from commit 6f1119222126db29e508104f88782b2478972bdf)


Issue Time Tracking

            Worklog Id:     (was: 30522)
            Time Spent: 10m
    Remaining Estimate: 0h

> Http2ConnectionState::restart_streams infinite loop causes deadlock 
> --------------------------------------------------------------------
>                 Key: TS-4916
>                 URL: https://issues.apache.org/jira/browse/TS-4916
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core, HTTP/2
>            Reporter: Gancho Tenev
>            Assignee: Gancho Tenev
>            Priority: Blocker
>             Fix For: 7.1.0
>          Time Spent: 10m
>  Remaining Estimate: 0h
> Http2ConnectionState::restart_streams falls into an infinite loop while 
> holding a lock, which leads to cache updates to start failing.
> The infinite loop is caused by traversing a list whose last element “next” 
> points to the element itself and the traversal never finishes.
> {code}
> Thread 51 (Thread 0x2aaab3d04700 (LWP 34270)):
> #0  0x00002aaaaacf3fee in Http2ConnectionState::restart_streams 
> (this=0x2ae6ba5284c8) at Http2ConnectionState.cc:913
> #1  rcv_window_update_frame (cstate=..., frame=...) at 
> Http2ConnectionState.cc:627
> #2  0x00002aaaaacf9738 in Http2ConnectionState::main_event_handler 
> (this=0x2ae6ba5284c8, event=<optimized out>, edata=<optimized out>) at 
> Http2ConnectionState.cc:823
> #3  0x00002aaaaacef1c3 in Continuation::handleEvent (data=0x2aaab3d039a0, 
> event=2253, this=0x2ae6ba5284c8) at 
> ../../iocore/eventsystem/I_Continuation.h:153
> #4  send_connection_event (cont=cont@entry=0x2ae6ba5284c8, 
> event=event@entry=2253, edata=edata@entry=0x2aaab3d039a0) at 
> Http2ClientSession.cc:58
> #5  0x00002aaaaacef462 in Http2ClientSession::state_complete_frame_read 
> (this=0x2ae6ba528290, event=<optimized out>, edata=0x2aab7b237f18) at 
> Http2ClientSession.cc:426
> #6  0x00002aaaaacf0982 in Continuation::handleEvent (data=0x2aab7b237f18, 
> event=100, this=0x2ae6ba528290) at 
> ../../iocore/eventsystem/I_Continuation.h:153
> #7  Http2ClientSession::state_start_frame_read (this=0x2ae6ba528290, 
> event=<optimized out>, edata=0x2aab7b237f18) at Http2ClientSession.cc:399
> #8  0x00002aaaaacef5a3 in Continuation::handleEvent (data=0x2aab7b237f18, 
> event=100, this=0x2ae6ba528290) at 
> ../../iocore/eventsystem/I_Continuation.h:153
> #9  Http2ClientSession::state_complete_frame_read (this=0x2ae6ba528290, 
> event=<optimized out>, edata=0x2aab7b237f18) at Http2ClientSession.cc:431
> #10 0x00002aaaaacf0982 in Continuation::handleEvent (data=0x2aab7b237f18, 
> event=100, this=0x2ae6ba528290) at 
> ../../iocore/eventsystem/I_Continuation.h:153
> #11 Http2ClientSession::state_start_frame_read (this=0x2ae6ba528290, 
> event=<optimized out>, edata=0x2aab7b237f18) at Http2ClientSession.cc:399
> #12 0x00002aaaaae67e2b in Continuation::handleEvent (data=0x2aab7b237f18, 
> event=100, this=<optimized out>) at 
> ../../iocore/eventsystem/I_Continuation.h:153
> #13 read_signal_and_update (vc=0x2aab7b237e00, vc@entry=0x1, 
> event=event@entry=100) at UnixNetVConnection.cc:153
> #14 UnixNetVConnection::readSignalAndUpdate (this=this@entry=0x2aab7b237e00, 
> event=event@entry=100) at UnixNetVConnection.cc:1036
> #15 0x00002aaaaae47653 in SSLNetVConnection::net_read_io 
> (this=0x2aab7b237e00, nh=0x2aaab2409cc0, lthread=0x2aaab2406000) at 
> SSLNetVConnection.cc:595
> #16 0x00002aaaaae5558c in NetHandler::mainNetEvent (this=0x2aaab2409cc0, 
> event=<optimized out>, e=<optimized out>) at UnixNet.cc:513
> #17 0x00002aaaaae8d2e6 in Continuation::handleEvent (data=0x2aaab0bfa700, 
> event=5, this=<optimized out>) at I_Continuation.h:153
> #18 EThread::process_event (calling_code=5, e=0x2aaab0bfa700, 
> this=0x2aaab2406000) at UnixEThread.cc:148
> #19 EThread::execute (this=0x2aaab2406000) at UnixEThread.cc:275
> #20 0x00002aaaaae8c0e6 in spawn_thread_internal (a=0x2aaab0b25bb0) at 
> Thread.cc:86
> #21 0x00002aaaad6b3aa1 in start_thread (arg=0x2aaab3d04700) at 
> pthread_create.c:301
> #22 0x00002aaaae8bc93d in clone () at 
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
> {code}
> Here is the stream_list trace.
> {code}
> (gdb) thread 51
> [Switching to thread 51 (Thread 0x2aaab3d04700 (LWP 34270))]
> #0  0x00002aaaaacf3fee in Http2ConnectionState::restart_streams 
> (this=0x2ae6ba5284c8) at Http2ConnectionState.cc:913
> (gdb) trace_list stream_list
> ------- count=0 -------
> id=29
> this=0x2ae673f0c840
> next=0x2aaac05d8900
> prev=(nil)
> ------- count=1 -------
> id=27
> this=0x2aaac05d8900
> next=0x2ae5b6bbec00
> prev=0x2ae673f0c840
> ------- count=2 -------
> id=19
> this=0x2ae5b6bbec00
> next=0x2ae5b6bbec00
> prev=0x2aaac05d8900
> ------- count=3 -------
> id=19
> this=0x2ae5b6bbec00
> next=0x2ae5b6bbec00
> prev=0x2aaac05d8900
> . . . 
> ------- count=5560 -------
> id=19
> this=0x2ae5b6bbec00
> next=0x2ae5b6bbec00
> prev=0x2aaac05d8900
> . . .
> {code}
> Currently I am working on finding out why the list in question got into this 
> “impossible” (broken) state and and eventually coming up with a fix.

This message was sent by Atlassian JIRA

Reply via email to