Back out bug 1050122 for causing silent timeouts on emulator mochitests. a=me
authorKyle Huey <khuey@kylehuey.com>
Tue, 02 Sep 2014 12:05:36 -0700
changeset 203097 372ce1f36116abf788088814012aed51ae91b7fd
parent 203096 7753c52d5976d88ee24ea91472da09eca5504743
child 203105 4696eb4f3d9ccd3bb3ce2113303f46a51f6a5dd0
child 203122 1becc2a59531b58fb043a94f882482c35cd55919
child 203257 e2e30e1e734584a2d706804818d51f51f0b33e29
push id27419
push userkhuey@mozilla.com
push dateTue, 02 Sep 2014 19:07:20 +0000
treeherdermozilla-central@372ce1f36116 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1050122
milestone35.0a1
first release with
nightly linux32
372ce1f36116 / 35.0a1 / 20140902121319 / files
nightly linux64
372ce1f36116 / 35.0a1 / 20140902121319 / files
nightly mac
372ce1f36116 / 35.0a1 / 20140902121319 / files
nightly win32
372ce1f36116 / 35.0a1 / 20140902121319 / files
nightly win64
372ce1f36116 / 35.0a1 / 20140902121319 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Back out bug 1050122 for causing silent timeouts on emulator mochitests. a=me
b2g/app/B2GLoader.cpp
b2g/app/b2g.js
ipc/glue/ProcessUtils_linux.cpp
--- a/b2g/app/B2GLoader.cpp
+++ b/b2g/app/B2GLoader.cpp
@@ -210,23 +210,16 @@ RunProcesses(int argc, const char *argv[
     /* The Nuwa process */
     /* This provides the IPC service of loading Nuwa at the process.
      * The b2g process would send a IPC message of loading Nuwa
      * as the replacement of forking and executing plugin-container.
      */
     return XRE_ProcLoaderServiceRun(getppid(), childSock, argc, argv);
   }
 
-  // Reap zombie child process.
-  struct sigaction sa;
-  sa.sa_handler = SIG_IGN;
-  sigemptyset(&sa.sa_mask);
-  sa.sa_flags = 0;
-  sigaction(SIGCHLD, &sa, nullptr);
-
   // The b2g process
   int childPid = pid;
   XRE_ProcLoaderClientInit(childPid, parentSock);
   return b2g_main(argc, argv);
 }
 
 /**
  * B2G Loader is responsible for loading the b2g process and the
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -749,21 +749,23 @@ pref("hal.gonk.COMPOSITOR.nice", 0);
 // order to free up memory.
 pref("hal.processPriorityManager.gonk.notifyLowMemUnderKB", 14336);
 
 // We wait this long before polling the memory-pressure fd after seeing one
 // memory pressure event.  (When we're not under memory pressure, we sit
 // blocked on a poll(), and this pref has no effect.)
 pref("gonk.systemMemoryPressureRecoveryPollMS", 5000);
 
+#ifndef DEBUG
 // Enable pre-launching content processes for improved startup time
 // (hiding latency).
 pref("dom.ipc.processPrelaunch.enabled", true);
 // Wait this long before pre-launching a new subprocess.
 pref("dom.ipc.processPrelaunch.delayMs", 5000);
+#endif
 
 pref("dom.ipc.reuse_parent_app", false);
 
 // When a process receives a system message, we hold a CPU wake lock on its
 // behalf for this many seconds, or until it handles the system message,
 // whichever comes first.
 pref("dom.ipc.systemMessageCPULockTimeoutSec", 30);
 
--- a/ipc/glue/ProcessUtils_linux.cpp
+++ b/ipc/glue/ProcessUtils_linux.cpp
@@ -23,17 +23,16 @@
 #include "mozilla/ipc/Transport.h"
 #include "mozilla/ipc/FileDescriptorUtils.h"
 #include "mozilla/ipc/IOThreadChild.h"
 #include "mozilla/dom/ContentProcess.h"
 #include "base/file_descriptor_shuffle.h"
 #include "mozilla/BackgroundHangMonitor.h"
 #include "mozilla/DebugOnly.h"
 #include "base/process_util.h"
-#include "mozilla/Preferences.h"
 
 #include "prenv.h"
 
 #include "nsXULAppAPI.h" // export XRE_* functions
 
 #include "nsAppRunner.h"
 
 int content_process_main(int argc, char *argv[]);
@@ -186,24 +185,16 @@ ProcLoaderClientInit(pid_t aPeerPid, int
  */
 void
 ProcLoaderClientGeckoInit()
 {
   MOZ_ASSERT(sProcLoaderClientInitialized, "call ProcLoaderClientInit() at first");
   MOZ_ASSERT(!sProcLoaderClientGeckoInitialized,
              "call ProcLoaderClientGeckoInit() more than once");
 
-  if (!Preferences::GetBool("dom.ipc.processPrelaunch.enabled", false)) {
-    kill(sProcLoaderPid, SIGKILL);
-    sProcLoaderPid = 0;
-    close(sProcLoaderChannelFd);
-    sProcLoaderChannelFd = -1;
-    return;
-  }
-
   sProcLoaderClientGeckoInitialized = true;
 
   FileDescriptor *fd = new FileDescriptor(sProcLoaderChannelFd);
   close(sProcLoaderChannelFd);
   sProcLoaderChannelFd = -1;
   Transport *transport = OpenDescriptor(*fd, Transport::MODE_CLIENT);
   sProcLoaderParent = new ProcLoaderParent(fd);
   sProcLoaderParent->Open(transport,