|
From: Sverre S. <sun...@id...> - 2004-10-22 09:28:15
|
Hello I have never posted to this list, and I haven't found this problem in the list archives. I am a developer on a simulating software that uses the c++sim package - http://cxxsim.ncl.ac.uk/ We are currently trying to uncover possible memory leaks and has tried to use valgrind. When I start valgrind i get this error message: about 20 times repeating: @@ unlikely looking definition in unparsed remains ";" What does it mean? Then I get this error. ==24654== For more details, rerun with: -v ==24654== ==24654== warning: Valgrind's pthread_setschedparam does nothing ==24654== (scheduling not changeable) ==24654== your program may misbehave as a result ==24654== pthread_mutex_lock/trylock: operation would deadlock ==24654== at 0x1B9111D3: pthread_mutex_lock (vg_libpthread.c:1334) ==24654== by 0x80718B0: Thread::Suspend(void) (in /home/laban/Projects/bsplab/bsplab) ==24654== by 0x8051C9B: ComputerSystem::Await(void) (computerSystem.cpp:84) ==24654== by 0x8051DBD: main (Main.cpp:67) It seems like it detects a deadlock and resolves it. The problem is that it isn't a deadlock. The thread should be suspended until simulation threads complete. And then some of these ==24654== Invalid read of size 4 ==24654== at 0x1B91730A: _IO_flockfile (vg_libpthread.c:3405) ==24654== by 0x1BA26B7C: _IO_flush_all_lockp (genops.c:856) ==24654== by 0x1BA26BDF: _IO_flush_all_internal (genops.c:873) ==24654== by 0x1BA26DDC: _IO_cleanup (genops.c:945) ==24654== Address 0x1C700D2B is not stack'd, malloc'd or (recently) free'd I guess this error is because of the stack switches. Does anyone know? The program exits before running the simulator properly. Without valgrind this program should run to the end. any help is greatly appreciated Sverre Sundsdal -- ______________________________________________________________________ Sverre Sundsdal - 91 78 92 76 www.samfundet.no |