Closed Bug 905824 Opened 11 years ago Closed 11 years ago

ObjdirMismatchException when symlinks are involved

Categories

(Firefox Build System :: General, defect, P1)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla27

People

(Reporter: MatsPalmgren_bugz, Assigned: gps)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(2 files)

# mach mochitest-plain 
Error running mach:

    ['mochitest-plain']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

ObjdirMismatchException: Objdir mismatch: /md1/OBJDIR/home/mats/moz/inbound != /OBJDIR/home/mats/moz/inbound

  File "/home/mats/moz/inbound/testing/mochitest/mach_commands.py", line 267, in run_mochitest_plain
    return self.run_mochitest(test_file, 'plain', **kwargs)
  File "/home/mats/moz/inbound/testing/mochitest/mach_commands.py", line 298, in run_mochitest
    **kwargs)
  File "/home/mats/moz/inbound/testing/mochitest/mach_commands.py", line 109, in run_mochitest_test
    runner = mochitest.Mochitest(automation)
  File "/OBJDIR/home/mats/moz/inbound/_tests/testing/mochitest/runtests.py", line 453, in __init__
    super(Mochitest, self).__init__()
  File "/OBJDIR/home/mats/moz/inbound/_tests/testing/mochitest/runtests.py", line 187, in __init__
    mozinfo.find_and_update_from_json(*dirs)
  File "/home/mats/moz/inbound/testing/mozbase/mozinfo/mozinfo/mozinfo.py", line 148, in find_and_update_from_json
    build = MozbuildObject.from_environment()
  File "/home/mats/moz/inbound/python/mozbuild/mozbuild/base.py", line 163, in from_environment
    raise ObjdirMismatchException(topobjdir, config['topobjdir'])
# ls -l /OBJDIR
lrwxrwxrwx 1 root root 11 Feb 26  2012 /OBJDIR -> /md1/OBJDIR
This setup used to work recently.
Keywords: regression
It's a regression from the mochitest harness changing how it loads mozconfigs. Please try the patch in bug 901811. If that fixes it, please dupe. Else, please add a comment with the output of |mach environment| and we'll get to the bottom of this.
Component: mach → Build Config
Attached file environment
The patch in bug 901811 did not help - same error.
This is the output of "./mach environment" (with that patch applied).

BTW, building and running firefox works fine.
"mach reftest" also works.
Please also upload your mozconfig and information about your directory structure, symlinks and all. Please also include steps to reproduce, including working directories. The goal is to give us enough information so that we can write a unit test that reproduces your environment (and hopefully the error).
Flags: needinfo?(matspal)
The attachment has all the paths, the only symlink I have is the one in comment 0:
/OBJDIR -> /md1/OBJDIR

/md1/OBJDIR and all the other paths are real directories, not symlinks.

The contents of the local (source dir) .mozconfig is:
. $HOME/.mozconfig
ac_add_options --enable-installer

and $HOME/.mozconfig has:
mk_add_options MOZ_OBJDIR=/OBJDIR@TOPSRCDIR@

and some standard stuff like --enable-debug etc.
I'm not aware of anything else that is special in my environment.
Let me know if you can reproduce it with that info.
Flags: needinfo?(matspal)
Bug still occurs... where you able to reproduce it?
Flags: needinfo?(gps)
I haven't looked at this one yet. Will try to look at it today. If you want a quick workaround, comment out the raising of ObjdirMismatchException from python/mozbuild/mozbuild/base.py. It should be relatively safe for most development scenarios.
Assignee: nobody → gps
Flags: needinfo?(gps)
Priority: -- → P1
Summary: mach does not grok symlinks? → ObjdirMismatchException when symlinks are involved
Blocks: 912114
I'm optimistic this will fix things.

Turns out the implementation of samepath() was wrong because it was
looking for an API on os.path that AFAICT never existed! I also think
I've identified the root cause of automation test failures: they're
picking up mozinfo.json from the virtualenv. So I added a backdoor to
disable that. Will post another patch that attempts to enable disabled
tests with this workaround.

https://tbpl.mozilla.org/?tree=Try&rev=85aa11e17f9d
Attachment #804052 - Flags: review?(ted)
Attachment #804052 - Flags: review?(ted) → review+
https://hg.mozilla.org/projects/build-system/rev/b702bb90a87e
Status: NEW → ASSIGNED
Flags: in-testsuite+
https://hg.mozilla.org/mozilla-central/rev/b702bb90a87e
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: