mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Temporary debug spew for diagnosing Linux mochitest hang.
This commit is contained in:
parent
ad605908e9
commit
7b53db6a22
@ -281,6 +281,15 @@ PluginModuleChild::ActorDestroy(ActorDestroyReason why)
|
||||
{
|
||||
// doesn't matter why we're being destroyed; it's up to us to
|
||||
// initiate (clean) shutdown
|
||||
|
||||
|
||||
|
||||
#ifdef OS_LINUX
|
||||
fprintf(stderr, "TEST-UNEXPECTED-FAIL | plugin process %d | initiating shutdown\n", getpid());
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
XRE_ShutdownChildProcess();
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,12 @@ bool LaunchApp(const std::vector<std::string>& argv,
|
||||
#endif
|
||||
exit(127);
|
||||
} else {
|
||||
|
||||
|
||||
fprintf(stderr, "TEST-UNEXPECTED-FAIL | ==> process %d launched | child process %d\n", GetCurrentProcId(), pid);
|
||||
|
||||
|
||||
|
||||
gProcessLog.print("==> process %d launched child process %d\n",
|
||||
GetCurrentProcId(), pid);
|
||||
if (wait)
|
||||
|
@ -54,6 +54,12 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
|
||||
#include "base/eintr_wrapper.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "base/process_util.h"
|
||||
@ -189,6 +195,14 @@ public:
|
||||
ChildReaper::OnSignal(sig);
|
||||
|
||||
if (!process_) {
|
||||
|
||||
|
||||
|
||||
fprintf(stderr, "TEST-UNEXPECTED-FAIL | process %d reaped | child process (got SIGCHLD, exited normally)\n", getpid());
|
||||
|
||||
|
||||
|
||||
|
||||
MessageLoop::current()->RemoveDestructionObserver(this);
|
||||
delete this;
|
||||
}
|
||||
@ -200,6 +214,13 @@ public:
|
||||
DCHECK(process_);
|
||||
|
||||
WaitForChildExit();
|
||||
|
||||
|
||||
|
||||
fprintf(stderr, "TEST-UNEXPECTED-FAIL | process %d reaped | child process (waitpid() on shutdown)\n", getpid());
|
||||
|
||||
|
||||
|
||||
process_ = 0;
|
||||
|
||||
// XXX don't think this is necessary, since destruction can only
|
||||
@ -239,8 +260,16 @@ ProcessWatcher::EnsureProcessTerminated(base::ProcessHandle process,
|
||||
DCHECK(process != base::GetCurrentProcId());
|
||||
DCHECK(process > 0);
|
||||
|
||||
if (IsProcessDead(process))
|
||||
if (IsProcessDead(process)) {
|
||||
|
||||
|
||||
|
||||
fprintf(stderr, "TEST-UNEXPECTED-FAIL | process %d reaped | child process %d (it was already dead)\n", getpid(), process);
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
MessageLoopForIO* loop = MessageLoopForIO::current();
|
||||
if (force) {
|
||||
|
@ -3592,6 +3592,19 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
|
||||
|
||||
XRE_DeinitCommandLine();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef OS_LINUX
|
||||
fprintf(stderr, "TEST-UNEXPECTED-FAIL | browser process %d | exiting\n", getpid());
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return NS_FAILED(rv) ? 1 : 0;
|
||||
}
|
||||
|
||||
|
@ -371,6 +371,13 @@ XRE_InitChildProcess(int aArgc,
|
||||
sIOMessageLoop = nsnull;
|
||||
}
|
||||
|
||||
|
||||
#ifdef OS_LINUX
|
||||
fprintf(stderr, "TEST-UNEXPECTED-FAIL | plugin process %d | IO thread joined XPCOM thread, exiting\n", getpid());
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
NS_LogTerm();
|
||||
return XRE_DeinitCommandLine();
|
||||
}
|
||||
@ -503,6 +510,15 @@ XRE_ShutdownChildProcess()
|
||||
NS_ABORT_IF_FALSE(!!ioLoop, "Bad shutdown order");
|
||||
|
||||
ioLoop->PostTask(FROM_HERE, new MessageLoop::QuitTask());
|
||||
|
||||
|
||||
|
||||
#ifdef OS_LINUX
|
||||
fprintf(stderr, "TEST-UNEXPECTED-FAIL | plugin process %d | posted quit task to IO thread\n", getpid());
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
Loading…
Reference in New Issue
Block a user