[LU-6970] llog_osd_put_cat_list() leaks thandle after failed declaration Created: 05/Aug/15  Updated: 12/May/16  Resolved: 28/Aug/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.8.0
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Critical
Reporter: John Hammond Assignee: Hongchao Zhang
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

This is in lustre-release/master as well. In llog_osd_put_cat_list() if dt_declare_record_write() fails then the thandle is never destroyed.

        th = dt_trans_create(env, d);
        if (IS_ERR(th))
                GOTO(out, rc = PTR_ERR(th));

        lgi->lgi_buf.lb_len = size;
        lgi->lgi_buf.lb_buf = idarray;
        rc = dt_declare_record_write(env, o, &lgi->lgi_buf, lgi->lgi_off, th);
        if (rc)
                GOTO(out, rc);
        ...
out_trans:
        dt_trans_stop(env, d, th);
out:
        lu_object_put(env, &o->do_lu);
        RETURN(rc);


 Comments   
Comment by Andreas Dilger [ 07/Aug/15 ]

If this failure happens then the whole journal would be blocked waiting for this handle to be released, so it seems pretty serious.

Comment by Joseph Gmitter (Inactive) [ 07/Aug/15 ]

Hongchao,
Can you look at this issue?
Thanks.
Joe

Comment by Gerrit Updater [ 11/Aug/15 ]

Hongchao Zhang (hongchao.zhang@intel.com) uploaded a new patch: http://review.whamcloud.com/15951
Subject: LU-6970 llog: free thandle if declare failed
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 1c155043793d9f7af22a2de01ee68fd914d24b3d

Comment by Gerrit Updater [ 28/Aug/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15951/
Subject: LU-6970 llog: free thandle if declare failed
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6fdcca8b2639ad9f6797cc7482da04c5e76a9e54

Comment by Joseph Gmitter (Inactive) [ 28/Aug/15 ]

Landed for 2.8.

Generated at Sat Feb 10 02:04:52 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.