Project

General

Profile

Bug #12565

osd: do not cache unused memory in attrs

Added by Xinze Chi over 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

attrs maybe only a range of bufferlist in recovery, If obc cache it,
this causes the whole memory in bufferlist would not be free.
So rebuild the bufferlist before cache it.

The log said:

2015-08-02 17:00:14.177715 7fd8aa80d700 10 osd.0 pg_epoch: 397 pg[4.54s0( v 125'88 (0'0,125'88] local-les=387 n=86 ec=86 les/c 387/383 386/386/347) [0,20,14,7,19,8] r=0 lpr=386 pi=382-385/1 rops=9
crt=125'88 lcod 0'0 mlcod 0'0 active+recovering+degraded] handle_sub_read_reply readop not complete: ReadOp(tid=1865136, to_read={338b0ed4/rb.0.108f.6b8b4567.000000001e2f/head//4=read_request_t(t
o_read=[0,8388608,0], need=0(0),0,2097152,14(2),0,2097152,19(4),0,2097152,20(1),0,2097152, want_attrs=1),1e6c1ed4/rb.0.108f.6b8b4567.000000001caf/head//4=read_request_t(to_read=[0,
8388608,0], need=0(0),0,2097152,14(2),0,2097152,19(4),0,2097152,20(1),0,2097152, want_attrs=1)}, complete={338b0ed4/rb.0.108f.6b8b4567.000000001e2f/head//4=read_result_t(r=0, error
s={}, attrs={_=buffer::list(len=266,
        buffer::ptr(2031840~266 0x183780e0 in raw 0x18188000 len 2033591 nref 11)
),hinfo_key=buffer::list(len=42,
        buffer::ptr(2032584~42 0x183783c8 in raw 0x18188000 len 2033591 nref 11)
),snapset=buffer::list(len=31,
        buffer::ptr(2032641~31 0x18378401 in raw 0x18188000 len 2033591 nref 11)
)}, returned=(0, 8388608, [14(2),401902, 19(4),981140, 20(1),418554]), partial_read=0,1e6c1ed4/rb.0.108f.6b8b4567.000000001caf/head//4=read_result_t(r=0, errors={}, attrs={_=buffer::list(len=266,
        buffer::ptr(2032755~266 0x18378473 in raw 0x18188000 len 2033591 nref 11)
),hinfo_key=buffer::list(len=42,
        buffer::ptr(2033499~42 0x1837875b in raw 0x18188000 len 2033591 nref 11)
),snapset=buffer::list(len=31,
        buffer::ptr(2033556~31 0x18378794 in raw 0x18188000 len 2033591 nref 11)

Related issues

Copied to Ceph - Backport #13692: osd: do not cache unused memory in attrs Resolved

Associated revisions

Revision c5895d3f (diff)
Added by Xinze Chi over 7 years ago

bug fix: osd: do not cache unused buffer in attrs

attrs only reference the origin bufferlist (decode from MOSDPGPush or
ECSubReadReply message) whose size is much greater than attrs in recovery.
If obc cache it (get_obc maybe cache the attr), this causes the whole origin
bufferlist would not be free until obc is evicted from obc cache. So rebuild
the bufferlist before cache it.

Fixes: #12565
Signed-off-by: Ning Yao <>
Signed-off-by: Xinze Chi <>

Revision 9643ee65 (diff)
Added by Xinze Chi about 7 years ago

bug fix: osd: do not cache unused buffer in attrs

attrs only reference the origin bufferlist (decode from MOSDPGPush or
ECSubReadReply message) whose size is much greater than attrs in recovery.
If obc cache it (get_obc maybe cache the attr), this causes the whole origin
bufferlist would not be free until obc is evicted from obc cache. So rebuild
the bufferlist before cache it.

Fixes: #12565
Signed-off-by: Ning Yao <>
Signed-off-by: Xinze Chi <>
(cherry picked from commit c5895d3fad9da0ab7f05f134c49e22795d5c61f3)

History

#1 Updated by Kefu Chai over 7 years ago

  • Description updated (diff)
  • Status changed from New to Fix Under Review
  • Assignee set to Xinze Chi

#2 Updated by Kefu Chai over 7 years ago

  • Status changed from Fix Under Review to Resolved

#3 Updated by Xinze Chi about 7 years ago

@Kefu, please backport this PR.

#4 Updated by Kefu Chai about 7 years ago

  • Status changed from Resolved to Pending Backport
  • Backport set to hammer

#5 Updated by Loïc Dachary about 7 years ago

  • Copied to Backport #13692: osd: do not cache unused memory in attrs added

#6 Updated by Loïc Dachary almost 7 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF