vmware / splinterdb

High Performance Embedded Key-Value Store
https://splinterdb.org
Apache License 2.0
682 stars 57 forks source link

Error On Running Examples #600

Open aaditya2200 opened 10 months ago

aaditya2200 commented 10 months ago

I am trying to integrate splinter DB into an application of mine. I tried running the intro examples, and I encountered this error. Assertion failed at src/clockcache.c:2234:clockcache_get_internal(): "SUCCESS(status)". Could this be because the DB file does not exist? If yes, is there any way to run splinter DB without the DB file?

aaditya2200 commented 10 months ago

I narrowed it down to a pread call which is happening in laio_read

rtjohnso commented 10 months ago

Hi Aaditya,

Thanks for the bug report.

Is one of the examples failing, or is it your code that's failing? I just built and successfully ran the examples in the current main branch.

What OS are you compiling and running on?

If it's your own code that is encountering the error, can you send me an example that you think should work but is not working?

It is not currently possible to run splinter w/o a database file. However, splinterdb_create should create the file for you.

Best, Rob

On Fri, Nov 17, 2023 at 2:22 PM Aaditya Rangarajan @.***> wrote:

I narrowed it down to a pread call which is happening in laio_read

— Reply to this email directly, view it on GitHub https://github.com/vmware/splinterdb/issues/600#issuecomment-1817191187, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA45FRKX66OWWX7VHGHBOEDYE7PRRAVCNFSM6AAAAAA7QGSWQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGE4TCMJYG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

aaditya2200 commented 10 months ago

Hi Rob,

I am just trying to run splintered_intro_example on Ubuntu 18.04. I tried debugging it and narrowed it down to src/platform_linux/laio.c, in the laio_read function. The pread() is throwing an error. (It says operation not supported, but I am running the ext3 file system). I am just trying to create a splinterDB instance and insert elements into it, using the same code as shown in the example. Best, Aaditya.

rtjohnso commented 10 months ago

It looks like this is due to the fact that ext3 does not support fallocate. There is an uncaught failure in the fallocate call earlier when splinter is creating the database.

I've pushed a PR for splinter to catch the error.

This won't solve your problem on ext3, though. It will just result in a more meaningful error message.

Can you move to ext4?

Best, Rob

On Fri, Nov 17, 2023 at 5:20 PM Aaditya Rangarajan @.***> wrote:

Hi Rob,

I am just trying to run splintered_intro_example on Ubuntu 18.04. I tried debugging it and narrowed it down to src/platform_linux/laio.c, in the laio_read function. The pread() is throwing an error. (It says operation not supported, but I am running the ext3 file system). I am just trying to create a splinterDB instance and insert elements into it, using the same code as shown in the example. Best, Aaditya.

— Reply to this email directly, view it on GitHub https://github.com/vmware/splinterdb/issues/600#issuecomment-1817307627, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA45FRK7NK75TMM5KKZVVEDYFAEPPAVCNFSM6AAAAAA7QGSWQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGMYDONRSG4 . You are receiving this because you commented.Message ID: @.***>

aaditya2200 commented 10 months ago

Oh sure, thank you! Yes, we will move to ext4. Thanks!

Aaditya.