Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disk manager: boost::filesystem::status not implemented in arcch64 linux 4.14 #4205

Open
wey-gu opened this issue Apr 24, 2022 · 11 comments
Open
Labels
affects/none PR/issue: this bug affects none version. hacktoberfest hacktoberfest events severity/none Severity of bug type/bug Type: something is unexpected wontfix Solution: this will not be worked on recently

Comments

@wey-gu
Copy link
Contributor

wey-gu commented Apr 24, 2022

Please check the FAQ documentation before raising an issue

Describe the bug (required)

reported via https://discuss.nebula-graph.com.cn/t/topic/8487/37?u=wey , boost::filesystem::status() not implemented was encountered during meta boot.

maybe during boost::filesystem::exists in follow function ?

DiskManager::DiskManager(const std::vector<std::string>& dataPaths,
                         std::shared_ptr<thread::GenericWorker> bgThread)
    : bgThread_(bgThread) {
  try {
    // atomic is not copy-constructible
    std::vector<std::atomic_uint64_t> freeBytes(dataPaths.size() + 1);
    Paths* paths = new Paths();
    paths_.store(paths);
    size_t index = 0;
    for (const auto& path : dataPaths) {
      auto absolute = boost::filesystem::absolute(path);
      if (!boost::filesystem::exists(absolute)) {
        if (!boost::filesystem::create_directories(absolute)) {
          LOG(FATAL) << folly::sformat("DataPath:{} does not exist, create failed.", path);
        }
      } else if (!boost::filesystem::is_directory(absolute)) {
        LOG(FATAL) << "DataPath is not a valid directory: " << path;
      }
      auto canonical = boost::filesystem::canonical(path);
      auto info = boost::filesystem::space(canonical);
      paths->dataPaths_.emplace_back(std::move(canonical));
      freeBytes[index++] = info.available;
    }
    freeBytes_ = std::move(freeBytes);
  } catch (boost::filesystem::filesystem_error& e) {
    LOG(FATAL) << "DataPath invalid: " << e.what();
  }
  if (bgThread_) {
    bgThread_->addRepeatTask(FLAGS_disk_check_interval_secs * 1000, &DiskManager::refresh, this);
  }
}

Your Environments (required)

  • OS: uname -a kernel 4.14, aarch64
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id : 3.0.2

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Step 1
  2. Step 2
  3. Step 3

Expected behavior

Additional context

@wey-gu wey-gu changed the title disk manager: boost::filesystem::status not implemented in certain envrioment disk manager: boost::filesystem::status not implemented in arcch64 linux 4.14 Apr 24, 2022
@wey-gu
Copy link
Contributor Author

wey-gu commented Apr 25, 2022

Another user reported here: https://discuss.nebula-graph.com.cn/t/topic/8428/10?u=wey

Linux ds1 4.14.0-115.el7a.0.1.aarch64 #1 SMP Sun Nov 25 20:54:21 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

@wey-gu
Copy link
Contributor Author

wey-gu commented Apr 25, 2022

Not sure if it's a bug/upstream bug, but it's reported as unable to run Nebula on CentOS 7.4 ARM from different sources, thus I am labeling it as bug first.

@wey-gu wey-gu added the type/bug Type: something is unexpected label Apr 25, 2022
@Sophie-Xie Sophie-Xie added the need to discuss Solution: issue or PR without a clear conclusion on whether to handle it label Apr 28, 2022
@Sophie-Xie Sophie-Xie added wontfix Solution: this will not be worked on recently and removed need to discuss Solution: issue or PR without a clear conclusion on whether to handle it labels Aug 31, 2022
@wey-gu
Copy link
Contributor Author

wey-gu commented Nov 23, 2022

other users encounter this there days, too

https://discuss.nebula-graph.com.cn/t/topic/11239/17

@wey-gu wey-gu reopened this Nov 25, 2022
@wey-gu
Copy link
Contributor Author

wey-gu commented Nov 25, 2022

Reopen it as more users are hitting this.

ref: https://community-chat.nebula-graph.io/t/5161068/hi-everyone-i-ran-into-a-problem-starting-nebula-graph-metad

update: this could be reproduced in x86_64 Linux kernel 4.15

@SuperYoko
Copy link
Contributor

see: boostorg/filesystem@3e8c8b1
Compile with new boost later than 1.77 should be okay with some situation, but I'm not sure of it. I need to verify that later.

@wey-gu
Copy link
Contributor Author

wey-gu commented Mar 2, 2023

see: boostorg/filesystem@3e8c8b1 Compile with new boost later than 1.77 should be okay with some situation, but I'm not sure of it. I need to verify that later.

upstream awareness of this issue looks promising :D

@wey-gu
Copy link
Contributor Author

wey-gu commented May 9, 2023

another user hit this issue vesoft-inc/nebula-console#170

@CoderXionghs
Copy link

CoderXionghs commented Sep 24, 2023

I am also encountered this issue with start up a nebula-graph docker (3.6.0), and I solved it by update libseccomp-2.3.1-3 to libseccomp-2.3.1-4;
my os info: centos 7.6, linux kernel: 4.14.0-115.xxx , arm architecture;

but when i copyed the nebula binary file from docker to host, it can succsfully startup (without update libseccomp);

@wey-gu
Copy link
Contributor Author

wey-gu commented Sep 24, 2023

Thanks @CoderXionghs your precious attempts will help a lot more guys encountering this.

And it's so very valuable as only some ffi lib update would help/ help pointed to related cause to libseccomp w/o changing kernel.

@wey-gu
Copy link
Contributor Author

wey-gu commented Sep 25, 2023

@SuperYoko @dutor what do you think of this please, it seems the libseccomp that's related to syscall filtering could be related to how boost::filesystem::status() syscall behaves, should we highlight this in docs or?

@dutor
Copy link
Contributor

dutor commented Sep 26, 2023

I thought vesoft-inc/nebula-ent#2357 has addressed such an issue, again. But it seems there are other cases left.
I have processsed this issue for several times and there is no easy way to resolve it absolutely because of the way how docker works.

For this specific case, we could make a workaround to replace these boost interfaces. I think @SuperYoko could help on this.

@wey-gu wey-gu added the hacktoberfest hacktoberfest events label Sep 26, 2023
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Sep 26, 2023
@SuperYoko SuperYoko removed their assignment May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. hacktoberfest hacktoberfest events severity/none Severity of bug type/bug Type: something is unexpected wontfix Solution: this will not be worked on recently
Projects
Development

No branches or pull requests

5 participants