|
From: Konstantin S. <kon...@gm...> - 2008-02-05 18:52:11
|
Hi, One of my tests failed under valgrind with this message: ==30205== Unsupported clone() flags: 0x800111 ==30205== ==30205== The only supported clone() uses are: ==30205== - via a threads library (LinuxThreads or NPTL) ==30205== - via the implementation of fork or vfork ==30205== ==30205== Valgrind detected that your program requires ==30205== the following unimplemented functionality: ==30205== Valgrind does not support general clone(). ==30205== This may be because the functionality is hard to implement, ==30205== or because no reasonable program would behave this way, ==30205== or because nobody has yet needed it. In any case, let us know at ==30205== www.valgrind.org and/or try to work around the problem, if you can. ==30205== ==30205== Valgrind has to exit now. Sorry. Bye! ==30205== The flags are: CLONE_UNTRACED|SIGCHLD|CLONE_VM Is this variation of clone() hard to implement? Thanks, --kcc |
> ==30205== Unsupported clone() flags: 0x800111 > The flags are: CLONE_UNTRACED|SIGCHLD|CLONE_VM > Is this variation of clone() hard to implement? Supporting more combinations of flags is easy as long as you don't care how they interact with valgrind. Some of the flags do interact with valgrind (CLONE_VM; CLONE_SIGHAND and perhaps CLONE_THREAD; CLONE_FILES if logging messages; CLONE_STOPPED) but most of them do not. The existing code takes the view that an unexplored combination of flags is unsupported. In this case the unknown is CLONE_UNTRACED, which linux/sched.h documents as "set if the tracing process can't force CLONE_PTRACE on this clone." In some ways Valgrind is a "super" ptrace, so how does this relate to the application and its intended purpose? Merely changing the valgrind code to ignore CLONE_UNTRACED is trivial, but the devil is in how the intended semantics work out. My patches for valgrind to support UserModeLinux implemented a CLONE_CHILD_LETGO flag meaning, "do not virtualize the child; let it run natively free." This happened to be a good idea for UML. -- John Reiser, jreiser@BitWagon.com |
|
From: Konstantin S. <kon...@gm...> - 2008-02-07 00:03:35
|
John, > My patches for valgrind to support UserModeLinux implemented > a CLONE_CHILD_LETGO flag meaning, "do not virtualize the child; > let it run natively free." This happened to be a good idea for UML. May I ask you to send me this patch? If I understood you correctly, I need something similar for CLONE_UNTRACED. Thanks, --kcc |
Hello Konstantin, >>My patches for valgrind to support UserModeLinux implemented >>a CLONE_CHILD_LETGO flag meaning, "do not virtualize the child; >>let it run natively free." This happened to be a good idea for UML. > May I ask you to send me this patch? > If I understood you correctly, I need something similar for CLONE_UNTRACED. http://bitwagon.com/valgrind+uml/ http://bitwagon.com/valgrind+uml/vg330-patches-jreiser0127.tgz -- John Reiser, jreiser@BitWagon.com |