Project

General

Profile

Bug #20871

core dump when bluefs's mkdir returns -EEXIST

Added by Chang Liu about 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
08/01/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:

Description

(gdb) bt
#0  0x00007fffebb4c428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007fffebb4e02a in __GI_abort () at abort.c:89
#2  0x00007fffee6b8e5b in ceph::__ceph_assert_fail (assertion=0x5555562fa750 "0 == \"unrecognized error code\"", file=0x5555562fa710 "/home/liuchang/WorkSpace/ceph/src/os/bluestore/BlueRocksEnv.cc", 
    line=22, func=0x5555562fb760 <err_to_status(int)::__PRETTY_FUNCTION__> "rocksdb::Status err_to_status(int)") at /home/liuchang/WorkSpace/ceph/src/common/assert.cc:66
#3  0x0000555555f33b5c in err_to_status (r=-17) at /home/liuchang/WorkSpace/ceph/src/os/bluestore/BlueRocksEnv.cc:22
#4  0x0000555555f34692 in BlueRocksEnv::CreateDir (this=0x55555737eca0, dirname="db/lost") at /home/liuchang/WorkSpace/ceph/src/os/bluestore/BlueRocksEnv.cc:431
#5  0x00005555560222ec in rocksdb::(anonymous namespace)::Repairer::ArchiveFile (this=0x7fffffffbcd0, fname="db/MANIFEST-000001") at /home/liuchang/WorkSpace/ceph/src/rocksdb/db/repair.cc:565
#6  0x000055555601f773 in rocksdb::(anonymous namespace)::Repairer::Run (this=0x7fffffffbcd0) at /home/liuchang/WorkSpace/ceph/src/rocksdb/db/repair.cc:172
#7  0x0000555556022a14 in rocksdb::RepairDB (dbname="db", options=...) at /home/liuchang/WorkSpace/ceph/src/rocksdb/db/repair.cc:624
#8  0x0000555555ddeb5a in RocksDBStore::repair (this=0x5555572d0000) at /home/liuchang/WorkSpace/ceph/src/kv/RocksDBStore.cc:462
#9  0x0000555555ca1b65 in StoreTool::repair (this=0x7fffffffd4e0) at /home/liuchang/WorkSpace/ceph/src/tools/ceph_kvstore_tool.cc:270
#10 0x0000555555c9c900 in main (argc=4, argv=0x7fffffffd788) at /home/liuchang/WorkSpace/ceph/src/tools/ceph_kvstore_tool.cc:323
(gdb) f 4
#4  0x0000555555f34692 in BlueRocksEnv::CreateDir (this=0x55555737eca0, dirname="db/lost") at /home/liuchang/WorkSpace/ceph/src/os/bluestore/BlueRocksEnv.cc:431
warning: Source file is more recent than executable.
431         return err_to_status(r);
(gdb) l
426
427     rocksdb::Status BlueRocksEnv::CreateDir(const std::string& dirname)
428     {
429       int r = fs->mkdir(dirname);
430       if (r < 0)
431         return err_to_status(r);
432       return rocksdb::Status::OK();
433     }
434
435     rocksdb::Status BlueRocksEnv::CreateDirIfMissing(const std::string& dirname)
(gdb) p r
$1 = -17
(gdb) up
#5  0x00005555560222ec in rocksdb::(anonymous namespace)::Repairer::ArchiveFile (this=0x7fffffffbcd0, fname="db/MANIFEST-000001") at /home/liuchang/WorkSpace/ceph/src/rocksdb/db/repair.cc:565
565         env_->CreateDir(new_dir);  // Ignore error
(gdb) l
560         std::string new_dir;
561         if (slash != nullptr) {
562           new_dir.assign(fname.data(), slash - fname.data());
563         }
564         new_dir.append("/lost");
565         env_->CreateDir(new_dir);  // Ignore error
566         std::string new_file = new_dir;
567         new_file.append("/");
568         new_file.append((slash == nullptr) ? fname.c_str() : slash + 1);
569         Status s = env_->RenameFile(fname, new_file);

History

#1 Updated by Chang Liu about 2 years ago

  • Project changed from Ceph to RADOS
  • Subject changed from core dump when bluefs's create_dir returns -EEXIST to core dump when bluefs's mkdir returns -EEXIST

#3 Updated by Brad Hubbard about 2 years ago

  • Status changed from New to In Progress

#5 Updated by Chang Liu about 2 years ago

  • Status changed from In Progress to Need Review

#6 Updated by Chang Liu almost 2 years ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF