I want to use PurifyPlus to check my program, which is a service started by xinetd. So STDIN/STDOUT/STDERR of my program are actually the socket connection used for communication with clients. I found my instrumented program will print some warning messages into STDOUT/STDERR, the message is something like:
"ge slave: Warning: Unknown language \"POSIX\", using English.\n\nWarning! Purify has detected the use of RTLD_DEEPBIND during the dlopen of\nlibnss_compat.so.2.\nPurify does not support the use of this opti"
I guess this is generated by Purify runtime during the start of my program. Is there any way to stop my program generate such messages? It will cause the message parsing between server and client side to be messed up.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
6 replies Latest Post - 2012-07-05T01:55:15Z by SystemAdmin
Pinned topic How to make purifyplus suppress the warning messages
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-07-05T01:55:15Z at 2012-07-05T01:55:15Z by SystemAdmin
Re: How to make purifyplus suppress the warning messages2012-07-03T19:56:10Z in response to SystemAdminHi Guanglei,
I guess I'd try using the -log-file option to automatically
redirect Purify messages to a log file. For example:
% setenv PURIFYOPTIONS -log-file=mylog.%v.%p
Let me know if this doesn't work and I'll guess again...
Re: How to make purifyplus suppress the warning messages2012-07-04T05:15:24Z in response to SystemAdminThanks for your reply.
I did use PURIFYOPTIONS like what you did:
It doesn't work. I think the message I saw doesn't belong to the one which should go into the log file. It seems to be a warning message generated during execvp() of my application by Purify.
Re: How to make purifyplus suppress the warning messages2012-07-04T06:27:50Z in response to SystemAdminHi Guanglei,
OK, let me guess again! I found this tech note which leads
me to believe -suppress-runtime-warnings might work:
It's worth a try anyway!
Re: How to make purifyplus suppress the warning messages2012-07-04T06:48:24Z in response to SystemAdminHi,
I tried this option:
liguangl:/u/liguangl/sandbox> env | grep PURI
But PurifyPlus will still generate warning messages. I use gdb to get the following from my client, which shows Purify still generates warning messages into STDERR/STDOUT
#2 0x00007f19d27bb74d in Stream::read (this=0x3ed0f10,
buf=0x7f1958d40010 "ge slave: Warning: Unknown language \"POSIX\", using English.\n\nWarning! Purify has detected the use of RTLD_DEEPBIND during the dlopen of\nlibnss_compat.so.2.\nPurify does not support the use of this opti"..., size=1986359905) at /project/sprelbarlx2/build/rbarlx2s007a/src/ppe/sci/common/stream.cpp:117
Re: How to make purifyplus suppress the warning messages2012-07-04T07:04:03Z in response to SystemAdminHi Guanglei,
> ...but PurifyPlus will still generate the warning messages.
OK, how about this Tech Note?
It recommends the following:
Who knows... third time's the charm?
Re: How to make purifyplus suppress the warning messages2012-07-05T01:55:15Z in response to SystemAdminHi,
All the above don't work.
But I use a workaround and it works. I wrote a wrapper c application, which will just close(1), close(2), and execvp() of my application. Then no messages will be printed into STDERR of my application since it has been closed before exec.
Thanks you all for your suggestions.