Samourai-Wallet / whirlpool-client-cli

Command line Whirlpool client
Other
16 stars 13 forks source link

Whirlpool-cli crashing - java.lang.OutOfMemoryError #16

Closed pajasevi closed 4 years ago

pajasevi commented 4 years ago

My whirlpool-cli is crashing every day due to java.lang.OutOfMemoryError. Sometimes it is able to be killed gracefully, sometimes there is a need to kill the whole Java process.

Hardware: Raspberry Pi4 OS: Raspbian

logs:

    at org.springframework.messaging.simp.stomp.DefaultStompSession.afterConnectFailure(DefaultStompSession.java:398) ~[spring-messaging-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]
    at org.springframework.web.socket.messaging.WebSocketStompClient$WebSocketTcpConnectionHandlerAdapter.onFailure(WebSocketStompClient.java:314) ~[spring-websocket-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]
    at org.springframework.util.concurrent.ListenableFutureCallbackRegistry.notifyFailure(ListenableFutureCallbackRegistry.java:86) ~[spring-core-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]
    at org.springframework.util.concurrent.ListenableFutureCallbackRegistry.addCallback(ListenableFutureCallbackRegistry.java:67) ~[spring-core-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]
    at org.springframework.util.concurrent.ListenableFutureTask.addCallback(ListenableFutureTask.java:61) ~[spring-core-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]
    at org.springframework.util.concurrent.SettableListenableFuture.addCallback(SettableListenableFuture.java:76) ~[spring-core-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]
    at org.springframework.web.socket.messaging.WebSocketStompClient.connect(WebSocketStompClient.java:268) ~[spring-websocket-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]
    at org.springframework.web.socket.messaging.WebSocketStompClient.connect(WebSocketStompClient.java:249) ~[spring-websocket-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]
    at com.samourai.stomp.client.JavaStompClient.connect(JavaStompClient.java:68) ~[classes!/:na]
    at com.samourai.stomp.client.StompTransport.connect(StompTransport.java:33) ~[whirlpool-client-0.23.0.jar!/:na]
    at com.samourai.whirlpool.client.mix.dialog.MixSession.connect(MixSession.java:77) ~[whirlpool-client-0.23.0.jar!/:na]
    at com.samourai.whirlpool.client.mix.dialog.MixSession$3.onTransportDisconnected(MixSession.java:278) ~[whirlpool-client-0.23.0.jar!/:na]
    at com.samourai.stomp.client.StompTransport$1.onError(StompTransport.java:54) ~[whirlpool-client-0.23.0.jar!/:na]
    at com.samourai.stomp.client.StompTransport$1.onError(StompTransport.java:36) ~[whirlpool-client-0.23.0.jar!/:na]
    at com.samourai.stomp.client.JavaStompClient$1.handleTransportError(JavaStompClient.java:149) ~[classes!/:na]

2020-01-06 23:26:17.624 ERROR 8929 --- [t-1578349073606] c.samourai.stomp.client.JavaStompClient  :  ! transportError: java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
2020-01-06 23:26:17.625  INFO 8929 --- [t-1578349073606] c.s.w.c.m.d.MixSession[1578349073606]    :  ! Failed to connect to server. Please check your connectivity or retry later.
2020-01-06 23:26:17.625 ERROR 8929 --- [t-1578349073606] c.s.w.c.mix.MixClient[1578349073606]     : ERROR: Disconnected
2020-01-06 23:26:17.625 ERROR 8929 --- [t-1578349073606] s.w.c.w.l.LoggingWhirlpoolClientListener :  - [MIX] ⣿ WHIRLPOOL FAILED ⣿ Disconnected
2020-01-06 23:26:17.626  INFO 8929 --- [t-1578349073606] c.s.w.client.wallet.WhirlpoolWallet      : onMixFail(DISCONNECTED): will retry later
^C[76894,737s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 320k, guardsize: 0k, detached.
zeroleak commented 4 years ago

thanks, will be fixed soon

zeroleak commented 4 years ago

threads leak was identified, will be fixed today

pajasevi commented 4 years ago

That's amazing, thanks!

zeroleak commented 4 years ago

Fixed in 0.10.2 Also added a command [S]ystem to debug system threads and memory usage