Bug #70960
closedOSD::osd_op_tp thread had suicide timed out after 150.000000000s - MissingLoc::add_source_info
0%
Description
Two teuthology failures for the same test:
description: rados/thrash-erasure-code/{ceph clusters/{fixed-4} fast/fast mon_election/connectivity
msgr-failures/fastclose objectstore/{bluestore/{alloc$/{avl} base compr$/{no$/{no}}
mem$/{normal-1} onode-segment$/{512K} write$/{write_v2}}} rados recovery-overrides/{more-async-recovery}
supported-random-distro$/{ubuntu_latest} thrashers/default thrashosds-health workloads/ec-radosbench}
/a/lflores-2025-04-14_14:00:23-rados-wip-lflores-testing-2-2025-04-11-1133-distro-default-smithi/8239422
2025-04-14T16:10:21.773 INFO:tasks.ceph.osd.3.smithi172.stderr: ceph version 20.0.0-1385-g919f1b1b (919f1b1b3d09f5bed0b6b2cc44a1368dc72f2f5d) tentacle (dev) 2025-04-14T16:10:21.773 INFO:tasks.ceph.osd.3.smithi172.stderr: 1: /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fac77c7a520] 2025-04-14T16:10:21.773 INFO:tasks.ceph.osd.3.smithi172.stderr: 2: /usr/lib/ceph/erasure-code/libec_isa.so(+0x1c1cd) [0x7fac69f3c1cd] 2025-04-14T16:10:21.773 INFO:tasks.ceph.osd.3.smithi172.stderr: 3: /usr/lib/ceph/erasure-code/libec_isa.so(+0x1c246) [0x7fac69f3c246] 2025-04-14T16:10:21.773 INFO:tasks.ceph.osd.3.smithi172.stderr: 4: (ceph::ErasureCode::_minimum_to_decode(std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> >*)+0x19f) [0x7fac69f31cbf] 2025-04-14T16:10:21.773 INFO:tasks.ceph.osd.3.smithi172.stderr: 5: (ceph::ErasureCode::minimum_to_decode(std::set<int, std::less<int>, std::allocator<int> > const&, std::set<int, std::less<int>, std::allocator<int> > const&, std::map<int, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >, std::less<int>, std::allocator<std::pair<int const, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > > > >*)+0x79) [0x7fac69f31f69] 2025-04-14T16:10:21.773 INFO:tasks.ceph.osd.3.smithi172.stderr: 6: ceph-osd(+0x769072) [0x55bb901d5072] 2025-04-14T16:10:21.773 INFO:tasks.ceph.osd.3.smithi172.stderr: 7: ceph-osd(+0x63c3be) [0x55bb900a83be] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 8: (operator<<(std::ostream&, PG const&)+0x16c) [0x55bb900bd0ac] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 9: (PG::gen_prefix(std::ostream&) const+0x165) [0x55bb900a5d65] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 10: (MissingLoc::add_source_info(pg_shard_t, pg_info_t const&, pg_missing_set<false> const&, HBHandle*)+0x436) [0x55bb9033f776] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 11: (PeeringState::search_for_missing(pg_info_t const&, pg_missing_set<false> const&, pg_shard_t, PeeringCtxWrapper&)+0xfa) [0x55bb902dc9da] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 12: (PeeringState::Active::react(MLogRec const&)+0x163) [0x55bb902f2793] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 13: ceph-osd(+0x8c9e91) [0x55bb90335e91] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 14: (PG::do_peering_event(std::shared_ptr<PGPeeringEvent>, PeeringCtx&)+0x1b6) [0x55bb900cc856] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 15: (OSD::dequeue_peering_evt(OSDShard*, PG*, std::shared_ptr<PGPeeringEvent>, ThreadPool::TPHandle&)+0x2ae) [0x55bb900524fe] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 16: (ceph::osd::scheduler::PGPeeringItem::run(OSD*, OSDShard*, boost::intrusive_ptr<PG>&, ThreadPool::TPHandle&)+0x51) [0x55bb902a42f1] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 17: (OSD::ShardedOpWQ::_process(unsigned int, ceph::heartbeat_handle_d*)+0xa76) [0x55bb90067a06] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 18: (ShardedThreadPool::shardedthreadpool_worker(unsigned int)+0x292) [0x55bb905c30d2] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 19: ceph-osd(+0xb57654) [0x55bb905c3654] 2025-04-14T16:10:21.774 INFO:tasks.ceph.osd.3.smithi172.stderr: 20: /lib/x86_64-linux-gnu/libc.so.6(+0x94b43) [0x7fac77cccb43] 2025-04-14T16:10:21.775 INFO:tasks.ceph.osd.3.smithi172.stderr: 21: /lib/x86_64-linux-gnu/libc.so.6(+0x126a00) [0x7fac77d5ea00] 2025-04-14T16:10:21.775 INFO:tasks.ceph.osd.3.smithi172.stderr:2025-04-14T16:10:21.771+0000 7fac5b351640 -1 *** Caught signal (Aborted) ** 2025-04-14T16:10:21.775 INFO:tasks.ceph.osd.3.smithi172.stderr: in thread 7fac5b351640 thread_name:tp_osd_tp 2025-04-14T16:10:21.775 INFO:tasks.ceph.osd.3.smithi172.stderr:
There is some stack backtrace hallucination happening here. Frames 1-5 don't fit the rest of the stack, MissingLoc::add_source_info is logging a message, PG::gen_prefix is generating the log prefix that has details about the state of the PG, this should never call ErasureCode::minimum_to_decode. The log messages for the thread show it is processing a peering event and calling MissingLoc::add_source_info, the PG is not active at this time so the thread definitely is not processing I/O and calling ErasureCode::minimum_to_decode.
Case 2:
/a/lflores-2025-04-16_19:39:40-rados-wip-lflores-testing-2-2025-04-11-1133-distro-default-smithi/8245298
2025-04-16T21:46:31.643 INFO:tasks.ceph.osd.1.smithi081.stderr:*** Caught signal (Aborted) ** 2025-04-16T21:46:31.643 INFO:tasks.ceph.osd.1.smithi081.stderr: in thread 7fa267725640 thread_name:tp_osd_tp 2025-04-16T21:46:31.645 INFO:tasks.ceph.osd.1.smithi081.stderr: ceph version 20.0.0-1437-g0cc9fd4d (0cc9fd4d8f54f88b0b19307f59abf9d80d4f799d) tentacle (dev) 2025-04-16T21:46:31.645 INFO:tasks.ceph.osd.1.smithi081.stderr: 1: /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fa288857520] 2025-04-16T21:46:31.645 INFO:tasks.ceph.osd.1.smithi081.stderr: 2: ceph-osd(+0x769477) [0x55cdf2f71477] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 3: ceph-osd(+0x63c7ee) [0x55cdf2e447ee] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 4: (operator<<(std::ostream&, PG const&)+0x16c) [0x55cdf2e594dc] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 5: (PG::gen_prefix(std::ostream&) const+0x165) [0x55cdf2e421a5] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 6: (MissingLoc::add_source_info(pg_shard_t, pg_info_t const&, pg_missing_set<false> const&, HBHandle*)+0x436) [0x55cdf30dbfa6] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 7: (PeeringState::search_for_missing(pg_info_t const&, pg_missing_set<false> const&, pg_shard_t, PeeringCtxWrapper&)+0xfa) [0x55cdf3078ada] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 8: (PeeringState::Active::react(MLogRec const&)+0x163) [0x55cdf308efb3] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 9: ceph-osd(+0x8ca7a1) [0x55cdf30d27a1] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 10: (PG::do_peering_event(std::shared_ptr<PGPeeringEvent>, PeeringCtx&)+0x1b6) [0x55cdf2e68c86] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 11: (OSD::dequeue_peering_evt(OSDShard*, PG*, std::shared_ptr<PGPeeringEvent>, ThreadPool::TPHandle&)+0x2ae) [0x55cdf2dee83e] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 12: (ceph::osd::scheduler::PGPeeringItem::run(OSD*, OSDShard*, boost::intrusive_ptr<PG>&, ThreadPool::TPHandle&)+0x51) [0x55cdf3040761] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 13: (OSD::ShardedOpWQ::_process(unsigned int, ceph::heartbeat_handle_d*)+0xa76) [0x55cdf2e03db6] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 14: (ShardedThreadPool::shardedthreadpool_worker(unsigned int)+0x292) [0x55cdf335fa92] 2025-04-16T21:46:31.646 INFO:tasks.ceph.osd.1.smithi081.stderr: 15: ceph-osd(+0xb58014) [0x55cdf3360014] 2025-04-16T21:46:31.647 INFO:tasks.ceph.osd.1.smithi081.stderr: 16: /lib/x86_64-linux-gnu/libc.so.6(+0x94b43) [0x7fa2888a9b43] 2025-04-16T21:46:31.647 INFO:tasks.ceph.osd.1.smithi081.stderr: 17: /lib/x86_64-linux-gnu/libc.so.6(+0x126a00) [0x7fa28893ba00]
This is a more accurate stack backtrace
In both cases there is a time out for the thread which has resulted in SIGABRT being sent to the thread to stop it:
2025-04-16T21:46:31.639+0000 7fa27d243640 1 heartbeat_map is_healthy 'OSD::osd_op_tp thread 0x7fa267725640' had suicide timed out after 150.000000000s
The theory is that the hallucination in the stack backtrace is buggy code dealing with unwinding the stack from within a signal handler.
More detailed analysis of the log:
Thread Scheduled here
2025-04-16T21:44:00.722+0000 7fa267725640 20 osd.1 op_wq(4) _process 7.cs0 to_process <> waiting <> waiting_peering {}
2025-04-16T21:44:00.722+0000 7fa267725640 20 osd.1 op_wq(4) _process OpSchedulerItem(7.cs0 PGPeeringEvent(epoch_sent: 1918 epoch_requested: 1897 MLogRec from 14(0) log log((0'0,1637'9267], crt=1637'9267) pi ([0,0] all_participants={} intervals=[]) +create_info) class_id 2 prio 255 cost 10 e1918) queued
- Thread 7fa26371d640 has the PG lock so it doesn't start immediately
- It logs 8601 "proc_replic_log after missing" logs
- It logs 9352 "search_for_missing" logs
Thread starts 99 seconds later!
2025-04-16T21:45:39.060+0000 7fa267725640 20 osd.1 op_wq(4) _process 7.cs0 to_process <OpSchedulerItem(7.cs0 PGPeeringEvent(epoch_sent: 1918 epoch_requested: 1897 MLogRec from 14(0) log log((0'0,1637'9267], crt=1637'9267) pi ([0,0] all_participants={} intervals=[]) +create_info) class_id 2 prio 255 cost 10 e1918),OpSchedulerItem(7.cs0 PGPeeringEvent(epoch_sent: 1918 epoch_requested: 1897 MLogRec from 3(2) log log((0'0,1637'9267], crt=1637'9267) pi ([0,0] all_participants={} intervals=[]) +create_info) class_id 2 prio 255 cost 10 e1918)> waiting <> waiting_peering {}
2025-04-16T21:45:39.060+0000 7fa267725640 20 osd.1 op_wq(4) _process OpSchedulerItem(7.cs0 PGPeeringEvent(epoch_sent: 1918 epoch_requested: 1897 MLogRec from 14(0) log log((0'0,1637'9267], crt=1637'9267) pi ([0,0] all_participants={} intervals=[]) +create_info) class_id 2 prio 255 cost 10 e1918) pg 0x55ce35397000
- 21:45:39
- 8033 "proc_replica_log after missing" logs, about 4-10ms each
- 21:46:23
- 1032 "search_for_missing" logs, about 4ms each
Timed out here after running for 52 seconds
2025-04-16T21:46:31.639+0000 7fa27d243640 1 heartbeat_map is_healthy 'OSD::osd_op_tp thread 0x7fa267725640' had timed out after 15.000000954s 2025-04-16T21:46:31.639+0000 7fa27d243640 1 heartbeat_map is_healthy 'OSD::osd_op_tp thread 0x7fa267725640' had suicide timed out after 150.000000000s 2025-04-16T21:46:31.643+0000 7fa267725640 -1 *** Caught signal (Aborted) **
In both these tests teuthology is running with the default log size of 10000 and in one case has 8149 log entries and in the other has 9267 log entries for the PG that gets into trouble. Peering is trying to cope with multiple OSDs having 8K+ missing objects and is logging each missing object once in PeeringState::proc_replica_log and then again in MissingLoc::add_source_info. It is taking 4+ms per log entry, so one peering event can take 90+ seconds to process. When you get two peering events for the same PG lock contention can mean a thread can block for 90 seconds and then try and run for 90 seconds getting timed out at 150 seconds.
Probably the best fix is to reduce the log size for this test to something like 1000 entries. Many teuthology tests run with very short (e.g. ~5 entry logs), there is probably value in doing some teuthology tests with larger logs, but there are diminishing returns in terms of finding bugs for having 10K entry logs, especially as generating this amount of logging will mean the test does very little useful work.
LF Updated by Laura Flores over 1 year ago
- Is duplicate of Bug #70582: Heartbeat crash in reset_timeout and clear_timeout added
LF Updated by Laura Flores over 1 year ago
- Status changed from New to Duplicate
I'm adding a note to the other tracker ticket about your analysis here since it is helpful for figuring out a fix.
LF Updated by Laura Flores 12 months ago
/a/skanta-2025-12-09_12:02:32-rados-wip-bharath4-testing-2025-12-09-1249-tentacle-distro-default-smithi/8647076