Project

General

Profile

Bug #14954

BlueStore: met assert when write size==bluestore_overlay_max_length

Added by jianpeng ma over 3 years ago. Updated about 2 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
03/03/2016
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

Suppose set bluestore_overlay_max_length == bluestore_min_alloc_size && bluestore_overlay_max > 0.
write(bluestore_min_alloc_size, offset=0). It will met those errors:
0> 2016-03-03 18:32:22.089828 7f2719572700 -1 os/bluestore/BlueStore.cc: In function 'int BlueStore::_do_write(BlueStore::TransContext*, BlueStore::CollectionRef&, BlueStore::OnodeRef, uint64_t, uint64_t, ceph::bufferlist&, uint32_t)' thread 7f2719572700 time 2016-03-03 18:32:22.083797
os/bluestore/BlueStore.cc: 5601: FAILED assert(0 == "leaked unwritten extent")

ceph version 10.0.3-2621-g045ad3d (045ad3d2a5bf85698d9d28e8e47bfe3ec2a136af)
1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x80) [0x55a57b3990a0]
2: (BlueStore::_do_write(BlueStore::TransContext*, boost::intrusive_ptr<BlueStore::Collection>&, boost::intrusive_ptr<BlueStore::Onode>, unsigned long, unsigned long, ceph::buffer::list&, unsigned int)+0x302a) [0x55a57afd7b9a]
3: (BlueStore::_write(BlueStore::TransContext*, boost::intrusive_ptr<BlueStore::Collection>&, boost::intrusive_ptr<BlueStore::Onode>&, unsigned long, unsigned long, ceph::buffer::list&, unsigned int)+0x2ee) [0x55a57afd873e]
4: (BlueStore::_txc_add_transaction(BlueStore::TransContext*, ObjectStore::Transaction*)+0xcd4) [0x55a57aff0d94]
5: (BlueStore::queue_transactions(ObjectStore::Sequencer*, std::vector<ObjectStore::Transaction, std::allocator<ObjectStore::Transaction> >&, std::shared_ptr<TrackedOp>, ThreadPool::TPHandle*)+0x4cb) [0x55a57aff382b]
6: (ReplicatedPG::queue_transactions(std::vector<ObjectStore::Transaction, std::allocator<ObjectStore::Transaction> >&, std::shared_ptr<OpRequest>)+0x81) [0x55a57ae6eff1]
7: (void ReplicatedBackend::sub_op_modify_impl<MOSDRepOp, 112>(std::shared_ptr<OpRequest>)+0xc2d) [0x55a57aed585d]
8: (ReplicatedBackend::sub_op_modify(std::shared_ptr<OpRequest>)+0x44) [0x55a57aebf8b4]
9: (ReplicatedBackend::handle_message(std::shared_ptr<OpRequest>)+0x2fb) [0x55a57aebfc3b]
10: (ReplicatedPG::do_request(std::shared_ptr<OpRequest>&, ThreadPool::TPHandle&)+0xbd) [0x55a57ae1326d]
11: (OSD::dequeue_op(boost::intrusive_ptr<PG>, std::shared_ptr<OpRequest>, ThreadPool::TPHandle&)+0x411) [0x55a57acbb131]
12: (PGQueueable::RunVis::operator()(std::shared_ptr<OpRequest>&)+0x52) [0x55a57acbb382]
13: (OSD::ShardedOpWQ::_process(unsigned int, ceph::heartbeat_handle_d*)+0x6e1) [0x55a57acd50c1]
14: (ShardedThreadPool::shardedthreadpool_worker(unsigned int)+0x734) [0x55a57b3892e4]
15: (ShardedThreadPool::WorkThreadSharded::entry()+0x10) [0x55a57b38c3f0]
16: (()+0x760a) [0x7f2737a1360a]
17: (clone()+0x6d) [0x7f27359bca4d]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.

Associated revisions

Revision b0b4b6de (diff)
Added by Jianpeng Ma over 3 years ago

os/bluestore/BlueStore: Fix bug when calc offset & end whether locate in the a extent.

Suppose: bluestore_overlay_max_length bluestore_min_alloc_size
The orignal code which calc content of written whether locate in a
extent:
(offset / min_alloc_size) (offset + length) /min_alloc_size
This will make the case which offset=0 & length =min_alloc_size locate
in the different extent.
In fact, this content is in the same extent.

Change end = offset + length - 1 make work.

Fixes: #14954

Signed-off-by: Jianpeng Ma <>

History

#2 Updated by Sage Weil about 2 years ago

  • Status changed from New to Rejected

Also available in: Atom PDF