[SPDK] Re: Rocksdb with SPDK
dimitra.giantsidi at gmail.com
| Newsgroups | dev.linux.lists.spdk |
|---|---|
| Message-ID | <[email protected]> |
Hi Benjamin,
Thank you for your prompt reply!
I got rid of the "Not implemented"-error by working on a more "stable" and sane compiler/linker environment -- thanks again for your help.
However, even with a stable gcc release I am having some important (might trivial) questions.
All in all, I want to use the rocksdb logging interface (based on blobfs) for a very simple parallel (multithreaded) logging application.
In particular, I want to measure the time a thread takes to append and sync (to the disk) manually some data (for benchmarking purposes).
The workflow of my code is simple (I can attach my code if it is required :)):
-- in the main function I am creating a "rocksdb::NewSpdkEnv()" which is global and thus visible to all application threads.
-- Also the main thread creates a unique-for-each-thread "NewWritableFile(fname, &file, soptions);" which is of type SpdkWritableFile and forwards the unique_ptr of it to the thread function.
-- Afterwards each thread will append data on its assigned file and also might invoke Sync().
However, even this code works fine when using the kernel driver, it does not work with spdk (breaks with a segfault). The trace of the gdb is not really deterministic:
"Thread 4 "spdk_rocksdb" received signal SIGSEGV, Segmentation fault.
0x00000000008c1734 in alloc_fs_request (channel=channel(a)entry=0x30) at blobfs.c:264
264 if (channel->sync) {
"
Any idea of what it might be? Is the logic of my application orthogonal to the context of the SpdkEnv() for rocksdb?
Lastly, does the " __thread struct sync_args g_sync_args;" in "spdk/lib/rocksdb/env_spdk.cc" play any role when spawning new threads?
I feel that my error is related to how spdk channels are configured regarding to the thread_context information.
Any help would be highly appreciated :)
Thank you again for your time,
Dimitra