Closed Bug 506323 Opened 15 years ago Closed 10 years ago

Mozbuild 1.4: Failure to fork on Win XP x64

Categories

(Firefox Build System :: MozillaBuild, task)

x86_64
Windows XP
task
Not set
blocker

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: nmaier, Unassigned)

Details

Attachments

(1 file)

On WinXP MozillaBuild 1.4 (bash) fails to fork giving this error:

C:\mozilla-build\msys\bin\bash.exe: *** fork: can't reserve memory for stack 0x4D0000 - 0x6D0000, Win32 error 0
      0 [main] bash 4212 sync_with_child: child 5404(0x2DC) died before initialization with status code 0x1
    144 [main] bash 4212 sync_with_child: *** child state waiting for longjmp
bash: fork: Resource temporarily unavailable

A fix was posted in bug 459257 [1], but later reverted again via bug 415100 [2].

I don't know if the -x64 scripts were supposed to fix this? They don't in any case as the same problem happens there was well, and futhermore they will do x64 builds as opposed to "standard" x86 builds.

I propose [2] is backed out or adjusted.

[1] http://hg.mozilla.org/mozilla-build/rev/7b301b3453d6#l2.34
[2] http://hg.mozilla.org/mozilla-build/rev/fdf0cb1d1f18
bug 415100 also updated MSYS, which was supposed to make things work on x64. I've had numerous reports of people successfully using the 1.4 release candidates on Windows x64.

The -x64 scripts are for building native x64 binaries on an x64 host.
To resolve this, you have to run \Windows\SysWow64\CMD.exe at first.

MSYS tools doesn't work on 64-bit CMD.EXE.  I have to use 32-bit CMD.EXE.
Also, this is on XP/2003 x64 only.  If you use Vista x64 or 7 x64, this problem doesn't occur.
(In reply to comment #3)
> Also, this is on XP/2003 x64 only.  If you use Vista x64 or 7 x64, this problem
> doesn't occur.

Indeed, I just verified in Vista x64 and there it works.
It does not work in XP/2003 x64, however.
So it's either (1) re-introducing the patch to start the wow32 cmd.exe, (2) adjusting to start the wow32 cmd.exe only if os.majorVersion < 6 or (3) adding a note for XP/2003 users to either patch themselves or call start-*.bat from a wow32 cmd.exe only.

I'd prefer option number (2) or (1).

Attached patch implements (2).
Attachment #390729 - Flags: review?(ted.mielczarek)
This looks like a lot of complexity for supporting an OS that so few people are likely to be using. :-/
Comment on attachment 390729 [details] [diff] [review]
patch, v1: implement compat for <vista

Sorry, I just don't think this is worth the complexity.
Attachment #390729 - Flags: review?(ted.mielczarek) → review-
Well, I don't see exactly see the complexity in effectively 14 lines of code to support an operating system (actually two XP/Server 2003) that likly has the same market share than linux combined...

Since you don't like the added complexicty consider re-adding the original patch that will always use a 32bit cmd.exe. It doesn't really matter what underlying shell there is as bash is 32bit anyway and will stay that way for quite some time I think, as mingw-gcc Win64 support is not nearly ready.
(In reply to comment #8)
> Is this still a problem?

Yes.  But this only occurs when build environment is XP x64 or 2003 x64.  x64 target is Vista or later, so should we mark as wontfix?
Agreed.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: