SafeCLI has crashed

I am getting this error frequently now when I run safe files put with some formatting code
safe files put $ | head -n1|cut -f2 -d'"'

willie@gagarin:~$ ~/projects/maidsafe/T5-scripts/dedup-tester/ 
The Safe CLI had a problem and crashed. To help us diagnose the problem you can send us a crash report.

We have generated a report file at "/tmp/report-2715372b-cefc-4228-88f0-03b980ba6c25.toml". Please submit an issue, including the report as an attachment, at
Alternatively, you can report it on our dev forum at:

In order to improve the software, we rely on people to submit reports.

Thank you kindly!


output files will be written to  /tmp/std-file-upload-tests-04

This account has a balance of  776.633787184

processing a 5MB standard testfile

real	2m29.832s
user	0m26.573s
sys	0m0.556s

processing a 10MB standard testfile

real	4m36.921s
user	0m45.004s
sys	0m1.148s

THe forum software will not let me upload the crash reports - not in an approved format so I will attach them to an issue in The Safe CLI had a problem and crashed. · Issue #796 · maidsafe/sn_api · GitHub


Can you paste the text output from

$ cat /tmp/report-2715372b-cefc-4228-88f0-03b980ba6c25.toml

Interesting that github won’t allow toml. You could rename it to .txt and it would be possible to upload it.

Its not just github, I cant (quickly) upload it here either

willie@gagarin:~$ cat /tmp/report-2715372b-cefc-4228-88f0-03b980ba6c25.toml
name = 'sn_cli'
operating_system = 'unix:Ubuntu'
crate_version = '0.25.3'
explanation = '''
Panic occurred in file 'library/std/src/io/' at line 940
cause = 'failed printing to stdout: Broken pipe (os error 32)'
method = 'Panic'
backtrace = '''

   0: 0x7f269b09db6d - std::io::stdio::print_to::he744d1d1f1db1337
                at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/io/
                 - std::io::stdio::_print::hdfd9abb06b145965
                at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/io/
   1: 0x7f269a58069a - safe::subcommands::keys::key_commander::{{closure}}::hfdb08b9db0e3883d
   2: 0x7f269a553211 - safe::cli::run_with::{{closure}}::h09f0b26e4414dfbc
   3: 0x7f269a4e5019 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h078becce977db4ba
   4: 0x7f269a5c67d2 - std::thread::local::LocalKey<T>::with::hd16e14ced8bae5bd
   5: 0x7f269a420a1f - tokio::runtime::enter::Enter::block_on::h54522673e7bea9d7
   6: 0x7f269a3c3765 - tokio::runtime::thread_pool::ThreadPool::block_on::h7c43d0cdb013a89e
   7: 0x7f269a64501b - tokio::runtime::Runtime::block_on::he50578512431431f
   8: 0x7f269a43166e - safe::main::hb20983804401d7d6
   9: 0x7f269a49bdd3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h882c9bdca0f619e3
  10: 0x7f269a49be2d - std::rt::lang_start::{{closure}}::h6f81a7bc24c4a84e
  11: 0x7f269b0ab369 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h5ebb83e980356edd
                at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/core/src/ops/
                 - std::panicking::try::do_call::hed50049424ee3d72
                at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/
                 - std::panicking::try::h3c1728c72c9519f4
                at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/
                 - std::panic::catch_unwind::h8846e729982505ff
                at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/
                 - std::rt::lang_start_internal::h28500d1c33144b32
                at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/
  12: 0x7f269a431732 - main'''

OK OK that didnt take long :slight_smile:

I am wondering there may be a link between what I am doing in my script

OPEN_BALANCE= safe keys balance|tail -n1|cut -f2 -d':'

and this crash

I expect there is a more efficient and elegant way of returning simply the numerical balance - possibly with sed.
@JPL had a crash as well running this script but he lost the report when he powered off his PC

See also Can I play around with a safe network testnet? - #105 by Southside - Support - Safe Network Forum

The json/yaml output formats should be of help?: $ safe keys balance --json

1 Like

Well of course - duh!!