View Issue Details

IDProjectCategoryView StatusLast Update
0007007Talerexchangepublic2022-11-04 20:52
Reportersebasjm Assigned ToChristian Grothoff  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.9Fixed in Version0.9 
Summary0007007: exchange crash running initialize_taler_system.sh script in the merchant test suite
DescriptionI'm trying to build a setup to run integration tests and found this issue.

scripts ends at line 180 (aprox) doing the request to the exchange for the keys (/keys) after singing and uploading configuration (with taler-exchange-offline)

Exchange logs:

2021-08-31T16:45:59.747175+0000 taler-exchange-httpd-12908(MEE5M6GZVY98BRRCKPNJ41ZEWM) INFO Creating /keys at cherry pick date Thu Jan 01 00:00:00 1970
2021-08-31T16:45:59.748188+0000 taler-exchange-httpd-12908(MEE5M6GZVY98BRRCKPNJ41ZEWM) ERROR Assertion failed at json_pack.c:42. Aborting.

Exchange Secmod RSA logs:

2021-08-31T19:29:59.018366+0000 taler-exchange-secmod-rsa-1398 INFO Sending RSA denomination key M29MNZV7 (coin_kudos_ct_1)
2021-08-31T19:29:59.018705+0000 taler-exchange-secmod-rsa-1398 WARNING `sendto' failed at taler-exchange-secmod-rsa.c:548 with error: No such file or directory
2021-08-31T19:29:59.018763+0000 taler-exchange-secmod-rsa-1398 INFO Client /tmp/taler-system-runtime//exchange-secmod-rsa/clients/cliIY8Zju must have disconnected


Core dump info:

#5 0xb6dec938 in GNUNET_JSON_pack_ (spec=0xbe81f5e4) at json_pack.c:42
#6 0x0045d488 in create_krd (ksh=0x1b335c8, denom_keys_hash=0xbe81f6ec, last_cpd=..., signkeys=0x1b50a18, recoup=0x1b545a8, denoms=0x1b54600)
    at taler-exchange-httpd_keys.c:1442
#7 0x0045e004 in finish_keys_response (ksh=0x1b335c8) at taler-exchange-httpd_keys.c:1641
#8 0x0045e632 in build_key_state (hs=0x1b509e0, management_only=false) at taler-exchange-httpd_keys.c:1757
#9 0x0045e950 in get_key_state (management_only=false) at taler-exchange-httpd_keys.c:1817
#10 0x0045e9b8 in TEH_keys_get_state () at taler-exchange-httpd_keys.c:1835
#11 0x0045eefe in TEH_keys_get_handler (rc=0x1b6bf98, args=0xbe81f860) at taler-exchange-httpd_keys.c:2081

> uname -a
Linux ubuntu 5.11.0-1016-raspi #17-Ubuntu SMP PREEMPT Thu Jul 29 15:35:34 UTC 2021 armv7l armv7l armv7l GNU/Linux

exchange revision 4b9ae0bb93743cace6a835df1a7a8918a3d1ed63


Not sure if this is related, but trying to run make check fails at test_helper_rsa

2021-08-31T19:33:22.080882+0000 test-helper-rsa-1979 INFO Requesting signature over 256 bytes with key 5075T4QM
2021-08-31T19:33:22.081209+0000 taler-exchange-secmod-rsa-1993 INFO Received request to sign over 256 bytes with key 5075T4QM
2021-08-31T19:33:22.129064+0000 taler-exchange-secmod-rsa-1993 INFO Sending RSA signature
2021-08-31T19:33:22.140915+0000 test-helper-rsa-1979 INFO Received valid signature for key 5075T4QM
2021-08-31T19:33:22.144170+0000 test-helper-rsa-1979 INFO Requesting signature over 256 bytes with key PX3DER9G
2021-08-31T19:33:22.144308+0000 taler-exchange-secmod-rsa-1993 INFO Signing request failed, denomination key PX3DER9G is not yet valid
2021-08-31T19:33:22.144413+0000 test-helper-rsa-1979 WARNING External protocol violation detected at crypto_helper_denom.c:644.
2021-08-31T19:33:22.144567+0000 test-helper-rsa-1979 ERROR Unexpected error 1701
FAIL test_helper_rsa (exit status: 7)

Additional Information
    INFO: OS : Linux
    INFO: OS RELEASE : 5.11.0-1016-raspi
    INFO: HARDWARE : armv7l
    INFO: awk : Found
    INFO: gcc : gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0
    INFO: cc : cc (Ubuntu 10.3.0-1ubuntu1) 10.3.0
    INFO: c++ : c++ (Ubuntu 10.3.0-1ubuntu1) 10.3.0
    INFO: clang :
    INFO: clang++ :
    WARNING: make : Not Found (unexpected result)
    INFO: gmake : 4.3
    INFO: autoconf : 2.69
    INFO: automake : 1.16.3
    INFO: libtool : 2.4.6
    INFO: GNUnet : 0.15.4-alpha.0
    INFO: git commit : a2b5de8e03aea9d8664817ba51720ccf27517f4f
    INFO: libgcrypt : 1.8.7
TagsNo tags attached.

Activities

Christian Grothoff

2021-08-31 21:56

manager   ~0018152

0013ce41..6c6787b4 adds some assertions to help pin down the issue (I did not yet reproduce it).

Christian Grothoff

2021-08-31 21:57

manager   ~0018153

The assertion means that some argument to JSON_PACK is NULL which is not allowed. Not sure which one. Looking at the code it does not seem obvious that we have a non-NULL argument present.

sebasjm

2021-08-31 22:35

developer   ~0018154

tested and those asserts are passing

Christian Grothoff

2021-08-31 23:00

manager   ~0018155

And it is still crashing!? Can you use gdb to inspect the core dump and see what field exactly is failing in the spec?

Christian Grothoff

2021-08-31 23:01

manager   ~0018156

Oh, and here it seems to work just fine. At least I just ran the shells script and got no crash.

sebasjm

2021-09-01 15:26

developer   ~0018158

ACK, this is what i've got

(gdb) printf "%s\n", spec[i].field_name
list_issue_date
(gdb) x spec[i].object
0x0: Cannot access memory at address 0x0

#5 0xb6e76938 in GNUNET_JSON_pack_ (spec=0xbeffe594) at json_pack.c:42
#6 0x0040d6f4 in create_krd (ksh=0x45c5c8, denom_keys_hash=0xbeffe69c, last_cpd=..., signkeys=0x479790, recoup=0x47d398, denoms=0x47d3f0)
    at taler-exchange-httpd_keys.c:1447

Christian Grothoff

2021-09-01 16:14

manager   ~0018159

bf2ce985..13deb5c4 fixes the crash. However, this happened when there are NO denomination keys. Which is odd, and so with this change you will NOT get a /keys reply from the exchange. But it won't crash anymore.

Christian Grothoff

2021-09-02 18:14

manager   ~0018216

Fix committed to master branch.

Related Changesets

exchange: master 13deb5c4

2021-09-01 18:09

Christian Grothoff


Details Diff
fix 0007007 crash Affected Issues
0007007
mod - src/exchange/taler-exchange-httpd_keys.c Diff File

exchange: master e1dae71a

2021-09-02 17:19

Christian Grothoff


Details Diff
try to fix 0007007 key update issue discovered by Sebastian Affected Issues
0007007
mod - src/exchange/taler-exchange-httpd_keys.c Diff File

Issue History

Date Modified Username Field Change
2021-08-31 21:41 sebasjm New Issue
2021-08-31 21:41 sebasjm Status new => assigned
2021-08-31 21:41 sebasjm Assigned To => Christian Grothoff
2021-08-31 21:56 Christian Grothoff Note Added: 0018152
2021-08-31 21:57 Christian Grothoff Note Added: 0018153
2021-08-31 22:35 sebasjm Note Added: 0018154
2021-08-31 23:00 Christian Grothoff Note Added: 0018155
2021-08-31 23:01 Christian Grothoff Note Added: 0018156
2021-09-01 15:26 sebasjm Note Added: 0018158
2021-09-01 16:14 Christian Grothoff Note Added: 0018159
2021-09-01 16:14 Christian Grothoff Priority normal => high
2021-09-01 16:14 Christian Grothoff Severity major => crash
2021-09-01 16:14 Christian Grothoff Target Version git (master) => 0.8.5
2021-09-01 16:14 Christian Grothoff Status assigned => resolved
2021-09-01 16:14 Christian Grothoff Resolution open => fixed
2021-09-01 16:14 Christian Grothoff Fixed in Version => 0.8.5
2021-09-02 18:13 Christian Grothoff Changeset attached => Taler-exchange master e1dae71a
2021-09-02 18:13 Christian Grothoff Changeset attached => Taler-exchange master 13deb5c4
2021-09-02 18:14 Christian Grothoff Note Added: 0018216
2022-10-20 10:45 Christian Grothoff Fixed in Version 0.8.5 => 0.9
2022-10-20 10:45 Christian Grothoff Target Version 0.8.5 => 0.9
2022-11-04 20:52 Christian Grothoff Status resolved => closed