OSD crash during repair
G'day,
I'm getting an OSD crash on 0.56.7-1~bpo70+1 whilst trying to repair an OSD:
http://tracker.ceph.com/issues/6233
----
ceph version 0.56.7 (14f23ab86b0058a8651895b3dc972a29459f3a33)
1: /usr/bin/ceph-osd() [0x8530a2]
2: (()+0xf030) [0x7f541ca39030]
3: (gsignal()+0x35) [0x7f541b132475]
4: (abort()+0x180) [0x7f541b1356f0]
5: (_gnu_cxx::_verbose_terminate_handler()+0x11d) [0x7f541b98789d]
6: (()+0x63996) [0x7f541b985996]
7: (()+0x639c3) [0x7f541b9859c3]
8: (()+0x63bee) [0x7f541b985bee]
9: (ceph::buffer::list::iterator::copy(unsigned int, char*)+0x127) [0x8fa9a7]
10: (object_info_t::decode(ceph::buffer::list::iterator&)+0x29) [0x95b579]
11: (object_info_t::object_info_t(ceph::buffer::list&)+0x180) [0x695ec0]
12: (PG::repair_object(hobject_t const&, ScrubMap::object*, int, int)+0xc7) [0x7646b7] 13: (PG::scrub_process_inconsistent()+0x9bd) [0x76534d]
14: (PG::scrub_finish()+0x4f) [0x76587f]
15: (PG::chunky_scrub(ThreadPool::TPHandle&)+0x10d6) [0x76cb96]
16: (PG::scrub(ThreadPool::TPHandle&)+0x138) [0x76d7e8]
17: (OSD::ScrubWQ::_process(PG*, ThreadPool::TPHandle&)+0xf) [0x70515f]
18: (ThreadPool::worker(ThreadPool::WorkThread*)+0x992) [0x8f0542]
19: (ThreadPool::WorkThread::entry()+0x10) [0x8f14d0]
20: (()+0x6b50) [0x7f541ca30b50]
21: (clone()+0x6d) [0x7f541b1daa7d]
NOTE: a copy of the executable, or objdump -rdS <executable> is needed to interpret this.
----
This occurs as a result of:
# ceph pg dump | grep inconsistent 2.12 2723 0 0 0 11311299072 159189 159189 active+clean+inconsistent 2013-09-06 09:35:47.512119 20117'690441 20120'7914185 [6,7] [6,7] 20021'675967 2013-09-03 15:58:12.459188 19384'665404 2013-08-28 12:42:07.490877 # ceph pg repair 2.12
Looking at PG::repair_object per line 12 of the backtrace, I can see a dout(10) which should tell me the problem object:
----
src/osd/PG.cc:
void PG::repair_object(const hobject_t& soid, ScrubMap::object *po, int bad_peer, int ok_peer) {
dout(10) << "repair_object " << soid << " bad_peer osd." << bad_peer << " ok_peer osd." << ok_peer << dendl;
...
}
----
The 'ceph pg dump' output above tells me the primary osd is '6', so I can increase the logging level to 10 on osd.6 to get the debug output, and repair again:
# ceph osd tell 6 injectargs '--debug_osd 0/10' # ceph pg repair 2.12
I get the same OSD crash, but this time it logs the dout from above, which shows the problem object:
-1> 2013-09-06 09:34:45.142224 7f0ae94bd700 10 osd.6 pg_epoch: 20117 pg[2.12( v 20117'690441 (20117'689440,20117'690441] local-les=20115 n=2722 ec=1 les/c 20115/20115 20108/20112/20112) [6,7] r=0 lpr=20112 mlcod 20117'690440 active+scrubbing+deep+repair] repair_object 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 bad_peer osd.7 ok_peer osd.6
0> 2013-09-06 09:34:45.206621 7f0ae94bd700 -1 *** Caught signal (Aborted) **So...
Firstly, is anyone interested in further investigating the problem to fix the crash behaviour?
And, what's the best way to fix the pool?
Cheers,
Chris
Hi Chris,
What is the inconsistency that scrub reports in the log? My guess is that the simplest way to resolve this is to remove whichever copy you decide is invalid, but it depends on what the inconstency it is trying/failing to repair is.
Thanks!
sage
Quoted 79 lines · Chris Dunlop
G'day,
I'm getting an OSD crash on 0.56.7-1~bpo70+1 whilst trying to repair an OSD:
http://tracker.ceph.com/issues/6233
----
ceph version 0.56.7 (14f23ab86b0058a8651895b3dc972a29459f3a33)
1: /usr/bin/ceph-osd() [0x8530a2]
2: (()+0xf030) [0x7f541ca39030]
3: (gsignal()+0x35) [0x7f541b132475]
4: (abort()+0x180) [0x7f541b1356f0]
5: (_gnu_cxx::_verbose_terminate_handler()+0x11d) [0x7f541b98789d]
6: (()+0x63996) [0x7f541b985996]
7: (()+0x639c3) [0x7f541b9859c3]
8: (()+0x63bee) [0x7f541b985bee]
9: (ceph::buffer::list::iterator::copy(unsigned int, char*)+0x127) [0x8fa9a7]
10: (object_info_t::decode(ceph::buffer::list::iterator&)+0x29) [0x95b579]
11: (object_info_t::object_info_t(ceph::buffer::list&)+0x180) [0x695ec0]
12: (PG::repair_object(hobject_t const&, ScrubMap::object*, int, int)+0xc7) [0x7646b7] 13: (PG::scrub_process_inconsistent()+0x9bd) [0x76534d]
14: (PG::scrub_finish()+0x4f) [0x76587f]
15: (PG::chunky_scrub(ThreadPool::TPHandle&)+0x10d6) [0x76cb96]
16: (PG::scrub(ThreadPool::TPHandle&)+0x138) [0x76d7e8]
17: (OSD::ScrubWQ::_process(PG*, ThreadPool::TPHandle&)+0xf) [0x70515f]
18: (ThreadPool::worker(ThreadPool::WorkThread*)+0x992) [0x8f0542]
19: (ThreadPool::WorkThread::entry()+0x10) [0x8f14d0]
20: (()+0x6b50) [0x7f541ca30b50]
21: (clone()+0x6d) [0x7f541b1daa7d]
NOTE: a copy of the executable, orobjdump -rdS <executable>is needed to interpret this.
----This occurs as a result of:
# ceph pg dump | grep inconsistent 2.12 2723 0 0 0 11311299072 159189 159189 active+clean+inconsistent 2013-09-06 09:35:47.512119 20117'690441 20120'7914185 [6,7] [6,7] 20021'675967 2013-09-03 15:58:12.459188 19384'665404 2013-08-28 12:42:07.490877 # ceph pg repair 2.12Looking at
PG::repair_objectper line 12 of the backtrace, I can see a dout(10) which should tell me the problem object:----
src/osd/PG.cc:
voidPG::repair_object(const hobject_t& soid, ScrubMap::object *po, int bad_peer, int ok_peer){
dout(10) << "repair_object" << soid << "bad_peerosd." <<bad_peer<< "ok_peerosd." <<ok_peer<< dendl;
...
}
----The 'ceph pg dump' output above tells me the primary osd is '6', so I can increase the logging level to 10 on osd.6 to get the debug output, and repair again:
# ceph osd tell 6 injectargs '--debug_osd 0/10' # ceph pg repair 2.12I get the same OSD crash, but this time it logs the dout from above, which shows the problem object:
-1> 2013-09-06 09:34:45.142224 7f0ae94bd700 10 osd.6 pg_epoch: 20117 pg[2.12( v 20117'690441 (20117'689440,20117'690441] local-les=20115 n=2722 ec=1 les/c 20115/20115 20108/20112/20112) [6,7] r=0 lpr=20112 mlcod 20117'690440 active+scrubbing+deep+repair] repair_object 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 bad_peer osd.7 ok_peer osd.6 0> 2013-09-06 09:34:45.206621 7f0ae94bd700 -1 *** Caught signal (Aborted) **So...
Firstly, is anyone interested in further investigating the problem to fix the crash behaviour?
And, what's the best way to fix the pool?
Cheers,
Chris
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Sage,
Does this answer your question?
2013-09-06 09:30:19.813811 7f0ae8cbc700 0 log [INF] : applying configuration change: internal_safe_to_start_threads = 'true' 2013-09-06 09:33:28.303658 7f0ae94bd700 0 log [ERR] : 2.12 osd.7: soid 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 extra attr _, extra attr snapset 2013-09-06 09:33:28.303685 7f0ae94bd700 0 log [ERR] : repair 2.12 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 no 'snapset' attr 2013-09-06 09:34:45.138468 7f0ae94bd700 0 log [ERR] : 2.12 repair stat mismatch, got 2722/2723 objects, 339/339 clones, 11307104768/11311299072 bytes. 2013-09-06 09:34:45.142215 7f0ae94bd700 0 log [ERR] : 2.12 repair 0 missing, 1 inconsistent objects 2013-09-06 09:34:45.206621 7f0ae94bd700 -1 *** Caught signal (Aborted) **
I've just attached the full 'debug_osd 0/10' log to the bug report.
Thanks,
Chris
Quoted 96 lines · Sage Weil
Hi Chris,
What is the inconsistency that scrub reports in the log? My guess is that the simplest way to resolve this is to remove whichever copy you decide is invalid, but it depends on what the inconstency it is trying/failing to repair is.
Thanks!
sageQuoted 70 lines · Chris Dunlop
G'day,
I'm getting an OSD crash on 0.56.7-1~bpo70+1 whilst trying to repair an OSD:
http://tracker.ceph.com/issues/6233
----
ceph version 0.56.7 (14f23ab86b0058a8651895b3dc972a29459f3a33)
1: /usr/bin/ceph-osd() [0x8530a2]
2: (()+0xf030) [0x7f541ca39030]
3: (gsignal()+0x35) [0x7f541b132475]
4: (abort()+0x180) [0x7f541b1356f0]
5: (_gnu_cxx::_verbose_terminate_handler()+0x11d) [0x7f541b98789d]
6: (()+0x63996) [0x7f541b985996]
7: (()+0x639c3) [0x7f541b9859c3]
8: (()+0x63bee) [0x7f541b985bee]
9: (ceph::buffer::list::iterator::copy(unsigned int, char*)+0x127) [0x8fa9a7]
10: (object_info_t::decode(ceph::buffer::list::iterator&)+0x29) [0x95b579]
11: (object_info_t::object_info_t(ceph::buffer::list&)+0x180) [0x695ec0]
12: (PG::repair_object(hobject_t const&, ScrubMap::object*, int, int)+0xc7) [0x7646b7] 13: (PG::scrub_process_inconsistent()+0x9bd) [0x76534d]
14: (PG::scrub_finish()+0x4f) [0x76587f]
15: (PG::chunky_scrub(ThreadPool::TPHandle&)+0x10d6) [0x76cb96]
16: (PG::scrub(ThreadPool::TPHandle&)+0x138) [0x76d7e8]
17: (OSD::ScrubWQ::_process(PG*, ThreadPool::TPHandle&)+0xf) [0x70515f]
18: (ThreadPool::worker(ThreadPool::WorkThread*)+0x992) [0x8f0542]
19: (ThreadPool::WorkThread::entry()+0x10) [0x8f14d0]
20: (()+0x6b50) [0x7f541ca30b50]
21: (clone()+0x6d) [0x7f541b1daa7d]
NOTE: a copy of the executable, orobjdump -rdS <executable>is needed to interpret this.
----This occurs as a result of:
# ceph pg dump | grep inconsistent 2.12 2723 0 0 0 11311299072 159189 159189 active+clean+inconsistent 2013-09-06 09:35:47.512119 20117'690441 20120'7914185 [6,7] [6,7] 20021'675967 2013-09-03 15:58:12.459188 19384'665404 2013-08-28 12:42:07.490877 # ceph pg repair 2.12Looking at
PG::repair_objectper line 12 of the backtrace, I can see a dout(10) which should tell me the problem object:----
src/osd/PG.cc:
voidPG::repair_object(const hobject_t& soid, ScrubMap::object *po, int bad_peer, int ok_peer){
dout(10) << "repair_object" << soid << "bad_peerosd." <<bad_peer<< "ok_peerosd." <<ok_peer<< dendl;
...
}
----The 'ceph pg dump' output above tells me the primary osd is '6', so I can increase the logging level to 10 on osd.6 to get the debug output, and repair again:
# ceph osd tell 6 injectargs '--debug_osd 0/10' # ceph pg repair 2.12I get the same OSD crash, but this time it logs the dout from above, which shows the problem object:
-1> 2013-09-06 09:34:45.142224 7f0ae94bd700 10 osd.6 pg_epoch: 20117 pg[2.12( v 20117'690441 (20117'689440,20117'690441] local-les=20115 n=2722 ec=1 les/c 20115/20115 20108/20112/20112) [6,7] r=0 lpr=20112 mlcod 20117'690440 active+scrubbing+deep+repair] repair_object 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 bad_peer osd.7 ok_peer osd.6 0> 2013-09-06 09:34:45.206621 7f0ae94bd700 -1 *** Caught signal (Aborted) **So...
Firstly, is anyone interested in further investigating the problem to fix the crash behaviour?
And, what's the best way to fix the pool?
Quoted 9 lines
Cheers,
Chris
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Chris Dunlop
Hi Sage,
Does this answer your question?
Quoted 8 lines
2013-09-06 09:30:19.813811 7f0ae8cbc700 0 log [INF] : applying configuration change: internal_safe_to_start_threads = 'true' 2013-09-06 09:33:28.303658 7f0ae94bd700 0 log [ERR] : 2.12 osd.7: soid 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 extra attr _, extra attr snapset 2013-09-06 09:33:28.303685 7f0ae94bd700 0 log [ERR] : repair 2.12 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 no 'snapset' attr 2013-09-06 09:34:45.138468 7f0ae94bd700 0 log [ERR] : 2.12 repair stat mismatch, got 2722/2723 objects, 339/339 clones, 11307104768/11311299072 bytes. 2013-09-06 09:34:45.142215 7f0ae94bd700 0 log [ERR] : 2.12 repair 0 missing, 1 inconsistent objects 2013-09-06 09:34:45.206621 7f0ae94bd700 -1 *** Caught signal (Aborted) **I've just attached the full '
debug_osd0/10' log to the bug report.
This suggests to me that the object on osd.6 is missing those xattrs; can you confirm with getfattr -d on the in osd.6's data directory?
If that is indeed the case, you should be able to move the object out of the way (don't delete it, just in case) and then do the repair. The osd.6 should recover by copying the object from osd.7 (which has the needed xattrs). Bobtail is smart enough to recover missing objects but not to recover just missing xattrs.
Also, you should upgrade to dumpling. :)
sage
Quoted 108 lines
Thanks,
Chris
Quoted 92 lines · Sage Weil
Hi Chris,
What is the inconsistency that scrub reports in the log? My guess is that the simplest way to resolve this is to remove whichever copy you decide is invalid, but it depends on what the inconstency it is trying/failing to repair is.
Thanks!
sageQuoted 70 lines · Chris Dunlop
G'day,
I'm getting an OSD crash on 0.56.7-1~bpo70+1 whilst trying to repair an OSD:
http://tracker.ceph.com/issues/6233
----
ceph version 0.56.7 (14f23ab86b0058a8651895b3dc972a29459f3a33)
1: /usr/bin/ceph-osd() [0x8530a2]
2: (()+0xf030) [0x7f541ca39030]
3: (gsignal()+0x35) [0x7f541b132475]
4: (abort()+0x180) [0x7f541b1356f0]
5: (_gnu_cxx::_verbose_terminate_handler()+0x11d) [0x7f541b98789d]
6: (()+0x63996) [0x7f541b985996]
7: (()+0x639c3) [0x7f541b9859c3]
8: (()+0x63bee) [0x7f541b985bee]
9: (ceph::buffer::list::iterator::copy(unsigned int, char*)+0x127) [0x8fa9a7]
10: (object_info_t::decode(ceph::buffer::list::iterator&)+0x29) [0x95b579]
11: (object_info_t::object_info_t(ceph::buffer::list&)+0x180) [0x695ec0]
12: (PG::repair_object(hobject_t const&, ScrubMap::object*, int, int)+0xc7) [0x7646b7] 13: (PG::scrub_process_inconsistent()+0x9bd) [0x76534d]
14: (PG::scrub_finish()+0x4f) [0x76587f]
15: (PG::chunky_scrub(ThreadPool::TPHandle&)+0x10d6) [0x76cb96]
16: (PG::scrub(ThreadPool::TPHandle&)+0x138) [0x76d7e8]
17: (OSD::ScrubWQ::_process(PG*, ThreadPool::TPHandle&)+0xf) [0x70515f]
18: (ThreadPool::worker(ThreadPool::WorkThread*)+0x992) [0x8f0542]
19: (ThreadPool::WorkThread::entry()+0x10) [0x8f14d0]
20: (()+0x6b50) [0x7f541ca30b50]
21: (clone()+0x6d) [0x7f541b1daa7d]
NOTE: a copy of the executable, orobjdump -rdS <executable>is needed to interpret this.
----This occurs as a result of:
# ceph pg dump | grep inconsistent 2.12 2723 0 0 0 11311299072 159189 159189 active+clean+inconsistent 2013-09-06 09:35:47.512119 20117'690441 20120'7914185 [6,7] [6,7] 20021'675967 2013-09-03 15:58:12.459188 19384'665404 2013-08-28 12:42:07.490877 # ceph pg repair 2.12Looking at
PG::repair_objectper line 12 of the backtrace, I can see a dout(10) which should tell me the problem object:----
src/osd/PG.cc:
voidPG::repair_object(const hobject_t& soid, ScrubMap::object *po, int bad_peer, int ok_peer){
dout(10) << "repair_object" << soid << "bad_peerosd." <<bad_peer<< "ok_peerosd." <<ok_peer<< dendl;
...
}
----The 'ceph pg dump' output above tells me the primary osd is '6', so I can increase the logging level to 10 on osd.6 to get the debug output, and repair again:
# ceph osd tell 6 injectargs '--debug_osd 0/10' # ceph pg repair 2.12I get the same OSD crash, but this time it logs the dout from above, which shows the problem object:
-1> 2013-09-06 09:34:45.142224 7f0ae94bd700 10 osd.6 pg_epoch: 20117 pg[2.12( v 20117'690441 (20117'689440,20117'690441] local-les=20115 n=2722 ec=1 les/c 20115/20115 20108/20112/20112) [6,7] r=0 lpr=20112 mlcod 20117'690440 active+scrubbing+deep+repair] repair_object 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 bad_peer osd.7 ok_peer osd.6 0> 2013-09-06 09:34:45.206621 7f0ae94bd700 -1 *** Caught signal (Aborted) **So...
Firstly, is anyone interested in further investigating the problem to fix the crash behaviour?
And, what's the best way to fix the pool?
Quoted 9 lines
Cheers,
Chris
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Sage Weil
Quoted 11 lines · Chris Dunlop
Hi Sage,
Does this answer your question?
2013-09-06 09:30:19.813811 7f0ae8cbc700 0 log [INF] : applying configuration change: internal_safe_to_start_threads = 'true' 2013-09-06 09:33:28.303658 7f0ae94bd700 0 log [ERR] : 2.12 osd.7: soid 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 extra attr _, extra attr snapset 2013-09-06 09:33:28.303685 7f0ae94bd700 0 log [ERR] : repair 2.12 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 no 'snapset' attr 2013-09-06 09:34:45.138468 7f0ae94bd700 0 log [ERR] : 2.12 repair stat mismatch, got 2722/2723 objects, 339/339 clones, 11307104768/11311299072 bytes. 2013-09-06 09:34:45.142215 7f0ae94bd700 0 log [ERR] : 2.12 repair 0 missing, 1 inconsistent objects 2013-09-06 09:34:45.206621 7f0ae94bd700 -1 *** Caught signal (Aborted) **
Quoted 4 lines
Quoted 1 line
I've just attached the full '
debug_osd0/10' log to the bug report.This suggests to me that the object on osd.6 is missing those xattrs; can you confirm with getfattr -d on the in osd.6's data directory?
I haven't yet wrapped my head around how to translate an oid like those above into a underlying file system object. What directory should I be looking at?
Quoted 5 lines
If that is indeed the case, you should be able to move the object out of the way (don't delete it, just in case) and then do the repair. The osd.6 should recover by copying the object from osd.7 (which has the needed xattrs). Bobtail is smart enough to recover missing objects but not to recover just missing xattrs.
Do you want me to hold off on any repairs to allow tracking down the crash, or is the current code sufficiently different that there's little point?
Quoted 1 line
Also, you should upgrade to dumpling. :)
I've been considering it. It was initially a little scary with the various issues that were cropping up but that all seems to have quietened down.
Of course I'd like my cluster to be clean before attempting an upgrade!
Chris
Quoted 13 lines · Chris Dunlop
Quoted 12 lines · Sage Weil
Quoted 11 lines · Chris Dunlop
Hi Sage,
Does this answer your question?
2013-09-06 09:30:19.813811 7f0ae8cbc700 0 log [INF] : applying configuration change: internal_safe_to_start_threads = 'true' 2013-09-06 09:33:28.303658 7f0ae94bd700 0 log [ERR] : 2.12 osd.7: soid 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 extra attr _, extra attr snapset 2013-09-06 09:33:28.303685 7f0ae94bd700 0 log [ERR] : repair 2.12 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 no 'snapset' attr 2013-09-06 09:34:45.138468 7f0ae94bd700 0 log [ERR] : 2.12 repair stat mismatch, got 2722/2723 objects, 339/339 clones, 11307104768/11311299072 bytes. 2013-09-06 09:34:45.142215 7f0ae94bd700 0 log [ERR] : 2.12 repair 0 missing, 1 inconsistent objects 2013-09-06 09:34:45.206621 7f0ae94bd700 -1 *** Caught signal (Aborted) **
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
I've just attached the full '
debug_osd0/10' log to the bug report.This suggests to me that the object on osd.6 is missing those xattrs; can you confirm with getfattr -d on the in osd.6's data directory?
I haven't yet wrapped my head around how to translate an oid like those above into a underlying file system object. What directory should I be looking at?
Found it:
b5# cd /var/lib/ceph/osd/ceph-6/current
b5# find 2.12* | grep -i 17d9b.2ae8944a.000000001e11 2.12_head/DIR_2/DIR_1/DIR_A/rb.0.17d9b.2ae8944a.000000001e11__head_56987A12__2 b5# getfattr -d 2.12_head/DIR_2/DIR_1/DIR_A/rb.0.17d9b.2ae8944a.000000001e11__head_56987A12__2 <<< ...crickets... >>>
vs.
b4# cd /var/lib/ceph/osd/ceph-7/current
b4# getfattr -d 2.12_head/DIR_2/DIR_1/DIR_A/rb.0.17d9b.2ae8944a.000000001e11__head_56987A12__2
# file: 2.12_head/DIR_2/DIR_1/DIR_A/rb.0.17d9b.2ae8944a.000000001e11__head_56987A12__2 user.ceph._=0sCgjhAAAABANBAAAAAAAAACAAAAByYi4wLjE3ZDliLjJhZTg5NDRhLjAwMDAwMDAwMWUxMf7/////////EnqYVgAAAAAAAgAAAAAAAAAEAxAAAAACAAAAAAAAAP////8AAAAAAAAAAEInCgAAAAAAuEsAAEEnCgAAAAAAuEsAAAICFQAAAAgTmwEAAAAAAHD1AgAAAAAAAAAAAAAAQAAAAAAAyY4dUpjCTSACAhUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCJwoAAAAAALhLAAAA user.ceph.snapset=0sAgIZAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA==
Quoted 9 lines
Quoted 5 lines
If that is indeed the case, you should be able to move the object out of the way (don't delete it, just in case) and then do the repair. The osd.6 should recover by copying the object from osd.7 (which has the needed xattrs). Bobtail is smart enough to recover missing objects but not to recover just missing xattrs.
Do you want me to hold off on any repairs to allow tracking down the crash, or is the current code sufficiently different that there's little point?
Repaired! ...but why does it take multiple rounds?
b5# mv 2.12_head/DIR_2/DIR_1/DIR_A/rb.0.17d9b.2ae8944a.000000001e11__head_56987A12__2 ..
b5# ceph pg repair 2.12
b5# while ceph -s | grep -q scrubbing; do sleep 60; done b5# tail /var/log/ceph/ceph-osd.6.log
2013-09-06 15:02:13.751160 7f6ccc5ae700 0 log [ERR] : 2.12 osd.6 missing 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 2013-09-06 15:04:15.286711 7f6ccc5ae700 0 log [ERR] : 2.12 repair stat mismatch, got 2723/2724 objects, 339/339 clones, 11311299072/11315493376 bytes. 2013-09-06 15:04:15.286766 7f6ccc5ae700 0 log [ERR] : 2.12 repair 1 missing, 0 inconsistent objects 2013-09-06 15:04:15.286823 7f6ccc5ae700 0 log [ERR] : 2.12 repair 2 errors, 2 fixed 2013-09-06 15:04:20.778377 7f6ccc5ae700 0 log [ERR] : 2.12 scrub stat mismatch, got 2724/2723 objects, 339/339 clones, 11315493376/11311299072 bytes. 2013-09-06 15:04:20.778383 7f6ccc5ae700 0 log [ERR] : 2.12 scrub 1 errors
b5# ceph pg dump | grep inconsistent
2.12 2723 0 0 0 11311299072 159103 159103 active+clean+inconsistent 2013-09-06 15:04:20.778413 20121'690883 20128'7941893 [6,7] [6,7] 20121'690883 2013-09-06 15:04:20.778387 20121'690883 2013-09-06 15:04:15.286835
b5# ceph pg repair 2.12
b5# while ceph -s | grep -q scrubbing; do sleep 60; done b5# tail /var/log/ceph/ceph-osd.6.log
2013-09-06 15:07:30.461959 7f6ccc5ae700 0 log [ERR] : 2.12 repair stat mismatch, got 2724/2723 objects, 339/339 clones, 11315493376/11311299072 bytes. 2013-09-06 15:07:30.461991 7f6ccc5ae700 0 log [ERR] : 2.12 repair 1 errors, 1 fixed
b5# ceph pg dump | grep inconsistent
2.12 2724 0 0 0 11315493376 159580 159580 active+clean+inconsistent 2013-09-06 15:07:30.462039 20129'690886 20128'7942171 [6,7] [6,7] 20129'690886 2013-09-06 15:07:30.461995 20129'690886 2013-09-06 15:07:30.461995
b5# ceph pg repair 2.12
b5# while ceph -s | grep -q scrubbing; do sleep 60; done b5# tail /var/log/ceph/ceph-osd.6.log
2013-09-06 15:09:36.993049 7f6ccc5ae700 0 log [INF] : 2.12 repair ok, 0 fixed
# ceph pg dump | grep inconsistent <<< ...crickets... >>>
Chris
Quoted 45 lines · Chris Dunlop
Quoted 13 lines · Chris Dunlop
Quoted 12 lines · Sage Weil
Quoted 11 lines · Chris Dunlop
Hi Sage,
Does this answer your question?
2013-09-06 09:30:19.813811 7f0ae8cbc700 0 log [INF] : applying configuration change: internal_safe_to_start_threads = 'true' 2013-09-06 09:33:28.303658 7f0ae94bd700 0 log [ERR] : 2.12 osd.7: soid 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 extra attr _, extra attr snapset 2013-09-06 09:33:28.303685 7f0ae94bd700 0 log [ERR] : repair 2.12 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 no 'snapset' attr 2013-09-06 09:34:45.138468 7f0ae94bd700 0 log [ERR] : 2.12 repair stat mismatch, got 2722/2723 objects, 339/339 clones, 11307104768/11311299072 bytes. 2013-09-06 09:34:45.142215 7f0ae94bd700 0 log [ERR] : 2.12 repair 0 missing, 1 inconsistent objects 2013-09-06 09:34:45.206621 7f0ae94bd700 -1 *** Caught signal (Aborted) **Quoted 8 lines
Quoted 4 lines
Quoted 1 line
I've just attached the full '
debug_osd0/10' log to the bug report.This suggests to me that the object on osd.6 is missing those xattrs; can you confirm with getfattr -d on the in osd.6's data directory?
I haven't yet wrapped my head around how to translate an oid like those above into a underlying file system object. What directory should I be looking at?
Found it:
b5# cd
/var/lib/ceph/osd/ceph-6/current
b5# find 2.12* | grep -i 17d9b.2ae8944a.000000001e11 2.12_head/DIR_2/DIR_1/DIR_A/rb.0.17d9b.2ae8944a.000000001e11__head_56987A12__2 b5# getfattr -d 2.12_head/DIR_2/DIR_1/DIR_A/rb.0.17d9b.2ae8944a.000000001e11__head_56987A12__2 <<< ...crickets... >>>vs.
b4# cd
/var/lib/ceph/osd/ceph-7/current
b4# getfattr -d 2.12_head/DIR_2/DIR_1/DIR_A/rb.0.17d9b.2ae8944a.000000001e11__head_56987A12__2
# file: 2.12_head/DIR_2/DIR_1/DIR_A/rb.0.17d9b.2ae8944a.000000001e11__head_56987A12__2 user.ceph._=0sCgjhAAAABANBAAAAAAAAACAAAAByYi4wLjE3ZDliLjJhZTg5NDRhLjAwMDAwMDAwMWUxMf7/////////EnqYVgAAAAAAAgAAAAAAAAAEAxAAAAACAAAAAAAAAP////8AAAAAAAAAAEInCgAAAAAAuEsAAEEnCgAAAAAAuEsAAAICFQAAAAgTmwEAAAAAAHD1AgAAAAAAAAAAAAAAQAAAAAAAyY4dUpjCTSACAhUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCJwoAAAAAALhLAAAA user.ceph.snapset=0sAgIZAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA==Quoted 6 lines
Quoted 5 lines
If that is indeed the case, you should be able to move the object out of the way (don't delete it, just in case) and then do the repair. The osd.6 should recover by copying the object from osd.7 (which has the needed xattrs). Bobtail is smart enough to recover missing objects but not to recover just missing xattrs.
Quoted 5 lines
Quoted 3 lines
Do you want me to hold off on any repairs to allow tracking down the crash, or is the current code sufficiently different that there's little point?
Repaired! ...but why does it take multiple rounds?
Excellent!
It's because the first round repairs the object, but doesn't take its own change into account when verifying/recalculating the PG stats (object count, byte sum). The second pass just fixes up that arithmetic.
sage
Quoted 37 lines
b5# mv 2.12_head/DIR_2/DIR_1/DIR_A/rb.0.17d9b.2ae8944a.000000001e11__head_56987A12__2 ..
b5# ceph pg repair 2.12
b5# while ceph -s | grep -q scrubbing; do sleep 60; done b5# tail/var/log/ceph/ceph-osd.6.log2013-09-06 15:02:13.751160 7f6ccc5ae700 0 log [ERR] : 2.12 osd.6 missing 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 2013-09-06 15:04:15.286711 7f6ccc5ae700 0 log [ERR] : 2.12 repair stat mismatch, got 2723/2724 objects, 339/339 clones, 11311299072/11315493376 bytes. 2013-09-06 15:04:15.286766 7f6ccc5ae700 0 log [ERR] : 2.12 repair 1 missing, 0 inconsistent objects 2013-09-06 15:04:15.286823 7f6ccc5ae700 0 log [ERR] : 2.12 repair 2 errors, 2 fixed 2013-09-06 15:04:20.778377 7f6ccc5ae700 0 log [ERR] : 2.12 scrub stat mismatch, got 2724/2723 objects, 339/339 clones, 11315493376/11311299072 bytes. 2013-09-06 15:04:20.778383 7f6ccc5ae700 0 log [ERR] : 2.12 scrub 1 errorsb5# ceph pg dump | grep inconsistent
2.12 2723 0 0 0 11311299072 159103 159103 active+clean+inconsistent 2013-09-06 15:04:20.778413 20121'690883 20128'7941893 [6,7] [6,7] 20121'690883 2013-09-06 15:04:20.778387 20121'690883 2013-09-06 15:04:15.286835b5# ceph pg repair 2.12
b5# while ceph -s | grep -q scrubbing; do sleep 60; done b5# tail/var/log/ceph/ceph-osd.6.log2013-09-06 15:07:30.461959 7f6ccc5ae700 0 log [ERR] : 2.12 repair stat mismatch, got 2724/2723 objects, 339/339 clones, 11315493376/11311299072 bytes. 2013-09-06 15:07:30.461991 7f6ccc5ae700 0 log [ERR] : 2.12 repair 1 errors, 1 fixedb5# ceph pg dump | grep inconsistent
2.12 2724 0 0 0 11315493376 159580 159580 active+clean+inconsistent 2013-09-06 15:07:30.462039 20129'690886 20128'7942171 [6,7] [6,7] 20129'690886 2013-09-06 15:07:30.461995 20129'690886 2013-09-06 15:07:30.461995b5# ceph pg repair 2.12
b5# while ceph -s | grep -q scrubbing; do sleep 60; done b5# tail/var/log/ceph/ceph-osd.6.log2013-09-06 15:09:36.993049 7f6ccc5ae700 0 log [INF] : 2.12 repair ok, 0 fixed# ceph pg dump | grep inconsistent <<< ...crickets... >>>Chris
Quoted 13 lines · Chris Dunlop
Quoted 12 lines · Sage Weil
Quoted 11 lines · Chris Dunlop
Hi Sage,
Does this answer your question?
2013-09-06 09:30:19.813811 7f0ae8cbc700 0 log [INF] : applying configuration change: internal_safe_to_start_threads = 'true' 2013-09-06 09:33:28.303658 7f0ae94bd700 0 log [ERR] : 2.12 osd.7: soid 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 extra attr _, extra attr snapset 2013-09-06 09:33:28.303685 7f0ae94bd700 0 log [ERR] : repair 2.12 56987a12/rb.0.17d9b.2ae8944a.000000001e11/head//2 no 'snapset' attr 2013-09-06 09:34:45.138468 7f0ae94bd700 0 log [ERR] : 2.12 repair stat mismatch, got 2722/2723 objects, 339/339 clones, 11307104768/11311299072 bytes. 2013-09-06 09:34:45.142215 7f0ae94bd700 0 log [ERR] : 2.12 repair 0 missing, 1 inconsistent objects 2013-09-06 09:34:45.206621 7f0ae94bd700 -1 *** Caught signal (Aborted) **
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
I've just attached the full '
debug_osd0/10' log to the bug report.This suggests to me that the object on osd.6 is missing those xattrs; can you confirm with getfattr -d on the in osd.6's data directory?
I haven't yet wrapped my head around how to translate an oid like those above into a underlying file system object. What directory should I be looking at?
It's the osd.6 data directory (maybe /var/lib/ceph/osd/ceph-6, or whatever you configured), /currrent/$pgid_head/.../*rb.0.17d9b.2ae8944a.000000001e11*. In your case $pgid is 2.12. Do a
find . | grep rb.0.17d9b.2ae8944a.000000001e11
and you will see it pop up (with head in there along with some other stuff). getfattr -d $file to confirm the user.ceph._ and user.ceph.snapset xattrs are missing. I would also confirm that they are present on the same file in osd.7's data directory. Maybe do a sanity check to make sure the objects otherwise look like the match (file size, md5sum, etc.). Assuming osd.7 doesn't look obviously wrong (e.g., 0 bytes or something), rename the bad osd.6 copy out of the way and let repair recover it for you.
Note that you might have to do repair twice to make the pg stats number reflect the just-repaired object.
Quoted 9 lines
Quoted 5 lines
If that is indeed the case, you should be able to move the object out of the way (don't delete it, just in case) and then do the repair. The osd.6 should recover by copying the object from osd.7 (which has the needed xattrs). Bobtail is smart enough to recover missing objects but not to recover just missing xattrs.
Do you want me to hold off on any repairs to allow tracking down the crash, or is the current code sufficiently different that there's little point?
There is little point with bobtail.
Quoted 7 lines
Quoted 1 line
Also, you should upgrade to dumpling. :)
I've been considering it. It was initially a little scary with the various issues that were cropping up but that all seems to have quietened down.
Of course I'd like my cluster to be clean before attempting an upgrade!
Definitely. Let us know how it goes! :)
sage
Bobtail to dumpling (was: OSD crash during repair)
Quoted 11 lines · Sage Weil
Quoted 8 lines · Chris Dunlop
Quoted 1 line · Sage Weil
Also, you should upgrade to dumpling. :)
I've been considering it. It was initially a little scary with the various issues that were cropping up but that all seems to have quietened down.
Of course I'd like my cluster to be clean before attempting an upgrade!
Definitely. Let us know how it goes! :)
Upgraded, directly from bobtail to dumpling.
Well, that was a mite more traumatic than I expected. I had two issues, both my fault...
Firstly, I didn't realise I should have restarted the osds one at a time rather than doing 'service ceph restart' on each host quickly in succession. Restarting them all at once meant everything was offline whilst "PGs are upgrading".
Secondly, whilst I saw the 'osd crush update on start' issue in the release notes, and checked that my crush map hostnames match the actual hostnames, I have two separate pools (for fast SAS vs bulk SATA disks) and I stupidly only noticed the one which matched, but not the other which didn't match. So on restart all the osds moved into the one pool, and started rebalancing.
The two issues at the same time produced quite the adrenaline rush! :-)
My current crush configuration is below (host b2 is recently added and I haven't added it into the pools yet). Is there a better/recommended way of using the crush map to support separate pools to avoid setting 'osd crush update on start = false'? It doesn't seem that I can use the same 'host' names under the separate 'sas' and 'default' roots?
Cheers,
Chris
----------------------------------------------------------------------
# ceph osd tree # id weight type name up/down reweight -8 2 root sas -7 2 rack sas-rack-1 -5 1 host b4-sas 4 0.5 osd.4 up 1 5 0.5 osd.5 up 1 -6 1 host b5-sas 2 0.5 osd.2 up 1 3 0.5 osd.3 up 1 -1 12.66 root default -3 8 rack unknownrack -2 4 host b4 0 2 osd.0 up 1 7 2 osd.7 up 1 -4 4 host b5 1 2 osd.1 up 1 6 2 osd.6 up 1 -9 4.66 host b2 10 1.82 osd.10 up 1 11 1.82 osd.11 up 1 8 0.51 osd.8 up 1 9 0.51 osd.9 up 1
----------------------------------------------------------------------
# begin crush map
# devices device 0 osd.0 device 1 osd.1 device 2 osd.2 device 3 osd.3 device 4 osd.4 device 5 osd.5 device 6 osd.6 device 7 osd.7 device 8 osd.8 device 9 osd.9 device 10 osd.10 device 11 osd.11
# types type 0 osd type 1 host type 2 rack type 3 row type 4 room type 5 datacenter type 6 root
# buckets
host b4 {
id -2 # do not change unnecessarily
# weight 4.000
alg straw
hash 0 # rjenkins1
item osd.0 weight 2.000
item osd.7 weight 2.000
}
host b5 {
id -4 # do not change unnecessarily
# weight 4.000
alg straw
hash 0 # rjenkins1
item osd.1 weight 2.000
item osd.6 weight 2.000
}
rack unknownrack {
id -3 # do not change unnecessarily
# weight 8.000
alg straw
hash 0 # rjenkins1
item b4 weight 4.000
item b5 weight 4.000
}
host b2 {
id -9 # do not change unnecessarily
# weight 4.660
alg straw
hash 0 # rjenkins1
item osd.10 weight 1.820
item osd.11 weight 1.820
item osd.8 weight 0.510
item osd.9 weight 0.510
}
root default {
id -1 # do not change unnecessarily
# weight 12.660
alg straw
hash 0 # rjenkins1
item unknownrack weight 8.000
item b2 weight 4.660
}
host b4-sas {
id -5 # do not change unnecessarily
# weight 1.000
alg straw
hash 0 # rjenkins1
item osd.4 weight 0.500
item osd.5 weight 0.500
}
host b5-sas {
id -6 # do not change unnecessarily
# weight 1.000
alg straw
hash 0 # rjenkins1
item osd.2 weight 0.500
item osd.3 weight 0.500
}
rack sas-rack-1 {
id -7 # do not change unnecessarily
# weight 2.000
alg straw
hash 0 # rjenkins1
item b4-sas weight 1.000
item b5-sas weight 1.000
}
root sas {
id -8 # do not change unnecessarily
# weight 2.000
alg straw
hash 0 # rjenkins1
item sas-rack-1 weight 2.000
}# rules
rule data {
ruleset 0
type replicated
min_size 1
max_size 10
step take default
step chooseleaf firstn 0 type host
step emit
}
rule metadata {
ruleset 1
type replicated
min_size 1
max_size 10
step take default
step chooseleaf firstn 0 type host
step emit
}
rule rbd {
ruleset 2
type replicated
min_size 1
max_size 10
step take default
step chooseleaf firstn 0 type host
step emit
}
rule rbd-sas {
ruleset 3
type replicated
min_size 1
max_size 10
step take sas
step chooseleaf firstn 0 type host
step emit
}# end crush map ----------------------------------------------------------------------
Re: Bobtail to dumpling (was: OSD crash during repair)
Quoted 30 lines · Chris Dunlop
Quoted 11 lines · Sage Weil
Quoted 8 lines · Chris Dunlop
Quoted 1 line · Sage Weil
Also, you should upgrade to dumpling. :)
I've been considering it. It was initially a little scary with the various issues that were cropping up but that all seems to have quietened down.
Of course I'd like my cluster to be clean before attempting an upgrade!
Definitely. Let us know how it goes! :)
Upgraded, directly from bobtail to dumpling.
Well, that was a mite more traumatic than I expected. I had two issues, both my fault...
Firstly, I didn't realise I should have restarted the osds one at a time rather than doing 'service ceph restart' on each host quickly in succession. Restarting them all at once meant everything was offline whilst "PGs are upgrading".
Secondly, whilst I saw the 'osd crush update on start' issue in the release notes, and checked that my crush map hostnames match the actual hostnames, I have two separate pools (for fast SAS vs bulk SATA disks) and I stupidly only noticed the one which matched, but not the other which didn't match. So on restart all the osds moved into the one pool, and started rebalancing.
Quoted 2 lines
The two issues at the same time produced quite the adrenaline rush! :-)
I can imagine!
Quoted 6 lines
My current crush configuration is below (host b2 is recently added and I haven't added it into the pools yet). Is there a better/recommended way of using the crush map to support separate pools to avoid setting 'osd crush update on start = false'? It doesn't seem that I can use the same 'host' names under the separate 'sas' and 'default' roots?
For now we don't have a better solution than setting 'osd crush update on start = false'. Sorry! I'm guessing that it is pretty uncommong for disks to switch hosts, at least. :/
We could come up with a 'standard' way of structuring these sorts of maps with prefixes or suffixes on the bucket names; I'm open to suggestions.
However, I'm also wondering if we should take the next step at the same time and embed another dimension in the CRUSH tree so that CRUSH itself understands that it is host=b4 (say) but it is only looking at the sas or ssd items. This would (help) allow rules along the lines of "pick 3 hosts; choose the ssd from the first and sas disks from the other two". I'm not convinced that is an especially good idea for most users, but it's probably worth considering.
sage
Quoted 177 lines
Cheers,
Chris
----------------------------------------------------------------------
# ceph osd tree # id weight type name up/down reweight -8 2 root sas -7 2 rack sas-rack-1 -5 1 host b4-sas 4 0.5 osd.4 up 1 5 0.5 osd.5 up 1 -6 1 host b5-sas 2 0.5 osd.2 up 1 3 0.5 osd.3 up 1 -1 12.66 root default -3 8 rack unknownrack -2 4 host b4 0 2 osd.0 up 1 7 2 osd.7 up 1 -4 4 host b5 1 2 osd.1 up 1 6 2 osd.6 up 1 -9 4.66 host b2 10 1.82 osd.10 up 1 11 1.82 osd.11 up 1 8 0.51 osd.8 up 1 9 0.51 osd.9 up 1----------------------------------------------------------------------
# begin crush map# devices device 0 osd.0 device 1 osd.1 device 2 osd.2 device 3 osd.3 device 4 osd.4 device 5 osd.5 device 6 osd.6 device 7 osd.7 device 8 osd.8 device 9 osd.9 device 10 osd.10 device 11 osd.11# types type 0 osd type 1 host type 2 rack type 3 row type 4 room type 5 datacenter type 6 root# buckets host b4 { id -2 # do not change unnecessarily # weight 4.000 alg straw hash 0 # rjenkins1 item osd.0 weight 2.000 item osd.7 weight 2.000 } host b5 { id -4 # do not change unnecessarily # weight 4.000 alg straw hash 0 # rjenkins1 item osd.1 weight 2.000 item osd.6 weight 2.000 } rack unknownrack { id -3 # do not change unnecessarily # weight 8.000 alg straw hash 0 # rjenkins1 item b4 weight 4.000 item b5 weight 4.000 } host b2 { id -9 # do not change unnecessarily # weight 4.660 alg straw hash 0 # rjenkins1 item osd.10 weight 1.820 item osd.11 weight 1.820 item osd.8 weight 0.510 item osd.9 weight 0.510 } root default { id -1 # do not change unnecessarily # weight 12.660 alg straw hash 0 # rjenkins1 item unknownrack weight 8.000 item b2 weight 4.660 } host b4-sas { id -5 # do not change unnecessarily # weight 1.000 alg straw hash 0 # rjenkins1 item osd.4 weight 0.500 item osd.5 weight 0.500 } host b5-sas { id -6 # do not change unnecessarily # weight 1.000 alg straw hash 0 # rjenkins1 item osd.2 weight 0.500 item osd.3 weight 0.500 } rack sas-rack-1 { id -7 # do not change unnecessarily # weight 2.000 alg straw hash 0 # rjenkins1 item b4-sas weight 1.000 item b5-sas weight 1.000 } root sas { id -8 # do not change unnecessarily # weight 2.000 alg straw hash 0 # rjenkins1 item sas-rack-1 weight 2.000 }# rules rule data { ruleset 0 type replicated min_size 1 max_size 10 step take default step chooseleaf firstn 0 type host step emit } rule metadata { ruleset 1 type replicated min_size 1 max_size 10 step take default step chooseleaf firstn 0 type host step emit } rule rbd { ruleset 2 type replicated min_size 1 max_size 10 step take default step chooseleaf firstn 0 type host step emit } rule rbd-sas { ruleset 3 type replicated min_size 1 max_size 10 step take sas step chooseleaf firstn 0 type host step emit }# end crush map ---------------------------------------------------------------------- -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html