# Fdbserver test fails with assertion error

**URL:** <https://forums.foundationdb.org/t/fdbserver-test-fails-with-assertion-error/2674>\
**Category:** Running FoundationDB\
**Created:** [April 23, 2021, 7:28am UTC](https://forums.foundationdb.org/t/fdbserver-test-fails-with-assertion-error/2674 "2021-04-23T07:28:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![neelkanths](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/neelkanths/32/1067_2.png) [@neelkanths](https://forums.foundationdb.org/u/neelkanths)\
**Post date:** [April 23, 2021, 7:28am UTC](https://forums.foundationdb.org/t/fdbserver-test-fails-with-assertion-error/2674/1 "2021-04-23T07:28:05Z")

</div>

Hi,

I’m new to foundationdb and I’m trying to run some basic tests. I’m hitting assertion error when I tried to run InventoryTestSomeWrites. I have verified that foundationdb service is running ok and there are no errors.

Can someone please let me know what is the reason for getting assertion error and how do I fix it?

The tests/default.txt just has one test InventoryTestSomeWrites as shown below.

# tests/default.txt

testTitle=InventoryTestSomeWrites  
testName=InventoryTest  
transactionsPerSecond=10000.0  
testDuration=10.0  
fractionWriteTransactions=.1

# Test

fdbserver -r test

> startingConfiguration: start

> Run test:InventoryTestSomeWrites start
> 
> setting up test (InventoryTestSomeWrites)…
> 
> Test received trigger for setup…
> 
> running test (InventoryTestSomeWrites)…
> 
> Assertion count \>= 0 && count \< 1000000 failed @ /opt/foundation/ **sourcedir\_this\_is\_some\_very\_long\_name\_dir** /foundationdb/fdbserver/workloads/Inventory.actor.cpp 157:
> 
> addr2line -e fdbserver.debug -p -C -f -i 0x22c7754 0x16e2766 0x16e4d25 0x1cf6338 0x1ca8e88 0x1cf3527 0x1cf36c0 0x1cecbe8 0x1ce9218 0x1ce944c 0x1cf1f28 0x7ec418 0x21d5a15 0x21d5dc5 0xbcce70 0x2302524 0x781110 0x7fc78b0983d5
> 
> InventoryTest complete
> 
> Fatal Error: Operation failed

---

<div class="post-metadata">

**Author:** ![alexmiller](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/alexmiller/32/326_2.png) [@alexmiller](https://forums.foundationdb.org/u/alexmiller)\
**Post date:** [April 24, 2021, 8:22am UTC](https://forums.foundationdb.org/t/fdbserver-test-fails-with-assertion-error/2674/2 "2021-04-24T08:22:05Z")

</div>

The recommended way to run a suite of simulation tests locally is to invoke `ctest` in your build directory.

---

<div class="post-metadata">

**Author:** ![neelkanths](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/neelkanths/32/1067_2.png) [@neelkanths](https://forums.foundationdb.org/u/neelkanths)\
**Post date:** [April 26, 2021, 2:57pm UTC](https://forums.foundationdb.org/t/fdbserver-test-fails-with-assertion-error/2674/3 "2021-04-26T14:57:05Z")

</div>

Thank you for the reply. I’m running into some error when I tried to run the test through TestRunner.py. Could you please check below and let me know how to run this correctly.

Is there any documentation with steps on how to run these tests? That would be really helpful.

These are the two ctest files I see in my source and build directories:

> ./foundationdb/tests/CTestCustom.ctest  
> ./build/CTestCustom.ctest

[nkss@buildbox2 TestRunner]$ pwd  
local\_cluster.py logs TestDirectory.py TestDirectory.pyc testfile.txt TestRunner.py tmp\_cluster.py

[nkss@buildbox2 TestRunner]$ ./TestRunner.py -b /home/nkss/git/fdb/build -s /home/nkss/git/fdb/foundationdb -t simulation testfile.txt

> Traceback (most recent call last):  
> File “./TestRunner.py”, line 444, in   
> res = run\_simulation\_test(basedir, args)  
> File “./TestRunner.py”, line 331, in run\_simulation\_test  
> ‘test\_{}’.format(options.name.replace(‘/’, ‘\_’)))  
> AttributeError: ‘NoneType’ object has no attribute 'replace

---

<div class="post-metadata">

**Author:** ![neelkanths](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/neelkanths/32/1067_2.png) [@neelkanths](https://forums.foundationdb.org/u/neelkanths)\
**Post date:** [April 27, 2021, 5:52am UTC](https://forums.foundationdb.org/t/fdbserver-test-fails-with-assertion-error/2674/4 "2021-04-27T05:52:58Z")

</div>

I figured out what I was missing. Now, I’m able to run the test via ctest but I’m getting simfdb not found error. How do I create simdb? Could you please get to back to me.

FileNotFoundError: [Errno 2] No such file or directory: ‘/home/nkss/git/fdb/build/test\_runs/2021\_04\_26\_\_22\_42\_39/test\_SimpleExternalTest/simfdb’

**Excerpts from test output**

## 2021-04-26 22:42:39,604 - 1062 - INFO - COMMAND: /home/nkss/git/fdb/build/bin/fdbserver -r simulation -s 1530991082 -b on --crash --trace\_format xml -s 1530991082 -f /home/nkss/git/fdb/foundationdb/tests/SimpleExternalTest.txt Delete /home/nkss/git/fdb/build/test\_runs/2021\_04\_26\_\_22\_42\_39/test\_SimpleExternalTest/simfdb Traceback (most recent call last): File “/home/nkss/git/fdb/foundationdb/tests/TestRunner/TestRunner.py”, line 444, in res = run\_simulation\_test(basedir, args) File “/home/nkss/git/fdb/foundationdb/tests/TestRunner/TestRunner.py”, line 393, in run\_simulation\_test shutil.rmtree(os.path.join(wd, ‘simfdb’)) File “/usr/lib64/python3.6/shutil.py”, line 477, in rmtree onerror(os.lstat, path, sys.exc\_info()) File “/usr/lib64/python3.6/shutil.py”, line 475, in rmtree orig\_st = os.lstat(path) **FileNotFoundError: [Errno 2] No such file or directory: ‘/home/nkss/git/fdb/build/test\_runs/2021\_04\_26\_\_22\_42\_39/test\_SimpleExternalTest/simfdb’** Test time = 0.25 sec

Test Failed.  
“SimpleExternalTest” end time: Apr 26 22:42 PDT  
“SimpleExternalTest” time elapsed: 00:00:00
