Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 2272981

Summary: mds: ensure snapclient is synced before corruption check
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Patrick Donnelly <pdonnell>
Component: CephFSAssignee: Patrick Donnelly <pdonnell>
Status: CLOSED ERRATA QA Contact: Amarnath <amk>
Severity: medium Docs Contact: Disha Walvekar <dwalveka>
Priority: unspecified    
Version: 6.1CC: ceph-eng-bugs, cephqe-warriors, hyelloji, mcaldeir, rpollack, tserlin, vereddy, vshankar
Target Milestone: ---   
Target Release: 7.0z2   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: ceph-18.2.0-179.el9cp Doc Type: Bug Fix
Doc Text:
Previously, some metadata was marked as corrupted because the state tests for the file system snap systems were incorrect. Due to this, the MDS wrongly indicated some metadata is damaged. With this fix, the state tests for the file system snap systems have been corrected and the MDS no longer indicates the correct metadata as corrupt.
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-07 12:11:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2272979    
Bug Blocks: 2272983    

Description Patrick Donnelly 2024-04-03 14:26:54 UTC
This bug was initially created as a copy of Bug #2272979

I am copying this bug because: 

7.0z backport

Description of problem:

See: https://tracker.ceph.com/issues/64058

Comment 7 Amarnath 2024-04-16 13:58:23 UTC
Hi All,

As commented by dev, This bz is hard reproduce. 
We have covered running above script(https://github.com/ceph/ceph/blob/main/qa/workunits/fs/snaps/untar_snap_rm.sh). 
We haven't observed any crash or aborts in the mds logs

Sanity And regression are run and we haven't seen anything failing around snapschedule
Regression runs : http://magna002.ceph.redhat.com/cephci-jenkins/test-runs/18.2.0-177/Regression/cephfs/
Sanity : http://magna002.ceph.redhat.com/cephci-jenkins/test-runs/18.2.0-177/Sanity/325/

MDS and MON Logs : 
http://magna002.ceph.redhat.com/ceph-qe-logs/amar/BZ_2272981/

Regards,
Amarnath

Comment 8 Amarnath 2024-04-16 13:59:17 UTC
Hi Patrick,

Could you please confirm if this BZ needs to be added to the 7.0z2 release notes? If so, please provide the doc type and the doc text.

Regards,
Amarnath

Comment 11 errata-xmlrpc 2024-05-07 12:11:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 7.0 Bug Fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2024:2743

Comment 12 Manny 2024-06-04 15:58:41 UTC
Crash signature:

~~~
2024-04-28T13:25:34.748+0000 7fedc6158700 -1 mds.4.cache.den(0x1 volumes) newly corrupt dentry to be committed: [dentry #0x1/volumes [2,head] rep@-2,-2.0 (dversion lock) v=0 ino=0x10000000000 state=0 | inodepin=1 0x55ff14692000]
2024-04-28T13:25:34.748+0000 7fedc6158700 -1 log_channel(cluster) log [ERR] : MDS abort because newly corrupt dentry to be committed: [dentry #0x1/volumes [2,head] rep@-2,-2.0 (dversion lock) v=0 ino=0x10000000000 state=0 | inodepin=1 0x55ff14692000]
2024-04-28T13:25:34.751+0000 7fedc6158700 -1 /builddir/build/BUILD/ceph-16.2.10/src/mds/CDentry.cc: In function 'bool CDentry::check_corruption(bool)' thread 7fedc6158700 time 2024-04-28T13:25:34.750059+0000
/builddir/build/BUILD/ceph-16.2.10/src/mds/CDentry.cc: 699: ceph_abort_msg("abort() called")

 ceph version 16.2.10-187.el8cp (5d6355e2bccd18b5c6457a34cb666d773f21823d) pacific (stable)
 1: (ceph::__ceph_abort(char const*, int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0xe5) [0x7fedceda6c74]
 2: (CDentry::check_corruption(bool)+0x456) [0x55ff0dfe98a6]
 3: (EMetaBlob::add_dir_context(CDir*, int)+0x241) [0x55ff0e132931]
 4: (MDCache::create_subtree_map()+0x1acd) [0x55ff0defef0d]
 5: (MDLog::_journal_segment_subtree_map(MDSContext*)+0x126) [0x55ff0e0c35d6]
 6: (MDLog::_submit_entry(LogEvent*, MDSLogContextBase*)+0x358) [0x55ff0e0c3a28]
 7: (Server::journal_close_session(Session*, int, Context*)+0x78c) [0x55ff0dded24c]
 8: (Server::kill_session(Session*, Context*)+0x212) [0x55ff0dded9a2]
 9: (Server::apply_blocklist()+0x10d) [0x55ff0ddedc5d]
 10: (MDSRank::apply_blocklist(std::set<entity_addr_t, std::less<entity_addr_t>, std::allocator<entity_addr_t> > const&, unsigned int)+0x34) [0x55ff0dda9824]
 11: (MDSRankDispatcher::handle_osd_map()+0x122) [0x55ff0dda9b92]
 12: (MDSDaemon::handle_core_message(boost::intrusive_ptr<Message const> const&)+0x33b) [0x55ff0dd93b8b]
 13: (MDSDaemon::ms_dispatch2(boost::intrusive_ptr<Message> const&)+0xc3) [0x55ff0dd94473]
 14: (DispatchQueue::entry()+0x126a) [0x7fedcefef8da]
 15: (DispatchQueue::DispatchThread::entry()+0x11) [0x7fedcf0a2e21]
 16: /lib64/libpthread.so.0(+0x81ca) [0x7fedcdd851ca]
 17: clone()

2024-04-28T13:25:34.753+0000 7fedc6158700 -1 *** Caught signal (Aborted) **
 in thread 7fedc6158700 thread_name:ms_dispatch

 ceph version 16.2.10-187.el8cp (5d6355e2bccd18b5c6457a34cb666d773f21823d) pacific (stable)
 1: /lib64/libpthread.so.0(+0x12cf0) [0x7fedcdd8fcf0]
 2: gsignal()
 3: abort()
 4: (ceph::__ceph_abort(char const*, int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x1b6) [0x7fedceda6d45]
 5: (CDentry::check_corruption(bool)+0x456) [0x55ff0dfe98a6]
 6: (EMetaBlob::add_dir_context(CDir*, int)+0x241) [0x55ff0e132931]
 7: (MDCache::create_subtree_map()+0x1acd) [0x55ff0defef0d]
 8: (MDLog::_journal_segment_subtree_map(MDSContext*)+0x126) [0x55ff0e0c35d6]
 9: (MDLog::_submit_entry(LogEvent*, MDSLogContextBase*)+0x358) [0x55ff0e0c3a28]
 10: (Server::journal_close_session(Session*, int, Context*)+0x78c) [0x55ff0dded24c]
 11: (Server::kill_session(Session*, Context*)+0x212) [0x55ff0dded9a2]
 12: (Server::apply_blocklist()+0x10d) [0x55ff0ddedc5d]
 13: (MDSRank::apply_blocklist(std::set<entity_addr_t, std::less<entity_addr_t>, std::allocator<entity_addr_t> > const&, unsigned int)+0x34) [0x55ff0dda9824]
 14: (MDSRankDispatcher::handle_osd_map()+0x122) [0x55ff0dda9b92]
 15: (MDSDaemon::handle_core_message(boost::intrusive_ptr<Message const> const&)+0x33b) [0x55ff0dd93b8b]
 16: (MDSDaemon::ms_dispatch2(boost::intrusive_ptr<Message> const&)+0xc3) [0x55ff0dd94473]
 17: (DispatchQueue::entry()+0x126a) [0x7fedcefef8da]
 18: (DispatchQueue::DispatchThread::entry()+0x11) [0x7fedcf0a2e21]
 19: /lib64/libpthread.so.0(+0x81ca) [0x7fedcdd851ca]
 20: clone()
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
~~~

See also Knowledge  (https://access.redhat.com/solutions/7073314)

BR
Manny