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

crash test failing on non-tmpfs #7535

Open
ajkr opened this issue Oct 11, 2020 · 1 comment
Open

crash test failing on non-tmpfs #7535

ajkr opened this issue Oct 11, 2020 · 1 comment
Labels
bug Confirmed RocksDB bugs up-for-grabs Up for grabs

Comments

@ajkr
Copy link
Contributor

ajkr commented Oct 11, 2020

When run on non-tmpfs, python tools/db_crashtest.py blackbox --simple regularly fails with a MultiGet() error looking like this:

MultiGet error: IO error: Req failed: /tmp/rocksdb_crashtest_blackboxEJqTfu/009243.sst: Unknown error -22
MultiGet error: IO error: Req failed: /tmp/rocksdb_crashtest_blackboxEJqTfu/009255.sst: Unknown error -22
MultiGet error: IO error: Req failed: /tmp/rocksdb_crashtest_blackboxEJqTfu/009255.sst: Unknown error -22
MultiGet error: IO error: Req failed: /tmp/rocksdb_crashtest_blackboxEJqTfu/009255.sst: Unknown error -22
MultiGet error: IO error: Req failed: /tmp/rocksdb_crashtest_blackboxEJqTfu/009255.sst: Unknown error -22
MultiGet error: IO error: Req failed: /tmp/rocksdb_crashtest_blackboxEJqTfu/009243.sst: Unknown error -22

It's possible our CI always uses tmpfs which might have led us to miss this. cc @anand1976

@mrambacher
Copy link
Contributor

Looking at this a little further, can someone explain to me what TEST_TMPDIR is supposed to mean? On Linux, it IS the test directory to run under. If it it set, the TestDirectory will exactly that value.
const char* env = getenv("TEST_TMPDIR");
if (env && env[0] != '\0') {
*result = env;
} else {
char buf[100];
snprintf(buf, sizeof(buf), "/tmp/rocksdbtest-%d", int(geteuid()));
*result = buf;
}

On Windows, it is a prefix:

const char* env = getenv("TEST_TMPDIR");
if (env && env[0] != '\0') {
output = env;
} else {
env = getenv("TMP");

if (env && env[0] != '\0') {
  output = env;
} else {
  output = "c:\\tmp";
}

}
CreateDir(output, opts, dbg);

output.append("\testrocksdb-");
output.append(std::to_string(GetCurrentProcessId()));

CreateDir(output, opts, dbg);

To me, it seems like they are both potentially wrong. If TEST_TMPDIR is meant to be a full-path, then Windows is wrong. If it is not meant to be a full path, then I think the Posix version should check the value of TMPDIR and not just assume /tmp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed RocksDB bugs up-for-grabs Up for grabs
Projects
None yet
Development

No branches or pull requests

2 participants