curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Some errors reported by valgrind

From: James Read via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 5 Jun 2020 01:34:07 +0100

Hi,

I have some errors reported by valgrind that may or may not be related to
some strange behaviour with my crawler. Here is the output from valgrind:

==299487== Memcheck, a memory error detector
==299487== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==299487== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright
info
==299487== Command: ./a.out
==299487== Parent PID: 2591
==299487==
==299487== Warning: ignored attempt to set SIGKILL handler in sigaction();
==299487== the SIGKILL signal is uncatchable
==299487== Syscall param epoll_ctl(event) points to uninitialised byte(s)
==299487== at 0x515AACE: epoll_ctl (syscall-template.S:78)
==299487== by 0x10CE05: crawler_init (crawler.c:935)
==299487== by 0x10D89B: main (crawler.c:1155)
==299487== Address 0x1ffefe28ac is on thread 1's stack
==299487== in frame #1, created by crawler_init (crawler.c:904)
==299487==
==299487== Syscall param epoll_ctl(event) points to uninitialised byte(s)
==299487== at 0x515AACE: epoll_ctl (syscall-template.S:78)
==299487== by 0x10C3CF: setsock (crawler.c:717)
==299487== by 0x10C46F: addsock (crawler.c:730)
==299487== by 0x10CC23: sock_cb (crawler.c:869)
==299487== by 0x48B70B1: singlesocket (multi.c:2593)
==299487== by 0x48B7878: multi_socket (multi.c:2839)
==299487== by 0x48B8053: curl_multi_socket_action (multi.c:2956)
==299487== by 0x10C29B: timer_cb (crawler.c:689)
==299487== by 0x10D57A: crawler_init (crawler.c:1100)
==299487== by 0x10D89B: main (crawler.c:1155)
==299487== Address 0x1ffefe2584 is on thread 1's stack
==299487== in frame #1, created by setsock (crawler.c:697)
==299487==
==299487== Syscall param epoll_ctl(event) points to uninitialised byte(s)
==299487== at 0x515AACE: epoll_ctl (syscall-template.S:78)
==299487== by 0x10C3CF: setsock (crawler.c:717)
==299487== by 0x10CC42: sock_cb (crawler.c:871)
==299487== by 0x48B70B1: singlesocket (multi.c:2593)
==299487== by 0x48B7878: multi_socket (multi.c:2839)
==299487== by 0x48B8053: curl_multi_socket_action (multi.c:2956)
==299487== by 0x10C16D: event_cb (crawler.c:651)
==299487== by 0x10D5DB: crawler_init (crawler.c:1102)
==299487== by 0x10D89B: main (crawler.c:1155)
==299487== Address 0x1ffefe25a4 is on thread 1's stack
==299487== in frame #1, created by setsock (crawler.c:697)
==299487==
==299487==
==299487== HEAP SUMMARY:
==299487== in use at exit: 21,583,789 bytes in 21,740 blocks
==299487== total heap usage: 1,166,605 allocs, 1,144,865 frees,
1,474,268,994 bytes allocated
==299487==
==299487== LEAK SUMMARY:
==299487== definitely lost: 5,015,901 bytes in 19,165 blocks
==299487== indirectly lost: 0 bytes in 0 blocks
==299487== possibly lost: 138,910 bytes in 30 blocks
==299487== still reachable: 16,428,978 bytes in 2,545 blocks
==299487== suppressed: 0 bytes in 0 blocks
==299487== Rerun with --leak-check=full to see details of leaked memory
==299487==
==299487== Use --track-origins=yes to see where uninitialised values come
from
==299487== ERROR SUMMARY: 294 errors from 3 contexts (suppressed: 0 from 0)
==299487==
==299487== 1 errors in context 1 of 3:
==299487== Syscall param epoll_ctl(event) points to uninitialised byte(s)
==299487== at 0x515AACE: epoll_ctl (syscall-template.S:78)
==299487== by 0x10CE05: crawler_init (crawler.c:935)
==299487== by 0x10D89B: main (crawler.c:1155)
==299487== Address 0x1ffefe28ac is on thread 1's stack
==299487== in frame #1, created by crawler_init (crawler.c:904)
==299487==
==299487==
==299487== 59 errors in context 2 of 3:
==299487== Syscall param epoll_ctl(event) points to uninitialised byte(s)
==299487== at 0x515AACE: epoll_ctl (syscall-template.S:78)
==299487== by 0x10C3CF: setsock (crawler.c:717)
==299487== by 0x10CC42: sock_cb (crawler.c:871)
==299487== by 0x48B70B1: singlesocket (multi.c:2593)
==299487== by 0x48B7878: multi_socket (multi.c:2839)
==299487== by 0x48B8053: curl_multi_socket_action (multi.c:2956)
==299487== by 0x10C16D: event_cb (crawler.c:651)
==299487== by 0x10D5DB: crawler_init (crawler.c:1102)
==299487== by 0x10D89B: main (crawler.c:1155)
==299487== Address 0x1ffefe25a4 is on thread 1's stack
==299487== in frame #1, created by setsock (crawler.c:697)
==299487==
==299487==
==299487== 234 errors in context 3 of 3:
==299487== Syscall param epoll_ctl(event) points to uninitialised byte(s)
==299487== at 0x515AACE: epoll_ctl (syscall-template.S:78)
==299487== by 0x10C3CF: setsock (crawler.c:717)
==299487== by 0x10C46F: addsock (crawler.c:730)
==299487== by 0x10CC23: sock_cb (crawler.c:869)
==299487== by 0x48B70B1: singlesocket (multi.c:2593)
==299487== by 0x48B7878: multi_socket (multi.c:2839)
==299487== by 0x48B8053: curl_multi_socket_action (multi.c:2956)
==299487== by 0x10C29B: timer_cb (crawler.c:689)
==299487== by 0x10D57A: crawler_init (crawler.c:1100)
==299487== by 0x10D89B: main (crawler.c:1155)
==299487== Address 0x1ffefe2584 is on thread 1's stack
==299487== in frame #1, created by setsock (crawler.c:697)
==299487==
==299487== ERROR SUMMARY: 294 errors from 3 contexts (suppressed: 0 from 0)

If interested the current code for the crawler is at
https://github.com/JamesRead5737/webcrawler

Thanks for any help with understanding these errors.

James Read

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-06-05