Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on Kraken and Poloniex #630

Closed
werkkrew opened this issue Feb 7, 2018 · 5 comments
Closed

Segfault on Kraken and Poloniex #630

werkkrew opened this issue Feb 7, 2018 · 5 comments

Comments

@werkkrew
Copy link

werkkrew commented Feb 7, 2018

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 docker does not like naming containers uppercase single case letters #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: "`
".

@ctubio
Copy link
Owner

ctubio commented Feb 8, 2018

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 1 cpu?
(ima try to synchronize ncurses calls meanwhile)

@ctubio ctubio added the 💀 bug label Feb 8, 2018
@ctubio ctubio changed the title Segfault on Kraken Segfault on Kraken and Poloniex Feb 8, 2018
@werkkrew
Copy link
Author

werkkrew commented Feb 8, 2018 via email

@ctubio
Copy link
Owner

ctubio commented Feb 8, 2018

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

@werkkrew
Copy link
Author

werkkrew commented Feb 8, 2018

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 docker does not like naming containers uppercase single case letters #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

@ctubio
Copy link
Owner

ctubio commented Feb 8, 2018

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 💃
thanks''''

@ctubio ctubio closed this as completed in e21abb5 Feb 8, 2018
ctubio added a commit that referenced this issue Feb 8, 2018
Free Software Free Society

To support commits by ctubio,
you can buy-me-a-drink with a small git tip at:
  1GitTipgxvKB3zjCLXRcSgDhC9pivkpc7u

I promise to drink chocolate milk in the development of the next commit.

To request new features or in case this commit breaks something for you,
please create a new github issue with all possible details,
but never share your API Keys!

Signed-off-by: Carles Tubio <ctubio@users.noreply.github.com>

Free Software Free Society

To support commits by ctubio,
you can buy-me-a-drink with a small git tip at:
  1GitTipgxvKB3zjCLXRcSgDhC9pivkpc7u

I promise to drink chocolate milk in the development of the next commit.

To request new features or in case this commit breaks something for you,
please create a new github issue with all possible details,
but never share your API Keys!

Signed-off-by: Carles Tubio <ctubio@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants