#24341 closed defect (fixed)

rbm windows builds failing with target arch 386 mismatch with current arch amd64

Reported by: pospeselr Owned by: boklm
Priority: Medium Milestone:
Component: Applications/rbm Version:
Severity: Normal Keywords: TorBrowserTeam201802R
Cc: boklm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

OS: Ubuntu 17.10 amd64
runc version: runc_1.0.0~rc2+docker1.13.1-0ubuntu1_amd64.deb
failing targets:

nightly-windows-i686
nightly-windows-x86_64
alpha-windows-i686
alpha-windows-x86_64
release-windows-i686
release-windows-x86_64
alpha_nightly-windows-i686
alpha_nightly-windows-x86_64

linux and macos targets do not have this problem

output:

make alpha_nightly-windows-x86_64 
git submodule update --init
./rbm/rbm build release --target alpha_nightly --target torbrowser-windows-x86_64
Building project tor-browser - tor-browser-7.5a8-windows-x86_64-30832d
Building project container-image - container-image_precise-i386-7adf0860f1b6.tar.gz
Building project debootstrap-image - container-image_precise-i386.tar.gz
Using file /media/ssd/Code/Tor/tor-browser-build/out/debootstrap-image/container-image_ubuntu-base-17.04-base-amd64.tar.gz
Error: Error starting remote:

target arch 386 mismatch with current arch amd64

Makefile:72: recipe for target 'alpha_nightly-windows-x86_64' failed
make: *** [alpha_nightly-windows-x86_64] Error 1

Child Tickets

Attachments (1)

firefox-windows-i686.log.gz (468.2 KB) - added by pospeselr 14 months ago.
gzip'd build log

Download all attachments as: .zip

Change History (12)

comment:1 Changed 14 months ago by boklm

Does alpha-linux-i686 have this problem too?

comment:2 Changed 14 months ago by pospeselr

Testing now!

Edit: Yes it fails with the same error!

Last edited 14 months ago by pospeselr (previous) (diff)

comment:3 Changed 14 months ago by boklm

It seems they added this error in this commit:
https://github.com/opencontainers/runc/commit/1cd050244e004bc9940787f888b4570328703100
And later removed it in this commit:
https://github.com/opencontainers/runc/commit/e1146182a8cebb5a6133a9e298a5e4acf99652e9

Apparently the platform.arch value was "never used, just validated", so maybe we can always set it to amd64 to avoid the error with that runc version.

I did that in branch bug_24341:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_24341&id=946d493f800fa39fadba61fa0440a35074d0bbd5

Could you check if that fix the problem?

comment:4 Changed 14 months ago by pospeselr

Testing now!

Changed 14 months ago by pospeselr

Attachment: firefox-windows-i686.log.gz added

gzip'd build log

comment:5 Changed 14 months ago by pospeselr

nightly-windows-i686 build fails (log attached). I suspect this is the relevant bit:

