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

PersistanceManager fails to persist PendingTrades #6953

Closed
erfeereffrefer opened this issue Nov 30, 2023 · 3 comments · Fixed by #6955
Closed

PersistanceManager fails to persist PendingTrades #6953

erfeereffrefer opened this issue Nov 30, 2023 · 3 comments · Fixed by #6955

Comments

@erfeereffrefer
Copy link

Description

PersistanceManager fails to persist PendingTrades after failed trade resulting in good trades being lost since last restart.

Version

1.9.14

Steps to reproduce

Have offers open, someone takes an offer and it fails. Have good non failed trades pending. Whenever PersistenceManager tries to persist get a null pointer exception message.

Expected behaviour

Failed trades shouldn't cause PersistanceManager to fail to persist other non failed trades. In fact failed trades should also persist.

Actual behaviour

When Bisq is in this state and I try to close it it fails to close and hangs. Once killing and reopening good trades that were added after the failed trade are lost completely.

When Bisq is in this state it also throws the same null pointer exception when I attempt to backup.

This issue has persisted amongst multiple version and caused countless trades of mine to go to arbitration.

Screenshots

Screenshot 2023-12-01 at 10 05 34 am

Device or machine

Linux

Additional info

Dec.-01 09:37:09.400 [JavaFX Application Thread] INFO b.c.p.PersistenceManager: Start flushAllDataToDisk
Dec.-01 09:37:09.401 [JavaFX Application Thread] ERROR b.c.p.PersistenceManager: Error in saveToFile toProtoMessage: TradableList, FailedTrades
Dec.-01 09:37:09.401 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Uncaught Exception from thread JavaFX Application Thread
Dec.-01 09:37:09.401 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableMessage= java.lang.NullPointerException
Dec.-01 09:37:09.401 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableClass= class java.lang.RuntimeException
Dec.-01 09:37:09.401 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Stack trace:
java.lang.RuntimeException: java.lang.NullPointerException
at bisq.common.persistence.PersistenceManager.persistNow(PersistenceManager.java:441)
at bisq.common.persistence.PersistenceManager.persistNow(PersistenceManager.java:419)
at bisq.common.persistence.PersistenceManager.lambda$flushAllDataToDisk$3(PersistenceManager.java:152)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at bisq.common.persistence.PersistenceManager.lambda$flushAllDataToDisk$4(PersistenceManager.java:139)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:447)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:446)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NullPointerException
at bisq.core.trade.model.bisq_v1.Contract.toProtoMessage(Contract.java:230)
at bisq.core.trade.model.bisq_v1.Trade.lambda$toProtoMessage$2(Trade.java:542)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at bisq.core.trade.model.bisq_v1.Trade.toProtoMessage(Trade.java:542)
at bisq.core.trade.model.bisq_v1.BuyerAsMakerTrade.toProtoMessage(BuyerAsMakerTrade.java:76)
at bisq.core.trade.model.bisq_v1.BuyerAsMakerTrade.toProtoMessage(BuyerAsMakerTrade.java:39)
at bisq.common.proto.ProtoUtil.lambda$collectionToProto$0(ProtoUtil.java:88)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at bisq.common.proto.ProtoUtil.collectionToProto(ProtoUtil.java:97)
at bisq.core.trade.model.TradableList.toProtoMessage(TradableList.java:67)
at bisq.common.proto.persistable.PersistableEnvelope.toPersistableMessage(PersistableEnvelope.java:30)
at bisq.common.persistence.PersistenceManager.persistNow(PersistenceManager.java:427)

Copy link

boring-cyborg bot commented Nov 30, 2023

Thanks for opening your first issue here!

Be sure to follow the issue template. Your issue will be reviewed by a maintainer and labeled for further action.

@pazza83
Copy link

pazza83 commented Dec 2, 2023

I chatted to @erfeereffrefer on Matrix.

I can confirm they had a couple of trades enter mediation where they did not have the trade on their Bisq instance. I was unable to assist them in support chat as not familiar with the PersistanceManager issue.

It would be good for one of the devs to have a look into this.

@ghost
Copy link

ghost commented Dec 3, 2023

  • A PR has been created to mitigate the issue, so that persistence does not get interrupted.
  • Steps to reproduce do not reproduce. Failed trades do not cause persistence issue.
  • Callstack shows NPE caused by null RefundAgentNodeAddress.
  • Should never be null. Root cause of OP's issue: unknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants