-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ord env
less aggressive exit
#4186
Conversation
Five seconds feels like a long time to wait. Can we get away with less? |
It's not really critical that this shuts down fast. It's more important that Bitcoin Core doesn't get borked. We could probably test and reduce by 2-3 seconds but I'd rather be on the safe side. The borked database is also a very insidious error because Bitcoin Core just starts up from block 0 and doesn't tell you something went wrong previously. The |
I made the timeout changes manually and created a new build from Master to test with. Unfortunately, I see I think that a key aspect to this issue is that once F:\0.22.1_env_test\release>ord --data-dir env wallet inscribe --fee-rate 5 --file "F:\Bitcoin\art projects\ANDRE.webp"
error: JSON-RPC error: RPC error response: RpcError { code: -4, message: "Wallet is currently rescanning. Abort existing rescan or wait.", data: None }
0: std::backtrace_rs::backtrace::dbghelp64::trace
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
1: std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/std\src\..\..\backtrace\src\backtrace\mod.rs:66
2: std::backtrace::Backtrace::create
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/std\src\backtrace.rs:331
3: std::backtrace::Backtrace::capture
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/std\src\backtrace.rs:296
4: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
5: <T as ord::subcommand::Output>::print
6: <T as ord::subcommand::Output>::print
7: ord::subcommand::wallet::inscribe::Inscribe::run
8: ord::subcommand::wallet::WalletCommand::parse_metadata
9: ord::arguments::Arguments::run
10: ord::main
11: __ImageBase
12: __ImageBase
13: std::rt::lang_start_internal::closure$2
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/std\src\rt.rs:143
14: std::panicking::try::do_call
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/std\src\panicking.rs:554
15: std::panicking::try
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/std\src\panicking.rs:518
16: std::panic::catch_unwind
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/std\src\panic.rs:345
17: std::rt::lang_start_internal
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14\library/std\src\rt.rs:143
18: main
19: invoke_main
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
20: __scrt_common_main_seh
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
21: BaseThreadInitThunk
22: RtlUserThreadStart shutting down then produces the two kill errors: F:\0.22.1_env_test\release\ord.exe --datadir env wallet balance
Shutting down gracefully. Press <CTRL-C> again to shutdown immediately.
Shutting down gracefully. Press <CTRL-C> again to shutdown immediately.
kill: 29276: No such process
kill: 30912: No such process The only difference I see is that after restarting and checking the balance again, it seems to be maintained: F:\0.22.1_env_test\release>ord --data-dir env wallet balance
{
"cardinal": 500000000000,
"ordinal": 0,
"runes": {},
"runic": 0,
"total": 500000000000
} but trying to inscribe again throws the same error. |
Ok thanks for the report @cryptoni9n! Seems to only have fixed one issue. For the main issue I'll continue investigating |
We were very aggressive with killing the process. Not allowing Bitcoinn Core time to process the
kill
command, which lead it to bork it's database. This now waits 5 seconds, giving it enough time to exit.