View Issue Details

IDProjectCategoryView StatusLast Update
0010631Talermerchant backendpublic2025-11-19 18:09
Reportervecirex Assigned ToChristian Grothoff  
PriorityurgentSeveritycrashReproducibilityN/A
Status closedResolutionfixed 
Product Version1.0 
Target Version1.2Fixed in Version1.2 
Summary0010631: TOPS/CHF payment leads to core dump in newest taler-merchant-httpd
DescriptionWhile continuining TOPS/CHF testing on the newest taler merchant from trixie-testing with @stefan and trying a payment with a freshly verified IBAN, we discovered:

Creating an order and attempting a payment leads taler-merchant-httpd to coredump.

How this looks like on https://taler.hacktivism.ch; taler-merchant-httpd --log=info was running and aborted like this:

taler-merchant-httpd@bcead3ae4f5e:/usr/share/taler-merchant/config.d$ 2025-11-19
T11:07:28.183363+0000 taler-merchant-httpd-139891(SG1JEZ0RYBAMRXJ13Q4W01K5D0) WA
RNING Endpoint `/favicon.ico' not known                                         
2025-11-19T11:08:03.450126+0000 taler-merchant-httpd-139891(9ZCYFCH1Q1XMHH2GY4YQ
R0QFY4) ERROR Assertion failed at taler-merchant-httpd_post-orders-ID-pay.c:5020
. Aborting.                                                                     

[2]-  Aborted                 (core dumped) taler-merchant-httpd
taler-merchant-httpd@bcead3ae4f5e:/usr/share/taler-merchant/config.d$
Steps To ReproduceCreate an order for a verified IBAN, try to pay it (in my case with an Android wallet) and use the newest taler-merchant-httpd:

taler-merchant-httpd@bcead3ae4f5e:/usr/share/taler-merchant/config.d$ taler-merchant-httpd --version
taler-merchant-httpd v1.2.0-git-3049fca
TagsNo tags attached.

Relationships

related to 0010630 assignedvecirex Meta/Reminder ticket for merchant-related issues / tickets not yet opened (not limited to, but focus context: TOPS/CHF) 

Activities

vecirex

2025-11-19 12:30

manager   ~0026540

How the payment looked like on Android when the backend crash happened.

vecirex

2025-11-19 12:37

manager   ~0026541

Last edited: 2025-11-19 12:42

Beautify: Remove some screen(1) session artefacts from the bug descr & steps to reproduce section.

vecirex

2025-11-19 12:57

manager   ~0026543

In the Android app, the payment of CHF 0.23 afterwards showed as pending while the service was down; after relaunching taler-merchant-httpd payment went through, however:

{
  "type": "payment",
  "transactionId": "txn:payment:GBEPX741GJ58XT13A8SNA29RD46YFHZQCDKYDW6AFTWTAH2EYRCG",
  "timestamp": {
    "t_s": 1763550472
  },
  "txState": {
    "major": "done"
  },
  "txActions": [
    "delete"
  ],
  "info": {
    "orderId": "2025.323-028BE9HBRXDS6",
    "merchant": {
      "name": "hacktivismch3sp",
      "address": {},
      "jurisdiction": {}
    },
    "summary": "Protein Powder Clemens Special Edition"
  },
  "amountRaw": "CHF:0.23",
  "amountEffective": "CHF:0.23",
  "scopes": [
    {
      "type": "exchange",
      "currency": "CHF",
      "url": "https://exchange.taler-ops.ch/"
    }
  ]
}

vecirex

2025-11-19 13:40

manager   ~0026544

Last edited: 2025-11-19 13:42

Doing a second payment in the same self-provisioned instance, the issue could be "reliably" reproduced, the core dump happens exactly after the payment is confirmed on the wallet-side; in the taler-merchant-httpd logs it even states that the order was already paid, while the app shows it pending after the crash.

Server-side:

2025-11-19T12:30:59.619150+0000 taler-merchant-httpd-139972(8GQFJY1NXKGQXYF8TTV6|
Z9QC8G) INFO Order `2025.323-03C0ZNCDXA3YM' (FVXQBKBJ) was fully paid           |
2025-11-19T12:30:59.640251+0000 taler-merchant-httpd-139972(8GQFJY1NXKGQXYF8TTV6|
Z9QC8G) INFO Notifying clients of new order 4 at N04B5R66                       |
2025-11-19T12:30:59.640726+0000 taler-merchant-httpd-139972(8GQFJY1NXKGQXYF8TTV6|
Z9QC8G) INFO Committing merchant DB transaction run pay                         |
2025-11-19T12:30:59.648110+0000 taler-merchant-httpd-139972(8GQFJY1NXKGQXYF8TTV6|
Z9QC8G) INFO Processing /pay in phase 6                                         |
2025-11-19T12:30:59.648156+0000 taler-merchant-httpd-139972(8GQFJY1NXKGQXYF8TTV6|
Z9QC8G) ERROR Assertion failed at taler-merchant-httpd_post-orders-ID-pay.c:5020|
. Aborting.                                                                     |
                                                                                |
[4]+  Aborted                 (core dumped) taler-merchant-httpd --log=info 


Client-side:

