westerndigitalcorporation / zenfs

ZenFS is a storage backend for RocksDB that enables support for ZNS SSDs and SMR HDDs.
GNU General Public License v2.0
243 stars 88 forks source link

db_bench segfaults on malformed URI string #115

Closed yhr closed 2 years ago

yhr commented 2 years ago

./db_bench --benchmarks=fillseq --num=1000000 --value_size=800 --histogram --fs_uri=zenfs://nvme1n1 Received signal 11 (Segmentation fault)

0 ./db_bench(+0x2a2f98) [0x55b095471f98] ?? ??:0

1 ./db_bench(+0xb4cb6) [0x55b095283cb6] ?? ??:0

2 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f0667bd70b3] ?? ??:0

3 ./db_bench(+0xb36ae) [0x55b0952826ae] ?? ??:0

--fs_uri=zenfs://nvme1n1 is not correct, it needs a dev: prefix, but the error should not result in a segfault.

aravind-wdc commented 2 years ago

This issue is not seen with latest rocksdb master, after PR https://github.com/facebook/rocksdb/pull/9333

db_bench fails, instead of segmentation fault. Rocksdb is now propagating the error code from underlying plugin to the application.

sudo ./db_bench --benchmarks=fillseq --num=1000000 --value_size=800 --histogram --fs_uri=zenfs://nvme0n1 Failed creating env: Invalid argument: Malformed URI: zenfs://nvme0n1

aravind-wdc commented 2 years ago

Can close this now.