Grin: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Chain(Error { inner:

Created on 10 Jan 2019  路  25Comments  路  Source: mimblewimble/grin

Hello,
On a Debian 9.6, downloaded grin v0.5.1, install ok, md5sum ok,
just launching

grin --floonet

... and nothing happens.
Not even a grin process running.

edit: the issue is still present with grin v0.5.2

grin-server.log

20190110 16:19:40.169 INFO grin_util::logger - log4rs is initialized, file level: Debug, stdout level: Warn, min. level: Debug
20190110 16:19:40.169 INFO grin - Using configuration file at /home/userz/.grin/floo/grin-server.toml
20190110 16:19:40.169 INFO grin - This is Grin version 0.5.1 (git v0.5.1), built for x86_64-unknown-linux-gnu by rustc 1.31.1 (b6c32da9b 2018-12-18).
20190110 16:19:40.169 DEBUG grin - Built with profile "release", features "".
20190110 16:19:40.169 WARN grin::cmd::server - Starting GRIN in UI mode...
20190110 16:19:40.169 INFO grin_servers::grin::server - Starting server, genesis block: edc758c1
20190110 16:19:40.202 DEBUG grin_chain::txhashset::txhashset - Error returned, discarding txhashset extension: Other Error: output vs rproof MMRs different sizes 
 Cause: Unknown 
 Backtrace: 
20190110 16:19:40.219 ERROR grin_util::logger - 
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Chain(Error { inner: 

Other Error: output vs rproof MMRs different sizes })': libcore/result.rs:1009stack backtrace:
   0:     0x55982a88665d - backtrace::backtrace::trace::hd74837959dc31a2c
   1:     0x55982a885872 - ::default::hfbe03539066da14f
   2:     0x55982a8858e9 - backtrace::capture::Backtrace::new::hd9d47426559d8b68
   3:     0x55982a80f390 - grin_util::logger::send_panic_to_log::{{closure}}::h0919c24963251ad6
   4:     0x55982a9570e6 - std::panicking::rust_panic_with_hook::hde420d6fd4455550
                        at libstd/panicking.rs:480
   5:     0x55982a956c31 - std::panicking::continue_panic_fmt::h8f394f3c578bcc76
                        at libstd/panicking.rs:390
   6:     0x55982a956b15 - rust_begin_unwind
                        at libstd/panicking.rs:325
   7:     0x55982a9a0b8c - core::panicking::panic_fmt::hca5dc4e8b320bc56
                        at libcore/panicking.rs:77
   8:     0x55982a0dbf49 - core::result::unwrap_failed::h31e8096bf431f8db
   9:     0x55982a0947b0 - grin::cmd::server::start_server::hb8666c7b00b2e941
  10:     0x55982a0953c8 - grin::cmd::server::server_command::ha8bb4497bcf97bf1
  11:     0x55982a11fd26 - grin::real_main::hb39a0190d567a13c
  12:     0x55982a11e665 - grin::main::hab1e977be2785e7c
  13:     0x55982a0f00b2 - std::rt::lang_start::{{closure}}::h2873acc0c7532388
  14:     0x55982a956ab2 - std::rt::lang_start_internal::{{closure}}::hafa8ecdacd368ebb
                        at libstd/rt.rs:59
                         - std::panicking::try::do_call::h8c0dbb48abbdf4df
                        at libstd/panicking.rs:310
  15:     0x55982a969189 - __rust_maybe_catch_panic
                        at libpanic_unwind/lib.rs:102
  16:     0x55982a93830a - std::panicking::try::hbc21637ba5f64d73
                        at libstd/panicking.rs:289
                         - std::panic::catch_unwind::h954917b922b8d970
                        at libstd/panic.rs:392
                         - std::rt::lang_start_internal::h5b2de3cc38c3b406
                        at libstd/rt.rs:58
  17:     0x55982a120a74 - main
  18:     0x7fe95dd722e0 - __libc_start_main
  19:     0x55982a060f80 - 
  20:                0x0 - 

I would be happy to help with that.
How could I diagnose more ?
Thanks

bug help wanted

Most helpful comment

It's because we compile grin with avx/avx2 support, so it fails on cpus without those extensions.
I'll open an issue to track it

 elfx86exts grin
MODE64 (call)
CMOV (cmova)
SSE1 (movups)
SSE2 (movq)
SSSE3 (pshufb)
AVX (vxorps)
AVX2 (vpcmpeqd)
BMI2 (mulx)
ADX (adcx)
BMI (andn)
CPU Generation: Unknown

All 25 comments

Did you get this issue solved

@h1-cwc wrote

Did you get this issue solved

Not at the moment.
I read several people having issues with binaries, but succeeding with a build.
So it's what I try now (not finished).

I guess the issue may be related to character encoding, or a missing message ?

This -

Other Error: output vs rproof MMRs different sizes

suggests the chain_data is getting corrupted somehow (tl;dr they should be the same size).

Can you try clearing out your chain_data dir and trying to sync again?
If its still occurring then I'm guessing its some kind of binary compatibility issue.

@antiochp , thanks for your answer.
So I deleted everything under the chain_data dir
and retried grin --floonet (this is with the downloaded binary v0.5.2)
But I got the same results:


20190115 11:12:10.723 INFO grin_util::logger - log4rs is initialized, file level: Debug, stdout level: Warn, min. level: Debug
20190115 11:12:10.723 INFO grin - Using configuration file at /home/userz/.grin/floo/grin-server.toml
20190115 11:12:10.723 INFO grin - This is Grin version 0.5.2 (git v0.5.2), built for x86_64-unknown-linux-gnu by rustc 1.31.1 (b6c32da9b 2018-12-18).
20190115 11:12:10.723 DEBUG grin - Built with profile "release", features "".
20190115 11:12:10.723 WARN grin::cmd::server - Starting GRIN in UI mode...
20190115 11:12:10.723 INFO grin_servers::grin::server - Starting server, genesis block: edc758c1370d...
20190115 11:13:04.931 INFO grin_util::logger - log4rs is initialized, file level: Debug, stdout level: Warn, min. level: Debug
20190115 11:13:04.931 INFO grin - Using configuration file at /home/userz/.grin/floo/grin-server.toml
20190115 11:13:04.931 INFO grin - This is Grin version 0.5.2 (git v0.5.2), built for x86_64-unknown-linux-gnu by rustc 1.31.1 (b6c32da9b 2018-12-18).
20190115 11:13:04.931 DEBUG grin - Built with profile "release", features "".
20190115 11:13:04.931 WARN grin::cmd::server - Starting GRIN in UI mode...
20190115 11:13:04.931 INFO grin_servers::grin::server - Starting server, genesis block: edc758c1370d...
20190115 11:13:04.967 DEBUG grin_chain::txhashset::txhashset - Error returned, discarding txhashset extension: Other Error: output vs rproof MMRs different sizes 
 Cause: Unknown 
 Backtrace: 
20190115 11:13:04.987 ERROR grin_util::logger - 
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Chain(Error { inner: 

Other Error: output vs rproof MMRs different sizes })': libcore/result.rs:1009stack backtrace:
   0:     0x555649b8f0bd - backtrace::backtrace::trace::hd74837959dc31a2c
   1:     0x555649b8e2d2 - ::default::hfbe03539066da14f
   2:     0x555649b8e349 - backtrace::capture::Backtrace::new::hd9d47426559d8b68
   3:     0x555649b17f50 - grin_util::logger::send_panic_to_log::{{closure}}::h9dfd05e2f10c03c7
   4:     0x555649c5fb46 - std::panicking::rust_panic_with_hook::hde420d6fd4455550
                        at libstd/panicking.rs:480
   5:     0x555649c5f691 - std::panicking::continue_panic_fmt::h8f394f3c578bcc76
                        at libstd/panicking.rs:390
   6:     0x555649c5f575 - rust_begin_unwind
                        at libstd/panicking.rs:325
   7:     0x555649ca95ec - core::panicking::panic_fmt::hca5dc4e8b320bc56
                        at libcore/panicking.rs:77
   8:     0x5556493d4dc9 - core::result::unwrap_failed::ha0c3868a9b78e917
   9:     0x555649390030 - grin::cmd::server::start_server::hd08f9d9ce0e1a175
  10:     0x555649390ce8 - grin::cmd::server::server_command::hd6ce3947e95b34a1
  11:     0x55564941bc56 - grin::real_main::hb3cbcedf020dd0fa
  12:     0x55564941a445 - grin::main::h6cbf10070b5d4461
  13:     0x5556493f1a22 - std::rt::lang_start::{{closure}}::h355f6dda1d0140bb
  14:     0x555649c5f512 - std::rt::lang_start_internal::{{closure}}::hafa8ecdacd368ebb
                        at libstd/rt.rs:59
                         - std::panicking::try::do_call::h8c0dbb48abbdf4df
                        at libstd/panicking.rs:310
  15:     0x555649c71be9 - __rust_maybe_catch_panic
                        at libpanic_unwind/lib.rs:102
  16:     0x555649c40d6a - std::panicking::try::hbc21637ba5f64d73
                        at libstd/panicking.rs:289
                         - std::panic::catch_unwind::h954917b922b8d970
                        at libstd/panic.rs:392
                         - std::rt::lang_start_internal::h5b2de3cc38c3b406
                        at libstd/rt.rs:58
  17:     0x55564941c9e4 - main
  18:     0x7f4e0918b2e0 - __libc_start_main
  19:     0x55564935d2c0 - 
  20:                0x0 - 

I did the same thing of deleting the chain_data and it still produced the issue.

I built a new one from the source code and I'm not having the problems anymore.

same as @h1-cwc ,
I build from the source (grin v0.5.2-22), and at least it is starting, the ascii screen is here, with connected peers, etc.

These all do seem to suggest an incompatibility (somewhere) between the pre-built binaries and the system you are running this on.

@antiochp I was running Ubuntu 16.04 server, fresh install

Getting this as well on Mac OS Mojave. Is this Kernel panic? Is this error normal until the mainnet launches? ERROR grin_util::logger -
thread 'main' panicked at 'called Result::unwrap() on an Err value: Chain(Error { inner:

Two days ago I was building and running from source successfully. When I pulled the latest changes last night and rebuilt the binary, I started to get the error mentioned here. I tried wiping the repo directory and starting from scratch with the same issue. Running the pre-built binary works fine. Ubuntu 16.04.

EDIT: Now working for me after pulling latest master.

@antiochp I agree with your observation the there is some incompatibility somewhere. I'm running two nodes, release 1.0.0 download. One node is fine. The other crashes with this message. Building from master on the problematic node works. Both nodes run Ubuntu 16.04.5.

Perhaps something to do with either mmap or croaring, that's the 2 that would impact MMRs. It'd be useful to narrow it down to the line or method that fails, perhaps some good old debugging with println!("here") ?

Oh I made the dup. Sorry, I tried searching but I guess those qutoes messed the search.
So as a last result I compiled from source and the compiled binary works :-D

I have the same issue with the released version.
After building from latest master and removing chain_data it worked.

@karstennilsen What platform are you on? Can you be specific? What OS, version thereof, what CPU?

Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-43-generic x86_64)
on hardware:
Asrock H110 Pro BTC+ Intel H110 LGA 1151 (Socket H4) ATX
Patriot Memory 8GB PC4-24000 8GB DDR4 3000MHz geheugenmodule
Intel Pentium G4560 processor 3,5 GHz Box 3 MB

I have exactly the same error, i have build binaries from source.
Linux 4.16.13-galliumos x86_64
HW: Intel(R) Celeron(R) CPU N3160 @ 1.60GHz

echo $? after running ./grin gives code 101, log messages are the same as above.

On Ubuntu 16.04.1 x86_64 the binary release 1.0 crashes with core dump. I think the grin-server.log posted above may be misleading, at the first attempt I don't see any log messages after genesis block hash. This launch partially generates chain data files which look corrupted during subsequent launches.

I straced the first launch, it fails with SIGILL:

mmap(NULL, 53, PROT_READ, MAP_SHARED, 8, 0) = 0x7f0dd3d94000
stat("/home/ubuntu/.grin/main/chain_data/header/header_head/pmmr_leaf.bin.tmp", 0x7ffcec2fcf90) = -1 ENOENT (No such file or directory)
open("/home/ubuntu/.grin/main/chain_data/header/header_head/pmmr_leaf.bin.tmp", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 17
write(17, ":0\0\0\0\0\0\0", 8)          = 8
close(17)                               = 0
stat("/home/ubuntu/.grin/main/chain_data/header/header_head/pmmr_leaf.bin", 0x7ffcec2fcf90) = -1 ENOENT (No such file or directory)
rename("/home/ubuntu/.grin/main/chain_data/header/header_head/pmmr_leaf.bin.tmp", "/home/alex-gsg/.grin/main/chain_data/header/header_head/pmmr_leaf.bin") = 0
write(11, "\372uf\322u\0llFxvu\217+\310~L\353\322\2\n\351\317\237)Lb\27\202\215hr", 32) = 32
fsync(11)                               = 0
fstat(11, {st_mode=S_IFREG|0664, st_size=32, ...}) = 0
fstat(11, {st_mode=S_IFREG|0664, st_size=32, ...}) = 0
mmap(NULL, 32, PROT_READ, MAP_SHARED, 11, 0) = 0x7f0dd3d93000
write(12, "\1\10\267\345|D\215\265\357%\252\21\235\336#\22\306M\177\361\270\220\304\26\306\335\245\354s\313\376\322"..., 34) = 34
fsync(12)                               = 0
fstat(12, {st_mode=S_IFREG|0664, st_size=34, ...}) = 0
fstat(12, {st_mode=S_IFREG|0664, st_size=34, ...}) = 0
mmap(NULL, 34, PROT_READ, MAP_SHARED, 12, 0) = 0x7f0dd3d92000
stat("/home/ubuntu/.grin/main/chain_data/txhashset/output/pmmr_leaf.bin.tmp", 0x7ffcec2fcf90) = -1 ENOENT (No such file or directory)
open("/home/ubuntu/.grin/main/chain_data/txhashset/output/pmmr_leaf.bin.tmp", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 17
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0x55fa417b6832} ---
+++ killed by SIGILL (core dumped) +++
Illegal instruction (core dumped)

In that folder I see after crash:

ls -al  ~/.grin/main/chain_data/txhashset/output/
total 16
drwxrwxr-x 2 ubuntu alex-gsg 4096 Jan 18 18:18 .
drwxrwxr-x 5 ubuntu alex-gsg 4096 Jan 18 18:18 ..
-rw-rw-r-- 1 ubuntu alex-gsg   34 Jan 18 18:18 pmmr_data.bin
-rw-rw-r-- 1 ubuntu alex-gsg   32 Jan 18 18:18 pmmr_hash.bin
-rw-rw-r-- 1 ubuntu alex-gsg    0 Jan 18 18:18 pmmr_leaf.bin.tmp

From starce it seems I should have pmmr_leaf.bin too (.tmp file was renamed), but I may be confused by rename argument order.

I'm seeing this as well

Grin: grin-v1.0.0-479973573-linux-amd64.tgz
Kernel: Linux X 4.9.78-xxxx-std-ipv6-64 #2 SMP - x86_64 GNU/Linux
Distro: Debian GNU/Linux buster/sid
CPU info:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU W3520 @ 2.67GHz
stepping : 5
microcode : 0x1b
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm retpoline kaiser tpr_shadow vnmi flexpriority ept vpid dtherm ida

seme problem grin 1.0.0; ubuntu 16.04

``20190119 16:09:38.742 INFO grin_util::logger - log4rs is initialized, file level: Trace, stdout level: Warn, min. level: Trace 20190119 16:09:38.742 INFO grin - Using configuration file at /home/grinuser/.grin/main/grin-server.toml 20190119 16:09:38.742 INFO grin - This is Grin version 1.0.0 (git v1.0.0), built for x86_64-unknown-linux-gnu by rustc 1.31.1 (b6c32da9b 2018-12-18). 20190119 16:09:38.742 DEBUG grin - Built with profile "release", features "". 20190119 16:09:38.742 WARN grin::cmd::server - Starting GRIN in UI mode... 20190119 16:09:38.742 INFO grin_servers::grin::server - Starting server, genesis block: 40adad0aec27 20190119 16:09:38.808 TRACE grin_chain::txhashset::txhashset - Starting new txhashset extension. 20190119 16:09:38.808 DEBUG grin_chain::txhashset::txhashset - Error returned, discarding txhashset extension: Other Error: output vs rproof MMRs different sizes Cause: Unknown Backtrace: 20190119 16:09:38.847 ERROR grin_util::logger - thread 'main' panicked at 'calledResult::unwrap()on anErr` value: Chain(Error { inner:

Other Error: output vs rproof MMRs different sizes })': libcore/result.rs:1009stack backtrace:
0: 0x563a99c2579d - backtrace::backtrace::trace::hd74837959dc31a2c
1: 0x563a99c249b2 - ::default::hfbe03539066da14f
2: 0x563a99c24a29 - backtrace::capture::Backtrace::new::hd9d47426559d8b68
3: 0x563a99bae630 - grin_util::logger::send_panic_to_log::{{closure}}::h6b81febaf2dee014
4: 0x563a99cf6226 - std::panicking::rust_panic_with_hook::hde420d6fd4455550
at libstd/panicking.rs:480
5: 0x563a99cf5d71 - std::panicking::continue_panic_fmt::h8f394f3c578bcc76
at libstd/panicking.rs:390
6: 0x563a99cf5c55 - rust_begin_unwind
at libstd/panicking.rs:325
7: 0x563a99d3fccc - core::panicking::panic_fmt::hca5dc4e8b320bc56
at libcore/panicking.rs:77
8: 0x563a9947f419 - core::result::unwrap_failed::h830a8bfc4a83e400
9: 0x563a9941b3b0 - grin::cmd::server::start_server::h865872809e516a65
10: 0x563a9941c068 - grin::cmd::server::server_command::hc789d325932205ed
11: 0x563a994ab9fc - grin::real_main::h7464ec6aee075aa9
12: 0x563a994a9ee5 - grin::main::h76cf7ec850a9936e
13: 0x563a994781d2 - std::rt::lang_start::{{closure}}::hd67b3eb73f2382c8
14: 0x563a99cf5bf2 - std::rt::lang_start_internal::{{closure}}::hafa8ecdacd368ebb
at libstd/rt.rs:59
- std::panicking::try::do_call::h8c0dbb48abbdf4df
at libstd/panicking.rs:310
15: 0x563a99d082c9 - __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
16: 0x563a99cd744a - std::panicking::try::hbc21637ba5f64d73
at libstd/panicking.rs:289
- std::panic::catch_unwind::h954917b922b8d970
at libstd/panic.rs:392
- std::rt::lang_start_internal::h5b2de3cc38c3b406
at libstd/rt.rs:58
17: 0x563a994ac364 - main
18: 0x7fcced81f82f - __libc_start_main
19: 0x563a993ee980 -
20: 0x0 - ```

I have same problem with Ubuntu 18.10 when trying precompiled binary. After building from source, everything works well.

It's because we compile grin with avx/avx2 support, so it fails on cpus without those extensions.
I'll open an issue to track it

 elfx86exts grin
MODE64 (call)
CMOV (cmova)
SSE1 (movups)
SSE2 (movq)
SSSE3 (pshufb)
AVX (vxorps)
AVX2 (vpcmpeqd)
BMI2 (mulx)
ADX (adcx)
BMI (andn)
CPU Generation: Unknown

@hashmap can we close this issue now that we have https://github.com/mimblewimble/grin/issues/2494?

@kargakis makes sense, thanks

Was this page helpful?
0 / 5 - 0 ratings