fix breakage in symbolstore.py when running in Scratchbox

RESOLVED FIXED

Status

()

--
major
RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: ted, Assigned: ted)

Tracking

Trunk
x86
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(status1.9.2 .5-fixed, fennec1.1+)

Details

Attachments

(1 attachment)

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'

Comment 2

9 years ago
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.

Updated

9 years ago
Blocks: 566428
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

Comment 5

9 years ago
this is blocking 1.1
tracking-fennec: --- → 1.1+
Created attachment 445980 [details] [diff] [review]
replace os.popen/os.system with subprocess

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
Last Resolved: 9 years ago
Resolution: --- → FIXED

Comment 9

8 years ago
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?

Updated

8 years ago
Attachment #445980 - Flags: approval1.9.2.5? → approval1.9.2.5+

Comment 10

8 years ago
Pushed to 1.9.2.5 relbranch:
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/91e79f7e8b96

Pushed to 1.9.2 default:
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/85d0f45dc6d8
status1.9.2: --- → .5-fixed
You need to log in before you can comment on or make changes to this bug.