Closed Bug 566311 Opened 10 years ago Closed 10 years ago

fix breakage in when running in Scratchbox


(Toolkit :: Crash Reporting, defect, major)

Not set



Tracking Status
status1.9.2 --- .5-fixed
fennec 1.1+ ---


(Reporter: ted, Assigned: ted)




(1 file)

Currently "make buildsymbols" fails in Scratchbox:
/usr/bin/python2.5 /home/cltbld/mozilla-central/toolkit/crashreporter/tools/ \
  -c --vcs-info                                          \
  -s /home/cltbld/mozilla-central               \
  ./dist/host/bin/dump_syms                                                \
  ./dist/crashreporter-symbols                                   \
  ./dist/bin >                                        \
Processing file: ./dist/bin/GoodPlugin
Unexpected error:  <type 'exceptions.IOError'>
Traceback (most recent call last):
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/", line 780, in <module>
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/", line 776, in main
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/", line 464, in Process
    return self.ProcessDir(file_or_dir)
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/", line 481, in ProcessDir
    if not self.ProcessFile(fullpath):
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/", line 529, in ProcessFile
    (filename, rootname) = GetVCSFilename(filename, self.srcdirs)
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/", line 363, in GetVCSFilename
    fileInfo = HGFileInfo(file, srcdir)
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/", line 276, in __init__
    rev = os.popen('hg identify -i "%s"' % srcdir, "r").readlines()[0].rstrip()
IOError: [Errno 4] Interrupted system call
make: *** [buildsymbols] Error 1
Running that os.popen line by itself in a Python shell works, so it must be slightly more complicated than that:
>>> import os
>>> srcdir = "/home/cltbld/mozilla-central"
>>> os.popen('hg identify -i "%s"' % srcdir, "r").readlines()[0].rstrip()
Would it help if I passed the buildid via commandline or env?
We could probably hack something like that if need be, although it'd be nicer if we could just fix the script to not crash.
Stuart: I found out in meeting just now that Ted wasnt informed that this was a blocker on Fennec1.1rc1. Latest estimate is a few days work. Raising priority, as this blocks "go to build" for Fennec1.1rc1.

(If I misunderstood, and this is *not* blocking Fennec1.1rc1, please chime in)
Severity: normal → major
this is blocking 1.1
tracking-fennec: --- → 1.1+
The subprocess module handles this properly, so I just swapped out the script's usage of os.popen and os.system with usage of subprocess. This patch makes buildsymbols work correctly in my Scratchbox.

r?ing catlee, my go-to Python reviewer.
Attachment #445980 - Flags: review?(catlee)
Comment on attachment 445980 [details] [diff] [review]
replace os.popen/os.system with subprocess

Looks ok to me.
Attachment #445980 - Flags: review?(catlee) → review+
Pushed to m-c:
Closed: 10 years ago
Resolution: --- → FIXED
Comment on attachment 445980 [details] [diff] [review]
replace os.popen/os.system with subprocess

This never landed on m-1.9.2, and is breaking 1.1rc1.
Attachment #445980 - Flags: approval1.9.2.5?
Attachment #445980 - Flags: approval1.9.2.5? → approval1.9.2.5+
You need to log in before you can comment on or make changes to this bug.