Project

General

Profile

Actions

Bug #6246

closed

crushtool dumps core with non-unique bucket IDs

Added by Hugh Saunders over 10 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
High
Assignee:
David Zafman
Category:
-
Target version:
-
% Done:

0%

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

Description

Any crushmap with duplicate bucket IDs will cause crushtool to dump core on compile. It would be much better of crushtool detected this situation and notified the user of their error.

Simplest example I could construct:

type 0 osd
type 1 root
root default {
  id -1
  alg straw
  hash 0
}
root root2 {
  id -1
  alg straw
  hash 0
}

Output:

ceph@tccephadmin:~$ crushtool -c crushmap-id-core -o crushmap-id-core.bin
crushtool: crush/builder.c:151: crush_add_bucket: Assertion `map->buckets[pos] == 0' failed.
*** Caught signal (Aborted) **
 in thread 7f3087872780
 ceph version 0.67.2 (eb4380dd036a0b644c6283869911d615ed729ac8)
 1: crushtool() [0x4cc7ca]
 2: (()+0xfcb0) [0x7f3086f0bcb0]
 3: (gsignal()+0x35) [0x7f3085d3b425]
 4: (abort()+0x17b) [0x7f3085d3eb8b]
 5: (()+0x2f0ee) [0x7f3085d340ee]
 6: (()+0x2f192) [0x7f3085d34192]
 7: crushtool() [0x50135c]
 8: (CrushCompiler::parse_bucket(__gnu_cxx::__normal_iterator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >*, std::vector<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >, std::allocator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> > > > > const&)+0xe39) [0x4d19b9]
 9: (CrushCompiler::parse_crush(__gnu_cxx::__normal_iterator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >*, std::vector<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >, std::allocator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> > > > > const&)+0xd3) [0x4d1dc3]
 10: (CrushCompiler::compile(std::istream&, char const*)+0xc43) [0x4d2c93]
 11: (main()+0x240f) [0x4c398f]
 12: (__libc_start_main()+0xed) [0x7f3085d2676d]
 13: crushtool() [0x4c67e9]
2013-09-06 12:17:02.297876 7f3087872780 -1 *** Caught signal (Aborted) **
 in thread 7f3087872780

 ceph version 0.67.2 (eb4380dd036a0b644c6283869911d615ed729ac8)
 1: crushtool() [0x4cc7ca]
 2: (()+0xfcb0) [0x7f3086f0bcb0]
 3: (gsignal()+0x35) [0x7f3085d3b425]
 4: (abort()+0x17b) [0x7f3085d3eb8b]
 5: (()+0x2f0ee) [0x7f3085d340ee]
 6: (()+0x2f192) [0x7f3085d34192]
 7: crushtool() [0x50135c]
 8: (CrushCompiler::parse_bucket(__gnu_cxx::__normal_iterator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >*, std::vector<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >, std::allocator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> > > > > const&)+0xe39) [0x4d19b9]
 9: (CrushCompiler::parse_crush(__gnu_cxx::__normal_iterator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >*, std::vector<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >, std::allocator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> > > > > const&)+0xd3) [0x4d1dc3]
 10: (CrushCompiler::compile(std::istream&, char const*)+0xc43) [0x4d2c93]
 11: (main()+0x240f) [0x4c398f]
 12: (__libc_start_main()+0xed) [0x7f3085d2676d]
 13: crushtool() [0x4c67e9]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.

--- begin dump of recent events ---
   -12> 2013-09-06 12:17:02.292502 7f3087872780  5 asok(0x1fea160) register_command perfcounters_dump hook 0x1feb890
   -11> 2013-09-06 12:17:02.292583 7f3087872780  5 asok(0x1fea160) register_command 1 hook 0x1feb890
   -10> 2013-09-06 12:17:02.292604 7f3087872780  5 asok(0x1fea160) register_command perf dump hook 0x1feb890
    -9> 2013-09-06 12:17:02.292612 7f3087872780  5 asok(0x1fea160) register_command perfcounters_schema hook 0x1feb890
    -8> 2013-09-06 12:17:02.292622 7f3087872780  5 asok(0x1fea160) register_command 2 hook 0x1feb890
    -7> 2013-09-06 12:17:02.292626 7f3087872780  5 asok(0x1fea160) register_command perf schema hook 0x1feb890
    -6> 2013-09-06 12:17:02.292631 7f3087872780  5 asok(0x1fea160) register_command config show hook 0x1feb890
    -5> 2013-09-06 12:17:02.292650 7f3087872780  5 asok(0x1fea160) register_command config set hook 0x1feb890
    -4> 2013-09-06 12:17:02.292655 7f3087872780  5 asok(0x1fea160) register_command config get hook 0x1feb890
    -3> 2013-09-06 12:17:02.292667 7f3087872780  5 asok(0x1fea160) register_command log flush hook 0x1feb890
    -2> 2013-09-06 12:17:02.292679 7f3087872780  5 asok(0x1fea160) register_command log dump hook 0x1feb890
    -1> 2013-09-06 12:17:02.292684 7f3087872780  5 asok(0x1fea160) register_command log reopen hook 0x1feb890
     0> 2013-09-06 12:17:02.297876 7f3087872780 -1 *** Caught signal (Aborted) **
 in thread 7f3087872780

 ceph version 0.67.2 (eb4380dd036a0b644c6283869911d615ed729ac8)
 1: crushtool() [0x4cc7ca]
 2: (()+0xfcb0) [0x7f3086f0bcb0]
 3: (gsignal()+0x35) [0x7f3085d3b425]
 4: (abort()+0x17b) [0x7f3085d3eb8b]
 5: (()+0x2f0ee) [0x7f3085d340ee]
 6: (()+0x2f192) [0x7f3085d34192]
 7: crushtool() [0x50135c]
 8: (CrushCompiler::parse_bucket(__gnu_cxx::__normal_iterator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >*, std::vector<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >, std::allocator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> > > > > const&)+0xe39) [0x4d19b9]
 9: (CrushCompiler::parse_crush(__gnu_cxx::__normal_iterator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >*, std::vector<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> >, std::allocator<boost::spirit::tree_node<boost::spirit::node_val_data<char const*, boost::spirit::nil_t> > > > > const&)+0xd3) [0x4d1dc3]
 10: (CrushCompiler::compile(std::istream&, char const*)+0xc43) [0x4d2c93]
 11: (main()+0x240f) [0x4c398f]
 12: (__libc_start_main()+0xed) [0x7f3085d2676d]
 13: crushtool() [0x4c67e9]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.

--- logging levels ---
   0/ 5 none
   0/ 1 lockdep
   0/ 1 context
   1/ 1 crush
   1/ 5 mds
   1/ 5 mds_balancer
   1/ 5 mds_locker
   1/ 5 mds_log
   1/ 5 mds_log_expire
   1/ 5 mds_migrator
   0/ 1 buffer
   0/ 1 timer
   0/ 1 filer
   0/ 1 striper
   0/ 1 objecter
   0/ 5 rados
   0/ 5 rbd
   0/ 5 journaler
   0/ 5 objectcacher
   0/ 5 client
   0/ 5 osd
   0/ 5 optracker
   0/ 5 objclass
   1/ 3 filestore
   1/ 3 journal
   0/ 5 ms
   1/ 5 mon
   0/10 monc
   1/ 5 paxos
   0/ 5 tp
   1/ 5 auth
   1/ 5 crypto
   1/ 1 finisher
   1/ 5 heartbeatmap
   1/ 5 perfcounter
   1/ 5 rgw
   1/ 5 hadoop
   1/ 5 javaclient
   1/ 5 asok
   1/ 1 throttle
  -2/-2 (syslog threshold)
  99/99 (stderr threshold)
  max_recent       500
  max_new         1000
  log_file
--- end dump of recent events ---
Aborted (core dumped)
Actions #1

Updated by Sage Weil over 10 years ago

  • Priority changed from Normal to High
Actions #2

Updated by Ian Colle over 10 years ago

  • Assignee set to David Zafman
Actions #3

Updated by David Zafman over 10 years ago

  • Status changed from New to Fix Under Review
Actions #4

Updated by Sage Weil over 10 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

Updated by Sage Weil over 10 years ago

  • Status changed from Pending Backport to Resolved
Actions #6

Updated by Greg Farnum almost 7 years ago

  • Project changed from Ceph to RADOS
  • Category deleted (10)
Actions

Also available in: Atom PDF