AssertionError in pymake\parser.py - "assert offset >= self.lstart and offset <= self.lend" with unterminated function call at the end of a line

RESOLVED WONTFIX

Status

()

Core
Build Config
RESOLVED WONTFIX
5 years ago
3 years ago

People

(Reporter: emorley, Unassigned)

Tracking

Trunk
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [pymake])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 645261 [details]
Build log

Windows 64 bit
MozillaBuild 1.6.1
Windows SDK v7.0A
MSVC 2010
start-msvc10.bat

Building from:
https://hg.mozilla.org/integration/mozilla-inbound/rev/44e8a79e4be3

Had clobbered.

.mozconfig:
  MOZ_OBJDIR=d:/obj-inbound
  MOZ_MAKE_FLAGS=-j12

python $INBOUND_DIR/build/pymake/make.py -s -f client.mk

{
Generating LALR tables
Traceback (most recent call last):
  File "d:/srcdirs/inbound/build/pymake/make.py", line 18, in <module>
    pymake.process.ParallelContext.spin()
  File "d:\srcdirs\inbound\build\pymake\pymake\process.py", line 341, in spin
    c.run()
  File "d:\srcdirs\inbound\build\pymake\pymake\process.py", line 271, in run
    cb(*args, **kwargs)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 680, in _depfinishedparallel
    self.resolvecb(error=self.error, didanything=self.didanything)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 574, in resolvecb
    self.runnext()
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 594, in runnext
    self.rlist.pop(0).runcommands(self.indent, self.commandscb)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 764, in runcommands
    self._commandcb(False)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 701, in _commandcb
    self.commands.pop(0)(self._commandcb)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 1199, in __call__
    process.call(self.cline, loc=self.loc, cb=self._cb, context=self.context, **self.kwargs)
  File "d:\srcdirs\inbound\build\pymake\pymake\process.py", line 86, in call
    cb(res=0)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 1195, in _cb
    self.usercb(error=False)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 701, in _commandcb
    self.commands.pop(0)(self._commandcb)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 1199, in __call__
    process.call(self.cline, loc=self.loc, cb=self._cb, context=self.context, **self.kwargs)
  File "d:\srcdirs\inbound\build\pymake\pymake\process.py", line 95, in call
    command.main(argv[2:], env, cwd, cb)
  File "d:\srcdirs\inbound\build\pymake\pymake\command.py", line 271, in main
    _MakeContext(makeflags, makelevel, workdir, context, env, targets, options, ostmts, overrides, cb)
  File "d:\srcdirs\inbound\build\pymake\pymake\command.py", line 94, in __init__
    self.remakecb(True)
  File "d:\srcdirs\inbound\build\pymake\pymake\command.py", line 124, in remakecb
    self.makefile.include(f)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 1554, in include
    stmts = parser.parsefile(fspath)
  File "d:\srcdirs\inbound\build\pymake\pymake\parser.py", line 373, in parsefile
    return _parsecache.get(pathname)
  File "d:\srcdirs\inbound\build\pymake\pymake\util.py", line 136, in get
    item.o = self.cfunc(key)
  File "d:\srcdirs\inbound\build\pymake\pymake\parser.py", line 351, in _parsefile
    stmts = parsestring(fd.read(), pathname)
  File "d:\srcdirs\inbound\build\pymake\pymake\parser.py", line 390, in parsestring
    e, token, offset = parsemakesyntax(d, offset + 1, (), itercommandchars)
  File "d:\srcdirs\inbound\build\pymake\pymake\parser.py", line 768, in parsemakesyntax
    raise SyntaxError("Unterminated function call", d.getloc(offset))
  File "d:\srcdirs\inbound\build\pymake\pymake\parser.py", line 64, in getloc
    assert offset >= self.lstart and offset <= self.lend
AssertionError
}

Full log attached.
(Reporter)

Updated

5 years ago
Whiteboard: [pymake]
I've got the same situation, same development environment, my mozconfig is
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj
mk_add_options MOZ_MAKE_FLAGS="-j4"
(Reporter)

Comment 2

5 years ago
Rough range:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=ec9fd0a08b8b&tochange=a26e751bfb54
http://hg.mozilla.org/mozilla-central/rev/cb0b3e605cf1 should hopefully fix this.
(In reply to Siddharth Agarwal [:sid0] from comment #3)
> http://hg.mozilla.org/mozilla-central/rev/cb0b3e605cf1 should hopefully fix
> this.

Even if it does, there's a problem if makefiles can trigger pymake asserts! ;-)
(Reporter)

Comment 5

5 years ago
(In reply to Siddharth Agarwal [:sid0] from comment #3)
> http://hg.mozilla.org/mozilla-central/rev/cb0b3e605cf1 should hopefully fix
> this.

Works, thank you :-)

(Or more I now get as far as bug 774062, but that was pre-existing)

Comment 6

5 years ago
Indeed, that should fix it. The assert appears to be an error that happens only when we're reporting a makefile parsing error ("Unterminated function call") at the very end of a line (the offset for the reported error points out of the line. We should fix the pymake error code.
Summary: Windows build failure: AssertionError in pymake\parser.py - "assert offset >= self.lstart and offset <= self.lend" → AssertionError in pymake\parser.py - "assert offset >= self.lstart and offset <= self.lend" with unterminated function call at the end of a line
(Reporter)

Updated

5 years ago
Severity: critical → normal
(Reporter)

Comment 7

3 years ago
Moved to https://github.com/mozilla/pymake/issues/22
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.