AMP incorrectly monitoring socat process when using LinuxBufferedConsole in Generic
Bug Report
System Information
- Ubuntu 20.04.4
- AMP 2.3.4.4
- Mainline
I confirm:
- [x] that I have searched for an existing bug report for this issue.
- [x] that I am using the latest available version of AMP.
- [x] that my operating system is up-to-date.
Symptoms
On some servers running under Generic, LinuxBufferedConsole is needed to get full console output. However, in some cases that causes AMP to monitor the wrong process (it appears to monitor socat), resulting in metrics being reported incorrectly.
This mostly seems to affect servers running under Xvfb/Wine. I have seen it previously with The Isle (EVRIMA), which runs a native binary, but on a recent test the problem did not re-occur.
Night of the Dead is an example of incorrect monitoring.
Relevant kvp contents:
App.ExecutableLinux=/usr/bin/xvfb-run
App.LinuxCommandLineArgs=-a wine "./LF/Binaries/Win64/LFServer.exe"
...
App.MonitorChildProcess=True
App.MonitorChildProcessWaitMs=2000
App.MonitorChildProcessName=wine64
When the server is running without a buffered console, the CPU and memory metrics show correctly. htop shows:
When the server is running with a buffered console, metrics are not correct (eg only 4MB RAM usage is reported). htop shows:
Reproduction
Create an instance that uses Xvfb/Wine and LinuxBufferedConsole.