#1385 STDERRTOSTDOUT not fully ok

open
5
2011-01-07
2011-01-06
Bruno
No

I have an executable (Linux rhel5 C executable) which display some traces in stdout and some in stderr.
If i launch it without Staf ("./main 2>&1 | tee trace_file.txt") i get all the logs
If i use a command like
"staf my_host_name process START SHELL COMMAND /path/to/main STDOUT /path/to/tracefile.txt STDERRTOSTDOUT" : I DON'T get all the logs in the file (and the logs i don't get are not specificaly sterr or stdout). For example, there is not the first "emitter: ( 1, 2 )" trace.
Same thing if i first "touch /tmp/empty_file.txt" and add STDIN /tmp/empty_file to the previous command line.
If i use a command like "staf my_host_name process START SHELL COMMAND /path/to/main STDOUT /path/to/tracefile_out.txt STDERR /path/to/tracefile_err.txt" i get all the logs in the files
If i use a command like "staf my_host_name process START SHELL COMMAND /path/to/main", i get all the logs in my linux console
This has been tested with STAF 3.4.4 (and STAF 3.2.4)

Discussion

  • Bruno

    Bruno - 2011-01-06
     
  • Sharon Lucas

    Sharon Lucas - 2011-01-07

    I haven't been able to recreate this problem on a Linux RHEL 5 machine running:

    # cat redhat-release
    Red Hat Enterprise Linux Client release 5.3 (Tikanga)

    If I redirect both STDOUT and STDERR to the same file, I see all the log messages that I get if I redirect STDOUT and STDERR to different files.

     
  • Sharon Lucas

    Sharon Lucas - 2011-01-07
    • labels: 357172 --> Service::Process
    • assigned_to: nobody --> slucas
     
  • Bruno

    Bruno - 2011-01-11

    I have made more tests after your comment : the behavior is different with the CPU architecture. I have the problem on a 16 Intel(R) Xeon(R) E5530 CPU (running Red Hat Enterprise Linux Server release 5.5 (Tikanga)), but not problem on a 2 processors Intel(R) Pentium(R) 4 CPU (running Red Hat Enterprise Linux Server release 5 (Tikanga)).

    I also join you trace_files_ok.txt and trace_files_missing.txt

    However, i have no problem with a launch without staf or with staf with 2 different trace files for stdout and stderr

     
  • Bruno

    Bruno - 2011-01-11

    the expected traces

     
  • Bruno

    Bruno - 2011-01-11

    same traces but some missing when STDERRTOSTDOUT on my 16 CPU machine

     
  • Sharon Lucas

    Sharon Lucas - 2011-01-11

    I can't run the c executable on my other two Linux systems because it was compiled with a later glibc version than is installed on them. Can you provide the source file(s) and how to compiler them?

    Perhaps this problem is timing related? Only occurs on certain machines due to processor speed, etc? But, without being able to recreate the problem, it's difficult to investigate.

    No one else has ever reported a problem redirecting a STAF process's stdout and stderr to the same file.

    I guess for now you'll just have to redirect the process's output to two different files for your automation using STAF.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks