Project

General

Profile

Actions

Bug #71786

closed
JM RF

Assertion `interrupt_cond.get() == ic.get()' failed

Bug #71786: Assertion `interrupt_cond.get() == ic.get()' failed

Added by junxiang mu over 1 year ago. Updated about 1 month ago.

Status:
Resolved
Priority:
High
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Community (dev)
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.0.0-1626-gc966086b57
Released In:
v21.2.0~401
Upkeep Timestamp:
2026-10-24T01:45:10+00:00

Description

When handling PR: https://github.com/ceph/ceph/pull/57491, I found that the command `rados -p test rmsnap snap1` might cause the osd process to crash (not consistently reproducible). The trace log is as follows:

crimson-osd: /home/dandan/code/c++/ceph/src/crimson/common/interruptible_future.h:110: void crimson::interruptible::interrupt_cond_t<InterruptCond>::set(crimson::interruptible::InterruptCondRef<InterruptCond>&) [with InterruptCond = crimson::osd::IOInterruptCondition; crimson::interruptible::InterruptCondRef<InterruptCond> = seastar::lw_shared_ptr<crimson::osd::IOInterruptCondition>]: Assertion `interrupt_cond.get() == ic.get()' failed.
Aborting on shard 0.
Backtrace:
 1# gsignal in /lib/x86_64-linux-gnu/libc.so.6
 2# abort in /lib/x86_64-linux-gnu/libc.so.6
 3# 0x000074940E02881B in /lib/x86_64-linux-gnu/libc.so.6
 4# 0x000074940E03B517 in /lib/x86_64-linux-gnu/libc.so.6
 5# crimson::interruptible::interrupt_cond_t<crimson::osd::IOInterruptCondition>::set(seastar::lw_shared_ptr<crimson::osd::IOInterruptCondition>&) in /home/dandan/code/c++/ceph/build/bin/crimson-osd
 6# 0x000059EF64FA9263 in /home/dandan/code/c++/ceph/build/bin/crimson-osd
 7# 0x000059EF64FA969E in /home/dandan/code/c++/ceph/build/bin/crimson-osd
 8# 0x000059EF64FA9D24 in /home/dandan/code/c++/ceph/build/bin/crimson-osd
 9# crimson::osd::PG::on_active_actmap() in /home/dandan/code/c++/ceph/build/bin/crimson-osd
10# PeeringState::Active::react(PeeringState::ActMap const&) in /home/dandan/code/c++/ceph/build/bin/crimson-osd
11# boost::statechart::detail::reaction_result boost::statechart::custom_reaction<PeeringState::ActMap>::react<PeeringState::Active, boost::statechart::event_base, void const*>(PeeringState::Active&, boost::statechart::event_base const&, void const* const&) in /home/dandan/code/c++/ceph/build/bin/crimson-osd
12# boost::statechart::detail::reaction_result boost::statechart::simple_state<PeeringState::Active, PeeringState::Primary, PeeringState::Activating, (boost::statechart::history_mode)0>::local_react_impl_non_empty::local_react_impl<boost::mpl::list20<boost::statechart::custom_reaction<PeeringState::ActMap>, boost::statechart::custom_reaction<PeeringState::AdvMap>, boost::statechart::custom_reaction<MInfoRec>, boost::statechart::custom_reaction<MNotifyRec>, boost::statechart::custom_reaction<MLogRec>, boost::statechart::custom_reaction<MTrim>, boost::statechart::custom_reaction<PeeringState::Backfilled>, boost::statechart::custom_reaction<PeeringState::ActivateCommitted>, boost::statechart::custom_reaction<PeeringState::AllReplicasActivated>, boost::statechart::custom_reaction<DeferRecovery>, boost::statechart::custom_reaction<DeferBackfill>, boost::statechart::custom_reaction<PeeringState::UnfoundRecovery>, boost::statechart::custom_reaction<PeeringState::UnfoundBackfill>, boost::statechart::custom_reaction<RemoteReservationRevokedTooFull>, boost::statechart::custom_reaction<RemoteReservationRevoked>, boost::statechart::custom_reaction<PeeringState::DoRecovery>, boost::statechart::custom_reaction<RenewLease>, boost::statechart::custom_reaction<MLeaseAck>, boost::statechart::custom_reaction<PeeringState::CheckReadable>, boost::statechart::custom_reaction<PgCreateEvt> >, boost::statechart::simple_state<PeeringState::Active, PeeringState::Primary, PeeringState::Activating, (boost::statechart::history_mode)0> >(boost::statechart::simple_state<PeeringState::Active, PeeringState::Primary, PeeringState::Activating, (boost::statechart::history_mode)0>&, boost::statechart::event_base const&, void const*) in /home/dandan/code/c++/ceph/build/bin/crimson-osd
13# boost::statechart::detail::reaction_result boost::statechart::simple_state<PeeringState::Active, PeeringState::Primary, PeeringState::Activating, (boost::statechart::history_mode)0>::local_react_impl_non_empty::local_react_impl<boost::mpl::list21<boost::statechart::custom_reaction<PeeringState::QueryUnfound>, boost::statechart::custom_reaction<PeeringState::ActMap>, boost::statechart::custom_reaction<PeeringState::AdvMap>, boost::statechart::custom_reaction<MInfoRec>, boost::statechart::custom_reaction<MNotifyRec>, boost::statechart::custom_reaction<MLogRec>, boost::statechart::custom_reaction<MTrim>, boost::statechart::custom_reaction<PeeringState::Backfilled>, boost::statechart::custom_reaction<PeeringState::ActivateCommitted>, boost::statechart::custom_reaction<PeeringState::AllReplicasActivated>, boost::statechart::custom_reaction<DeferRecovery>, boost::statechart::custom_reaction<DeferBackfill>, boost::statechart::custom_reaction<PeeringState::UnfoundRecovery>, boost::statechart::custom_reaction<PeeringState::UnfoundBackfill>, boost::statechart::custom_reaction<RemoteReservationRevokedTooFull>, boost::statechart::custom_reaction<RemoteReservationRevoked>, boost::statechart::custom_reaction<PeeringState::DoRecovery>, boost::statechart::custom_reaction<RenewLease>, boost::statechart::custom_reaction<MLeaseAck>, boost::statechart::custom_reaction<PeeringState::CheckReadable>, boost::statechart::custom_reaction<PgCreateEvt> >, boost::statechart::simple_state<PeeringState::Active, PeeringState::Primary, PeeringState::Activating, (boost::statechart::history_mode)0> >(boost::statechart::simple_state<PeeringState::Active, PeeringState::Primary, PeeringState::Activating, (boost::statechart::history_mode)0>&, boost::statechart::event_base const&, void const*) in /home/dandan/code/c++/ceph/build/bin/crimson-osd
14# boost::statechart::detail::reaction_result boost::statechart::simple_state<PeeringState::Active, PeeringState::Primary, PeeringState::Activating, (boost::statechart::history_mode)0>::local_react_impl_non_empty::local_react_impl<boost::mpl::list<boost::statechart::custom_reaction<PeeringState::QueryState>, boost::statechart::custom_reaction<PeeringState::QueryUnfound>, boost::statechart::custom_reaction<PeeringState::ActMap>, boost::statechart::custom_reaction<PeeringState::AdvMap>, boost::statechart::custom_reaction<MInfoRec>, boost::statechart::custom_reaction<MNotifyRec>, boost::statechart::custom_reaction<MLogRec>, boost::statechart::custom_reaction<MTrim>, boost::statechart::custom_reaction<PeeringState::Backfilled>, boost::statechart::custom_reaction<PeeringState::ActivateCommitted>, boost::statechart::custom_reaction<PeeringState::AllReplicasActivated>, boost::statechart::custom_reaction<DeferRecovery>, boost::statechart::custom_reaction<DeferBackfill>, boost::statechart::custom_reaction<PeeringState::UnfoundRecovery>, boost::statechart::custom_reaction<PeeringState::UnfoundBackfill>, boost::statechart::custom_reaction<RemoteReservationRevokedTooFull>, boost::statechart::custom_reaction<RemoteReservationRevoked>, boost::statechart::custom_reaction<PeeringState::DoRecovery>, boost::statechart::custom_reaction<RenewLease>, boost::statechart::custom_reaction<MLeaseAck>, boost::statechart::custom_reaction<PeeringState::CheckReadable>, boost::statechart::custom_reaction<PgCreateEvt>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::statechart::simple_state<PeeringState::Active, PeeringState::Primary, PeeringState::Activating, (boost::statechart::history_mode)0> >(boost::statechart::simple_state<PeeringState::Active, PeeringState::Primary, PeeringState::Activating, (boost::statechart::history_mode)0>&, boost::statechart::event_base const&, void const*) in /home/dandan/code/c++/ceph/build/bin/crimson-osd
15# boost::statechart::simple_state<PeeringState::Active, PeeringState::Primary, PeeringState::Activating, (boost::statechart::history_mode)0>::react_impl(boost::statechart::event_base const&, void const*) in /home/dandan/code/c++/ceph/build/bin/crimson-osd
16# boost::statechart::simple_state<PeeringState::Clean, PeeringState::Active, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::react_impl(boost::statechart::event_base const&, void const*) in /home/dandan/code/c++/ceph/build/bin/crimson-osd

The crash occurs because when pg1 enters the `PG::on_active_actmap` method and calls `interruptor::with_interruption`, it sets the value of the `thread-local interrupt_cond_t<InterruptCond> interrupt_cond`. Since the same method is executed concurrently on each PG, it's possible that before pg1 completes execution, pg2 (which is on the same shard as pg1) also enters the PG::on_active_actmap method and calls interruptor::with_interruption, attempting to set interrupt_cond. This leads to an assert failure.

When I changed `seastar::parallel_for_each` to `seastar::do_for_each`, the assertion error no longer gets triggered. at: https://github.com/ceph/ceph/blob/main/src/crimson/osd/shard_services.cc#L95

However, I cannot reproduce this error on the main branch, only on my PR. I added print statements for calls to the interrupt_cond_t::set() method and found that pg alternating calls to interrupt_cond_t::set() do not occur on the main branch, but they do occur on my PR. Strangely, my code doesn't alter these logics.

@Matan Breizman Do you have any ideas or suggestions?


Related issues 2 (0 open — 2 closed)

Related to crimson - Bug #76550: Got abort after scrubber/kick_snap_trimResolvedRonen Friedman

Actions
Has duplicate crimson - Bug #76656: Crimson: embedded "with_interruption"Duplicate

Actions

MB Updated by Matan Breizman over 1 year ago Actions #1

  • Status changed from New to Need More Info
  • Source set to Community (dev)

junxiang mu wrote:

When handling PR: https://github.com/ceph/ceph/pull/57491, I found that the command `rados -p test rmsnap snap1` might cause the osd process to crash (not consistently reproducible). The trace log is as follows:

...

@Matan Breizman Do you have any ideas or suggestions?

I can't see something obvious. Since this is only reproducible with the PR mentioned above, despite it not being directly related, I suspect the issue is originated from the way the new trim_snaps is using trim_snaps. Let's wait for the PR to be ready for testing to see if this still issue is relevant.

MB Updated by Matan Breizman 7 months ago Actions #2

  • Subject changed from Crimson: PG::on_active_actmap may crash by interruptor to Assertion `interrupt_cond.get() == ic.get()' failed
  • Status changed from Need More Info to New
  • Priority changed from Normal to High

https://pulpito.ceph.com/matan-2026-05-12_13:03:47-crimson-rados-wip-matanb-testing-may12-distro-debug-trial/210256

DEBUG 2026-05-12 13:22:28,443 [shard 0:main] seastore_tm - 0x5180002e8c80 trans.423 TransactionManager::resolve_cursor_to_mapping: LBACursor(0x517000195600@17#0,,L0xffff2867172b1000~lba_map_val_t(paddr<Seg[Dev(0x0),0x1],0xc0000>~0x2000, type=ONODE_BLOCK_STAGED, checksum=0x76c92fc2, refcount=1)) -> LBAMapping(L0xffff2867172b1000~0x2000->paddr<Seg[Dev(0x0),0x1],0xc0000>)
DEBUG 2026-05-12 13:22:28,443 [shard 1:main] osd -  pg_epoch 37 pg[2.5( empty local-lis/les=36/37 n=0 ec=13/13 lis/c=36/36 les/c/f=37/37/0 sis=36) [3,0] r=0 lpr=36 crt=0'0 mlcod 0'0 active+clean PeeringState::prepare_stats_for_publish reporting purged_snaps []
DEBUG 2026-05-12 13:22:28,444 [shard 1:main] osd -  pg_epoch 37 pg[2.5( empty local-lis/les=36/37 n=0 ec=13/13 lis/c=36/36 les/c/f=37/37/0 sis=36) [3,0] r=0 lpr=36 crt=0'0 mlcod 0'0 active+clean PeeringState::prepare_stats_for_publish publish_stats_to_osd 37:18
DEBUG 2026-05-12 13:22:28,444 [shard 0:main] seastore_onode - 0x5180002e9080 trans.424 FLTreeOnodeManager::list_onodes: reached the end #-1:2867172b:::osd_superblock:head# > #-4:20000000::::0#0
INFO  2026-05-12 13:22:28,444 [shard 1:main] osd -  pg_epoch 37 pg[2.5( empty local-lis/les=36/37 n=0 ec=13/13 lis/c=36/36 les/c/f=37/37/0 sis=36) [3,0] r=0 lpr=36 crt=0'0 mlcod 0'0 active+clean : scrub complete, retriggering snap trim
DEBUG 2026-05-12 13:22:28,444 [shard 1:main] osd -  pg_epoch 37 pg[2.5( empty local-lis/les=36/37 n=0 ec=13/13 lis/c=36/36 les/c/f=37/37/0 sis=36) [3,0] r=0 lpr=36 crt=0'0 mlcod 0'0 active+clean : on_active_actmap snap_trimq=[2~1]
DEBUG 2026-05-12 13:22:28,444 [shard 0:main] seastore_tm - 0x5180002e8c80 trans.423 TransactionManager::get_pin: got LBAMapping(L0xffff2867172b1000~0x2000->paddr<Seg[Dev(0x0),0x1],0xc0000>)
DEBUG 2026-05-12 13:22:28,444 [shard 0:main] seastore - 0x5180002e9080 trans.424 SeaStoreS::list_objects: got 0 objects, left limit 18446744073709551615
ceph-osd: /ceph/rpmbuild/BUILD/ceph-21.0.0-1314-gfb937268/src/crimson/common/interruptible_future.h:110: void crimson::interruptible::interrupt_cond_t<InterruptCond>::set(crimson::interruptible::InterruptCondRef<InterruptCond>&) [with InterruptCond = crimson::osd::IOInterruptCondition; crimson::interruptible::InterruptCondRef<InterruptCond> = seastar::lw_shared_ptr<crimson::osd::IOInterruptCondition>]: Assertion `interrupt_cond.get() == ic.get()' failed.
daemon-helper: command crashed with signal 6

JP Updated by Jose J Palacios Perez 7 months ago Actions #3

  • Seen on main build, https://pulpito-ng.ceph.com/runs/jjperez-2026-05-12_09:42:35-crimson-rados-main-distro-debug-trial/jobs/208574
  • osd.3:
    paddr=paddr<Seg[Dev(0x0),0x1],0xc0000>, prior_paddr=nullopt, length=0x2000, loaded=0x2000, state=CLEAN, last_committed_crc=1992896450, refcount=6, user_hint=Hint(NULL), rewrite_gen=GEN_NULL, pending_io=N/A, laddr=L0xffff2867172b1000, seen=1, fltree_header=headerI0(is_level_tail=1, level=1))
    ceph-osd: /ceph/rpmbuild/BUILD/ceph-21.0.0-1259-g8e5014f3/src/crimson/common/interruptible_future.h:110: void crimson::interruptible::interrupt_cond_t<InterruptCond>::set(crimson::interruptible::InterruptCondRef<InterruptCond>&) [with InterruptCond = crimson::osd::IOInterruptCondition; crimson::interruptible::InterruptCondRef<InterruptCond> = seastar::lw_shared_ptr<crimson::osd::IOInterruptCondition>]: Assertion `interrupt_cond.get() == ic.get()' failed.
    daemon-helper: command crashed with signal 6
    

JP Updated by Jose J Palacios Perez 7 months ago ยท Edited Actions #4

MB Updated by Matan Breizman 7 months ago Actions #5

  • Related to Bug #76550: Got abort after scrubber/kick_snap_trim added

MB Updated by Matan Breizman 7 months ago Actions #6

  • Status changed from New to Fix Under Review
  • Assignee set to Ronen Friedman
  • Pull request ID set to 68948

@Ronen Friedman this looks related to the fix you suggested.
Adding the PR here as well, please feel free to remove if this is not actually related.
Thanks!

XX Updated by Xuehan Xu 7 months ago Actions #7

  • Related to Bug #76656: Crimson: embedded "with_interruption" added

MB Updated by Matan Breizman 7 months ago Actions #8

  • Related to deleted (Bug #76656: Crimson: embedded "with_interruption")

MB Updated by Matan Breizman 7 months ago Actions #9

  • Has duplicate Bug #76656: Crimson: embedded "with_interruption" added

JP Updated by Jose J Palacios Perez 7 months ago Actions #11

JP Updated by Jose J Palacios Perez 7 months ago Actions #12

JP Updated by Jose J Palacios Perez 7 months ago Actions #13

  • Seen in https://pulpito-ng.ceph.com/runs/jjperez-2026-05-19_14:02:35-crimson-rados-wip-perezjos-crimson-only-19-05-2026-PR68358-distro-debug-trial/jobs/221932
  • osd.3:
    EBUG 2026-05-21 09:14:31,917 [shard 1:main] seastore - 0x5180002f1480 trans.317 SeaStoreS::repeat_with_onode: get_attr cid=2.2_head oid=#2:5cea7035:::rbd_info:head# ...
    ceph-osd: /ceph/rpmbuild/BUILD/ceph-21.0.0-1542-gd039cada/src/crimson/common/interruptible_future.h:110: void crimson::interruptible::interrupt_cond_t<InterruptCond>::set(crimson::interruptible::InterruptCondRef<InterruptCond>&) [with InterruptCond = crimson::osd::IOInterruptCondition; crimson::interruptible::InterruptCondRef<InterruptCond> = seastar::lw_shared_ptr<crimson::osd::IOInterruptCondition>]: Assertion `interrupt_cond.get() == ic.get()' failed.
    DEBUG 2026-05-21 09:14:31,917 [shard 1:main] seastore_cache - 0x5180002f1480 trans.317 Cache::get_root: root not on t -- CachedExtent(addr=0x516000105f80, type=ROOT, trans=0, version=1, dirty_from=jseq(sseq(24), paddr<Seg[Dev(0x0),0x8f],0x1000>), modify_time=tp(2026-05-21 09:14:00), paddr=paddr<Dev(ROOT),0x0>, prior_paddr=nullopt, length=0x0, loaded=0x0, state=DIRTY, last_committed_crc=0, refcount=4, user_hint=Hint(NULL), rewrite_gen=GEN_NULL, pending_io=N/A, root_block(lba_root_node=0x5170000a4f80, backref_root_node=0x516000106b80))
    daemon-helper: command crashed with signal 6
    

UB Updated by Upkeep Bot 7 months ago Actions #14

  • Status changed from Fix Under Review to Resolved
  • Merge Commit set to c966086b5791df50721948a9468509fc23bd9229
  • Fixed In set to v21.0.0-1626-gc966086b57
  • Upkeep Timestamp set to 2026-05-21T19:37:52+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #15

  • Released In set to v21.2.0~401
  • Upkeep Timestamp changed from 2026-05-21T19:37:52+00:00 to 2026-10-24T01:45:10+00:00
Actions

Also available in: PDF Atom