Topic
  • 6 replies
  • Latest Post - ‏2012-07-05T01:55:15Z by SystemAdmin
SystemAdmin
SystemAdmin
2948 Posts

Pinned topic How to make purifyplus suppress the warning messages

‏2012-07-03T14:02:45Z |
Hi,
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.

Thanks.
Updated on 2012-07-05T01:55:15Z at 2012-07-05T01:55:15Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    2948 Posts

    Re: How to make purifyplus suppress the warning messages

    ‏2012-07-03T19:56:10Z  
    Hi 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...
    Don
  • SystemAdmin
    SystemAdmin
    2948 Posts

    Re: How to make purifyplus suppress the warning messages

    ‏2012-07-04T05:15:24Z  
    Hi 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...
    Don
    Thanks for your reply.

    I did use PURIFYOPTIONS like what you did:
    export PURIFYOPTIONS="-log-file=/tmp/lgl.log"
    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.
  • SystemAdmin
    SystemAdmin
    2948 Posts

    Re: How to make purifyplus suppress the warning messages

    ‏2012-07-04T06:27:50Z  
    Thanks for your reply.

    I did use PURIFYOPTIONS like what you did:
    export PURIFYOPTIONS="-log-file=/tmp/lgl.log"
    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.
    Hi Guanglei,

    OK, let me guess again! I found this tech note which leads
    me to believe -suppress-runtime-warnings might work:

    http://www-01.ibm.com/support/docview.wss?uid=swg21122966

    It's worth a try anyway!
    Don
  • SystemAdmin
    SystemAdmin
    2948 Posts

    Re: How to make purifyplus suppress the warning messages

    ‏2012-07-04T06:48:24Z  
    Hi Guanglei,

    OK, let me guess again! I found this tech note which leads
    me to believe -suppress-runtime-warnings might work:

    http://www-01.ibm.com/support/docview.wss?uid=swg21122966

    It's worth a try anyway!
    Don
    Hi,
    I tried this option:
    liguangl:/u/liguangl/sandbox> env | grep PURI
    PURIFYOPTIONS=-log-file=/tmp/lgl.log -suppress-runtime-warnings=yes
    liguangl:/u/liguangl/sandbox>

    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
  • SystemAdmin
    SystemAdmin
    2948 Posts

    Re: How to make purifyplus suppress the warning messages

    ‏2012-07-04T07:04:03Z  
    Hi,
    I tried this option:
    liguangl:/u/liguangl/sandbox> env | grep PURI
    PURIFYOPTIONS=-log-file=/tmp/lgl.log -suppress-runtime-warnings=yes
    liguangl:/u/liguangl/sandbox>

    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
    Hi Guanglei,

    >
    > ...but PurifyPlus will still generate the warning messages.
    >

    OK, how about this Tech Note?

    http://www-01.ibm.com/support/docview.wss?uid=swg21264832

    It recommends the following:

    -log-file=/dev/null -append-log-file

    Who knows... third time's the charm?
    Don
  • SystemAdmin
    SystemAdmin
    2948 Posts

    Re: How to make purifyplus suppress the warning messages

    ‏2012-07-05T01:55:15Z  
    Hi Guanglei,

    >
    > ...but PurifyPlus will still generate the warning messages.
    >

    OK, how about this Tech Note?

    http://www-01.ibm.com/support/docview.wss?uid=swg21264832

    It recommends the following:

    -log-file=/dev/null -append-log-file

    Who knows... third time's the charm?
    Don
    Hi,
    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.