Using Cosmos SDK how to fix: failed to parse log level - sdk

can anyone help me out on why i see this error when running gaiad version
Error: failed to parse log level (main:info,state:info,statesync:info,*:error): Unknown Level String: 'main:info,state:info,statesync:info,*:error', defaulting to NoLevel
Usage:
gaiad version [flags]
Flags:
-h, --help help for version
--long Print long version information
-o, --output string Output format (text|json) (default "text")
Global Flags:
--home string directory for config and data (default "/Users/highlander/.gaia")
--log_format string The logging format (json|plain) (default "plain")
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
--trace print out full stack trace on errors

Related

.clang-tidy configuration file content is being ignored

I want to modify the checks that the code analyzer program clang-tidy is doing, but it seems like the content of the configuration file .clang-tidy is being ignored.
I create the file by calling clang-tidy with the flag -dump-config and redirect the output to the file .clang-tidy.
Then I call sed to replace the value 800 with the value 700, which corresponds to the option with key google-readability-function-size.StatementThreshold. The specific option is not important to me, this is just for testing.
I verify that the value has indeed been changed.
Lastly, I rerun clang-tidy to see if it has accepted the new configuration, but it remains unchanged.
# generate config
clang-tidy -dump-config > .clang-tidy
# change config
sed -i 's/800/700/' .clang-tidy
# verify change
grep '700' .clang-tidy
# use config, does not work
clang-tidy -config '' -dump-config
The CheckOption remains at the default value, the content of the config file has been ignored:
CheckOptions:
# some lines omitted for brevity
- key: google-readability-function-size.StatementThreshold
value: '800'
Running clang-tidy -config '' -dump-config -explain-config shows that the configuration file has at least been found, i.e. many clang-analyzer specific checks are enabled in the detected config file, but the check google-readability-function-size.StatementThreshold is not listed.
I also tried passing the config directly as command line parameter with the command clang-tidy -config="{CheckOptions: [ {key: google-readability-function-size.StatementThreshold, value: 700} ]}" -dump-config, but got the same result.
The command clang-tidy --version gives the following output, running on Ubuntu 20.04:
LLVM (http://llvm.org/):
LLVM version 10.0.0
Optimized build.
Default target: x86_64-pc-linux-gnu
Host CPU: haswell
To see the change, you need to enable the check:
Checks: 'google-readability-function-size'
You can see it changed in the effective configuration with:
clang-tidy --dump-config
Another pitfall to be aware of is that errors parsing the values will be silently discarded.

What is the difference between reading in text mode and binary mode, when checking checksums using `sha1sum`?

I often compute checksums of files downloaded from the Internet, using shasum family of commands, without paying attention to the mode for reading. In particular, sha1sum usually defaults to text mode for applications.
What is the difference between reading in text mode and binary mode, when checking checksums using sha1sum?
~/Downloads$ sha1sum --help
Usage: sha1sum [OPTION]... [FILE]...
Print or check SHA1 (160-bit) checksums.
With no FILE, or when FILE is -, read standard input.
-b, --binary read in binary mode
-c, --check read SHA1 sums from the FILEs and check them
--tag create a BSD-style checksum
-t, --text read in text mode (default)
-z, --zero end each output line with NUL, not newline,
and disable file name escaping
The following five options are useful only when verifying checksums:
--ignore-missing don't fail or report status for missing files
--quiet don't print OK for each successfully verified file
--status don't output anything, status code shows success
--strict exit non-zero for improperly formatted checksum lines
-w, --warn warn about improperly formatted checksum lines
--help display this help and exit
--version output version information and exit
The sums are computed as described in FIPS-180-1. When checking, the input
should be a former output of this program. The default mode is to print a
line with checksum, a space, a character indicating input mode ('*' for binary,
' ' for text or where binary is insignificant), and name for each FILE.
GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation <https://www.gnu.org/software/coreutils/sha1sum>
or available locally via: info '(coreutils) sha1sum invocation'
None.
At least judging by the answer to the similar question on the difference between text and binary in md5sum.
It appears it flags are for standards compliance or something

Understanding debugtrace log of postgresql installer binary

I am trying to install PostgreSQL 9.6 on a CentOS 7.6 VM using installer binary postgresql-9.6.6-1-linux-x64.run. I have run the below command to install:
./postgresql-9.6.6-1-linux-x64.run --installer-language en --serviceaccount postgres --servicename postgresqld --datadir "/home/postgres/" --prefix "/home/postgres" --superpassword **** --serverport 5432 --debuglevel 4 --debugtrace ./postgresql-debug.log --mode unattended
The debug trace log "./postgresql-debug.log" generated lot of encoded formatted text which cannot be understood.
It is not in base64 either. Can someone please help me how to decode the log.
Here is first few lines of debug trace log.
<errorDump>
<context>MwSUdmn65MlwA81MDBVmg34ZjlXDReCYnIxjAwgZ15jHp8UXS0OQ2L/a8iph
kR7moeATHKE7UkwbqeM1bluAAET0rr2AXwDdQdowNVgI5BYvwz7YBMUd5nsn
AgldXNczMw/dSiFsj334+Bb/iOhXuaQo/S0FzyzqFPEqaBHVjPrJv70vdhTD
dmHn7vKY/Zo2xZ/eyouLxobkFYdRw2zqX+HAkRpygUNPqHzvy0AJg6Kln8uv
GhwphVedsu1buJc7gb2T+1HWqsCXB8jm9LI7GmDvA62sKmgmjxRDMl+UI6UE
rn7gbhrc59oI4Wjem2aJK8ufTHuYM+xfXNFc5yY9CtoI4Wjem2aJzo+oIONC
gYoZFhKeT1iysdoI4Wjem2aJ8B3Ju++KR9us+PNdpxdCk9oI4Wjem2aJL+bx
eZCCp83ng4pRhi+GoQyXnF++cnIKHlx0bVlSX7X7AV8O24BoFwyXnF++cnIK
rJUoxqtsZe6URWF1lQj7xgyXnF++cnIKkX2dNd0GKfLyeRPuEuaM1N6/6xVl

YOCTO - First build for BBB

I am trying to use for the first time the Yocto tool for my BeagleBoneBlack.
First I run this bash file to install Yocto:
#!/bin/bash
WKDIR=/work
mkdir -p $WKDIR/beaglebone-black/yocto/sources
mkdir -p $WKDIR/beaglebone-black/yocto/builds
cd $WKDIR/beaglebone-black/yocto/sources
git clone -b morty git://git.yoctoproject.org/poky.git poky-morty
cd $WKDIR/beaglebone-black/yocto/
source sources/poky-morty/oe-init-build-env builds/build-bbb-morty
Then I edited the file local.conf at "build-bbb-morty/conf" diretory:
MACHINE ?= "beaglebone"
and added
DL_DIR ?= "${TOPDIR}/../dl"
IMAGE_INSTALL_append = " kernel-modules kernel-devicetree"
Then I run bitbake:> bitbake core-image-minimal
After about 8 hours in my Core i7 five generation I got this result at my terminal output and I have no idea what I need to do to fix it:
bitbake core-image-minimal
Parsing recipes: 100% |########################################################################################################| Time: 0:02:55
Parsing of 864 .bb files complete (0 cached, 864 parsed). 1318 targets, 67 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.32.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-16.04"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "beaglebone"
DISTRO = "poky"
DISTRO_VERSION = "2.2.1"
TUNE_FEATURES = "arm armv7a vfp neon callconvention-hard cortexa8"
TARGET_FPU = "hard"
meta
meta-poky
meta-yocto-bsp = "morty:a3fa5ce87619e81d7acfa43340dd18d8f2b2d7dc"
NOTE: Fetching uninative binary shim from http ://downloads.yoctoproject.org/releases/uninative/1.4/x86_64-nativesdk-libc.tar.bz2;sha256sum=101ff8f2580c193488db9e76f9646fb6ed38b65fb76f403acb0e2178ce7127ca
--2017-01-18 15:51:09-- http ://downloads.yoctoproject.org/releases/uninative/1.4/x86_64-nativesdk-libc.tar.bz2
Resolving downloads.yoctoproject.org (downloads.yoctoproject.org)... 198.145.20.127
Connecting to downloads.yoctoproject.org (downloads.yoctoproject.org)|198.145.20.127|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2473216 (2.4M) [application/octet-stream]
Saving to: ‘/work/beaglebone-black/yocto/builds/build-bbb-morty/../dl/uninative/101ff8f2580c193488db9e76f9646fb6ed38b65fb76f403acb0e2178ce7127ca/x86_64-nativesdk-libc.tar.bz2’
2017-01-18 15:51:18 (297 KB/s) - ‘/work/beaglebone-black/yocto/builds/build-bbb-morty/../dl/uninative/101ff8f2580c193488db9e76f9646fb6ed38b65fb76f403acb0e2178ce7127ca/x86_64-nativesdk-libc.tar.bz2’ saved [2473216/2473216]
Initialising tasks: 100% |#####################################################################################################| Time: 0:00:14
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: attr-native-2.4.47-r0 do_fetch: Failed to fetch URL http ://download.savannah.gnu.org/releases/attr/attr-2.4.47.src.tar.gz, attempting MIRRORS if available
WARNING: libpng-native-1.6.24-r0 do_fetch: Failed to fetch URL http ://distfiles.gentoo.org/distfiles/libpng-1.6.24.tar.xz, attempting MIRRORS if available
ERROR: core-image-minimal-1.0-r0 do_image_wic: Function failed: do_image_wic (log file is located at /work/beaglebone-black/yocto/builds/build-bbb-morty/tmp/work/beaglebone-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_wic.23788)
ERROR: Logfile of failure stored in: /work/beaglebone-black/yocto/builds/build-bbb-morty/tmp/work/beaglebone-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_wic.23788
Log data follows:
| DEBUG: Executing python function set_image_size
| DEBUG: Python function set_image_size finished
| DEBUG: Executing shell function do_image_wic
| Checking basic build environment...
| Done.
|
| Build artifacts not found, exiting.<br/>
| (Please check that the build artifacts for the machine
| selected in local.conf actually exist and that they
| are the correct artifacts for the image (.wks file))
|
| The artifact that couldn't be found was kernel-dir:
| /work/beaglebone-black/yocto/builds/build-bbb-morty/tmp/deploy/images/beaglebone
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_image_wic (log file is located at /work/beaglebone-black/yocto/builds/build-bbb-morty/tmp/work/beaglebone-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_wic.23788)
ERROR: Task (/work/beaglebone-black/yocto/sources/poky-morty/meta/recipes-core/images/core-image-minimal.bb:do_image_wic) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1771 tasks of which 6 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/work/beaglebone-black/yocto/sources/poky-morty/meta/recipes-core/images/core-image-minimal.bb:do_image_wic
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
While not sure this could be the reason of the problem, the prefered method to add packages to the image, in the local.conf context is using the CORE_IMAGE_EXTRA_INSTALL variable.
Therefore change:
IMAGE_INSTALL_append = " kernel-modules kernel-devicetree"
to
CORE_IMAGE_EXTRA_INSTALL += "kernel-modules kernel-devicetree"
I think there is no problem with your work method.
It seems to be a build environment problem, but the error log seems to confirm.
your log location at "/work/beaglebone-black/yocto/builds/build-bbb-morty/tmp/work/beaglebone-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_wic.23788"
Your error log indicates the the URL for fetching binaries failed.
You can try using tunnel through proxy. Or you can run the bitbake again because it can also fail sometimes due to network conditions.

Error while generating trace file in Vampirtrace

I want to do profiling for my parallel processing code that I have wrote using OpenMPI library. I am trying to use vampirtrace for this purpose. I compiled my code using command
vtcxx -vt:cxx mpic++ ../src/parallel_encode_nonBlocking.cpp -o parallel_encode_nonBlocking_trace.exe
and I am trying to run my code using following command to generate trace file,
mpirun -np 4 parallel_encode_nonBlocking_trace.exe ducks.m2v ducks11.h264
here last 2 names are names of input and output files that are required by code. But after running code I am getting following errors,
/usr/bin/nm: '/home/rishikesh/Videos/Documents/Rishikesh_MTP_data/Harshad': No such file
/usr/bin/nm: 'MTP/MTP/encoder_experiments/ffmpeg_transcode/bin/parallel_encode_nonBlocking_trace.exe': No such file
VampirTrace: FATAL: Failed to execute /usr/bin/nm -B --demangle --line-numbers /home/rishikesh/Videos/Documents/Rishikesh_MTP_data/Harshad MTP/MTP/encoder_experiments/ffmpeg_transcode/bin/parallel_encode_nonBlocking_trace.exe
Please set the environment variable VT_GNU_NM to the 'nm' command including command line switches which lists symbol/addresses of an object file in BSD-style or set VT_GNU_NMFILE to a pre-created symbol list file.
/usr/bin/nm: '/home/rishikesh/Videos/Documents/Rishikesh_MTP_data/Harshad': No such file
/usr/bin/nm: 'MTP/MTP/encoder_experiments/ffmpeg_transcode/bin/parallel_encode_nonBlocking_trace.exe': No such file
/usr/bin/nm: '/home/rishikesh/Videos/Documents/Rishikesh_MTP_data/Harshad': No such file
/usr/bin/nm: 'MTP/MTP/encoder_experiments/ffmpeg_transcode/bin/parallel_encode_nonBlocking_trace.exe': No such file
VampirTrace: FATAL: Failed to execute /usr/bin/nm -B --demangle --line-numbers /home/rishikesh/Videos/Documents/Rishikesh_MTP_data/Harshad MTP/MTP/encoder_experiments/ffmpeg_transcode/bin/parallel_encode_nonBlocking_trace.exe
Please set the environment variable VT_GNU_NM to the 'nm' command including command line switches which lists symbol/addresses of an object file in BSD-style or set VT_GNU_NMFILE to a pre-created symbol list file.
/usr/bin/nm: VampirTrace: FATAL: Failed to execute /usr/bin/nm -B --demangle --line-numbers /home/rishikesh/Videos/Documents/Rishikesh_MTP_data/Harshad MTP/MTP/encoder_experiments/ffmpeg_transcode/bin/parallel_encode_nonBlocking_trace.exe
Please set the environment variable VT_GNU_NM to the 'nm' command including command line switches which lists symbol/addresses of an object file in BSD-style or set VT_GNU_NMFILE to a pre-created symbol list file.
'/home/rishikesh/Videos/Documents/Rishikesh_MTP_data/Harshad': No such file
/usr/bin/nm: 'MTP/MTP/encoder_experiments/ffmpeg_transcode/bin/parallel_encode_nonBlocking_trace.exe': No such file
VampirTrace: FATAL: Failed to execute /usr/bin/nm -B --demangle --line-numbers /home/rishikesh/Videos/Documents/Rishikesh_MTP_data/Harshad MTP/MTP/encoder_experiments/ffmpeg_transcode/bin/parallel_encode_nonBlocking_trace.exe
Please set the environment variable VT_GNU_NM to the 'nm' command including command line switches which lists symbol/addresses of an object file in BSD-style or set VT_GNU_NMFILE to a pre-created symbol list file.
--------------------------------------------------------------------------
mpirun noticed that the job aborted, but has no info as to the process
that caused that situation.
--------------------------------------------------------------------------
There seems to be a bug in VampirTrace with spaces in the absolute path name to your application binary. To work around that you can either remove the space from the "Harshad MTP" directory, or manually execute
nm parallel_encode_nonBlocking_trace.exe > nm.file
export VT_GNU_NMFILE="$PWD/nm.file"
The error message is quite clear about that if you actually carefully read it.

Resources