microsoft / microsoft/SPTAG

test failure when building on Linux in tmpfs due to the use of `O_DIRECT`

Open
#329 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
5k
Forks
622
Avg merge
8h 37m
Merged PRs (30d)
5

Description

When building SPTAG on Linux in a tmpfs (a RAM-only filesystem), the tests fail because they open files with O_DIRECT but that isn't supported on tmpfs by current versions of Linux.

1: [4] Failed to create file handle: SPANN/SPTAGFullList.bin: Invalid argument
1: [4] Cannot open file:SPANN/SPTAGFullList.bin!
1: [4] Cannot Load SSDIndex!
1: ./Test/src/AlgoTest.cpp(45): error: in "AlgoTest/SPANNTest": check SPTAG::ErrorCode::Success == vecIndex->SaveIndex(out) has failed

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Test/src/AlgoTest.cpp at line 45 and reproduce the failing SPANNTest on a Linux tmpfs. Trace the file-opening path that uses O_DIRECT and verify that the tests complete successfully on tmpfs without the invalid-argument failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, operating-systems, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.