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

java.lang.IllegalStateException on startup #3072

Closed
yoshimo opened this issue Aug 10, 2019 · 8 comments
Closed

java.lang.IllegalStateException on startup #3072

yoshimo opened this issue Aug 10, 2019 · 8 comments
Labels
a:bug an:investigation in:trade-process in:wallet is:critical https://bisq.wiki/Critical_bug is:priority PR or issue marked with this label is up for compensation

Comments

@yoshimo
Copy link

yoshimo commented Aug 10, 2019

When i start bisq 1.1.5 i get the above error.

bisq.log.zip

@freimair
Copy link
Contributor

here is the relevant part of the log:

Aug.-10 11:48:25.107 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Stack trace:
java.lang.IllegalStateException
	at com.google.common.base.Preconditions.checkState(Preconditions.java:429)
	at org.bitcoinj.wallet.Wallet.addWalletTransaction(Wallet.java:2879)
	at org.bitcoinj.wallet.Wallet.maybeCommitTx(Wallet.java:2430)
	at bisq.core.btc.wallet.TxBroadcaster.broadcastTx(TxBroadcaster.java:110)
	at bisq.core.btc.wallet.TradeWalletService.broadcastTx(TradeWalletService.java:1050)
	at bisq.core.arbitration.DisputeManager.onDisputeResultMessage(DisputeManager.java:956)
	at bisq.core.arbitration.DisputeManager.dispatchMessage(DisputeManager.java:335)
	at bisq.core.arbitration.DisputeManager.lambda$applyMessages$14(DisputeManager.java:289)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at bisq.core.arbitration.DisputeManager.applyMessages(DisputeManager.java:285)
	at bisq.core.arbitration.DisputeManager.tryApplyMessages(DisputeManager.java:261)
	at bisq.core.arbitration.DisputeManager.lambda$new$1(DisputeManager.java:164)
	at bisq.network.p2p.P2PService.lambda$processMailboxEntry$9(P2PService.java:527)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at bisq.network.p2p.P2PService.processMailboxEntry(P2PService.java:526)
	at bisq.network.p2p.P2PService.lambda$maybeProcessAllMailboxEntries$12(P2PService.java:644)
	at java.base/java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4791)
	at bisq.network.p2p.P2PService.maybeProcessAllMailboxEntries(P2PService.java:642)
	at bisq.network.p2p.P2PService.onUpdatedDataReceived(P2PService.java:341)
	at bisq.network.p2p.peers.getdata.RequestDataManager$2.onComplete(RequestDataManager.java:339)
	at bisq.network.p2p.peers.getdata.RequestDataHandler.onMessage(RequestDataHandler.java:291)
	at bisq.network.p2p.network.NetworkNode.lambda$onMessage$4(NetworkNode.java:344)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at bisq.network.p2p.network.NetworkNode.onMessage(NetworkNode.java:344)
	at bisq.network.p2p.network.Connection.lambda$onMessage$4(Connection.java:428)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at bisq.network.p2p.network.Connection.lambda$onMessage$5(Connection.java:428)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175)
	at java.base/java.lang.Thread.run(Thread.java:844)
 

first step I assume would be to handle the error more gracefully so that we have more information if that kind of situation happens again.

@stale
Copy link

stale bot commented Dec 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Dec 18, 2019
@yoshimo
Copy link
Author

yoshimo commented Dec 21, 2019

Do we handle the logging better now @freimair ?

@stale stale bot removed the was:dropped label Dec 21, 2019
@ripcurlx ripcurlx added the is:priority PR or issue marked with this label is up for compensation label Feb 18, 2020
@ripcurlx ripcurlx added the is:critical https://bisq.wiki/Critical_bug label Feb 18, 2020
@ripcurlx
Copy link
Contributor

