From 1b0ff742a8869d56d8b31e2448cf6930059f9eb4 Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 25 Sep 2007 09:08:41 +0000 Subject: [PATCH] Answer to FS: valgrind don't like contextes git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4709 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- doc/FAQ.doc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/FAQ.doc b/doc/FAQ.doc index 396581e5ea..f59e1cf7cd 100644 --- a/doc/FAQ.doc +++ b/doc/FAQ.doc @@ -1189,6 +1189,32 @@ You should try to use the surfxml_update.pl script that can be found If you don't, you really should use valgrind to debug your code, it's almost magic. +\subsubsection faq_trouble_vg_context Stack switching problems and truncated backtraces + +With the default version of simgrid, valgrind will probably spit tons +of warnings about stack switching like the following, and produce +truncated bactraces where only one call appears instead of the whole +stack. + +\verbatim +==14908== Warning: client switching stacks? SP change: 0xBEA2A48C --> 0x476F350 +==14908== to suppress, use: --max-stackframe=1171541700 or greater +==14908== Warning: client switching stacks? SP change: 0x476E1E4 --> 0xBEA2A48C +==14908== to suppress, use: --max-stackframe=1171537240 or greater +==14908== Warning: client switching stacks? SP change: 0xBEA2A48C --> 0x4792420 +==14908== to suppress, use: --max-stackframe=1171685268 or greater +==14908== further instances of this message will not be shown. +\endverbatim + +This is because valgrind don't like too much the UNIX98 contextes we +use by default in simgrid for efficiency reasons. Simply add the +--with-pthread flag to your configure when debugging your code. You +may also find --disable-compiler-optimization usefull if valgrind or +gdb get fooled by the optimization done by the compiler. But you +should remove these flages when everything works before going in +production (before launching your 1252135 experiments), or everything +will run only one third of the true SimGrid potential. + \subsubsection faq_trouble_vg_longjmp longjmp madness in valgrind This is when valgrind starts complaining about longjmp things, just like: -- 2.20.1