Actions
Bug #23878
closedassert on pg upmap
% Done:
0%
Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
I use the follow script to test upmap
./bin/init-ceph stop
killall ceph-mon ceph-osd
killall ceph-mon ceph-osd
OSD=9 MON=1 MGR=1 MDS=0 ../src/vstart.sh -X -n
./bin/ceph osd crush add-bucket test root
./bin/ceph osd crush add-bucket huangjun-1 host
./bin/ceph osd crush add-bucket huangjun-2 host
./bin/ceph osd crush add-bucket huangjun-3 host
./bin/ceph osd crush move huangjun-1 root=test
./bin/ceph osd crush move huangjun-2 root=test
./bin/ceph osd crush move huangjun-3 root=test
./bin/ceph osd crush add osd.0 1.0 host=huangjun-1
./bin/ceph osd crush add osd.1 1.0 host=huangjun-1
./bin/ceph osd crush add osd.2 1.0 host=huangjun-1
./bin/ceph osd crush add osd.3 1.0 host=huangjun-2
./bin/ceph osd crush add osd.4 1.0 host=huangjun-2
./bin/ceph osd crush add osd.5 1.0 host=huangjun-2
./bin/ceph osd crush add osd.7 1.0 host=huangjun-3
./bin/ceph osd crush add osd.6 1.0 host=huangjun-3
./bin/ceph osd erasure-code-profile set test k=4 m=2 crush-failure-domain=osd
./bin/ceph osd getcrushmap -o crush
./bin/crushtool -d crush -o crush.txt
echo "
rule test {
id 1
type erasure
min_size 1
max_size 10
step take huangjun-1
step chooseleaf indep 2 type osd
step emit
step take huangjun-2
step chooseleaf indep 2 type osd
step emit
step take huangjun-3
step chooseleaf indep 2 type osd
step emit
}
" >> crush.txt
./bin/crushtool -c crush.txt -o crush.new
./bin/ceph osd setcrushmap -i crush.new
./bin/ceph osd pool create test 256 256 erasure test test
max_deviation=0.01
max_pg=256
pool='test'
./bin/ceph osd getmap -o om
./bin/osdmaptool om --upmap-deviation $max_deviation --upmap-max $max_pg --upmap-pool $pool --upmap result.sh
sh result.sh
rm -f result.sh
./bin/ceph osd crush unlink osd.2 huangjun-1
./bin/ceph osd getmap -o om
./bin/osdmaptool om --upmap-deviation $max_deviation --upmap-max $max_pg --upmap-pool $pool --upmap result.sh
sh result.sh
the test crashed with
*** Caught signal (Aborted) ** in thread 7f9e999b0180 thread_name:osdmaptool ceph version 12.2.5 (cad919881333ac92274171586c827e01f554a70a) luminous (stable) 1: (()+0x21321) [0x56420eafb321] 2: (()+0xf5e0) [0x7f9e8f6755e0] 3: (gsignal()+0x37) [0x7f9e8e0671f7] 4: (abort()+0x148) [0x7f9e8e0688e8] 5: (()+0x74f47) [0x7f9e8e0a6f47] 6: (()+0x7c619) [0x7f9e8e0ae619] 7: (std::_Rb_tree<pg_t, std::pair<pg_t const, std::vector<std::pair<int, int>, mempool::pool_allocator<(mempool::pool_index_t)15, std::pair<int, int> > > >, std::_Select1st<std::pair<pg_t const, std::vector<std::pair<int, int>, mempool::pool_allocator<(mempool::pool_index_t)15, std::pair<int, int> > > > >, std::less<pg_t>, mempool::pool_allocator<(mempool::pool_index_t)15, std::pair<pg_t const, std::vector<std::pair<int, int>, mempool::pool_allocator<(mempool::pool_index_t)15, std::pair<int, int> > > > > >::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<pg_t const, std::vector<std::pair<int, int>, mempool::pool_allocator<(mempool::pool_index_t)15, std::pair<int, int> > > > >)+0x76) [0x7f9e90f7a4b6] 8: (OSDMap::calc_pg_upmaps(CephContext*, float, int, std::set<long, std::less<long>, std::allocator<long> > const&, OSDMap::Incremental*)+0x1041) [0x7f9e90f6a651] 9: (main()+0x3925) [0x56420eaec385] 10: (__libc_start_main()+0xf5) [0x7f9e8e053c05] 11: (()+0x12fc0) [0x56420eaecfc0] 2018-04-26 12:32:04.556614 7f9e999b0180 -1 *** Caught signal (Aborted) ** in thread 7f9e999b0180 thread_name:osdmaptool
Actions