Aug.-10 11:48:25.099 [JavaFX Application Thread] WARN  o.b.w.Wallet: Saw two pending transactions double spend each other 
Aug.-10 11:48:25.100 [JavaFX Application Thread] WARN  o.b.w.Wallet:   offending input is input 0 
Aug.-10 11:48:25.100 [JavaFX Application Thread] WARN  o.b.w.Wallet: 0de89a4edccd7b231560266515fee6fb9f26faed69a95add5f98495c2923b03b: 0100000001faf7e72e692144016f8989d85b7a4d63f52351cbaea87c1672c25f59a545fb2400000000fdfe0000483045022100fd33f1febaad6cd903117fb260515356e94bd16136dba82d5f2fb7cf246c1ae40220325f7d5c1ec83997d5a7e25c8923bafef2b7f6ee25f2c4d4a73892918563c97b014830450221009b380259facaf4010fb5c687aef362944e9dbcf2b4bb3ff5b530c26cc1b11cf202205b5eb36c10e857928baf367e0292cfc36fc050e8a9b9ac6b4bcae2779e39481d014c69522103036957627036bb8d9ca0f1eae67bedd0d4f6b173a2070666a5b5117b6d0a66242103cfafad7eded8d07f018af5939d6cf012a0961d80dbcd9e88f3ad3cd160f981d621023cdb6b70218b34237f848ca81c8a4b2d3ad9542cfbe5220e0ef9c81d2473d56753aeffffffff02c07a1000000000001976a91402065b04f01eb4c636f1cf3d64ec4ae214aef6a088ac20a10700000000001976a914e7cdff55ce30628765117f968eda806ae580ef7088ac00000000 
Aug.-10 11:48:25.100 [JavaFX Application Thread] WARN  o.b.w.Wallet: fd5a0d204a86c70e1c97ce529d95ed33309d865da677fa3f13bdb0470b859dfa: 0100000001faf7e72e692144016f8989d85b7a4d63f52351cbaea87c1672c25f59a545fb2400000000fdfe000048304502210082523b1c841f98a64cc8299e947b79b0e28e8d4621b3c3452a830fa1f3be1aa202201a4ac5f5fab6e12e81ef26b0402f09c94f08c6a1646794453a0f2d50be431e35014830450221009b380259facaf4010fb5c687aef362944e9dbcf2b4bb3ff5b530c26cc1b11cf202205b5eb36c10e857928baf367e0292cfc36fc050e8a9b9ac6b4bcae2779e39481d014c69522103036957627036bb8d9ca0f1eae67bedd0d4f6b173a2070666a5b5117b6d0a66242103cfafad7eded8d07f018af5939d6cf012a0961d80dbcd9e88f3ad3cd160f981d621023cdb6b70218b34237f848ca81c8a4b2d3ad9542cfbe5220e0ef9c81d2473d56753aeffffffff02c07a1000000000001976a91402065b04f01eb4c636f1cf3d64ec4ae214aef6a088ac20a10700000000001976a914e7cdff55ce30628765117f968eda806ae580ef7088ac00000000 
Aug.-10 11:48:25.104 [JavaFX Application Thread] INFO  o.b.w.Wallet: ->dead: 0de89a4edccd7b231560266515fee6fb9f26faed69a95add5f98495c2923b03b 
Aug.-10 11:48:25.105 [JavaFX Application Thread] INFO  b.c.a.DisputeManager: Send AckMessage for DisputeCommunicationMessage to peer g72ouph23eznvpuz.onion:9999. tradeId=15758-532a94d7-7034-4c28-a05a-4e6d1ee5e560-113, uid=3db365f8-2798-4995-8daf-6a4168d334ce 
Aug.-10 11:48:25.106 [JavaFX Application Thread] WARN  b.n.p.P2PService: We don't have the peer in our persisted peers so we don't know his capabilities. We decide to not sent the msg. peersNodeAddress=g72ouph23eznvpuz.onion:9999 
Aug.-10 11:48:25.106 [JavaFX Application Thread] ERROR b.c.a.DisputeManager: AckMessage for DisputeCommunicationMessage failed. Peer g72ouph23eznvpuz.onion:9999. tradeId=15758-532a94d7-7034-4c28-a05a-4e6d1ee5e560-113, uid=3db365f8-2798-4995-8daf-6a4168d334ce, errorMessage=We did not send the EncryptedMailboxMessage because the peer does not support the capability. 
Aug.-10 11:48:25.106 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Uncaught Exception from thread JavaFX Application Thread 
Aug.-10 11:48:25.106 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableMessage= null 
Aug.-10 11:48:25.106 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableClass= class java.lang.IllegalStateException 
Aug.-10 11:48:25.107 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Stack trace:
java.lang.IllegalStateException
	at com.google.common.base.Preconditions.checkState(Preconditions.java:429)
	at org.bitcoinj.wallet.Wallet.addWalletTransaction(Wallet.java:2879)
	at org.bitcoinj.wallet.Wallet.maybeCommitTx(Wallet.java:2430)
	at bisq.core.btc.wallet.TxBroadcaster.broadcastTx(TxBroadcaster.java:110)
	at bisq.core.btc.wallet.TradeWalletService.broadcastTx(TradeWalletService.java:1050)
	at bisq.core.arbitration.DisputeManager.onDisputeResultMessage(DisputeManager.java:956)
	at bisq.core.arbitration.DisputeManager.dispatchMessage(DisputeManager.java:335)

The problem starts already before. It is some double spending warning.

@cbeams cbeams added the a:bug label Feb 27, 2020
@chimp1984
Copy link
Contributor

It was in that code part:

 case DEAD:  // double-spend in alt chain
            checkState(dead.put(tx.getHash(), tx) == null);
            break;

Seems a double spent tx got added twice to the wallet, which should not be possible.

@darosior
Copy link

darosior commented Nov 24, 2020

Encountered this too, and this exactly what happened to me (double spend).

@chimp1984
Copy link
Contributor

@darosior We release to day 1.5.0. Wait until its out then update, make a backup and then do a spv resync with 1.5.0. Never downgrade back to an older version!

@darosior
Copy link

huh? I didn't downgrade, but yeah will check if 1.5.0 fixes this (unlikely as the wallet seems to be in a weird state after the double spend).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug an:investigation in:trade-process in:wallet is:critical https://bisq.wiki/Critical_bug is:priority PR or issue marked with this label is up for compensation
Projects
None yet
Development

No branches or pull requests

7 participants