View Issue Details

IDProjectCategoryView StatusLast Update
0005503Talermerchant backendpublic2019-12-20 18:12
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
PriorityurgentSeverityblockReproducibilityrandom
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Versiongit (master) 
Target Version0.6Fixed in Version0.6 
Summary0005503: {'code': 2501, 'hint': 'db error: could not check for existing order'}
DescriptionA user reports:
This message appeared while paying for a chapter of Stallmans book:

{'code': 2501, 'hint': 'db error: could not check for existing order'}
Additional InformationThe 2501 error had 5 (!) different meanings, I've changed the code now to disambiguate them. That said, the "hint" narrows it down to just two cases, either a hard or a soft transaction failure when we ask the DB about the existing contract.

I'm not sure why the 'soft' error isn't retried, but it seems unlikely that we had a truly conflicting transaction given our current transaction rate and that Peter tried several times. My best guess right now is that we're missing a commit/rollback somewhere and thus everything is run as part of some 'ancient' transaction (and thus if we re-start the merchant, things will start to work again just until we get into that logic of the not properly terminated transaction).

Analysis shows that the _proposal.c logic of the merchant backend doesn't seem to properly deal with transactions (I see no begin/commit, but multiple SQL statements!), and also while there is a MAX_RETRIES the SOFT case is not retried. This may not explain this bug, but there is work to be done there!!!
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2019-01-31 17:51

manager   ~0013539

Marcello is right (in his e-mail) that there is nothing more to be done here, in part because I actually did go over the file in the meantime, just forgot to 'resolve' this bug.

Issue History

Date ModifiedUsernameFieldChange
2018-12-22 11:47Christian GrothoffNew Issue
2018-12-22 11:47Christian GrothoffStatusnew => assigned
2018-12-22 11:47Christian GrothoffAssigned To => Marcello Stanisci
2019-01-31 17:51Christian GrothoffAssigned ToMarcello Stanisci => Christian Grothoff
2019-01-31 17:51Christian GrothoffStatusassigned => informing
2019-01-31 17:51Christian GrothoffResolutionopen => fixed
2019-01-31 17:51Christian GrothoffFixed in Version => 0.6
2019-01-31 17:51Christian GrothoffNote Added: 0013539
2019-12-20 18:12Christian GrothoffStatusinforming => closed
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend