Re: Program crashes with valgrind

James Read <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <CACpSuM3S4W7k0nvWibPUecTrFFEK07NyQ=6r74Kf52hNOUosMg@mail.gmail.com>
On Wed, May 20, 2020 at 2:31 PM Tom Hughes <[email protected]> wrote:

> On 20/05/2020 14:23, James Read wrote:
>
> > I'm trying to use valgrind to track down a memory leak in my web
> > crawling application. The problem is my application runs just fine
> > without valgrind but when I run it under valgrind the program crashes
> > before it has a chance to crawl any websites. Any ideas why this
> > behaviour could happen?
>
> On the basis of the information supplied I'd say it was
> caused by excess neutron flux in the discombobulator.
>
> Seriously, if you want anybody to actually try and answer
> your question then you'll have to provide some actual
> information like, what exactly it says...
>
>
A typical run of my program gives the following output:

Redis server: :0
Mongo server: 127.0.0.1:27017
URL file: links/links-2
Max connections: 1000
Selected JUST CRAWLER MODE

Parsed sites: 132 ^C
Crawler thread exiting.
Exiting.

But with valgrind ./crawler -c I get the following output:

==415433== Memcheck, a memory error detector
==415433== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==415433== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright
info
==415433== Command: ./crawler -c
==415433==
Redis server: :0
Mongo server: 127.0.0.1:27017
URL file: links/links-2
Max connections: 1000
Selected JUST CRAWLER MODE
==415433== Warning: ignored attempt to set SIGKILL handler in sigaction();
==415433==          the SIGKILL signal is uncatchable
setrlimit() failed
==415433==
==415433== HEAP SUMMARY:
==415433==     in use at exit: 37,773 bytes in 92 blocks
==415433==   total heap usage: 6,112 allocs, 6,020 frees, 460,106 bytes
allocated
==415433==
==415433== LEAK SUMMARY:
==415433==    definitely lost: 0 bytes in 0 blocks
==415433==    indirectly lost: 0 bytes in 0 blocks
==415433==      possibly lost: 0 bytes in 0 blocks
==415433==    still reachable: 37,773 bytes in 92 blocks
==415433==         suppressed: 0 bytes in 0 blocks
==415433== Rerun with --leak-check=full to see details of leaked memory
==415433==
==415433== For lists of detected and suppressed errors, rerun with: -s
==415433== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

As you can see no Parsed sites: value message just crashes and burns.

James Read


> Tom
>
> --
> Tom Hughes ([email protected])
> http://compton.nu/
>

_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.