Previous patch do not work, file are already in unbufferred mode.
The file needs to be opened in append mode so that each process can
append to the file.
Newest patch fix it.
Jean-Louis
Jean-Louis Martineau wrote:
The bug is not with the amstatus program. The current log file is
corrupted because many program write to it at the same time and they
use buffered output.
Try the attached patch, it make the file descriptor unbufferred. You
should not see that error on the following run.
Jean-Louis
diff --git a/server-src/amdump.pl b/server-src/amdump.pl
index 383fa85..2f51ce5 100644
--- a/server-src/amdump.pl
+++ b/server-src/amdump.pl
@@ -192,7 +192,7 @@ sub start_logfiles {
# undef first.. stupid perl.
debug("beginning amdump log");
$amdump_log = undef;
- open($amdump_log, ">", $amdump_log_filename)
+ open($amdump_log, ">>", $amdump_log_filename)
or die("could not open amdump log file '$amdump_log_filename': $!");
}