/var/tmp/dist/mingw-w64/helpers/i686-w64-mingw32-g++ -std=gnu++11 -mwindows -o UnifiedBindings5.o -c -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dist/stl_wrappers  -DNDEBUG=1 -DTRIMMED=1 -DWIN32_LEAN_AND_MEAN -D_WIN32 -DWIN32 -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DOS_WIN=1 -D_UNICODE -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DUNICODE -D_WINDOWS -D_SECURE_ATL -DHAVE_SIDEBAR -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/var/tmp/build/firefox-4c66c8e30e3c/dom/bindings -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dom/bindings -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dist/include/mozilla/dom -I/var/tmp/build/firefox-4c66c8e30e3c/dom/base -I/var/tmp/build/firefox-4c66c8e30e3c/dom/battery -I/var/tmp/build/firefox-4c66c8e30e3c/dom/canvas -I/var/tmp/build/firefox-4c66c8e30e3c/dom/geolocation -I/var/tmp/build/firefox-4c66c8e30e3c/dom/html -I/var/tmp/build/firefox-4c66c8e30e3c/dom/indexedDB -I/var/tmp/build/firefox-4c66c8e30e3c/dom/media/webaudio -I/var/tmp/build/firefox-4c66c8e30e3c/dom/media/webspeech/recognition -I/var/tmp/build/firefox-4c66c8e30e3c/dom/svg -I/var/tmp/build/firefox-4c66c8e30e3c/dom/workers -I/var/tmp/build/firefox-4c66c8e30e3c/dom/xbl -I/var/tmp/build/firefox-4c66c8e30e3c/dom/xml -I/var/tmp/build/firefox-4c66c8e30e3c/dom/xslt/base -I/var/tmp/build/firefox-4c66c8e30e3c/dom/xslt/xpath -I/var/tmp/build/firefox-4c66c8e30e3c/dom/xul -I/var/tmp/build/firefox-4c66c8e30e3c/js/xpconnect/src -I/var/tmp/build/firefox-4c66c8e30e3c/js/xpconnect/wrappers -I/var/tmp/build/firefox-4c66c8e30e3c/layout/generic -I/var/tmp/build/firefox-4c66c8e30e3c/layout/style -I/var/tmp/build/firefox-4c66c8e30e3c/layout/xul/tree -I/var/tmp/build/firefox-4c66c8e30e3c/media/mtransport -I/var/tmp/build/firefox-4c66c8e30e3c/media/webrtc -I/var/tmp/build/firefox-4c66c8e30e3c/media/webrtc/signaling/src/common/time_profiling -I/var/tmp/build/firefox-4c66c8e30e3c/media/webrtc/signaling/src/peerconnection -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/ipc/ipdl/_ipdlheaders -I/var/tmp/build/firefox-4c66c8e30e3c/ipc/chromium/src -I/var/tmp/build/firefox-4c66c8e30e3c/ipc/glue -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dist/include  -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dist/include/nspr -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dist/include/nss         -DMOZILLA_CLIENT -include /var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/mozilla-config.h -MD -MP -MF .deps/UnifiedBindings5.o.pp  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-format -fno-lifetime-dse -fno-exceptions -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -pipe  -g -O -fno-omit-frame-pointer   -Wno-error=shadow  /var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dom/bindings/UnifiedBindings5.cpp
virtual memory exhausted: Operation not permitted
make[5]: *** [UnifiedBindings20.o] Error 1

Looks like it's using 32-bit mingw:

debug-firefox$ file i686-w64-mingw32-g++
i686-w64-mingw32-g++: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x68147607a450ac3ec94bc7c069868e2bd952c314, not stripped

despite being a 64-bit kernel:

Linux runc 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Edit: nightly-windows-x86_64 build fine! 64-bit mingw:

file x86_64-w64-mingw32-g++ 
x86_64-w64-mingw32-g++: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=2d43064ba9ae0306b0464990d29b14da9ce80e2e, with debug_info, not stripped
Last edited 14 months ago by pospeselr (previous) (diff)

comment:6 in reply to:  5 Changed 14 months ago by boklm

Replying to pospeselr:

nightly-windows-i686 build fails (log attached). I suspect this is the relevant bit:

/var/tmp/dist/mingw-w64/helpers/i686-w64-mingw32-g++ -std=gnu++11 -mwindows -o UnifiedBindings5.o -c -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dist/stl_wrappers  -DNDEBUG=1 -DTRIMMED=1 -DWIN32_LEAN_AND_MEAN -D_WIN32 -DWIN32 -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DOS_WIN=1 -D_UNICODE -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DUNICODE -D_WINDOWS -D_SECURE_ATL -DHAVE_SIDEBAR -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/var/tmp/build/firefox-4c66c8e30e3c/dom/bindings -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dom/bindings -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dist/include/mozilla/dom -I/var/tmp/build/firefox-4c66c8e30e3c/dom/base -I/var/tmp/build/firefox-4c66c8e30e3c/dom/battery -I/var/tmp/build/firefox-4c66c8e30e3c/dom/canvas -I/var/tmp/build/firefox-4c66c8e30e3c/dom/geolocation -I/var/tmp/build/firefox-4c66c8e30e3c/dom/html -I/var/tmp/build/firefox-4c66c8e30e3c/dom/indexedDB -I/var/tmp/build/firefox-4c66c8e30e3c/dom/media/webaudio -I/var/tmp/build/firefox-4c66c8e30e3c/dom/media/webspeech/recognition -I/var/tmp/build/firefox-4c66c8e30e3c/dom/svg -I/var/tmp/build/firefox-4c66c8e30e3c/dom/workers -I/var/tmp/build/firefox-4c66c8e30e3c/dom/xbl -I/var/tmp/build/firefox-4c66c8e30e3c/dom/xml -I/var/tmp/build/firefox-4c66c8e30e3c/dom/xslt/base -I/var/tmp/build/firefox-4c66c8e30e3c/dom/xslt/xpath -I/var/tmp/build/firefox-4c66c8e30e3c/dom/xul -I/var/tmp/build/firefox-4c66c8e30e3c/js/xpconnect/src -I/var/tmp/build/firefox-4c66c8e30e3c/js/xpconnect/wrappers -I/var/tmp/build/firefox-4c66c8e30e3c/layout/generic -I/var/tmp/build/firefox-4c66c8e30e3c/layout/style -I/var/tmp/build/firefox-4c66c8e30e3c/layout/xul/tree -I/var/tmp/build/firefox-4c66c8e30e3c/media/mtransport -I/var/tmp/build/firefox-4c66c8e30e3c/media/webrtc -I/var/tmp/build/firefox-4c66c8e30e3c/media/webrtc/signaling/src/common/time_profiling -I/var/tmp/build/firefox-4c66c8e30e3c/media/webrtc/signaling/src/peerconnection -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/ipc/ipdl/_ipdlheaders -I/var/tmp/build/firefox-4c66c8e30e3c/ipc/chromium/src -I/var/tmp/build/firefox-4c66c8e30e3c/ipc/glue -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dist/include  -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dist/include/nspr -I/var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dist/include/nss         -DMOZILLA_CLIENT -include /var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/mozilla-config.h -MD -MP -MF .deps/UnifiedBindings5.o.pp  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-format -fno-lifetime-dse -fno-exceptions -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -pipe  -g -O -fno-omit-frame-pointer   -Wno-error=shadow  /var/tmp/build/firefox-4c66c8e30e3c/obj-mingw/dom/bindings/UnifiedBindings5.cpp
virtual memory exhausted: Operation not permitted
make[5]: *** [UnifiedBindings20.o] Error 1

So the patch is fixing the issue, but there is an other issue after that?

Looks like it's using 32-bit mingw:

debug-firefox$ file i686-w64-mingw32-g++
i686-w64-mingw32-g++: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x68147607a450ac3ec94bc7c069868e2bd952c314, not stripped

despite being a 64-bit kernel:

Linux runc 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

The kernel cannot be changed in a container, so we are always using a 64bit kernel, but that shouldn't be a problem for running 32bit binaries.

comment:7 Changed 14 months ago by boklm

Can you try to run ulimit -v both inside and outside the container to see what it says?

comment:8 Changed 14 months ago by pospeselr

I wasn't trying to say the kernel should be 32-bit, I meant the build tools ought to be 64-bit.

ulimit -v returns unlimited both in the debug-firefox shell and for my system.

comment:9 Changed 12 months ago by pospeselr

After a reboot (and the patch applied) this build issue for windows goes away.

comment:10 Changed 12 months ago by gk

Keywords: TorBrowserTeam201802R added
Status: newneeds_review

comment:11 Changed 11 months ago by gk

Resolution: fixed
Status: needs_reviewclosed

Okay, I merged that one into master (commit 166edadb8ea5bae52fa582952402d9e89e564a8d).

Note: See TracTickets for help on using tickets.