[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] multithreading problem



Using valgrind I got the following report (I couldn't produce a
segmentation fault):

login@adrastea-debian:~/test$ sudo valgrind ./simple==24900==
Memcheck, a memory error detector
==24900== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==24900== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h
for copyright info
==24900== Command: ./simple
==24900==
==24900== Syscall param epoll_ctl(event) points to uninitialised byte(s)
==24900==    at 0x591310A: epoll_ctl (syscall-template.S:82)
==24900==    by 0x41CB6A: epoll_init (epoll.c:187)
==24900==    by 0x414575: event_base_new_with_config (event.c:633)
==24900==    by 0x414694: event_base_new (event.c:468)
==24900==    by 0x4039FF: main (in /home/login/test/simple)
==24900==  Address 0x7ff000438 is on thread 1's stack
==24900==
^C==24900==
==24900== HEAP SUMMARY:
==24900==     in use at exit: 58,215,843 bytes in 33,736 blocks
==24900==   total heap usage: 220,252 allocs, 186,516 frees,
114,400,280 bytes allocated
==24900==
==24900== LEAK SUMMARY:
==24900==    definitely lost: 1,488,952 bytes in 10,360 blocks
==24900==    indirectly lost: 55,086,352 bytes in 21,554 blocks
==24900==      possibly lost: 1,493,626 bytes in 458 blocks
==24900==    still reachable: 146,913 bytes in 1,364 blocks
==24900==         suppressed: 0 bytes in 0 blocks
==24900== Rerun with --leak-check=full to see details of leaked memory
==24900==
==24900== For counts of detected and suppressed errors, rerun with: -v
==24900== Use --track-origins=yes to see where uninitialised values come from
==24900== ERROR SUMMARY: 5 errors from 1 contexts (suppressed: 4 from 4)

While stress testing I receive this error:

==25006== Warning: invalid file descriptor 1019 in syscall accept()
[warn] Error from accept() call: Too many open files

The memory leaks are the result of connections which are not closed
correctly. In a real implementation I would use a timer event to clean
up these connections.

I don't know if the "Too many open files" warning helps me.

2013/1/6 james <james@xxxxxxxxxxxxxxxxxxxxxx>:
> Given that you have debian, why don't you install valgrind and see what it
> says when you run the test?
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.