View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004486 | Taler | mechant backend | public | 2016-05-03 11:44 | 2021-09-02 18:22 |
Reporter | Marcello Stanisci | Assigned To | Christian Grothoff | ||
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.0 | ||||
Target Version | 0.0 | Fixed in Version | 0.0 | ||
Summary | 0004486: merchant kill segfaults | ||||
Description | If the merchant gets a SIGTERM/SIGKILL while at least one /keys request is active, it segfaults. It seems to depend on TALER_EXCHANGE_disconnect(). See the valgrind output attached. | ||||
Steps To Reproduce | launch the merchant by specifying a bad exchange's URL in the config; after the first /keys request, kill the merchant | ||||
Tags | No tags attached. | ||||
Attached Files | merchant.log (11,277 bytes)
==23510== Memcheck, a memory error detector ==23510== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==23510== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info ==23510== Command: taler-merchant-httpd ==23510== Parent PID: 22177 ==23510== ==23510== Invalid write of size 4 ==23510== at 0x804C958: retry_exchange (taler-merchant-httpd_exchanges.c:272) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== Address 0x4e203d0 is 64 bytes inside a block of size 72 free'd ==23510== at 0x402A3A8: free (vg_replace_malloc.c:473) ==23510== by 0x40BBF2F: GNUNET_xfree_ (common_allocation.c:256) ==23510== by 0x804D3B6: TMH_EXCHANGES_done (taler-merchant-httpd_exchanges.c:540) ==23510== by 0x804A7B4: do_shutdown (taler-merchant-httpd.c:265) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== ==23510== Invalid read of size 4 ==23510== at 0x804C967: retry_exchange (taler-merchant-httpd_exchanges.c:273) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== Address 0x4e203a0 is 16 bytes inside a block of size 72 free'd ==23510== at 0x402A3A8: free (vg_replace_malloc.c:473) ==23510== by 0x40BBF2F: GNUNET_xfree_ (common_allocation.c:256) ==23510== by 0x804D3B6: TMH_EXCHANGES_done (taler-merchant-httpd_exchanges.c:540) ==23510== by 0x804A7B4: do_shutdown (taler-merchant-httpd.c:265) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== ==23510== Invalid read of size 1 ==23510== at 0x402C3B8: strlen (vg_replace_strmem.c:412) ==23510== by 0x40BBFE2: GNUNET_xstrdup_ (common_allocation.c:279) ==23510== by 0x403D304: TALER_EXCHANGE_connect (exchange_api_handle.c:750) ==23510== by 0x804C974: retry_exchange (taler-merchant-httpd_exchanges.c:273) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== Address 0x4e20330 is 0 bytes inside a block of size 42 free'd ==23510== at 0x402A3A8: free (vg_replace_malloc.c:473) ==23510== by 0x40BBF2F: GNUNET_xfree_ (common_allocation.c:256) ==23510== by 0x804D3A3: TMH_EXCHANGES_done (taler-merchant-httpd_exchanges.c:539) ==23510== by 0x804A7B4: do_shutdown (taler-merchant-httpd.c:265) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== ==23510== Invalid read of size 1 ==23510== at 0x402C3C3: strlen (vg_replace_strmem.c:412) ==23510== by 0x40BBFE2: GNUNET_xstrdup_ (common_allocation.c:279) ==23510== by 0x403D304: TALER_EXCHANGE_connect (exchange_api_handle.c:750) ==23510== by 0x804C974: retry_exchange (taler-merchant-httpd_exchanges.c:273) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== Address 0x4e20331 is 1 bytes inside a block of size 42 free'd ==23510== at 0x402A3A8: free (vg_replace_malloc.c:473) ==23510== by 0x40BBF2F: GNUNET_xfree_ (common_allocation.c:256) ==23510== by 0x804D3A3: TMH_EXCHANGES_done (taler-merchant-httpd_exchanges.c:539) ==23510== by 0x804A7B4: do_shutdown (taler-merchant-httpd.c:265) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== ==23510== Invalid read of size 4 ==23510== at 0x402DFD8: memcpy (vg_replace_strmem.c:916) ==23510== by 0x40BC003: GNUNET_xstrdup_ (common_allocation.c:283) ==23510== by 0x403D304: TALER_EXCHANGE_connect (exchange_api_handle.c:750) ==23510== by 0x804C974: retry_exchange (taler-merchant-httpd_exchanges.c:273) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== Address 0x4e20330 is 0 bytes inside a block of size 42 free'd ==23510== at 0x402A3A8: free (vg_replace_malloc.c:473) ==23510== by 0x40BBF2F: GNUNET_xfree_ (common_allocation.c:256) ==23510== by 0x804D3A3: TMH_EXCHANGES_done (taler-merchant-httpd_exchanges.c:539) ==23510== by 0x804A7B4: do_shutdown (taler-merchant-httpd.c:265) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== ==23510== Invalid read of size 4 ==23510== at 0x402DFE2: memcpy (vg_replace_strmem.c:916) ==23510== by 0x40BC003: GNUNET_xstrdup_ (common_allocation.c:283) ==23510== by 0x403D304: TALER_EXCHANGE_connect (exchange_api_handle.c:750) ==23510== by 0x804C974: retry_exchange (taler-merchant-httpd_exchanges.c:273) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== Address 0x4e20338 is 8 bytes inside a block of size 42 free'd ==23510== at 0x402A3A8: free (vg_replace_malloc.c:473) ==23510== by 0x40BBF2F: GNUNET_xfree_ (common_allocation.c:256) ==23510== by 0x804D3A3: TMH_EXCHANGES_done (taler-merchant-httpd_exchanges.c:539) ==23510== by 0x804A7B4: do_shutdown (taler-merchant-httpd.c:265) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== ==23510== Invalid read of size 2 ==23510== at 0x402E020: memcpy (vg_replace_strmem.c:916) ==23510== by 0x40BC003: GNUNET_xstrdup_ (common_allocation.c:283) ==23510== by 0x403D304: TALER_EXCHANGE_connect (exchange_api_handle.c:750) ==23510== by 0x804C974: retry_exchange (taler-merchant-httpd_exchanges.c:273) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== Address 0x4e20358 is 40 bytes inside a block of size 42 free'd ==23510== at 0x402A3A8: free (vg_replace_malloc.c:473) ==23510== by 0x40BBF2F: GNUNET_xfree_ (common_allocation.c:256) ==23510== by 0x804D3A3: TMH_EXCHANGES_done (taler-merchant-httpd_exchanges.c:539) ==23510== by 0x804A7B4: do_shutdown (taler-merchant-httpd.c:265) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== ==23510== Invalid read of size 4 ==23510== at 0x409E94B: GNUNET_CURL_job_add (curl.c:314) ==23510== by 0x403D3A4: TALER_EXCHANGE_connect (exchange_api_handle.c:772) ==23510== by 0x804C974: retry_exchange (taler-merchant-httpd_exchanges.c:273) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== Address 0x4 is not stack'd, malloc'd or (recently) free'd ==23510== ==23510== ==23510== Process terminating with default action of signal 11 (SIGSEGV) ==23510== Access not within mapped region at address 0x4 ==23510== at 0x409E94B: GNUNET_CURL_job_add (curl.c:314) ==23510== by 0x403D3A4: TALER_EXCHANGE_connect (exchange_api_handle.c:772) ==23510== by 0x804C974: retry_exchange (taler-merchant-httpd_exchanges.c:273) ==23510== by 0x40EDB0C: run_ready (scheduler.c:620) ==23510== by 0x40EDB0C: GNUNET_SCHEDULER_run (scheduler.c:887) ==23510== by 0x40E8EF1: GNUNET_PROGRAM_run2 (program.c:300) ==23510== by 0x40E91E1: GNUNET_PROGRAM_run (program.c:339) ==23510== by 0x804A360: main (taler-merchant-httpd.c:775) ==23510== If you believe this happened as a result of a stack ==23510== overflow in your program's main thread (unlikely but ==23510== possible), you can try to increase the size of the ==23510== main thread stack using the --main-stacksize= flag. ==23510== The main thread stack size used in this run was 8388608. ==23510== ==23510== HEAP SUMMARY: ==23510== in use at exit: 118,988 bytes in 1,098 blocks ==23510== total heap usage: 86,725 allocs, 85,627 frees, 11,718,937 bytes allocated ==23510== ==23510== LEAK SUMMARY: ==23510== definitely lost: 152 bytes in 1 blocks ==23510== indirectly lost: 0 bytes in 0 blocks ==23510== possibly lost: 182 bytes in 6 blocks ==23510== still reachable: 118,654 bytes in 1,091 blocks ==23510== suppressed: 0 bytes in 0 blocks ==23510== Rerun with --leak-check=full to see details of leaked memory ==23510== ==23510== For counts of detected and suppressed errors, rerun with: -v ==23510== ERROR SUMMARY: 56 errors from 8 contexts (suppressed: 0 from 0) | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2016-05-03 11:44 | Marcello Stanisci | New Issue | |
2016-05-03 11:44 | Marcello Stanisci | Status | new => assigned |
2016-05-03 11:44 | Marcello Stanisci | Assigned To | => Christian Grothoff |
2016-05-03 11:44 | Marcello Stanisci | File Added: merchant.log | |
2016-05-03 12:36 | Christian Grothoff | Priority | normal => high |
2016-05-03 12:36 | Christian Grothoff | Product Version | => 0.0 |
2016-05-03 12:36 | Christian Grothoff | Target Version | => 0.0 |
2016-05-04 06:41 | Christian Grothoff | Note Added: 0010621 | |
2016-05-04 06:41 | Christian Grothoff | Status | assigned => resolved |
2016-05-04 06:41 | Christian Grothoff | Fixed in Version | => 0.0 |
2016-05-04 06:41 | Christian Grothoff | Resolution | open => fixed |
2016-05-04 06:41 | Christian Grothoff | Status | resolved => closed |
2021-09-02 18:22 | Christian Grothoff | Changeset attached | => Taler-merchant master 67165996 |