Le 12/02/2013 01:29, ArtemGr a écrit :
Jean-Marc Choulet <jm130794@...> writes:
Hello,
I have a little problem with my application. How can I find my error ?
Can you give me some idea ?
Some Googling suggests that this might be a libcurl-related problem.
Are you using libcurl? If yes, then try
curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1)
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general
Hello ArtemGr,
Now, I use CURLOPT_NOSIGNAL, but... :(
I attached valgrind log
Jean-Marc
==3374== Memcheck, a memory error detector
==3374== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==3374== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==3374== Command: tntnet ./tntnet.xml
==3374== Parent PID: 3371
==3374==
==3374== Thread 18:
==3374== Invalid read of size 8
==3374== at 0x51C9BD0: tnt::HtmlEscStreamBuf::overflow(int) (htmlescostream.cpp:57)
==3374== by 0x56DD084: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0x56D4054: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0xA6A3D8D: (anonymous namespace)::_component_::operator()(tnt::HttpRequest&, tnt::HttpReply&, tnt::QueryParams&) (in /home/jm/TRAVAIL/prog/tntnet/jbibapp/jbibapp.so)
==3374== by 0x51FAC71: tnt::Worker::dispatch(tnt::HttpRequest&, tnt::HttpReply&) (worker.cpp:432)
==3374== by 0x51FBE5A: tnt::Worker::processRequest(tnt::HttpRequest&, std::iostream&, unsigned int) (worker.cpp:241)
==3374== by 0x51FC9FE: tnt::Worker::run() (worker.cpp:140)
==3374== by 0x51FD759: cxxtools::DetachedThread::exec() (thread.h:315)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374== Address 0x713f230 is 4,912 bytes inside a block of size 5,816 free'd
==3374== at 0x4C2A4BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3374== by 0x51E8C44: tnt::PollerImpl::run() (smartptr.h:239)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374==
==3374== Invalid read of size 8
==3374== at 0x51C9BD4: tnt::HtmlEscStreamBuf::overflow(int) (streambuf:407)
==3374== by 0x56DD084: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0x56D4054: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0xA6A3D8D: (anonymous namespace)::_component_::operator()(tnt::HttpRequest&, tnt::HttpReply&, tnt::QueryParams&) (in /home/jm/TRAVAIL/prog/tntnet/jbibapp/jbibapp.so)
==3374== by 0x51FAC71: tnt::Worker::dispatch(tnt::HttpRequest&, tnt::HttpReply&) (worker.cpp:432)
==3374== by 0x51FBE5A: tnt::Worker::processRequest(tnt::HttpRequest&, std::iostream&, unsigned int) (worker.cpp:241)
==3374== by 0x51FC9FE: tnt::Worker::run() (worker.cpp:140)
==3374== by 0x51FD759: cxxtools::DetachedThread::exec() (thread.h:315)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374== Address 0x713f238 is 4,920 bytes inside a block of size 5,816 free'd
==3374== at 0x4C2A4BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3374== by 0x51E8C44: tnt::PollerImpl::run() (smartptr.h:239)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374==
==3374== Invalid write of size 1
==3374== at 0x51C9BDE: tnt::HtmlEscStreamBuf::overflow(int) (streambuf:409)
==3374== by 0x56DD084: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0x56D4054: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0xA6A3D8D: (anonymous namespace)::_component_::operator()(tnt::HttpRequest&, tnt::HttpReply&, tnt::QueryParams&) (in /home/jm/TRAVAIL/prog/tntnet/jbibapp/jbibapp.so)
==3374== by 0x51FAC71: tnt::Worker::dispatch(tnt::HttpRequest&, tnt::HttpReply&) (worker.cpp:432)
==3374== by 0x51FBE5A: tnt::Worker::processRequest(tnt::HttpRequest&, std::iostream&, unsigned int) (worker.cpp:241)
==3374== by 0x51FC9FE: tnt::Worker::run() (worker.cpp:140)
==3374== by 0x51FD759: cxxtools::DetachedThread::exec() (thread.h:315)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374== Address 0xf5c21b0 is 0 bytes inside a block of size 16,384 free'd
==3374== at 0x4C2A09C: operator delete[](void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3374== by 0x4EFDCF2: cxxtools::StreamBuffer::~StreamBuffer() (streambuffer.cpp:72)
==3374== by 0x4ED469E: cxxtools::IOStream::~IOStream() (iostream.cpp:117)
==3374== by 0x51DCEA9: tnt::Tcpjob::~Tcpjob() (tcpstream.h:43)
==3374== by 0x51E8C44: tnt::PollerImpl::run() (smartptr.h:239)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374==
==3374== Invalid read of size 8
==3374== at 0x51C9BE5: tnt::HtmlEscStreamBuf::overflow(int) (streambuf:525)
==3374== by 0x56DD084: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0x56D4054: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0xA6A3D8D: (anonymous namespace)::_component_::operator()(tnt::HttpRequest&, tnt::HttpReply&, tnt::QueryParams&) (in /home/jm/TRAVAIL/prog/tntnet/jbibapp/jbibapp.so)
==3374== by 0x51FAC71: tnt::Worker::dispatch(tnt::HttpRequest&, tnt::HttpReply&) (worker.cpp:432)
==3374== by 0x51FBE5A: tnt::Worker::processRequest(tnt::HttpRequest&, std::iostream&, unsigned int) (worker.cpp:241)
==3374== by 0x51FC9FE: tnt::Worker::run() (worker.cpp:140)
==3374== by 0x51FD759: cxxtools::DetachedThread::exec() (thread.h:315)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374== Address 0x713f230 is 4,912 bytes inside a block of size 5,816 free'd
==3374== at 0x4C2A4BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3374== by 0x51E8C44: tnt::PollerImpl::run() (smartptr.h:239)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374==
==3374== Thread 16:
==3374== Invalid read of size 8
==3374== at 0x51C9C9B: tnt::HtmlEscStreamBuf::overflow(int) (streambuf:414)
==3374== by 0x56DD084: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0x56D4054: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0xA6A3D8D: (anonymous namespace)::_component_::operator()(tnt::HttpRequest&, tnt::HttpReply&, tnt::QueryParams&) (in /home/jm/TRAVAIL/prog/tntnet/jbibapp/jbibapp.so)
==3374== by 0x51FAC71: tnt::Worker::dispatch(tnt::HttpRequest&, tnt::HttpReply&) (worker.cpp:432)
==3374== by 0x51FBE5A: tnt::Worker::processRequest(tnt::HttpRequest&, std::iostream&, unsigned int) (worker.cpp:241)
==3374== by 0x51FC9FE: tnt::Worker::run() (worker.cpp:140)
==3374== by 0x51FD759: cxxtools::DetachedThread::exec() (thread.h:315)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374== Address 0x1036df28 is 4,872 bytes inside a block of size 5,936 free'd
==3374== at 0x4C2A82E: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3374== by 0x66238D0: deflateEnd (in /lib/x86_64-linux-gnu/libz.so.1.2.3.4)
==3374== by 0x51C2587: tnt::DeflateStreamBuf::~DeflateStreamBuf() (deflatestream.cpp:80)
==3374== by 0x51D73D4: tnt::(anonymous namespace)::doCompress(std::string const&) (deflatestream.h:77)
==3374== by 0x51D769E: tnt::HttpReply::tryCompress(std::string&) (httpreply.cpp:264)
==3374== by 0x51D8C6C: tnt::HttpReply::send(unsigned int, char const*, bool) const (httpreply.cpp:319)
==3374== by 0x51D8EE1: tnt::HttpReply::sendReply(unsigned int, char const*) (httpreply.cpp:396)
==3374== by 0x51FB1F5: tnt::Worker::dispatch(tnt::HttpRequest&, tnt::HttpReply&) (worker.cpp:457)
==3374== by 0x51FBE5A: tnt::Worker::processRequest(tnt::HttpRequest&, std::iostream&, unsigned int) (worker.cpp:241)
==3374== by 0x51FC9FE: tnt::Worker::run() (worker.cpp:140)
==3374== by 0x51FD759: cxxtools::DetachedThread::exec() (thread.h:315)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374==
==3374== Invalid read of size 8
==3374== at 0x51C9CA2: tnt::HtmlEscStreamBuf::overflow(int) (streambuf:414)
==3374== by 0x56DD084: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0x56D4054: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0xA6A3D8D: (anonymous namespace)::_component_::operator()(tnt::HttpRequest&, tnt::HttpReply&, tnt::QueryParams&) (in /home/jm/TRAVAIL/prog/tntnet/jbibapp/jbibapp.so)
==3374== by 0x51FAC71: tnt::Worker::dispatch(tnt::HttpRequest&, tnt::HttpReply&) (worker.cpp:432)
==3374== by 0x51FBE5A: tnt::Worker::processRequest(tnt::HttpRequest&, std::iostream&, unsigned int) (worker.cpp:241)
==3374== by 0x51FC9FE: tnt::Worker::run() (worker.cpp:140)
==3374== by 0x51FD759: cxxtools::DetachedThread::exec() (thread.h:315)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374== Address 0x140000001a7 is not stack'd, malloc'd or (recently) free'd
==3374==
==3374==
==3374== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==3374== Access not within mapped region at address 0x140000001A7
==3374== at 0x51C9CA2: tnt::HtmlEscStreamBuf::overflow(int) (streambuf:414)
==3374== by 0x56DD084: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0x56D4054: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3374== by 0xA6A3D8D: (anonymous namespace)::_component_::operator()(tnt::HttpRequest&, tnt::HttpReply&, tnt::QueryParams&) (in /home/jm/TRAVAIL/prog/tntnet/jbibapp/jbibapp.so)
==3374== by 0x51FAC71: tnt::Worker::dispatch(tnt::HttpRequest&, tnt::HttpReply&) (worker.cpp:432)
==3374== by 0x51FBE5A: tnt::Worker::processRequest(tnt::HttpRequest&, std::iostream&, unsigned int) (worker.cpp:241)
==3374== by 0x51FC9FE: tnt::Worker::run() (worker.cpp:140)
==3374== by 0x51FD759: cxxtools::DetachedThread::exec() (thread.h:315)
==3374== by 0x4F0729E: thread_entry (callable.tpp:314)
==3374== by 0x542AE99: start_thread (pthread_create.c:308)
==3374== by 0x5C49CCC: clone (clone.S:112)
==3374== If you believe this happened as a result of a stack
==3374== overflow in your program's main thread (unlikely but
==3374== possible), you can try to increase the size of the
==3374== main thread stack using the --main-stacksize= flag.
==3374== The main thread stack size used in this run was 16777216.
==3374==
==3374== HEAP SUMMARY:
==3374== in use at exit: 3,242,495 bytes in 21,452 blocks
==3374== total heap usage: 180,866 allocs, 159,414 frees, 66,917,256 bytes allocated
==3374==
==3374== LEAK SUMMARY:
==3374== definitely lost: 0 bytes in 0 blocks
==3374== indirectly lost: 0 bytes in 0 blocks
==3374== possibly lost: 630,519 bytes in 3,149 blocks
==3374== still reachable: 2,611,976 bytes in 18,303 blocks
==3374== suppressed: 0 bytes in 0 blocks
==3374== Reachable blocks (those to which a pointer was found) are not shown.
==3374== To see them, rerun with: --leak-check=full --show-reachable=yes
==3374==
==3374== For counts of detected and suppressed errors, rerun with: -v
==3374== ERROR SUMMARY: 434 errors from 421 contexts (suppressed: 0 from 0)
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general