-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
env_test failure #977
Comments
Thanks for reporting. Does your filesystem/kernel version fall outside the range mentioned here: https://github.com/facebook/rocksdb/blob/master/util/io_posix.cc#L551-L561 ? I'll think about how to make these tests less platform-dependent, but just wanted to make sure this is the cause of your issue first. |
Thanks for following up. I am using ext4 on a 2.6.32-358.el6.x86_64 kernel. What is the impact of this test failing? Do you recommend that we move to ext3 (it is unlikely we will go to a 3.0 kernel for now). Thanks again. |
Summary: see #977; there are issues with fallocate() on certain filesystems/kernel versions that can lead it to pre- allocating blocks but never freeing them, even if they're unused. Test Plan: verified build commands omit DROCKSDB_FALLOCATE_PRESENT when this env variable is set. without disabling it: $ ROCKSDB_NO_FBCODE=1 make -n env_test | grep -q DROCKSDB_FALLOCATE_PRESENT ; echo $? 0 with disabling it: $ ROCKSDB_NO_FBCODE=1 DISABLE_FALLOCATE=1 make -n env_test | grep -q DROCKSDB_FALLOCATE_PRESENT ; echo $? 1 Reviewers: kradhakrishnan, yhchiang, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D54069
With the commit above, you can set the environment variable ROCKSDB_DISABLE_FALLOCATE=1 when running "make" to avoid fallocate() altogether. I'd expect this is better for your platform since otherwise it wouldn't be able to deallocate extra pre-allocated blocks. Let us know if you have further questions! |
Thanks for the change. I get the following error while building the env_test now: util/env_test.cc: In function ‘bool rocksdb::ioctl_support__FS_IOC_GETVERSION(const string&)’: make shared_library worked fine. I only got a warning (which I believe I also got prior to the latest commit), utilities/transactions/transaction_base.cc: In member function ‘virtual void rocksdb::TransactionBaseImpl::UndoGetForUpdate(rocksdb::ColumnFamilyHandle*, const rocksdb::Slice&)’: |
Summary: Previously compilation failed when ROCKSDB_NO_FBCODE=1 because fcntl.h wasn't included for open(). Related issue: #977 Test Plan: verified below command works now: $ make clean && ROCKSDB_NO_FBCODE=1 ROCKSDB_DISABLE_FALLOCATE=1 make -j32 env_test Reviewers: sdong, yhchiang, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D54135
Thanks again, that was actually another unrelated bug, which should be fixed now. |
Thanks! Now everything passes.I appreciate the quick response. I am closing the issue now. |
I did a checkout today afternoon and I got one of the tests failing (see below). It fails repeatedly, although I don't get a crash in subsequent iterations.
I was able to reproduce it with ulimit -c unlimited and get the coredump stacktrace, see below.
===== Running env_test
[==========] Running 15 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 15 tests from EnvPosixTest
[ RUN ] EnvPosixTest.RunImmediately
[ OK ] EnvPosixTest.RunImmediately (101 ms)
[ RUN ] EnvPosixTest.UnSchedule
[ OK ] EnvPosixTest.UnSchedule (0 ms)
[ RUN ] EnvPosixTest.RunMany
[ OK ] EnvPosixTest.RunMany (100 ms)
[ RUN ] EnvPosixTest.StartThread
[ OK ] EnvPosixTest.StartThread (100 ms)
[ RUN ] EnvPosixTest.TwoPools
[ OK ] EnvPosixTest.TwoPools (8007 ms)
[ RUN ] EnvPosixTest.DecreaseNumBgThreads
[ OK ] EnvPosixTest.DecreaseNumBgThreads (7303 ms)
[ RUN ] EnvPosixTest.RandomAccessUniqueID
[ OK ] EnvPosixTest.RandomAccessUniqueID (1001 ms)
[ RUN ] EnvPosixTest.AllocateTest
util/env_test.cc:650: Failure
Expected: ((f_stat.st_size + kPageSize + kBlockSize - 1) / kBlockSize) >= ((unsigned int)f_stat.st_blocks), actual: 2056 vs 204800
terminate called after throwing an instance of 'testing::internal::GoogleTestFailureException'
what(): util/env_test.cc:650: Failure
Expected: ((f_stat.st_size + kPageSize + kBlockSize - 1) / kBlockSize) >= ((unsigned int)f_stat.st_blocks), actual: 2056 vs 204800
/bin/sh: line 7: 24328 Aborted (core dumped) ./$t
make: *** [check] Error 1
#0 0x00000034bf8328a5 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.5-7.el6_0.x86_64 glibc-2.12-1.107.el6.x86_64 libgcc-4.4.7-3.el6.x86_64 libstdc++-4.4.7-3.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0 0x00000034bf8328a5 in raise () from /lib64/libc.so.6
#1 0x00000034bf834085 in abort () from /lib64/libc.so.6
#2 0x00000034cc4bea5d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#3 0x00000034cc4bcbe6 in ?? () from /usr/lib64/libstdc++.so.6
#4 0x00000034cc4bcc13 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5 0x00000034cc4bcc96 in __cxa_rethrow () from /usr/lib64/libstdc++.so.6
#6 0x00000000006881ab in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (this=Unhandled dwarf expression opcode 0xf3
) at third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:3863
#7 testing::UnitTest::Run (this=Unhandled dwarf expression opcode 0xf3
) at third-party/gtest-1.7.0/fused-src/gtest/gtest-all.cc:5681
#8 0x000000000040a3b1 in RUN_ALL_TESTS (argc=1, argv=Unhandled dwarf expression opcode 0xf3
) at ./third-party/gtest-1.7.0/fused-src/gtest/gtest.h:20722
#9 main (argc=1, argv=Unhandled dwarf expression opcode 0xf3
) at util/env_test.cc:1024
The text was updated successfully, but these errors were encountered: