Closed Bug 431861 Opened 16 years ago Closed 16 years ago

filename not defined in symbolstore.py's GetCleanRoot (or GetCleanRoot assumes the presence of an @ in a CVS/Root)

Categories

(Toolkit :: Crash Reporting, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9.1a1

People

(Reporter: nthomas, Assigned: lsblakk)

Details

Attachments

(1 file, 1 obsolete file)

Hit this error on our staging setup for trunk release automation:

building symbol store
mkdir -p ./dist/crashreporter-symbols/2008043004
/tools/python/bin/python /builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py    \
          --vcs-info -s /builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla ./dist/host/bin/dump_syms     \
          ./dist/crashreporter-symbols/2008043004                    \
          ./dist/bin >                                    \
          ./dist/crashreporter-symbols/2008043004/firefox-3.0-Linux-2008043004-symbols.txt
Unexpected error:  <type 'exceptions.NameError'>
Traceback (most recent call last):
  File "/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 644, in <module>
    main()
  File "/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 640, in main
    dumper.Process(arg)
  File "/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 386, in Process
    return self.ProcessDir(file_or_dir)
  File "/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 400, in ProcessDir
    if not self.ProcessFile(fullpath):
  File "/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 446, in ProcessFile
    (filename, rootname) = GetVCSFilename(filename, self.srcdir)
  File "/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 297, in GetVCSFilename
    file = fileInfo.filename
  File "/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 108, in __getattr__
    filename = self.GetFilename()
  File "/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 179, in GetFilename
    if self.revision and self.clean_root:
  File "/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 96, in __getattr__
    clean_root = self.GetCleanRoot()
  File "/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 161, in GetCleanRoot
    print >> sys.stderr, "Failed to get CVS Root for %s" % filename
NameError: global name 'filename' is not defined
Failed to write symbol file.
make: *** [buildsymbols] Error 1
make: Leaving directory `/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/obj-fx-trunk'
make -C /builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/obj-fx-trunk uploadsymbols
make: Entering directory `/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/obj-fx-trunk'
/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/upload_symbols.sh /builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-
53.1.14.el5_Depend/mozilla/../2008043004/crashreporter-symbols-firefox-3.0-Linux-2008043004.zip
Transferring symbols... /builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/../2008043004/crashreporter-symbols-firefox-3.0-Linux-2008043004.zip
/builds/tinderbox/Fx-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/../2008043004/crashreporter-symbols-firefox-3.0-Linux-2008043004.zip: No such file or directory
make: *** [uploadsymbols] Error 1

The CVS/Root on this box is
  staging-1.9-master.build.mozilla.org:/builds/cvsmirror/cvsroot
so len(parts) is only 1 in
  http://mxr.mozilla.org/seamonkey/source/toolkit/crashreporter/tools/symbolstore.py#156

We can fix up our non-standard Root if you don't think it's worth supporting this situation, so this is mainly about making sure filename is defined.

Also, what happens to the exit status when there is a problem generating source server information ? We need some way to know that a failure occurred given no-one is actively monitoring build logs.
Ted says 
  File "/builds/tinderbox/Tb-Mozilla1.9-Release/Linux_2.6.18-53.1.14.el5_Depend/mozilla/toolkit/crashreporter/tools/symbolstore.py", line 161, in GetCleanRoot
     print >> sys.stderr, "Failed to get CVS Root for %s" % filename
should get a s/filename/self.file/
Looks like a copy/paste error. Lukas: could you patch this in CVS? Just probably need to change "filename" in that line to "self.file".
Assignee: nobody → lukasblakk
Replaced all three instances in CVSFileInfo.
Attachment #327832 - Flags: review?(ted.mielczarek)
Taking out the error message in GetCleanRoot and just returning with ":" replaced so that staging CVSROOT is handled better eg:

'staging-1.9-master.whatever:/builds/whatever' will just be returned as 'staging-1.9-master.whatever/builds/whatever'
Attachment #327832 - Attachment is obsolete: true
Attachment #327833 - Flags: review?(ted.mielczarek)
Attachment #327832 - Flags: review?(ted.mielczarek)
Comment on attachment 327833 [details] [diff] [review]
Returning clean root with : replaced so as to handle staging CVSROOT

Sounds good!
Attachment #327833 - Flags: review?(ted.mielczarek) → review+
so - does someone want to check this in?
Status: NEW → ASSIGNED
Does this land in cvs or just mozilla-central (or both)?
m-c, then maybe we'll get approval for cvs.
Pushed to mozilla-central:
http://hg.mozilla.org/mozilla-central/index.cgi/rev/10e63a02fbc9
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: