kazuhisya / dm-writeboost-rpm

dm-writeboost rpm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

thread 'main' panicked at 'Couldn't parse as i32: ParseIntError { kind: Overflow }', src/libcore/result.rs:799

tchwpkgorg opened this issue · comments

I'm getting the following when trying to create a device - not sure how to debug this:

# wbcreate vz /dev/sda5 /dev/nvme0n1
thread 'main' panicked at 'Couldn't parse as i32: ParseIntError { kind: Overflow }', src/libcore/result.rs:799
stack backtrace:
   1:     0x7f6acc2bb178 - std::sys::backtrace::tracing::imp::write::h6f1d53a70916b90d
                        at /builddir/build/BUILD/rustc-1.13.0/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x7f6acc2bfccf - std::panicking::default_hook::{{closure}}::h137e876f7d3b5850
                        at /builddir/build/BUILD/rustc-1.13.0/src/libstd/panicking.rs:247
   3:     0x7f6acc2bec55 - std::panicking::default_hook::h0ac3811ec7cee78c
                        at /builddir/build/BUILD/rustc-1.13.0/src/libstd/panicking.rs:263
   4:     0x7f6acc2bf1f7 - std::panicking::rust_panic_with_hook::hc303199e04562edf
                        at /builddir/build/BUILD/rustc-1.13.0/src/libstd/panicking.rs:451
   5:     0x7f6acc2bf084 - std::panicking::begin_panic::h6ed03353807cf54d
                        at /builddir/build/BUILD/rustc-1.13.0/src/libstd/panicking.rs:413
   6:     0x7f6acc2befa9 - std::panicking::begin_panic_fmt::hc321cece241bb2f5
                        at /builddir/build/BUILD/rustc-1.13.0/src/libstd/panicking.rs:397
   7:     0x7f6acc2bef37 - rust_begin_unwind
                        at /builddir/build/BUILD/rustc-1.13.0/src/libstd/panicking.rs:373
   8:     0x7f6acc2ca67d - core::panicking::panic_fmt::h27224b181f9f037f
                        at /builddir/build/BUILD/rustc-1.13.0/src/libcore/panicking.rs:69
   9:     0x7f6acc2b1015 - core::result::unwrap_failed::h16b0af270ccf8f69
  10:     0x7f6acc2b1ce5 - lib::BlockDevice::size::ha6481c7a1ea3aa53
  11:     0x7f6acc2584dc - wbcreate::main::h1f14cd61e8afc4e1
  12:     0x7f6acc2c76fa - __rust_maybe_catch_panic
                        at /builddir/build/BUILD/rustc-1.13.0/src/libpanic_unwind/lib.rs:91
  13:     0x7f6acc2be4aa - std::rt::lang_start::h538f8960e7644c80
                        at /builddir/build/BUILD/rustc-1.13.0/src/libstd/panicking.rs:332
                        at /builddir/build/BUILD/rustc-1.13.0/src/libstd/panic.rs:311
                        at /builddir/build/BUILD/rustc-1.13.0/src/libstd/rt.rs:57
  14:     0x7f6acb656b34 - __libc_start_main
  15:     0x7f6acc255328 - <unknown>
  16:                0x0 - <unknown>

@tchwpkgorg

Thanks for reporting. I will ask you some questions on behave of @kazuhisya .

  1. What is your OS? Please give me uname -a
  2. Is /dev/sda5 is normal HDD? Please give me blockdev --getsz /dev/sda5
  3. The caching device looks NVMe device. Please give me blockdev --getsz /dev/nvme0n1?

@tchwpkgorg
Hi, Thank you for the report.

Could you please give me the following results and results of @akiradeveloper 's question?

  1. rpm -qa | grep kernel | sort
  2. rpm -qa | grep write | sort

and the result of lsblk would help too.

Here is is. The system in OpenVZ 7, based on CentOS/RHEL.

/dev/sda5 is part of a hardware RAID (adaptec).

# uname -a
Linux sogo 3.10.0-327.36.1.vz7.20.18 #1 SMP Tue Dec 20 13:52:43 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux

# blockdev --getsz /dev/sda5
15504236544

# blockdev --getsz /dev/nvme0n1
781422768

# rpm -qa | grep kernel | sort
abrt-addon-kerneloops-2.1.11-36.vl7.1.x86_64
kernel-tools-3.10.0-514.2.2.vl7.x86_64
kernel-tools-libs-3.10.0-514.2.2.vl7.x86_64
readykernel-7-22.vl7.noarch
readykernel-scan-0.7-1.vl7.noarch
vzkernel-3.10.0-327.36.1.vz7.20.18.x86_64
vzkernel-debug-devel-3.10.0-327.36.1.vz7.20.18.x86_64
vzkernel-devel-3.10.0-327.36.1.vz7.20.18.x86_64
vzkernel-headers-3.10.0-327.36.1.vz7.20.18.x86_64

# rpm -qa | grep write | sort
dm-writeboost-dkms-2.2.6-1dkms.el7.centos.noarch
dm-writeboost-tools-1.0.0-1.git90fd362.el7.centos.x86_64
writeboost-1.20160718-1.git37dc927.el7.centos.noarch

# lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda       8:0    1   7.3T  0 disk
├─sda1    8:1    1     1M  0 part
├─sda2    8:2    1  1023M  0 part /boot
├─sda3    8:3    1    32G  0 part [SWAP]
├─sda4    8:4    1    24G  0 part /
└─sda5    8:5    1   7.2T  0 part
  └─vz  252:0    0   7.2T  0 dm   /vz
nvme0n1 259:0    0 372.6G  0 disk
└─vz    252:0    0   7.2T  0 dm   /vz

I was able to create the device with writeboost from here: https://gitlab.com/onlyjob/writeboost (it's a simple shell script).

@tchwpkgorg Thanks. I see. As the error message tells parsing the size of sda5 failed because the result type is i32, which only covers up to 1TB. It's a simple bug.

I will fix the program later. Thanks for reporting.

Another good finding is that dm-writeboost can work with nvme device. It's recognized as a normal block device.

Thank you for the details.

I will ship a new dm-writeboost-tools package when upstream is finished working.
btw, I have never tried the operation in the OpenVZ kernel with dm-writeboost. I will try later.