{
  "type": "payment",
  "transactionId": "txn:payment:FMN624F6TMAZM43EXF3CYGJTFZANA6XVJN39FHW1YH9NSWZDZYHG",
  "timestamp": {
    "t_s": 1763555450
  },
  "txState": {
    "major": "pending",
    "minor": "submit-payment"
  },
  "txActions": [
    "retry",
    "suspend",
    "abort"
  ],
  "info": {
    "orderId": "2025.323-03C0ZNCDXA3YM",
    "merchant": {
      "name": "hacktivismch3sp",
      "address": {},
      "jurisdiction": {}
    },
    "summary": "MechaKoopa Sticker"
  },
  "error": {
    "code": 7002,
    "hint": "Error response did not even contain JSON. The request URL might be wrong or the service might be unavailable.",
    "message": null,
    "when": {
      "t_ms": 1763555633327
    },
    "requestUrl": "https://taler.hacktivism.ch/instances/hacktivismch3sp/orders/2025.323-03C0ZNCDXA3YM/pay",
    "requestMethod": "POST",
    "httpStatusCode": 502,
    "contentType": "text/html"
  },
  "amountRaw": "CHF:0.05",
  "amountEffective": "CHF:0.05",
  "scopes": [
    {
      "type": "exchange",
      "currency": "CHF",
      "url": "https://exchange.taler-ops.ch/"
    }
  ]
}

vecirex

2025-11-19 13:45

manager   ~0026545

Last edited: 2025-11-19 13:53

Payment shows done at the URL with the QR code which is visible in the screenshot above (cf. https://bugs.gnunet.org/file_download.php?file_id=1970&type=bug) immediately after restarting taler-merchant-httpd.

Christian Grothoff

2025-11-19 15:13

manager   ~0026546

you should be getting a core dump. Can you gdb it and share the result of
(gdb) print *pc
(after going up to the TMH_post_orders_ID_pay function)?

Christian Grothoff

2025-11-19 15:19

manager   ~0026547

Never mind, figured it out.

Christian Grothoff

2025-11-19 15:23

manager   ~0026548

Fix committed to master branch.

vecirex

2025-11-19 18:08

manager   ~0026551

Great ty, can be confirmed to work with the newest version of taler-merchant released in trixie-testing, as also shown in today's QC session creating various orders and paying them; also refunds worked:

taler-merchant-httpd@bcead3ae4f5e:/var/taler-src/gnunet$ taler-merchant-httpd --version
taler-merchant-httpd v1.2.1-git-70957d8

Related Changesets

merchant: master 20f863ab

2025-11-19 16:23

Christian Grothoff


Details Diff
fix 0010631 Affected Issues
0010631
mod - src/backend/taler-merchant-httpd_post-orders-ID-pay.c Diff File

Issue History

Date Modified Username Field Change
2025-11-19 12:19 vecirex New Issue
2025-11-19 12:20 vecirex Description Updated
2025-11-19 12:30 vecirex Note Added: 0026540
2025-11-19 12:30 vecirex File Added: android-wallet-payment-error-taler-merchant-httpd-coredumped.jpg
2025-11-19 12:30 Stefan Relationship added related to 0010630
2025-11-19 12:34 vecirex Description Updated
2025-11-19 12:35 vecirex Steps to Reproduce Updated
2025-11-19 12:37 vecirex Description Updated
2025-11-19 12:37 vecirex Note Added: 0026541
2025-11-19 12:38 vecirex Summary payment leads to core dump in newest taler-merchant-httpd => TOPS/CHF payment leads to core dump in newest taler-merchant-httpd
2025-11-19 12:38 vecirex Description Updated
2025-11-19 12:42 vecirex Note Edited: 0026541
2025-11-19 12:57 vecirex Note Added: 0026543
2025-11-19 12:57 vecirex File Added: android-wallet-payment-error-first-then-successful-payment-after-restart-taler-merchant-httpd.jpg
2025-11-19 13:40 vecirex Note Added: 0026544
2025-11-19 13:40 vecirex File Added: taler-merchant-core-dumps-when-doing-payment-for-sure.png
2025-11-19 13:40 vecirex File Added: android-wallet-payment-error-taler-merchant-httpd-coredumped-2.jpg
2025-11-19 13:40 vecirex File Added: android-wallet-payment-error-taler-merchant-httpd-coredumped-3.jpg
2025-11-19 13:42 vecirex Note Edited: 0026544
2025-11-19 13:45 vecirex Note Added: 0026545
2025-11-19 13:45 vecirex File Added: taler-merchant-httpd-shows-payment-done-immediately-after-restart-of-taler-merchant-httpd.png
2025-11-19 13:53 vecirex Note Edited: 0026545
2025-11-19 15:05 Christian Grothoff Assigned To => Christian Grothoff
2025-11-19 15:05 Christian Grothoff Status new => assigned
2025-11-19 15:13 Christian Grothoff Note Added: 0026546
2025-11-19 15:19 Christian Grothoff Note Added: 0026547
2025-11-19 15:23 Christian Grothoff Changeset attached => merchant master 20f863ab
2025-11-19 15:23 Christian Grothoff Note Added: 0026548
2025-11-19 15:23 Christian Grothoff Status assigned => resolved
2025-11-19 15:23 Christian Grothoff Resolution open => fixed
2025-11-19 15:23 Christian Grothoff Fixed in Version => 1.2
2025-11-19 15:24 Christian Grothoff Product Version => 1.0
2025-11-19 15:24 Christian Grothoff Target Version => 1.2
2025-11-19 18:08 vecirex Note Added: 0026551
2025-11-19 18:09 vecirex Status resolved => closed