View Issue Details

IDProjectCategoryView StatusLast Update
0005010Talerexchangepublic2021-09-02 16:22
ReporterChristian Grothoff Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeveritymajorReproducibilityrandom
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Versiongit (master) 
Target Version0.4Fixed in Version0.4 
Summary0005010: DB serializability violations not always handled gracefully
DescriptionSometimes the DB plugin returns a "hard" error code for a serializabiltiy violation, causing the exchange to not retry the request, but go all 500 on the user.

We need to go over the code and properly identify all places where serializability violations can occur and double-check their handling.
Steps To ReproduceRun multiple instances of

taler-merchant-generate-payments -n 1000 -e -m

against one merchant/exchange backend produces errors like:

May 14 15:31:46-114418 taler-exchange-httpd-12796 ERROR Query failed at plugin_exchangedb_postgres.c:2065: could not serialize access due to read/write dependencies among transactions/Reason code: Canceled on identification as a pivot, during write./ERROR: could not serialize access due to read/write dependencies among transactions
DETAIL: Reason code: Canceled on identification as a pivot, during write.
HINT: The transaction might succeed if retried.
/PGRES_FATAL_ERROR/ERROR: could not serialize access due to read/write dependencies among transactions
DETAIL: Reason code: Canceled on identification as a pivot, during write.
HINT: The transaction might succeed if retried.

May 14 15:31:46-114486 taler-exchange-httpd-12796 ERROR Assertion failed at plugin_exchangedb_postgres.c:2483.
May 14 15:31:46-114502 taler-exchange-httpd-12796 ERROR Assertion failed at taler-exchange-httpd_db.c:872.

and

May 14 14:10:53-171686 taler-merchant-generate-payments-4409 ERROR Unexpected response code 500 to command withdraw-coin-3
{"error": "internal error", "code": 1108, "hint": "Failure in database interaction"}May 14 14:10:53-171790 taler-merchant-generate-payments-4409 ERROR Assertion failed at taler-merchant-generate-payments.c:680.


Configuration file in use for this against ~0.3 is attached.
TagsNo tags attached.
Attached Files
taler.conf (4,053 bytes)

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2017-05-25 00:07

manager   ~0012159

6bb2631..6029ed7 contains some initial work in this direction, adding a "state" to the sessions to track serializability violations, logic to test the PQ return code against this situation, and modifies some (!) of the functions to return #GNUNET_NO if such a violation is detected.

TODO:
* broaden the logic to all functions in the API
* actually handle the return code in all clients using the API
* make the same changes also in the auditor and merchant backend DB logic

Christian Grothoff

2017-06-25 11:05

manager   ~0012268

Exchange and auditor have been updated, merchant backend is still TBD.

Christian Grothoff

2017-06-25 11:11

manager   ~0012269

For the merchant, the payment generators (sometimes, after a while) fail IF one runs 2 merchant instances and 4 payment generators. While the merchant backend fails to log a proper error message, I suspect this is due to this issue not being fixed yet in the merchant backend.

Christian Grothoff

2017-06-29 17:25

manager   ~0012282

Fixed merchantdb handling of soft errors (by visual inspection); found that generate-payments test failed in part because of timeout given large values of '-n'. Adjusted timeout based on value given to '-n'.

Christian Grothoff

2021-09-02 16:14

manager   ~0018295

Fix committed to master branch.

Issue History

Date ModifiedUsernameFieldChange
2017-05-14 13:40Christian GrothoffNew Issue
2017-05-14 13:40Christian GrothoffStatusnew => assigned
2017-05-14 13:40Christian GrothoffAssigned To => Christian Grothoff
2017-05-14 13:40Christian GrothoffFile Added: taler.conf
2017-05-25 00:07Christian GrothoffNote Added: 0012159
2017-06-25 11:05Christian GrothoffNote Added: 0012268
2017-06-25 11:11Christian GrothoffNote Added: 0012269
2017-06-29 17:25Christian GrothoffNote Added: 0012282
2017-06-29 18:01Christian GrothoffStatusassigned => informing
2017-06-29 18:01Christian GrothoffResolutionopen => fixed
2017-06-29 18:01Christian GrothoffFixed in Version => 0.4
2017-06-29 18:01Christian GrothoffTarget Version0.5 => 0.4
2017-10-18 13:42Christian GrothoffStatusinforming => closed
2021-09-02 16:13Christian Grothoff
2021-09-02 16:13Christian Grothoff
2021-09-02 16:13Christian Grothoff
2021-09-02 16:13Christian Grothoff
2021-09-02 16:13Christian Grothoff
2021-09-02 16:13Christian Grothoff
2021-09-02 16:14Christian GrothoffNote Added: 0018295
2021-09-02 16:22Christian Grothoff