Hi, is it necessary to use a tool like valgrind to debug deadlocks? For all deadlocks I have seen it was enough to see the tracebacks of all threads to diagnose the problem.
Could you please describe why this does not work in your case? Thanks Christoph Am 25.06.2012 10:09, schrieb Marian Kechlibar: > Dear Valgrind team, > > we're currently experimenting with Valgrind on Android devices. We've > already successfully rooted some devices and it seems that Valgrind can > run on them, although it consumes a lot of memory. > > We have a C++ Android application which is multi-threaded and sometimes > ends in a deadlock. I am thinking about a way how to detect the precise > deadlock location, and I came with the following idea, > but I need some help with it. > > 1) build the app with debugging symbols, > 2) implement a signal handler in the app, > 3) run the app on the device with valgrind and tool=none, > 4) when the app hangs, send a SIGTERM, caught by the app, > 5) in the signal handler within the app, use valgrind's macros to record > all stacks of all currently living threads. > > The steps 1-4 seem to work, but I am not sure if 5 is really achievable > with valgrind. There is this extremely useful valgrind macro > VALGRIND_PRINTF_BACKTRACE, which prints a good stack trace, but only for > the current thread. > > Is there any eay how to 'iterate' over all the current threads (let us > say that we know their thread id's - we do) and print their stack > traces? That would help us a lot. > > Best regards > > Marian Kechlibar > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Valgrind-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/valgrind-users > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
