Skip to content

Instantly share code, notes, and snippets.

@oskarth
Created June 29, 2019 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oskarth/c3f4392e84c279c433474d31b3173737 to your computer and use it in GitHub Desktop.
Save oskarth/c3f4392e84c279c433474d31b3173737 to your computer and use it in GitHub Desktop.
status-console-client hangs naive setupforeignthreadgc
oskarth@localhost ~/g/s/g/s/status-console-client>
gdb --args env GOMAXPROCS=1 ./bin/status-term-client -keyhex=0x9af3cdb76d76da2b36d2dcc082cb54ea672639331ef03b91a62ad6ef804b4896 2> test.log
GNU gdb (GDB) Fedora 8.2-7.fc29
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from env...(no debugging symbols found)...done.
Missing separate debuginfos, use: dnf debuginfo-install coreutils-8.30-7.fc29.x86_64
(gdb) run
Starting program: /usr/bin/env GOMAXPROCS=1 ./bin/status-term-client -keyhex=0x9af3cdb76d76da2b36d2dcc082cb54ea672639331ef03b91a62ad6ef804b4896
process 11689 is executing new program: /home/oskarth/go/src/github.com/status-im/status-console-client/bin/status-term-client
To enable execution of this file add
add-auto-load-safe-path /usr/local/go/src/runtime/runtime-gdb.py
line to your configuration file "/home/oskarth/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/oskarth/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff5722700 (LWP 11699)]
[New Thread 0x7ffff4f21700 (LWP 11700)]
[New Thread 0x7fffeffff700 (LWP 11701)]
[New Thread 0x7fffef7fe700 (LWP 11702)]
*** GOMAXPROCS 1
*** before nimstuff
*** Hello from main
*** inside secp256k1
*** secp compile
***Inside nim status
[nim-status] Start 1
[New Thread 0x7fffeeffd700 (LWP 11703)]
INF 2019-06-29 10:04:20+08:00 RLPx listener up tid=11689 file=../vendor/nim-eth/eth/p2p.nim:93 self=enode://f32c387eef7ab9780e6a0de3ab662a7ad05fc9c11c43e0fbe71fb7e0faccec74ba25e8cf6cb1140fc00071991d1d4c641db1b32dae25e7cfa491207fb7f670c8@0.0.0.0:30306
[]
[nim-status] Start 2
[]
[]
[]
*** Hello after start
[nim-status] ListenAndPost 1
[nim-status] ListenAndPost (post @i==1000) i= 0
[nim-status] ListenAndPost (post @i==1000) i= 1
[nim-status] ListenAndPost (post @i==1000) i= 2
[nim-status] ListenAndPost (post @i==1000) i= 3
[nim-status] ListenAndPost (post @i==1000) i= 4
[nim-status] ListenAndPost (post @i==1000) i= 5
[nim-status] ListenAndPost (post @i==1000) i= 6
[nim-status] ListenAndPost (post @i==1000) i= 7
[nim-status] ListenAndPost (post @i==1000) i= 8
[nim-status] ListenAndPost (post @i==1000) i= 9
[nim-status] ListenAndPost (post @i==1000) i= 10
[nim-status] ListenAndPost (post @i==1000) i= 11
[nim-status] ListenAndPost (post @i==1000) i= 12
[nim-status] ListenAndPost (post @i==1000) i= 13
[nim-status] ListenAndPost (post @i==1000) i= 14
[nim-status] ListenAndPost (post @i==1000) i= 15
[nim-status] ListenAndPost (post @i==1000) i= 16
[nim-status] ListenAndPost (post @i==1000) i= 17
[nim-status] ListenAndPost (post @i==1000) i= 18
[nim-status] ListenAndPost (post @i==1000) i= 19
^C
Thread 1 "status-term-cli" received signal SIGINT, Interrupt.
runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:536
536 MOVL AX, ret+40(FP)
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.28-30.fc29.x86_64
(gdb) bt
#0 runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:536
#1 0x0000000000449d8b in runtime.futexsleep (addr=0x1f43ac8 <runtime.m0+328>, val=0, ns=-1)
at /usr/local/go/src/runtime/os_linux.go:46
#2 0x0000000000428ef1 in runtime.notesleep (n=0x1f43ac8 <runtime.m0+328>)
at /usr/local/go/src/runtime/lock_futex.go:151
#3 0x0000000000451a91 in runtime.stopm () at /usr/local/go/src/runtime/proc.go:1936
#4 0x0000000000452bea in runtime.findrunnable (gp=0xc00004a000, inheritTime=false)
at /usr/local/go/src/runtime/proc.go:2399
#5 0x000000000045380c in runtime.schedule () at /usr/local/go/src/runtime/proc.go:2525
#6 0x0000000000454fad in runtime.exitsyscall0 (gp=0xc000000180) at /usr/local/go/src/runtime/proc.go:3129
#7 0x000000000047942b in runtime.mcall () at /usr/local/go/src/runtime/asm_amd64.s:299
#8 0x0000000000479349 in runtime.rt0_go () at /usr/local/go/src/runtime/asm_amd64.s:201
#9 0x0000000000f99010 in ?? ()
#10 0x0000000000479350 in runtime.rt0_go () at /usr/local/go/src/runtime/asm_amd64.s:206
#11 0x0000000000000002 in ?? ()
#12 0x00007fffffffd6d8 in ?? ()
#13 0x0000000000000002 in ?? ()
#14 0x00007fffffffd6d8 in ?? ()
#15 0x0000000000000000 in ?? ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment