Segmentation fault on Ubuntu Linux with trickle #15674

issue lxjhk openend this issue on March 27, 2019
  1. lxjhk commented at 4:03 am on March 27, 2019: none

    Desription

    After running bitcoind for a while, the program terminated with segmentation fault.

    Console Output

     0trickle -s -u 150 ./bitcoind -datadir=/btc-data/bitcoin/data
     1
     2...
     3
     419-02-06T16:24:35Z' progress=0.974263 cache=10.4MiB(78248txo)
     52019-03-27T03:19:33Z UpdateTip: new best=0000000000000000001c1d06f652792455f24b63ca66c16e2ba1cc12940af93f height=561832 version=0x20000000 log2_work=90.318593 tx=380346564 date='2019-02-06T16:27:37Z' progress=0.974264 cache=11.1MiB(84392txo)
     62019-03-27T03:19:36Z UpdateTip: new best=00000000000000000002371a6adffdcf79ca3a4c99a10d11d8dc9c28355b176c height=561833 version=0x20000000 log2_work=90.318616 tx=380349444 date='2019-02-06T16:37:25Z' progress=0.974268 cache=11.7MiB(89201txo)
     72019-03-27T03:19:42Z UpdateTip: new best=000000000000000000077cbc0d1845b47a0a1f4e8d269e469496bbbb03239439 height=561834 version=0x20c00000 log2_work=90.318639 tx=380350543 date='2019-02-06T16:38:29Z' progress=0.974268 cache=12.4MiB(94784txo)
     82019-03-27T03:20:48Z Pre-allocating up to position 0x7000000 in blk01519.dat
     92019-03-27T03:21:52Z UpdateTip: new best=0000000000000000000d4b0b3bd61bf105a06f0e5c9f06f4a4c85af8e7da200e height=561835 version=0x20000000 log2_work=90.318663 tx=380353291 date='2019-02-06T16:46:25Z' progress=0.974270 cache=13.0MiB(99572txo)
    102019-03-27T03:24:11Z Pre-allocating up to position 0xa00000 in rev01519.dat
    112019-03-27T03:24:11Z UpdateTip: new best=0000000000000000000e61f02e2aab67704eecb035e02460c78b7aa212bc66c2 height=561836 version=0x20000000 log2_work=90.318686 tx=380354077 date='2019-02-06T16:47:27Z' progress=0.974270 cache=13.8MiB(106454txo)
    12Segmentation fault (core dumped)
    

    Reproduce the Issue

    System: Ubuntu 16.04LTS, AWS Instance Steps: Just run it with sudo trickle -s -u 150 ./bitcoind -datadir=/btc-data/bitcoin/data and wait Version: bitcoin-0.17.0, downloaded form the official website Disk Type: SSD, 1T

    Core Dump Analysis

     0
     1sudo gdb ./bitcoind core
     2GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
     3Copyright (C) 2016 Free Software Foundation, Inc.
     4License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
     5This is free software: you are free to change and redistribute it.
     6There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
     7and "show warranty" for details.
     8This GDB was configured as "x86_64-linux-gnu".
     9Type "show configuration" for configuration details.
    10For bug reporting instructions, please see:
    11<http://www.gnu.org/software/gdb/bugs/>.
    12Find the GDB manual and other documentation resources online at:
    13<http://www.gnu.org/software/gdb/documentation/>.
    14For help, type "help".
    15Type "apropos word" to search for commands related to "word"...
    16Reading symbols from ./bitcoind...(no debugging symbols found)...done.
    17[New LWP 2756]
    18[New LWP 2715]
    19[New LWP 2714]
    20[New LWP 2716]
    21[New LWP 2711]
    22[New LWP 2727]
    23[New LWP 2712]
    24[New LWP 2713]
    25[New LWP 2717]
    26[New LWP 2718]
    27[New LWP 2755]
    28[New LWP 2760]
    29[New LWP 2719]
    30[New LWP 2758]
    31[New LWP 2720]
    32[New LWP 2759]
    33[Thread debugging using libthread_db enabled]
    34Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    35Core was generated by `./bitcoind -datadir=/btc-data/bitcoin/data'.
    36Program terminated with signal SIGSEGV, Segmentation fault.
    37[#0](/bitcoin-bitcoin/0/)  _int_malloc (av=av@entry=0x7f215c000020, bytes=bytes@entry=288) at malloc.c:3516
    383516	malloc.c: No such file or directory.
    39[Current thread is 1 (Thread 0x7f2163569700 (LWP 2756))]
    40(gdb) list
    413511	in malloc.c
    42(gdb) bt
    43[#0](/bitcoin-bitcoin/0/)  _int_malloc (av=av@entry=0x7f215c000020, bytes=bytes@entry=288) at malloc.c:3516
    44[#1](/bitcoin-bitcoin/1/)  0x00007f21fa707184 in __GI___libc_malloc (bytes=288) at malloc.c:2913
    45[#2](/bitcoin-bitcoin/2/)  0x000055f69179b3b8 in ?? ()
    46[#3](/bitcoin-bitcoin/3/)  0x000055f691185d41 in ?? ()
    47[#4](/bitcoin-bitcoin/4/)  0x000055f691195c4d in ?? ()
    48[#5](/bitcoin-bitcoin/5/)  0x000055f69115b567 in ?? ()
    49[#6](/bitcoin-bitcoin/6/)  0x000055f69119b4cb in ?? ()
    50[#7](/bitcoin-bitcoin/7/)  0x000055f6917d6b3f in ?? ()
    51[#8](/bitcoin-bitcoin/8/)  0x00007f21fb17b6ba in start_thread (arg=0x7f2163569700) at pthread_create.c:333
    52[#9](/bitcoin-bitcoin/9/)  0x00007f21fa78a41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
    53(gdb)
    54[#0](/bitcoin-bitcoin/0/)  _int_malloc (av=av@entry=0x7f215c000020, bytes=bytes@entry=288) at malloc.c:3516
    55[#1](/bitcoin-bitcoin/1/)  0x00007f21fa707184 in __GI___libc_malloc (bytes=288) at malloc.c:2913
    56[#2](/bitcoin-bitcoin/2/)  0x000055f69179b3b8 in ?? ()
    57[#3](/bitcoin-bitcoin/3/)  0x000055f691185d41 in ?? ()
    58[#4](/bitcoin-bitcoin/4/)  0x000055f691195c4d in ?? ()
    59[#5](/bitcoin-bitcoin/5/)  0x000055f69115b567 in ?? ()
    60[#6](/bitcoin-bitcoin/6/)  0x000055f69119b4cb in ?? ()
    61[#7](/bitcoin-bitcoin/7/)  0x000055f6917d6b3f in ?? ()
    62[#8](/bitcoin-bitcoin/8/)  0x00007f21fb17b6ba in start_thread (arg=0x7f2163569700) at pthread_create.c:333
    63[#9](/bitcoin-bitcoin/9/)  0x00007f21fa78a41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
    64(gdb) exit
    65Undefined command: "exit".  Try "help".
    66(gdb) quit
    
  2. fanquake added the label Linux/Unix on Mar 27, 2019
  3. lxjhk commented at 8:41 am on March 27, 2019: none

    This might have something to do with “trickle”. I am using the latest release of trickle on Ubuntu. “trickle” works fine with my other programs. Bitcoind is the only one to have experienced this issue.

    Memory should not be an issue here since I have 16GB RAM and 10GB Swap space.

  4. MarcoFalke commented at 12:32 pm on March 27, 2019: member
    Have you tried to report this bug upstream?
  5. practicalswift commented at 12:42 pm on March 27, 2019: contributor

    @lxjhk

    Thanks a lot for the bug report!

    Are you able to reproduce this issue against a bitcoind binary compiled from current master?

    If so, can you post the corresponding gdb output?

  6. fanquake commented at 6:02 am on August 4, 2019: member
    @lxjhk Can you follow up here? Was this determined to be an issue with trickle ?
  7. MarcoFalke added the label Upstream on Aug 4, 2019
  8. lxjhk commented at 3:01 am on August 5, 2019: none
    Hi sorry for late reply. I have since switched to the GoLang implementation of Bitcoin because I can’t solve that issue. It does not seem to be a trickle issue because when I use trickle with other applications, everything seemed to be fine.
  9. lxjhk commented at 3:04 am on August 5, 2019: none
    I am quite busy recently. I might be able to try reproducing the bug next week.
  10. MarcoFalke commented at 11:35 am on August 5, 2019: member

    I can trivially reproduce on a fresh Ubuntu Bionic with:

    0sudo trickle -s -d 50 -u 50 ./bitcoin-0.18.0/bin/bitcoind
    
  11. MarcoFalke renamed this:
    [0.17.1][0.17.0.1] Segmentation fault on Ubuntu Linux
    [0.17.1][0.17.0.1] Segmentation fault on Ubuntu Linux with trickle
    on Aug 5, 2019
  12. MarcoFalke renamed this:
    [0.17.1][0.17.0.1] Segmentation fault on Ubuntu Linux with trickle
    Segmentation fault on Ubuntu Linux with trickle
    on Aug 5, 2019
  13. MarcoFalke closed this on Apr 27, 2020

  14. slush0 commented at 3:43 pm on June 17, 2020: none
    I can confirm the bug with official build of bitcoin-qt 0.20.0 on Linux Mint 19.3.
  15. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-06-17 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me