View Issue Details

IDProjectCategoryView StatusLast Update
0005375GNUnetGNSpublic2019-02-28 11:17
ReporterschanzenAssigned Toschanzen 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target Version0.11.0Fixed in Version0.11.0 
Summary0005375: dns2gns segfaults due to repeated results callback
Descriptiondns2gns seems to receive multiple result callbacks from dnsstub.c (I think).
However, dns2gns frees the respective handle resulting in an invalid pointer deref in the result callback after the initial result.
Steps To Reproduce1. Start gnunet-dns2gns
2. nslookup google.de 127.0.0.1
3. Watch it segfault

If you remove the capabilities you can run valgrind on it:
setcap -r gnunet-dns2gns
Additional Information==196==
==196== Invalid read of size 2
==196== at 0x10AF3F: dns_result_processor (gnunet-dns2gns.c:265)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe38a8 is 72 bytes inside a block of size 96 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x1099F6: send_response (gnunet-dns2gns.c:219)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x109E44: handle_request (gnunet-dns2gns.c:432)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Invalid write of size 8
==196== at 0x10AF5B: dns_result_processor (gnunet-dns2gns.c:270)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe3870 is 16 bytes inside a block of size 96 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x1099F6: send_response (gnunet-dns2gns.c:219)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x109E44: handle_request (gnunet-dns2gns.c:432)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Invalid read of size 8
==196== at 0x10996E: send_response (gnunet-dns2gns.c:195)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe3870 is 16 bytes inside a block of size 96 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x1099F6: send_response (gnunet-dns2gns.c:219)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x109E44: handle_request (gnunet-dns2gns.c:432)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Invalid read of size 8
==196== at 0x109A50: send_response (gnunet-dns2gns.c:205)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe3868 is 8 bytes inside a block of size 96 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x1099F6: send_response (gnunet-dns2gns.c:219)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x109E44: handle_request (gnunet-dns2gns.c:432)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Invalid read of size 4
==196== at 0x109A54: send_response (gnunet-dns2gns.c:205)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe3898 is 56 bytes inside a block of size 96 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x1099F6: send_response (gnunet-dns2gns.c:219)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x109E44: handle_request (gnunet-dns2gns.c:432)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Invalid read of size 8
==196== at 0x109A62: send_response (gnunet-dns2gns.c:205)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe3860 is 0 bytes inside a block of size 96 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x1099F6: send_response (gnunet-dns2gns.c:219)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x109E44: handle_request (gnunet-dns2gns.c:432)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Syscall param socketcall.sendto(to.sa_family) points to unaddressable byte(s)
==196== at 0x53D5DA7: sendto (sendto.c:27)
==196== by 0x5080BF5: GNUNET_NETWORK_socket_sendto (network.c:943)
==196== by 0x109A69: send_response (gnunet-dns2gns.c:205)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe38b0 is 80 bytes inside a block of size 96 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x1099F6: send_response (gnunet-dns2gns.c:219)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x109E44: handle_request (gnunet-dns2gns.c:432)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Syscall param socketcall.sendto(to.sin_port) points to unaddressable byte(s)
==196== at 0x53D5DA7: sendto (sendto.c:27)
==196== by 0x5080BF5: GNUNET_NETWORK_socket_sendto (network.c:943)
==196== by 0x109A69: send_response (gnunet-dns2gns.c:205)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe38b2 is 82 bytes inside a block of size 96 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x1099F6: send_response (gnunet-dns2gns.c:219)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x109E44: handle_request (gnunet-dns2gns.c:432)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Syscall param socketcall.sendto(to.sin_addr) points to unaddressable byte(s)
==196== at 0x53D5DA7: sendto (sendto.c:27)
==196== by 0x5080BF5: GNUNET_NETWORK_socket_sendto (network.c:943)
==196== by 0x109A69: send_response (gnunet-dns2gns.c:205)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe38b4 is 84 bytes inside a block of size 96 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x1099F6: send_response (gnunet-dns2gns.c:219)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x109E44: handle_request (gnunet-dns2gns.c:432)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Invalid read of size 8
==196== at 0x1099BC: send_response (gnunet-dns2gns.c:216)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe3888 is 40 bytes inside a block of size 96 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x1099F6: send_response (gnunet-dns2gns.c:219)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x109E44: handle_request (gnunet-dns2gns.c:432)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Invalid read of size 8
==196== at 0x508D627: GNUNET_SCHEDULER_cancel (scheduler.c:971)
==196== by 0x1099C4: send_response (gnunet-dns2gns.c:216)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe3980 is 32 bytes inside a block of size 112 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x508D6A8: GNUNET_SCHEDULER_cancel (scheduler.c:1013)
==196== by 0x1099C4: send_response (gnunet-dns2gns.c:216)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x508E131: GNUNET_SCHEDULER_add_at_with_priority (scheduler.c:1104)
==196== by 0x109EA8: handle_request (gnunet-dns2gns.c:443)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Invalid read of size 4
==196== at 0x508D850: GNUNET_SCHEDULER_cancel (scheduler.c:981)
==196== by 0x1099C4: send_response (gnunet-dns2gns.c:216)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe39c8 is 104 bytes inside a block of size 112 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x508D6A8: GNUNET_SCHEDULER_cancel (scheduler.c:1013)
==196== by 0x1099C4: send_response (gnunet-dns2gns.c:216)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x508E131: GNUNET_SCHEDULER_add_at_with_priority (scheduler.c:1104)
==196== by 0x109EA8: handle_request (gnunet-dns2gns.c:443)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Invalid read of size 4
==196== at 0x508D85B: GNUNET_SCHEDULER_cancel (scheduler.c:989)
==196== by 0x1099C4: send_response (gnunet-dns2gns.c:216)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe39c4 is 100 bytes inside a block of size 112 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x508D6A8: GNUNET_SCHEDULER_cancel (scheduler.c:1013)
==196== by 0x1099C4: send_response (gnunet-dns2gns.c:216)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x508E131: GNUNET_SCHEDULER_add_at_with_priority (scheduler.c:1104)
==196== by 0x109EA8: handle_request (gnunet-dns2gns.c:443)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== Invalid read of size 8
==196== at 0x508D85F: GNUNET_SCHEDULER_cancel (scheduler.c:989)
==196== by 0x1099C4: send_response (gnunet-dns2gns.c:216)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Address 0x6fe3968 is 8 bytes inside a block of size 112 free'd
==196== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x508D6A8: GNUNET_SCHEDULER_cancel (scheduler.c:1013)
==196== by 0x1099C4: send_response (gnunet-dns2gns.c:216)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196== Block was alloc'd at
==196== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==196== by 0x50566F8: GNUNET_xmalloc_ (common_allocation.c:73)
==196== by 0x508E131: GNUNET_SCHEDULER_add_at_with_priority (scheduler.c:1104)
==196== by 0x109EA8: handle_request (gnunet-dns2gns.c:443)
==196== by 0x10A3F5: read_dns4 (gnunet-dns2gns.c:502)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
Jul 01 09:57:03-011767 gnunet-dns2gns-196 ERROR Assertion failed at scheduler.c:999. Aborting.
==196==
==196== Process terminating with default action of signal 6 (SIGABRT)
==196== at 0x52F1E97: raise (raise.c:51)
==196== by 0x52F3800: abort (abort.c:79)
==196== by 0x5057FA8: GNUNET_abort_ (common_logging.c:282)
==196== by 0x508D72B: GNUNET_SCHEDULER_cancel (scheduler.c:967)
==196== by 0x1099C4: send_response (gnunet-dns2gns.c:216)
==196== by 0x507823C: do_dns_read (dnsstub.c:371)
==196== by 0x5078322: read_response (dnsstub.c:435)
==196== by 0x508F959: GNUNET_SCHEDULER_do_work (scheduler.c:2104)
==196== by 0x509085F: select_loop (scheduler.c:2405)
==196== by 0x509085F: GNUNET_SCHEDULER_run (scheduler.c:725)
==196== by 0x5087A91: GNUNET_PROGRAM_run2 (program.c:341)
==196== by 0x5087DCE: GNUNET_PROGRAM_run (program.c:383)
==196== by 0x10974E: main (gnunet-dns2gns.c:705)
==196==
==196== HEAP SUMMARY:
==196== in use at exit: 49,002 bytes in 2,062 blocks
==196== total heap usage: 5,116 allocs, 3,054 frees, 209,255 bytes allocated
==196==
==196== LEAK SUMMARY:
==196== definitely lost: 56 bytes in 1 blocks
==196== indirectly lost: 82 bytes in 5 blocks
==196== possibly lost: 0 bytes in 0 blocks
==196== still reachable: 48,864 bytes in 2,056 blocks
==196== suppressed: 0 bytes in 0 blocks
==196== Rerun with --leak-check=full to see details of leaked memory
==196==
==196== For counts of detected and suppressed errors, rerun with: -v
==196== ERROR SUMMARY: 14 errors from 14 contexts (suppressed: 0 from 0)
Aborted
TagsNo tags attached.

Activities

schanzen

2018-07-01 12:21

developer   ~0013118

981ce540583cae841156b9a25dc826b4233a1a49 contains an attempted fix by cancelling the lookup when a result was processed. But I am not yet sure if
1. it fixes the problem
2. this is wanted behaviour (after all, there are more results=

schanzen

2018-07-01 12:32

developer   ~0013119

After the fix not more segfaults but now I get
Jul 01 10:32:09-385051 gnunet-dns2gns-136 ERROR Assertion failed at dnsparser.c:959.
periodically

Christian Grothoff

2018-07-01 19:54

manager   ~0013121

a62a08399..4e5b0abe8 modifies the dnsparser.c:959 error message to provide very clear guidance as to what is wrong.

Christian Grothoff

2018-07-01 19:57

manager   ~0013122

Btw, 981ce540583cae841156b9a25dc826b4233a1a49 is correct: DNS only supports returning one result, so once we did generate the first reply, we ought to be done, irrespective of us possibly finding more (the latter being because we may send queries to multiple DNS resolvers in parallel, and thus may get results from each of those back separately).

Christian Grothoff

2018-07-01 19:58

manager   ~0013123

Please report what the new log message says. ;-)

schanzen

2018-11-13 10:07

developer   ~0013335

I tested the original steps again and the segfault is gone.
I am unable to reproduce the assertion/error message.

Issue History

Date Modified Username Field Change
2018-07-01 12:10 schanzen New Issue
2018-07-01 12:10 schanzen Status new => assigned
2018-07-01 12:10 schanzen Assigned To => Christian Grothoff
2018-07-01 12:21 schanzen Status assigned => feedback
2018-07-01 12:21 schanzen Note Added: 0013118
2018-07-01 12:32 schanzen Note Added: 0013119
2018-07-01 12:32 schanzen Status feedback => assigned
2018-07-01 19:54 Christian Grothoff Note Added: 0013121
2018-07-01 19:57 Christian Grothoff Note Added: 0013122
2018-07-01 19:58 Christian Grothoff Assigned To Christian Grothoff => schanzen
2018-07-01 19:58 Christian Grothoff Status assigned => feedback
2018-07-01 19:58 Christian Grothoff Note Added: 0013123
2018-11-13 10:07 schanzen Status feedback => resolved
2018-11-13 10:07 schanzen Resolution open => fixed
2018-11-13 10:07 schanzen Fixed in Version => SVN HEAD
2018-11-13 10:07 schanzen Note Added: 0013335
2019-02-12 09:20 Christian Grothoff Target Version => 0.11.0
2019-02-16 11:54 Christian Grothoff Fixed in Version SVN HEAD => 0.11.0
2019-02-28 11:17 Christian Grothoff Status resolved => closed