[Bugs] [Bug 1385622] [GSS] - Recording (ffmpeg) processes on FUSE get hung

bugzilla at redhat.com bugzilla at redhat.com
Tue Oct 18 05:37:06 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1385622



--- Comment #2 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: http://review.gluster.org/15657 committed in release-3.7 by Raghavendra
G (rgowdapp at redhat.com) 
------
commit ff2f2d83f798486ef748513417700aff63e6d8fa
Author: Raghavendra G <rgowdapp at redhat.com>
Date:   Tue Sep 27 16:35:08 2016 +0530

    performance/write-behind: remove the request from liability queue in
    wb_fulfill_request

    Before this patch, a request is removed from liability queue only when
    ref count of request hits 0. Though, wb_fulfill_request does an unref,
    it need not be the last unref and hence the request may survive in
    liability queue till the last unref. Let,

    T1: the time at which wb_fulfill_request is invoked
    T2: the time at which last unref is done on request

    Let's consider a case of T2 > T1. In the time window between T1 and
    T2, any other request (waiter) conflicting with request in liability
    queue (blocker - basically a write which has been lied) is blocked
    from winding. If T2 happens to be when wb_do_unwinds is invoked, no
    further processing of request list happens and "waiter" would get
    blocked forever. An example imaginary sequence of events is given
    below:

    1. A write request w1 is picked up for unwinding in __wb_pick_unwinds
       (but unwind is not done _yet_ and hence reference
       remains). However, w1 is moved to liability queue. Let's call this
       invocation of wb_process_queue by wb_writev as PQ1.

    2. A flush (f1) request hits write behind. Since the liability queue
       of inode is not empty, f1 is not picked for unwinding. Let's call
       the invocation of wb_process_queue by wb_flush as PQ2.

    3. PQ2 continues and picks w1 for fulfilling and invokes
       wb_fulfill. As part of successful wb_fulfill_cbk,
       wb_fulfill_request (w1) is invoked. But, w1 is not freed (and hence
       not removed from liability queue) as w1 is not unwound _yet_ and a
       ref remains (PQ1 has not invoked wb_do_unwinds _yet_).

    4. wb_fulfill_cbk (triggered by PQ2) invokes a wb_process_queue (let's
       say PQ3). f1 is not resumed in PQ3 as w1 is still in liability
       queue. At this time, PQ2 and PQ3 are complete.

    5. PQ1 continues, unwinds w1 and does last unref on w1 and w1 is freed
       (and removed from liability queue). Since PQ1 didn't invoke
       wb_fulfill on any other write requests, there won't be any future
       codepaths that would invoke wb_process_queue and f1 is stuck
       forever.

    With this fix, w1 is removed from liability queue in step 3 above and
    PQ3 resumes f1 in step 4 (as there are no requests conflicting with f1
    in liability queue during execution of PQ3).

    > Signed-off-by: Raghavendra G <rgowdapp at redhat.com>
    > BUG: 1379655
    > Change-Id: Idacda1fcd520ac27f30224f8dfe8360dba6ac6cb
    > Reviewed-on: http://review.gluster.org/15579
    > CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
    > NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    > Smoke: Gluster Build System <jenkins at build.gluster.org>
    (cherry picked from commit a8b2a981881221925bb5edfe7bb65b25ad855c04)

    Signed-off-by: Raghavendra G <rgowdapp at redhat.com>
    BUG: 1385622
    Change-Id: Idacda1fcd520ac27f30224f8dfe8360dba6ac6cb
    Reviewed-on: http://review.gluster.org/15657
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list