Bug #66819
closedSegmentation fault in OSD::tick_without_osd_lock()
0%
Description
from the rgw/verify suite: https://qa-proxy.ceph.com/teuthology/cbodley-2024-07-03_01:53:26-rgw-wip-cbodley-testing-distro-default-smithi/7784881/
most jobs in the suite succeed, but one crashes during the cls workunit in ceph_test_cls_lock:
2024-07-03T02:30:28.891 INFO:tasks.workunit.client.0.smithi040.stdout:[ OK ] ClsLock.TestMultipleLocks (3059 ms) 2024-07-03T02:30:28.891 INFO:tasks.workunit.client.0.smithi040.stdout:[ RUN ] ClsLock.TestLockDuration 2024-07-03T02:30:36.944 INFO:tasks.workunit.client.0.smithi040.stdout:[ OK ] ClsLock.TestLockDuration (8053 ms) 2024-07-03T02:30:36.944 INFO:tasks.workunit.client.0.smithi040.stdout:[ RUN ] ClsLock.TestAssertLocked 2024-07-03T02:30:38.951 INFO:tasks.ceph.osd.5.smithi083.stderr:*** Caught signal (Segmentation fault) ** 2024-07-03T02:30:38.951 INFO:tasks.ceph.osd.5.smithi083.stderr: in thread 7f77da722640 thread_name:safe_timer 2024-07-03T02:30:38.955 INFO:tasks.ceph.osd.5.smithi083.stderr: ceph version 19.0.0-4722-g30e96d2f (30e96d2ffffa7f50cdb9aa9a47e096193f18457a) squid (dev) 2024-07-03T02:30:38.955 INFO:tasks.ceph.osd.5.smithi083.stderr: 1: /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f77e5d0d520] 2024-07-03T02:30:38.955 INFO:tasks.ceph.osd.5.smithi083.stderr: 2: (std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)+0xe) [0x7f77e60c262e] 2024-07-03T02:30:38.955 INFO:tasks.ceph.osd.5.smithi083.stderr: 3: (OSD::tick_without_osd_lock()+0x56c) [0x55c75a54f90c] 2024-07-03T02:30:38.955 INFO:tasks.ceph.osd.5.smithi083.stderr: 4: ceph-osd(+0x4d2aed) [0x55c75a4cbaed] 2024-07-03T02:30:38.955 INFO:tasks.ceph.osd.5.smithi083.stderr: 5: (CommonSafeTimer<std::mutex>::timer_thread()+0x126) [0x55c75aa8ebb6] 2024-07-03T02:30:38.955 INFO:tasks.ceph.osd.5.smithi083.stderr: 6: ceph-osd(+0xa965b1) [0x55c75aa8f5b1] 2024-07-03T02:30:38.955 INFO:tasks.ceph.osd.5.smithi083.stderr: 7: /lib/x86_64-linux-gnu/libc.so.6(+0x94b43) [0x7f77e5d5fb43] 2024-07-03T02:30:38.955 INFO:tasks.ceph.osd.5.smithi083.stderr: 8: /lib/x86_64-linux-gnu/libc.so.6(+0x126a00) [0x7f77e5df1a00] 2024-07-03T02:30:38.982 INFO:tasks.ceph.osd.5.smithi083.stderr:2024-07-03T02:30:38.961+0000 7f77da722640 -1 *** Caught signal (Segmentation fault) ** 2024-07-03T02:30:38.982 INFO:tasks.ceph.osd.5.smithi083.stderr: in thread 7f77da722640 thread_name:safe_timer
2024-07-03T02:30:38.949+0000 7f77da722640 10 osd.5 53 tick_without_osd_lock 2024-07-03T02:30:38.949+0000 7f77da722640 20 osd.5 53 tick_without_osd_lock max_waiting_epoch 54, requesting new map 2024-07-03T02:30:38.961+0000 7f77da722640 -1 *** Caught signal (Segmentation fault) ** in thread 7f77da722640 thread_name:safe_timer ceph version 19.0.0-4722-g30e96d2f (30e96d2ffffa7f50cdb9aa9a47e096193f18457a) squid (dev) 1: /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f77e5d0d520] 2: (std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)+0xe) [0x7f77e60c262e] 3: (OSD::tick_without_osd_lock()+0x56c) [0x55c75a54f90c] 4: ceph-osd(+0x4d2aed) [0x55c75a4cbaed] 5: (CommonSafeTimer<std::mutex>::timer_thread()+0x126) [0x55c75aa8ebb6] 6: ceph-osd(+0xa965b1) [0x55c75aa8f5b1] 7: /lib/x86_64-linux-gnu/libc.so.6(+0x94b43) [0x7f77e5d5fb43] 8: /lib/x86_64-linux-gnu/libc.so.6(+0x126a00) [0x7f77e5df1a00] NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
RZ Updated by Radoslaw Zarzynski over 2 years ago
- Assignee set to MOHIT AGRAWAL
Hi Mohit, would you mind taking a look?
RZ Updated by Radoslaw Zarzynski over 2 years ago
- Status changed from New to In Progress
MA Updated by MOHIT AGRAWAL over 2 years ago
- Status changed from In Progress to Need More Info
It seems the build hash(30e96d2ffffa7f50cdb9aa9a47e096193f18457a) is not available setup
a similar kind of environment to attach a core with gdb and based on current stacktrace it
is not sufficient to find out the reason so we have to wait next time to generate the crash.
AW Updated by Alex Wojno over 1 year ago
MOHIT AGRAWAL wrote in #note-3:
It seems the build hash(30e96d2ffffa7f50cdb9aa9a47e096193f18457a) is not available setup
a similar kind of environment to attach a core with gdb and based on current stacktrace it
is not sufficient to find out the reason so we have to wait next time to generate the crash.
Any update on this ticket? We are seeing this crash in production environments.
BS Updated by Bill Scales over 1 year ago
/a/lflores-2025-04-11_15:58:32-rados-wip-lflores-testing-2025-04-10-2245-distro-default-smithi/8235772/remote/smithi134/log/ceph-osd.6.log.gz
/a/lflores-2025-04-11_15:58:32-rados-wip-lflores-testing-2025-04-10-2245-distro-default-smithi/8235772/remote/smithi134/coredump
Description: rados/thrash-erasure-code/{ceph clusters/{fixed-4} fast/fast mon_election/connectivity msgr-failures/fastclose objectstore/{bluestore/{alloc$/{bitmap} base compr$/{no$/{no}} mem$/{low} onode-segment$/{512K} write$/{write_v1}}} rados recovery-overrides/{more-async-recovery} supported-random-distro$/{ubuntu_latest} thrashers/default thrashosds-health workloads/ec-radosbench}
Very similar stack trace running teuthology testing on main, there is a core dump too:
2025-04-11T20:13:38.294+0000 7f3baff2f640 -1 *** Caught signal (Segmentation fault) ** in thread 7f3baff2f640 thread_name:safe_timer ceph version 20.0.0-1387-g42ec3b79 (42ec3b797d082a3a557a57f9d603ef4fa725f61c) tentacle (dev) 1: /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f3bb7d3c520] 2: (std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)+0xe) [0x7f3bb80f162e] 3: (OSD::tick_without_osd_lock()+0x554) [0x55c635319704] 4: ceph-osd(+0x53976d) [0x55c63529376d] 5: (CommonSafeTimer<std::mutex>::timer_thread()+0x124) [0x55c6358b6ff4] 6: ceph-osd(+0xb5da71) [0x55c6358b7a71] 7: /lib/x86_64-linux-gnu/libc.so.6(+0x94b43) [0x7f3bb7d8eb43] 8: /lib/x86_64-linux-gnu/libc.so.6(+0x126a00) [0x7f3bb7e20a00]
RZ Updated by Radoslaw Zarzynski over 1 year ago
Pinged Mohit on that.
AA Updated by ahmad alkhansa over 1 year ago · Edited
Hi, we are having a similar core dump on squid.
ceph version 19.2.1 (58a7fab8be0a062d730ad7da874972fd3fba59fb) squid (stable)
1: /lib64/libc.so.6(+0x3e730) [0x7f5e0e23e730]
2: (std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)+0xe) [0x7f5e0e6c62ce]
3: (OSD::tick_without_osd_lock()+0x544) [0x5558277056f4]
4: /usr/bin/ceph-osd(+0x4e171d) [0x55582767e71d]
5: (CommonSafeTimer<std::mutex>::timer_thread()+0x12b) [0x555827c5376b]
6: /usr/bin/ceph-osd(+0xab7281) [0x555827c54281]
7: /lib64/libc.so.6(+0x89d22) [0x7f5e0e289d22]
8: /lib64/libc.so.6(+0x10ed40) [0x7f5e0e30ed40]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Is it related to this issue?
Yes it is related to that, i am still looking it and not able to find the RCA yet.
MA Updated by MOHIT AGRAWAL over 1 year ago
Below is the more detailed backtrace related to the coredump
It seems the map is corrupted that;s why it is not able to access reverse iterator.
I have checked no other thread was consuming the map so i am not sure how it
was corrupted. Need to debug it more.
Thread 1 (Thread 0x7f3baff2f640 (LWP 26829)):
#0 0x00007f3bb7d90a7c in pthread_kill () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f3bb7d3c476 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x000055c63588a2ab in reraise_fatal (signum=11) at global/./src/global/signal_handler.cc:88
#3 handle_oneshot_fatal_signal (signum=11) at global/./src/global/signal_handler.cc:367
#4 <signal handler called>
#5 0x00007f3bb80f162e in std::_Rb_tree_decrement(std::_Rb_tree_node_base const*) () from /lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x000055c635319704 in std::_Rb_tree_const_iterator<std::pair<unsigned int const, unsigned int> >::operator-- (this=<synthetic pointer>) at /usr/include/c++/11/bits/stl_tree.h:383
#7 std::reverse_iterator<std::_Rb_tree_const_iterator<std::pair<unsigned int const, unsigned int> > >::operator-> (this=<synthetic pointer>) at /usr/include/c++/11/bits/stl_iterator.h:262
#8 interval_set<unsigned int, std::map, true>::range_end (this=0x55c657432960) at osd/./src/include/interval_set.h:502
#9 OSDSuperblock::get_newest_map (this=0x55c657432938) at osd/./src/osd/osd_types.h:5658
#10 OSDSuperblock::get_newest_map (this=0x55c657432938) at osd/./src/osd/osd_types.h:5655
#11 OSD::tick_without_osd_lock (this=0x55c657432000) at osd/./src/osd/OSD.cc:6503
#12 0x000055c63529376d in Context::complete (this=0x55c6678683a0, r=<optimized out>) at ./src/include/Context.h:102
#13 0x000055c6358b6ff4 in CommonSafeTimer<std::mutex>::timer_thread (this=0x55c657432138) at common/./src/common/Timer.cc:116
#14 0x000055c6358b7a71 in CommonSafeTimerThread<std::mutex>::entry (this=<optimized out>) at common/./src/common/Timer.cc:33
#15 0x00007f3bb7d8eb43 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#16 0x00007f3bb7e20a00 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
f 8
p this->maps
$16 = {_size = 2089, m = std::map with 1 element = {[1318] = 2089}}
(gdb) p this->maps.m.rbegin()
Cannot evaluate function -- may be inlined
LF Updated by Laura Flores over 1 year ago · Edited
Hey @MOHIT AGRAWAL is there any additional info that would be useful to debug this further?
MA Updated by MOHIT AGRAWAL over 1 year ago
I think the osd was getting crashed because the map was corrupted and the map was corrupted because it was updated(erased) and accessed at the same time. As we can see in below logs the thread (7f3baff2f640) is getting crash and at the same time other thread 7f3baa014640(calling trim_maps via handle_osd_map) to remove old osdmap. I think we have to make it synchronize to update/access of maps under OSDSuperblock.
2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1317 2025-04-11T20:13:38.206+0000 7f3baff2f640 10 osd.6 3405 tick_without_osd_lock 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 trim_maps: min=2723 oldest_map=1303 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1303 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1304 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1305 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1306 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1307 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1308 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1309 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1310 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1311 2025-04-11T20:13:38.210+0000 7f3baff2f640 20 bluestore(/var/lib/ceph/osd/ceph-6) statfs store_statfs(0x163faea000/0x0/0x1680000000, data 0x151473e/0x2162000, compress 0x0/0x0/0x0, omap 0x22fec4, meta 0x3e18013c) 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1312 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1313 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1314 2025-04-11T20:13:38.210+0000 7f3baff2f640 20 osd.6 3405 tick_without_osd_lock max_waiting_epoch 3406, requesting new map 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1315 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1316 2025-04-11T20:13:38.210+0000 7f3baa014640 20 osd.6 3405 removing old osdmap epoch 1317 2025-04-11T20:13:38.210+0000 7f3baa014640 10 write_superblock sb(a2a75766-6245-4bfd-9ea7-151ab39e763b osd.6 bdcb218d-f910-40b3-8e11-2f41a60106ac e3405 maps [1318~2088] lci=[22,3405] tlb=2723) 2025-04-11T20:13:38.294+0000 7f3baff2f640 -1 *** Caught signal (Segmentation fault) ** in thread 7f3baff2f640 thread_name:safe_timer ceph version 20.0.0-1387-g42ec3b79 (42ec3b797d082a3a557a57f9d603ef4fa725f61c) tentacle (dev) 1: /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f3bb7d3c520] 2: (std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)+0xe) [0x7f3bb80f162e] 3: (OSD::tick_without_osd_lock()+0x554) [0x55c635319704] 4: ceph-osd(+0x53976d) [0x55c63529376d] 5: (CommonSafeTimer<std::mutex>::timer_thread()+0x124) [0x55c6358b6ff4] 6: ceph-osd(+0xb5da71) [0x55c6358b7a71] 7: /lib/x86_64-linux-gnu/libc.so.6(+0x94b43) [0x7f3bb7d8eb43] 8: /lib/x86_64-linux-gnu/libc.so.6(+0x126a00) [0x7f3bb7e20a00] NOTE: a copy of the executable, or objdump -rdS <executable> is needed to interpret this
MA Updated by MOHIT AGRAWAL over 1 year ago
- Status changed from Need More Info to Fix Under Review
- Pull request ID set to 62916
RZ Updated by Radoslaw Zarzynski over 1 year ago
scrub note: reviewing.
RZ Updated by Radoslaw Zarzynski over 1 year ago
scrub note: reviewed the PR;there might be a problem with the too big critical sectiion.
AK Updated by Adam Kupczyk over 1 year ago
ceph version 20.3.0-622-g091fad2b (091fad2b4c59f0d2789a74378cdc0defd97741d3) tentacle (dev - RelWithDebInfo)
1: /lib64/libc.so.6(+0x3ea60) [0x7fb819a3ea60]
2: (std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)+0xe) [0x7fb819ec62de]
3: (OSD::tick_without_osd_lock()+0x544) [0x562991a48724]
4: ceph-osd(+0x547b7d) [0x5629919c2b7d]
5: (CommonSafeTimer<std::mutex>::timer_thread()+0x12b) [0x56299200365b]
6: ceph-osd(+0xb89091) [0x562992004091]
7: /lib64/libc.so.6(+0x8a3b2) [0x7fb819a8a3b2]
MA Updated by MOHIT AGRAWAL over 1 year ago
- Status changed from Fix Under Review to Resolved
MA Updated by MOHIT AGRAWAL over 1 year ago
- Status changed from Resolved to Pending Backport
- Backport set to squid,tentacle
UB Updated by Upkeep Bot over 1 year ago
- Merge Commit set to c056c9fa03e169841132320482bcc5bae40d9424
- Fixed In set to v20.3.0-1116-gc056c9fa03e
- Upkeep Timestamp set to 2025-07-10T12:49:17+00:00
UB Updated by Upkeep Bot over 1 year ago
- Copied to Backport #72070: squid: Segmentation fault in OSD::tick_without_osd_lock() added
UB Updated by Upkeep Bot over 1 year ago
- Copied to Backport #72071: tentacle: Segmentation fault in OSD::tick_without_osd_lock() added
UB Updated by Upkeep Bot over 1 year ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot over 1 year ago
- Fixed In changed from v20.3.0-1116-gc056c9fa03e to v20.3.0-1116-gc056c9fa03
- Upkeep Timestamp changed from 2025-07-10T12:49:17+00:00 to 2025-07-14T20:10:51+00:00
RZ Updated by Radoslaw Zarzynski over 1 year ago
- Has duplicate Bug #72360: OSD Segmentation Fault in OSD::tick_without_osd_lock() with std::_Rb_tree in Ceph 19.2.2 Squid added
UB Updated by Upkeep Bot 12 months ago
- Status changed from Pending Backport to Resolved
- Upkeep Timestamp changed from 2025-07-14T20:10:51+00:00 to 2025-12-10T01:02:35+00:00
UB Updated by Upkeep Bot 3 months ago
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2025-12-10T01:02:35+00:00 to 2026-08-28T01:38:57+00:00
UB Updated by Upkeep Bot about 1 month ago
- Released In set to v21.2.0~2665
- Upkeep Timestamp changed from 2026-08-28T01:38:57+00:00 to 2026-10-24T01:59:52+00:00