Krypto-trading-bot: Segfault on Kraken and Poloniex

Created on 7 Feb 2018  Â·  5Comments  Â·  Source: ctubio/Krypto-trading-bot

Opening this issue because the bot told me to!

22:14:17.233456 GW KRAKEN Quoting state changed to CONNECTED.

22:44:50.895533 Errrror: Signal 11 Segmentation fault (Three-Headed Monkey found):

  • upstream: KRAKEN
  • currency: ZEC/USD
  • roll-out: 1518041644322
  • lastbeat: 1518043490894
  • os-uname: Linux 4.14.12-x86_64-linode92 #1 SMP Fri Jan 5 15:34:44 UTC 2018 x86_64
  • tracelog:
    ./app/server/K(_ZN1K2EV3wtfEi+0x301) [0x55a0bff42851]
    /usr/lib/libc.so.6(+0x348e0) [0x7fba28bfe8e0]
    ./app/server/K(_ZN1K2SH6logErrENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S6_+0x18) [0x55a0bff40168]
    ./app/server/K(_ZN1K2SH6logWarENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_+0x7a) [0x55a0bff4043a]
    ./app/server/K(_ZN1K2FN4wJetENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbS6_S6_S6_+0x2bb) [0x55a0bffd918b]
    ./app/server/K(_ZN1K8GwKraken11sync_ordersEv+0x87d) [0x55a0bffdbe4d]
    ./app/server/K(_ZNSt17_Function_handlerIFSt10unique_ptrINSt13__future_base12_Result_baseENS2_8_DeleterEEvENS1_12_Task_setterIS0_INS1_7_ResultISt6vectorIN1K6mOrderESaISA_EEEES3_
    ESt12_Bind_simpleIFZNKS9_2Gw6ordersMUlvE_clEvEUlvE_vEESC_EEE9_M_invokeERKSt9_Any_data+0x25) [0x55a0bffc25d5]
    ./app/server/K(_ZNSt13__future_base13_State_baseV29_M_do_setEPSt8functionIFSt10unique_ptrINS_12_Result_baseENS3_8_DeleterEEvEEPb+0x1b) [0x55a0bff3892b]
    /usr/lib/libpthread.so.0(+0xedcf) [0x7fba28f8fdcf]
    ./app/server/K(_ZNSt6thread11_State_implISt12_Bind_simpleIFZNSt13__future_base17_Async_state_implIS1_IFZNK1K2Gw6ordersMUlvE_clEvEUlvE_vEESt6vectorINS4_6mOrderESaISB_EEEC4EOS9_E
    UlvE_vEEE6_M_runEv+0xd2) [0x55a0bffbeba2]
    ./app/server/K(+0x54378f) [0x55a0c030278f]
    /usr/lib/libpthread.so.0(+0x708c) [0x7fba28f8808c]
    /usr/lib/libc.so.6(clone+0x3f) [0x7fba28cbfe1f]

Yikes!
please copy and paste the error above into a new github issue (noworry for duplicates).
If you agree, go to https://github.com/ctubio/Krypto-trading-bot/issues/new

22:44:50.896306 GW KRAKEN Quoting state changed to DISCONNECTED.
22:44:50.896422 GW KRAKEN Attempting to cancel all open orders, please wait..
22:44:57.619330 GW KRAKEN cancel all open orders OK.
22:44:57.622344 DB Warrrrning: Sqlite error: unrecognized token: "`
".

in the lab bug

All 5 comments

oook i hope i understood, the problem here is because ncurses is not threadsafe

once calls to ncurses doesnt crash we may be able to see the error message that the gateway is trying to print (but failed cos ncurses was doing something else)

:koala: do you have more than 1 cpu?
(ima try to synchronize ncurses calls meanwhile)

The VPS has 2 cpu cores but I am running multiple instances of K

On Wed, Feb 7, 2018, 7:19 PM Carles Tubio notifications@github.com wrote:

oook i hope i understood, the problem here is because ncurses is not
threadsafe

once calls to ncurses doesnt crash we may be able to see the error message
that the gateway is trying to print (but failed cos ncurses was doing
something else)

do you have more than one cpu?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ctubio/Krypto-trading-bot/issues/630#issuecomment-363958295,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAzMtZ242POmWyOecA1FwgBbxRKxshoNks5tSj2GgaJpZM4R9hnp
.

no problem about the multiple instances, but a single K instance may be calling a single loaded instance of ncurses from the main thread and from an async function at the same time while using both cores

Happened again - if it helps it only happens when there is a successful trade.

Errrror: Signal 11 Segmentation fault (Three-Headed Monkey found):

  • upstream: KRAKEN
  • currency: ZEC/USD
  • roll-out: 1518102283951
  • lastbeat: 1518106937743
  • os-uname: Linux 4.14.12-x86_64-linode92 #1 SMP Fri Jan 5 15:34:44 UTC 2018 x86_64
  • tracelog:
    ./app/server/K(_ZN1K2EV3wtfEi+0x301) [0x5628134717c1]
    /usr/lib/libc.so.6(+0x348e0) [0x7f0d079628e0]
    ./app/server/K(_ZN1K2SH6logErrENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S6_+0x18) [0x56281346f0d8]
    ./app/server/K(_ZN1K2SH6logWarENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_+0x7a) [0x56281346f3aa]
    ./app/server/K(_ZN1K2FN4wJetENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbS6_S6_S6_+0x2bb) [0x562813507abb]
    ./app/server/K(_ZN1K8GwKraken11sync_walletEv+0x599) [0x5628135094b9]
    ./app/server/K(_ZNSt17_Function_handlerIFSt10unique_ptrINSt13__future_base12_Result_baseENS2_8_DeleterEEvENS1_12_Task_setterIS0_INS1_7_ResultISt6vectorIN1K7mWalletESaISA_EEEES3_ESt1
    2_Bind_simpleIFZNKS9_2Gw6walletMUlvE_clEvEUlvE_vEESC_EEE9_M_invokeERKSt9_Any_data+0x22) [0x5628134e6b92]
    ./app/server/K(_ZNSt13__future_base13_State_baseV29_M_do_setEPSt8functionIFSt10unique_ptrINS_12_Result_baseENS3_8_DeleterEEvEEPb+0x1b) [0x56281346789b]
    /usr/lib/libpthread.so.0(+0xedcf) [0x7f0d07cf3dcf]
    ./app/server/K(_ZNSt6thread11_State_implISt12_Bind_simpleIFZNSt13__future_base17_Async_state_implIS1_IFZNK1K2Gw6walletMUlvE_clEvEUlvE_vEESt6vectorINS4_7mWalletESaISB_EEEC4EOS9_EUlvE
    _vEEE6_M_runEv+0xd2) [0x5628134ed832]
    ./app/server/K(+0x54480f) [0x56281383280f]
    /usr/lib/libpthread.so.0(+0x708c) [0x7f0d07cec08c]
    /usr/lib/libc.so.6(clone+0x3f) [0x7f0d07a23e1f]

Yikes!
please copy and paste the error above into a new github issue (noworry for duplicates).
If you agree, go to https://github.com/ctubio/Krypto-trading-bot/issues/new

after next commit should be fixed but could be fixed better with a mutex that i didnt wanted to add yet; lemme know if you still have issues and will consider adding the mutex :dancer:
thanks''''

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juaxix picture juaxix  Â·  4Comments

Bzzz666 picture Bzzz666  Â·  8Comments

CarlitoGrey picture CarlitoGrey  Â·  7Comments

halessi picture halessi  Â·  8Comments

IgorPcelnikov picture IgorPcelnikov  Â·  4Comments