View Issue Details

IDProjectCategoryView StatusLast Update
0006829Talermerchant backendpublic2024-01-12 13:04
Reportersebasjm 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
PriorityurgentSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006829: merchant backend crash if exchange does not support wire method
Descriptionbackend says:

    WARNING Exchange does not support our wire method. Retrying in 1 m

a minute after

    WARNING Exchange does not support `asd' wire method (will retry later)

then it blows up in pieces

    Segmentation fault (core dumped) taler-merchant-httpd

Exchange has x-taler-bank as wire method. Merchant backend was intentionally set to "payto://asd/asd".

Steps To Reproducecreate an instance with invalid account
try to use the storefront to buy something

will add a test later
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2021-04-12 13:12

manager   ~0017736

Are you still preparing a test for this? If so, please use your merchant.git/src/testing/test_merchant_instance_response.sh as a starting point (feel free to extend the script or to create another one).

sebasjm

2021-04-12 14:21

developer   ~0017737

No, I wasn't. But I can switch into this for a couple of minutes. Test on the way.

sebasjm

2021-04-12 20:56

developer   ~0017738

Is taking longer than I wanted to reproduce the error with a script. It happens 100% of time in my system so It seems more related to the environment configuration.
In order to make some progress, im adding more information here from a debugging session with gdb.

Its seems that after the merchant queries the exchange for the wire information it fails to get the fee from the account
important: fees is null at taler-merchant-httpd_exchanges.c:368


 
(gdb) frame 0
#0 0x00005594dd5a0d85 in process_wire_fees (exchange=0x5594dec79950, master_pub=0x5594dec954e8, wire_method=0x5594dec9c320 "x-taler-bank",
    payto_uri=0x5594deca41d0 "payto://x-taler-bank/bank.taler:5882/exchangeminator", fees=0x0) at taler-merchant-httpd_exchanges.c:368
368 (fees->start_date.abs_value_us < endp->end_date.abs_value_us) )
(gdb) frame 1
#1 0x00005594dd5a14d2 in process_wire_accounts (exchange=0x5594dec79950, master_pub=0x5594dec954e8, accounts_len=1, accounts=0x7ffe4ecd3710)
    at taler-merchant-httpd_exchanges.c:482
482 ec = process_wire_fees (exchange,
(gdb) frame 2
#2 0x00005594dd5a1a91 in handle_wire_data (cls=0x5594dec79950, hr=0x7ffe4ecd3910, accounts_len=1, accounts=0x7ffe4ecd3710)
    at taler-merchant-httpd_exchanges.c:663
663 ecx = process_wire_accounts (exchange,
(gdb) frame 3
#3 0x00007f5acb55fd36 in handle_wire_finished (cls=0x5594deca5cf0, response_code=200, response=0x5594dec9b090) at exchange_api_wire.c:332
332 exchange_api_wire.c: No such file or directory.
(gdb) frame 4

sebasjm

2021-04-13 12:05

developer   ~0017739

Reading the source code and seems an easy fix, Im doing some testing first and if its works i will push the fix.

sebasjm

2021-04-13 12:33

developer   ~0017740

fix in eaff762e..754ec646, please check

Christian Grothoff

2021-04-14 11:45

manager   ~0017741

Patch was good, thanks!

Issue History

Date ModifiedUsernameFieldChange
2021-04-01 19:50sebasjmNew Issue
2021-04-01 19:50sebasjmStatusnew => assigned
2021-04-01 19:50sebasjmAssigned To => Christian Grothoff
2021-04-02 09:17Christian GrothoffPrioritynormal => urgent
2021-04-02 09:17Christian GrothoffTarget Versiongit (master) => 0.9
2021-04-12 13:12Christian GrothoffNote Added: 0017736
2021-04-12 14:21sebasjmNote Added: 0017737
2021-04-12 20:56sebasjmNote Added: 0017738
2021-04-13 12:05sebasjmNote Added: 0017739
2021-04-13 12:33sebasjmStatusassigned => feedback
2021-04-13 12:33sebasjmNote Added: 0017740
2021-04-14 11:45Christian GrothoffNote Added: 0017741
2021-04-14 11:46Christian GrothoffStatusfeedback => informing
2021-04-14 11:46Christian GrothoffResolutionopen => fixed
2021-04-14 11:46Christian GrothoffFixed in Version => 0.9
2021-07-30 11:57Christian GrothoffFixed in Version0.9 => 0.8.1
2021-07-30 11:59Christian GrothoffTarget Version0.9 => 0.8.1
2021-07-30 12:01Christian GrothoffFixed in Version0.8.1 => 0.8
2021-07-30 12:02Christian GrothoffTarget Version0.8.1 => 0.8
2021-08-24 14:23Christian GrothoffStatusinforming => closed
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend