|
From: Joshua Moore-O. <jo...@ch...> - 2004-05-08 21:40:27
|
basically.. my program was attempting to access memory that it had previously deleted... valgrind gave me teh warnings, and then spat out all this and terminated. Dunno if it's of any help to you, it didn't happen again after I fixed the problem. Joshua Moore-Oliva. valgrind: vg_malloc2.c:1008 (vgPlain_arena_malloc): Assertion `new_sb != ((void *)0)' failed. ==30782== at 0xB802FA30: vgPlain_skin_assert_fail (in /usr/lib/valgrind/stage2) ==30782== by 0xB802FA2F: (within /usr/lib/valgrind/stage2) ==30782== by 0xB802FA9D: vgPlain_core_assert_fail (in /usr/lib/valgrind/stage2) ==30782== by 0xB802BBAF: vgPlain_arena_malloc (in /usr/lib/valgrind/stage2) ==30782== by 0xB802C701: vgPlain_cli_malloc (in /usr/lib/valgrind/stage2) ==30782== by 0xB02645AB: vgSkin___builtin_new (in /usr/lib/valgrind/vgskin_memcheck.so) ==30782== by 0xB8012057: (within /usr/lib/valgrind/stage2) ==30782== by 0xB800E3A0: vgPlain_scheduler (in /usr/lib/valgrind/stage2) ==30782== by 0xB802A2A2: (within /usr/lib/valgrind/stage2) ==30782== by 0xB0042C13: __libc_start_main (in /lib/libc-2.3.2.so) ==30782== by 0xB800B8A0: (within /usr/lib/valgrind/stage2) sched status: Thread 1: status = WaitSys, associated_mx = 0x0, associated_cv = 0x0 ==30782== at 0x3C308FD4: (within /lib/libc-2.3.2.so) ==30782== by 0x3C0D4DA8: sigwait (in /usr/lib/valgrind/libpthread.so) ==30782== by 0x8065453: Main<ControllerConnection>::handleSignals() (handleSignals.cpp:16) ==30782== by 0x8063FA2: Main<ControllerConnection>::go() (go.cpp:39) ==30782== by 0x805D4ED: main (main.cpp:88) Thread 2: status = WaitSys, associated_mx = 0x0, associated_cv = 0x0 ==30782== at 0x3C3ABC98: poll (in /lib/libc-2.3.2.so) ==30782== by 0x804EECF: ControllerConnection::pollGetLine(std::string&) (pollGetLine.cpp:13) ==30782== by 0x804EBF0: ControllerConnection::getBatch(Ffm<SELogicError, SERuntimeError>&) (getBatch.cpp:15) ==30782== by 0x8076A9F: BatchRetriever<ControllerConnection>::poll() (poll.cpp:20) ==30782== by 0x807670B: BatchRetriever<ControllerConnection>::run() (run.cpp:8) ==30782== by 0x806F053: Thread<SELogicError, SERuntimeError>::threadLaunch(void*) (threadLaunch.cpp:12) ==30782== by 0x3C0D30E0: (within /usr/lib/valgrind/libpthread.so) ==30782== by 0xB800FAB4: (within /usr/lib/valgrind/stage2) Thread 3: status = WaitSys, associated_mx = 0x0, associated_cv = 0x0 ==30782== at 0x3C3B49F9: epoll_wait (in /lib/libc-2.3.2.so) ==30782== by 0x8054410: SmtpPoller::poll() (poll.cpp:7) ==30782== by 0x8054463: SmtpPoller::run() (run.cpp:7) ==30782== by 0x806F053: Thread<SELogicError, SERuntimeError>::threadLaunch(void*) (threadLaunch.cpp:12) ==30782== by 0x3C0D30E0: (within /usr/lib/valgrind/libpthread.so) ==30782== by 0xB800FAB4: (within /usr/lib/valgrind/stage2) Thread 4: status = Runnable, associated_mx = 0x0, associated_cv = 0x0 ==30782== at 0x3C3B51B6: send (in /lib/libc-2.3.2.so) ==30782== by 0x3C3B050E: syslog (in /lib/libc-2.3.2.so) ==30782== by 0x804E51E: BatchStart::pop() (pop.cpp:4) ==30782== by 0x8053681: Batch::load() (load.cpp:24) ==30782== by 0x8057A67: SmtpConnection::load() (load.cpp:6) ==30782== by 0x805C684: SmtpConnectionLoader::poll() (poll.cpp:8) ==30782== by 0x805C743: SmtpConnectionLoader::run() (run.cpp:7) ==30782== by 0x806F053: Thread<SELogicError, SERuntimeError>::threadLaunch(void*) (threadLaunch.cpp:12) ==30782== by 0x3C0D30E0: (within /usr/lib/valgrind/libpthread.so) ==30782== by 0xB800FAB4: (within /usr/lib/valgrind/stage2) Thread 5: status = WaitCV, associated_mx = 0x3C0E9000, associated_cv = 0x3C0E9018 ==30782== at 0x3C0D41AF: pthread_cond_wait (in /usr/lib/valgrind/libpthread.so) ==30782== by 0x3C0D78CB: sem_wait (in /usr/lib/valgrind/libpthread.so) ==30782== by 0x805F00B: Semaphore<SELogicError, SERuntimeError>::wait() (wait.cpp:7) ==30782== by 0x8058394: ResolveManager::popLookupQuery(std::string&) (popLookupQuery.cpp:4) ==30782== by 0x805B392: ResolveQuery::poll() (poll.cpp:13) ==30782== by 0x805B63D: ResolveQuery::run() (run.cpp:7) ==30782== by 0x806F053: Thread<SELogicError, SERuntimeError>::threadLaunch(void*) (threadLaunch.cpp:12) ==30782== by 0x3C0D30E0: (within /usr/lib/valgrind/libpthread.so) ==30782== by 0xB800FAB4: (within /usr/lib/valgrind/stage2) Thread 6: status = WaitSys, associated_mx = 0x0, associated_cv = 0x0 ==30782== at 0x3C385B45: nanosleep (in /lib/libc-2.3.2.so) ==30782== by 0x805C0A5: ResolveRotater::poll() (poll.cpp:8) ==30782== by 0x805C0F7: ResolveRotater::run() (run.cpp:7) ==30782== by 0x806F053: Thread<SELogicError, SERuntimeError>::threadLaunch(void*) (threadLaunch.cpp:12) ==30782== by 0x3C0D30E0: (within /usr/lib/valgrind/libpthread.so) ==30782== by 0xB800FAB4: (within /usr/lib/valgrind/stage2) Thread 7: status = WaitSys, associated_mx = 0x0, associated_cv = 0x0 ==30782== at 0x3C3B5036: recv (in /lib/libc-2.3.2.so) ==30782== by 0x80745FD: Socket<SELogicError, SERuntimeError>::recv(std::string&, int*) (recv.cpp:17) ==30782== by 0x806AB75: TextSocket<SELogicError, SERuntimeError>::appendCache() (appendCache.cpp:11) ==30782== by 0x80682EE: TextSocket<SELogicError, SERuntimeError>::getLine(std::string&) (getLine.cpp:12) ==30782== by 0x804ED22: ControllerConnection::getLine(std::string&) (getLine.cpp:5) ==30782== by 0x804FC9C: ControllerConnection::retBatch(Ffm<SELogicError, SERuntimeError> const&) (retBatch.cpp:10) ==30782== by 0x8071D55: BatchReturner<ControllerConnection>::poll() (poll.cpp:15) ==30782== by 0x80710A5: BatchReturner<ControllerConnection>::run() (run.cpp:8) ==30782== by 0x806F053: Thread<SELogicError, SERuntimeError>::threadLaunch(void*) (threadLaunch.cpp:12) ==30782== by 0x3C0D30E0: (within /usr/lib/valgrind/libpthread.so) ==30782== by 0xB800FAB4: (within /usr/lib/valgrind/stage2) Thread 8: status = Runnable, associated_mx = 0x0, associated_cv = 0x0 ==30782== at 0x3C01C581: operator new(unsigned) (in /usr/lib/valgrind/vgpreload_memcheck.so) ==30782== by 0x3C2779F8: std::__default_alloc_template<true, 0>::allocate(unsigned) (in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libstdc++.so.5.0.5) ==30782== by 0x3C27D2D7: std::string::_Rep::_S_create(unsigned, std::allocator<char> const&) (in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libstdc++.so.5.0.5) ==30782== by 0x3C27D3A8: std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned) (in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libstdc++.so.5.0.5) ==30782== by 0x3C27A374: std::string::_Rep::_M_grab(std::allocator<char> const&, std::allocator<char> const&) (in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libstdc++.so.5.0.5) ==30782== by 0x3C27A417: std::string::string(std::string const&) (in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libstdc++.so.5.0.5) ==30782== by 0x80523A7: Batch::getDomain() const (getDomain.cpp:4) ==30782== by 0x80565D1: SmtpConnection::getDomain() (getDomain.cpp:4) ==30782== by 0x8056688: SmtpConnection::getJob(std::list<SmtpConnection*, std::allocator<SmtpConnection*> >&, boost::mutex&, Semaphore<SELogicError, SERuntimeError>&, std::string const&) (getJob.cpp:20) ==30782== by 0x805679A: SmtpConnection::getTalkJob() (getTalkJob.cpp:4) ==30782== by 0x8058108: SmtpConnection::work() (work.cpp:8) ==30782== by 0x805CDDA: Worker::poll() (poll.cpp:6) ==30782== by 0x805CE2F: Worker::run() (run.cpp:7) ==30782== by 0x806F053: Thread<SELogicError, SERuntimeError>::threadLaunch(void*) (threadLaunch.cpp:12) ==30782== by 0x3C0D30E0: (within /usr/lib/valgrind/libpthread.so) ==30782== by 0xB800FAB4: (within /usr/lib/valgrind/stage2) Thread 9: status = WaitSys, associated_mx = 0x0, associated_cv = 0x0 ==30782== at 0x3C3ABC98: poll (in /lib/libc-2.3.2.so) ==30782== by 0x8059A75: ResolveListener::pollGetLine(std::string&) (pollGetLine.cpp:13) ==30782== by 0x80596D1: ResolveListener::getResults(bool&, std::string&, std::string&, long&) (getResults.cpp:13) ==30782== by 0x8059987: ResolveListener::poll() (poll.cpp:14) ==30782== by 0x805A92F: ResolveListener::run() (run.cpp:7) ==30782== by 0x806F053: Thread<SELogicError, SERuntimeError>::threadLaunch(void*) (threadLaunch.cpp:12) ==30782== by 0x3C0D30E0: (within /usr/lib/valgrind/libpthread.so) ==30782== by 0xB800FAB4: (within /usr/lib/valgrind/stage2) Note: see also the FAQ.txt in the source distribution. It contains workarounds to several common problems. If that doesn't help, please report this bug to: valgrind.kde.org In the bug report, send all the above text, the valgrind version, and what Linux distro you are using. Thanks. |
|
From: Nicholas N. <nj...@ca...> - 2004-05-09 10:22:04
|
On Sat, 8 May 2004, Joshua Moore-Oliva wrote: > basically.. my program was attempting to access memory that it had > previously deleted... valgrind gave me teh warnings, and then spat out > all this and terminated. > > Dunno if it's of any help to you, it didn't happen again after I fixed > the problem. Thanks for the report. It's hard to avoid this -- if a program trashes malloc's data structures (which your program probably did) it's pretty hard to avoid problems. N |