Backed out changeset 97ec7ec089c4 (bug 1576748) for bustage in symbolstore.py
authorNoemi Erli <nerli@mozilla.com>
Sun, 01 Sep 2019 15:08:20 +0300
changeset 491039 10f791c3a57f54869b1afeb237dbc544f74f4591
parent 491038 e714dd56f2de11115529a26112a4013a4b2726af
child 491040 74bee2c675addb12595806d8edafe1fa899550f8
push id114013
push usercsabou@mozilla.com
push dateSun, 01 Sep 2019 21:52:27 +0000
treeherdermozilla-inbound@b338d55d5007 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1576748
milestone70.0a1
backs out97ec7ec089c4e91acd34d7324711cc9c556b1117
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 97ec7ec089c4 (bug 1576748) for bustage in symbolstore.py
toolkit/crashreporter/tools/symbolstore.py
--- a/toolkit/crashreporter/tools/symbolstore.py
+++ b/toolkit/crashreporter/tools/symbolstore.py
@@ -519,31 +519,19 @@ class Dumper:
         t_start = time.time()
         print("Processing file: %s" % file, file=sys.stderr)
 
         sourceFileStream = ''
         code_id, code_file = None, None
         try:
             cmd = self.dump_syms_cmdline(file, arch, dsymbundle=dsymbundle)
             print(' '.join(cmd), file=sys.stderr)
-            # We're interested in `stderr` in the case that something goes
-            # wrong with dump_syms, but we don't want to use
-            # `stderr=subprocess.PIPE` here, as that can land us in a
-            # deadlock when we try to read only from `stdout`, below.  The
-            # Python documentation recommends using `communicate()` in such
-            # cases, but `stderr` can be rather large, and we don't want to
-            # waste time accumulating all of it in the non-error case.  So we
-            # completely ignore `stderr` here and capture it separately,
-            # below.
             proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                                     stderr=open(os.devnull, 'wb'))
-            try:
-                module_line = proc.stdout.next()
-            except StopIteration:
-                module_line = ''
+            module_line = proc.stdout.next()
             if module_line.startswith("MODULE"):
                 # MODULE os cpu guid debug_file
                 (guid, debug_file) = (module_line.split())[3:5]
                 # strip off .pdb extensions, and append .sym
                 sym_file = re.sub("\.pdb$", "", debug_file) + ".sym"
                 # we do want forward slashes here
                 rel_path = os.path.join(debug_file,
                                         guid,
@@ -613,32 +601,18 @@ class Dumper:
                 print(rel_path)
                 if self.srcsrv and vcs_root:
                     # add source server indexing to the pdb file
                     self.SourceServerIndexing(debug_file, guid, sourceFileStream, vcs_root)
                 # only copy debug the first time if we have multiple architectures
                 if self.copy_debug and arch_num == 0:
                     self.CopyDebug(file, debug_file, guid,
                                    code_file, code_id)
-            else:
-                # For some reason, we didn't see the MODULE line as the first
-                # line of output.  It's very possible that the interesting error
-                # message(s) are on stderr, so let's re-execute the process and
-                # capture the entirety of stderr.
-                proc = subprocess.Popen(cmd, stdout=open(os.devnull, 'wb'),
-                                        stderr=subprocess.PIPE)
-                (_, dumperr) = proc.communicate()
-                retcode = proc.returncode
-                message = [
-                    "dump_syms failed to produce the expected output",
-                    "return code: %d" % retcode,
-                    "first line of output: %s" % module_line,
-                    "stderr: %s" % dumperr
-                ]
-                raise RuntimeError('\n----------\n'.join(message))
+        except StopIteration:
+            pass
         except Exception as e:
             print("Unexpected error: %s" % str(e), file=sys.stderr)
             raise
 
         if dsymbundle:
             shutil.rmtree(dsymbundle)
 
         if count_ctors: