Bug #20275
closedrgw_file: prevent conflict of mkdir between restarts
0%
Description
1. export bucket b1
2. mount localhost:/b1 /mnt
3. touch /mnt/dir1
4. kill 9 ganesha.nfsd succeed
5. systemctl start nfs-ganesha
6. export bucket b1
7. mount localhost:/b1 /mnt
8. mkdir /mnt/dir1 <-
9. ls /mnt <-- crash
trace:
ceph version 12.0.3-1449-g9836552 (9836552775d1e2fd91145ed381e1fdc6fc20fecb) luminous (dev)
1: (()+0x43bbef) [0x7f7797503bef]
2: (()+0xf370) [0x7f7824ee4370]
3: (gsignal()+0x37) [0x7f78244dc1d7]
4: (abort()+0x148) [0x7f78244dd8c8]
5: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x284) [0x7f778e217564]
6: (rgw::RGWFileHandle::decode(ceph::buffer::list::iterator&)+0x2ef) [0x7f7797239d5f]
7: (rgw::RGWFileHandle::decode_attrs(ceph::buffer::list const*, ceph::buffer::list const*)+0x92) [0x7f779722a872]
8: (rgw::RGWLibFS::stat_leaf(rgw::RGWFileHandle*, char const*, rgw_fh_type, unsigned int)+0xdd8) [0x7f779722f0a8]
9: (rgw_lookup()+0xb6) [0x7f77972301a6]
10: (()+0x4577) [0x7f781f9bf577]
11: (()+0x46fe) [0x7f781f9bf6fe]
12: (rgw::RGWReaddirRequest::send_response()+0x381) [0x7f7797248491]
13: (rgw::RGWLibProcess::process_request(rgw::RGWLibRequest*, rgw::RGWLibIO*)+0x4a2) [0x7f7797222732]
14: (rgw::RGWLibProcess::process_request(rgw::RGWLibRequest*)+0xfd) [0x7f779722365d]
15: (rgw::RGWFileHandle::readdir(bool ()(char const, void*, unsigned long, unsigned int), void*, unsigned long*, bool*, unsigned int)+0x5ff) [0x7f7797233a1f]
because mkdir does not check for backend object existence, for bucket it's fine.