Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Threading issues in PearlDiver.java #35

Merged
merged 2 commits into from
Dec 23, 2016
Merged

Threading issues in PearlDiver.java #35

merged 2 commits into from
Dec 23, 2016

Conversation

alfredch
Copy link
Contributor

Tests with attachToTangle for a bundle with 4 txs showed the following situation:
In 7 of 21 cases, one of the 4 nonces was returned as 999999999...

PearlDiver.search() has an IN-OUT-argument. Tracing proved that the the transactionTrits are calculated correctly - for the fault nonces as well - but after return from search(), when using the trits for building the transaction object, the nonce is 999999999... This happens most frequently when the spam loop is active and then a concurrent call to attachToTangle is made.

A further problem is created by the missing join() within the PearDiver thread structure. The worker threads have a chance to continue running when they should terminate because the creator does not care to wait for their termination.

Alfred Keller and others added 2 commits December 23, 2016 21:51
@davassi
Copy link
Contributor

davassi commented Dec 23, 2016

@alfredch nice work

@davassi davassi merged commit a0cc667 into iotaledger:dev Dec 23, 2016
davassi added a commit that referenced this pull request Jan 17, 2017
* Enabling (--remote) access.

* Updating PearlDiver

* UTF8 logo. Support for Repeater.

* Fixed regression on attachToTangle

* API statement log counter

* fixed debug parameter bill

* Version 1.1.2.3

* Threading issues in PearlDiver.java (#35)

* Thread safety and thread coordination

* Update PearlDiver.java

Indentation with spaces instead of tabs

* Obviated the bitIndex loop

* Updated milestone counter and snapshot (#45)

* added a new flag (--remote-limit-api) to restrict remote api access

* fixed responsechannel handling

* added pd unit test to dev

* Update pom.xml

1.1.2.3 -> 1.1.2.4

* Update README.md

* Update IRI.java
GalRogozinski pushed a commit to GalRogozinski/iri that referenced this pull request Mar 26, 2019
stplaydog referenced this pull request in StreamUnion/StreamNet Jun 23, 2019
…ceivedData' with 'pr… (#35)

* split process of Transaction out of 'preProcessReceivedData' with 'printStatistics'

* add judgement.

* throw the exception
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants