Closed Bug 566311 Opened 10 years ago Closed 10 years ago

fix breakage in symbolstore.py when running in Scratchbox

Categories

(Toolkit :: Crash Reporting, defect, major)

x86
Linux
defect
Not set
major

Tracking

()

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

People

(Reporter: ted, Assigned: ted)

References

Details

Attachments

(1 file)

Currently "make buildsymbols" fails in Scratchbox:
/usr/bin/python2.5 /home/cltbld/mozilla-central/toolkit/crashreporter/tools/symbolstore.py \
  -c --vcs-info                                          \
  -s /home/cltbld/mozilla-central               \
  ./dist/host/bin/dump_syms                                                \
  ./dist/crashreporter-symbols                                   \
  ./dist/bin >                                        \
  ./dist/crashreporter-symbols/fennec-1.1a2pre-Linux-20100227144522-symbols.txt
Processing file: ./dist/bin/GoodPlugin
Unexpected error:  <type 'exceptions.IOError'>
Traceback (most recent call last):
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/symbolstore.py", line 780, in <module>
    main()
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/symbolstore.py", line 776, in main
    dumper.Process(arg)
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/symbolstore.py", line 464, in Process
    return self.ProcessDir(file_or_dir)
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/symbolstore.py", line 481, in ProcessDir
    if not self.ProcessFile(fullpath):
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/symbolstore.py", line 529, in ProcessFile
    (filename, rootname) = GetVCSFilename(filename, self.srcdirs)
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/symbolstore.py", line 363, in GetVCSFilename
    fileInfo = HGFileInfo(file, srcdir)
  File "/home/cltbld/mozilla-central/toolkit/crashreporter/tools/symbolstore.py", 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()
'39544b4cb578'
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:
http://hg.mozilla.org/mozilla-central/rev/722556e1b9f5
Status: NEW → RESOLVED
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.