Bug #49815
BlueRocksEnv::GetChildren may pass trailing slashes to BlueFS readdir
Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
pacific, octopus, nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Description
ceph-osd --mkfs fails with RocksDB 6.15.5.
This seems to be that the trailing / in the directory lookup leads to db being there but db/ not being found.
I found this on nautilus while debugging #46847, so we might consider a backport :)
[...] 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs _read h 0x564fa48e4ac0 0x0~8000 from file(ino 4 size 0xd mtime 2021-03-15 14:39:51.216249 allocated 10000 extents [1:0x1ef90000~10000]) 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _read reaching (or past) eof, len clipped to 0xd 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _read fetching 0x0~1000 of 1:0x1ef90000~10000 2021-03-15 14:39:51.222 7f69e07b8b80 5 bdev(0x564fa498fb10 osd/0/block) read 0x1ef90000~1000 (direct) 2021-03-15 14:39:51.222 7f69e07b8b80 20 bdev(0x564fa498fb10 osd/0/block) _aio_log_start 0x1ef90000~1000 2021-03-15 14:39:51.222 7f69e07b8b80 20 bdev(0x564fa498fb10 osd/0/block) _aio_log_finish 1 0x1ef90000~1000 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _read left 0x1000 len 0xd 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _read got 13 2021-03-15 14:39:51.222 7f69e07b8b80 4 rocksdb: [db/version_set.cc:4764] Recovered from manifest file:db/MANIFEST-000001 succeeded,manifest_file_number is 1, next_file_number is 3, last_sequence is 0, log_number is 0,prev_log_number is 0,max_column_family is 0,min_log_number_to_keep is 0 2021-03-15 14:39:51.222 7f69e07b8b80 4 rocksdb: [db/version_set.cc:4779] Column family [default] (ID 0), log number is 0 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs stat db/IDENTITY 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs stat db/IDENTITY file(ino 3 size 0x25 mtime 2021-03-15 14:39:51.212496 allocated 10000 extents [1:0x1ef80000~10000]) 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs open_for_read db/IDENTITY (sequential) 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs open_for_read h 0x564fa48e4ac0 on file(ino 3 size 0x25 mtime 2021-03-15 14:39:51.212496 allocated 10000 extents [1:0x1ef80000~10000]) 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs _read h 0x564fa48e4ac0 0x0~2000 from file(ino 3 size 0x25 mtime 2021-03-15 14:39:51.212496 allocated 10000 extents [1:0x1ef80000~10000]) 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _read reaching (or past) eof, len clipped to 0x25 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _read fetching 0x0~1000 of 1:0x1ef80000~10000 2021-03-15 14:39:51.222 7f69e07b8b80 5 bdev(0x564fa498fb10 osd/0/block) read 0x1ef80000~1000 (direct) 2021-03-15 14:39:51.222 7f69e07b8b80 20 bdev(0x564fa498fb10 osd/0/block) _aio_log_start 0x1ef80000~1000 2021-03-15 14:39:51.222 7f69e07b8b80 20 bdev(0x564fa498fb10 osd/0/block) _aio_log_finish 1 0x1ef80000~1000 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _read left 0x1000 len 0x25 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _read got 37 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs _read h 0x564fa48e4ac0 0x25~2000 from file(ino 3 size 0x25 mtime 2021-03-15 14:39:51.212496 allocated 10000 extents [1:0x1ef80000~10000]) 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _read reaching (or past) eof, len clipped to 0x0 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _read got 0 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs readdir db/ 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs readdir dir db/ not found 2021-03-15 14:39:51.222 7f69e07b8b80 3 rocksdb: [db/db_impl/db_impl_open.cc:1785] Persisting Option File error: OK 2021-03-15 14:39:51.222 7f69e07b8b80 4 rocksdb: [db/db_impl/db_impl.cc:446] Shutdown: canceling all background work 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs unlock_file 0x564fa49a3550 on file(ino 2 size 0x0 mtime 2021-03-15 14:39:51.212446 allocated 0 extents []) 2021-03-15 14:39:51.222 7f69e07b8b80 4 rocksdb: [db/db_impl/db_impl.cc:625] Shutdown complete 2021-03-15 14:39:51.222 7f69e07b8b80 -1 rocksdb: NotFound: db/: No such file or directory 2021-03-15 14:39:51.222 7f69e07b8b80 -1 bluestore(osd/0) _open_db erroring opening db: 2021-03-15 14:39:51.222 7f69e07b8b80 1 bluefs umount 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs sync_metadata - no pending log events 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs _should_compact_log current 0x5000 expected 3000 ratio 1.66667 2021-03-15 14:39:51.222 7f69e07b8b80 10 bluefs _close_writer 0x564fa48c7c30 type 0 2021-03-15 14:39:51.222 7f69e07b8b80 20 bdev aio_wait 0x564fa4998010 done 2021-03-15 14:39:51.222 7f69e07b8b80 20 bluefs _stop_alloc 2021-03-15 14:39:51.222 7f69e07b8b80 10 bdev(0x564fa498fb10 osd/0/block) discard_drain 2021-03-15 14:39:51.222 7f69e07b8b80 20 bdev aio_wait 0x564fa483c020 done 2021-03-15 14:39:51.222 7f69e07b8b80 1 bdev(0x564fa498fb10 osd/0/block) close 2021-03-15 14:39:51.222 7f69e07b8b80 10 bdev(0x564fa498fb10 osd/0/block) _aio_stop 2021-03-15 14:39:51.469 7f69d77fe640 20 bdev reap_ioc reap ioc 0x564fa4998010 2021-03-15 14:39:51.469 7f69d77fe640 10 bdev(0x564fa498fb10 osd/0/block) _aio_thread end 2021-03-15 14:39:51.532 7f69e07b8b80 10 bdev(0x564fa498fb10 osd/0/block) _discard_stop 2021-03-15 14:39:51.532 7f69d6ffd640 20 bdev(0x564fa498fb10 osd/0/block) _discard_thread wake 2021-03-15 14:39:51.532 7f69d6ffd640 10 bdev(0x564fa498fb10 osd/0/block) _discard_thread finish 2021-03-15 14:39:51.532 7f69e07b8b80 10 bdev(0x564fa498fb10 osd/0/block) _discard_stop stopped 2021-03-15 14:39:51.532 7f69e07b8b80 1 bdev(0x564fa498ea50 osd/0/block) close 2021-03-15 14:39:51.532 7f69e07b8b80 10 bdev(0x564fa498ea50 osd/0/block) _aio_stop 2021-03-15 14:39:51.699 7f69dd164640 10 bdev(0x564fa498ea50 osd/0/block) _aio_thread end 2021-03-15 14:39:51.756 7f69e07b8b80 10 bdev(0x564fa498ea50 osd/0/block) _discard_stop 2021-03-15 14:39:51.756 7f69dc963640 20 bdev(0x564fa498ea50 osd/0/block) _discard_thread wake 2021-03-15 14:39:51.756 7f69dc963640 10 bdev(0x564fa498ea50 osd/0/block) _discard_thread finish 2021-03-15 14:39:51.756 7f69e07b8b80 10 bdev(0x564fa498ea50 osd/0/block) _discard_stop stopped 2021-03-15 14:39:51.756 7f69e07b8b80 -1 bluestore(osd/0) mkfs failed, (5) Input/output error 2021-03-15 14:39:51.756 7f69e07b8b80 -1 OSD::mkfs: ObjectStore::mkfs failed with error (5) Input/output error 2021-03-15 14:39:51.756 7f69e07b8b80 -1 ** ERROR: error creating empty object store in osd/0: (5) Input/output error
Related issues
History
#1 Updated by Jonas Jelten about 3 years ago
- Subject changed from BlueRocksEnv::GetChildren may pass slasg to BlueFS readdir to BlueRocksEnv::GetChildren may pass trailing slashes to BlueFS readdir
#2 Updated by Igor Fedotov about 3 years ago
- Project changed from Ceph to bluestore
#3 Updated by Jonas Jelten about 3 years ago
- Pull request ID set to 39412
#4 Updated by Neha Ojha about 3 years ago
- Status changed from New to Pending Backport
- Backport set to pacific, octopus, nautilus
NOTE: https://github.com/ceph/ceph/pull/39412/commits/3aa31813980d22719277a04797df48310acdff66 is the only commit that needs to be backported
#5 Updated by Backport Bot about 3 years ago
- Copied to Backport #49980: nautilus: BlueRocksEnv::GetChildren may pass trailing slashes to BlueFS readdir added
#6 Updated by Backport Bot about 3 years ago
- Copied to Backport #49981: octopus: BlueRocksEnv::GetChildren may pass trailing slashes to BlueFS readdir added
#7 Updated by Backport Bot about 3 years ago
- Copied to Backport #49982: pacific: BlueRocksEnv::GetChildren may pass trailing slashes to BlueFS readdir added
#8 Updated by Igor Fedotov over 2 years ago
- Status changed from Pending Backport to Resolved