New issue
Advanced search Search tips

Issue 748293 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Chrome Linux SwiftShader libs are unstripped

Project Member Reported by thestig@chromium.org, Jul 25 2017

Issue description

For a Chrome Linux package, the install of Chrome 59 in /opt/google/chrome contains a swiftshader sub-directory. The two files inside, libEGL.so and libGLESv2.so, sums up to ~26 MB. In Chrome 61, those two files add up to 59 MB.

When stripped with "strip -g", the Chrome 59 swiftshader files are down to 3.1 MB. The Chrome 61 files are 4.3 MB when stripped.

We probably should strip the files to reduce both the on-disk install size and the download size.

Even though M61 has branched already, we can probably fix this soon in M62 and easily merge to M61.
 
Cc: capn@chromium.org
For the record, the files were added in r470221.
Cc: cwallez@chromium.org
Components: Internals>GPU>ANGLE
cwallez: Oh, and I noticed on non-stable Linux channels, in addition to /opt/google/chrome-unstable/swiftshader/*.so, we also ship ANGLE .so files with the same file names in /opt/google/chrome-unstable, adding another 83 MB. Can we strip those too?
cwallez: ... and can we move the ANGLE .so files into an angle/ sub-directory?
Ew 83MB is huge, how do we strip them? Moving the libs in an ANGLE directory would require Chromium-side changes, +geofflang@ as I'm know sure why the libs are in this spot.

Note that the ANGLE libs aren't used by default on Linux for now, which is why we ship them in the non-stable channels only; so they could be removed for now. We are looking at enabling ANGLE by default in a couple channels though so maybe it isn't worth it.
Cc: geoffl...@chromium.org
+geofflang for realz.

cwallez: I was just curious about moving them into their own directory, since I have your attention. If you feel like doing that, feel free to open a new bug. If you want to continue shipping them in non-stable channels, that's fine too. But since I'm planning on stripped the SwiftShader libs, I might as well strip the ANGLE ones too.
FWIW, we already have a step somewhere that saves the debugging symbols for the swiftshader libs, just like we do for the chrome binary itself. So it's probably safe to strip. We should point the .gnu_debuglink for foo.so to foo.so.debug for convenience.

Comment 7 by capn@chromium.org, Jul 25 2017

Could you clarify which builds these are? As I noted in  crbug.com/720933#c19 , the libraries in archive builds are stripped by eu-strip. For example 59.0.3071.71's SwiftShader libraries are only 2.7 MB and 35.3 kB. Likewise for the 119 build.
capn: The official builds. I'm looking at what Linux users have installed on disk if they install the .deb Chrome download from https://www.google.com/chrome

You can unpack a .deb file with: dpkg x /path/to/foo.deb /path/to/unpacked_location
Cc: mmoss@chromium.org
+mmoss because I can't remember where all the magic happens.

Looking at chrome/installer/linux/common/installer.include, in stage_install_common() it strips chrome, and some nacl binaries. But it does not chrome-sandbox. Yet somehow the shipped chrome-sandbox is stripped.

Comment 10 by mmoss@chromium.org, Jul 25 2017

I'm not sure why chrome-sandbox gets to that point unstripped (I'll try to track it down), but the swiftshader/* files are being processed similarly to chrome, so their debug symbols are being saved in the debug-info.zip archive as part of the official builds, e.g.:

6407872 Jul 24 22:08 debug-info/swiftshader/libEGL.so.debug
52624960 Jul 24 22:08 debug-info/swiftshader/libGLESv2.so.debug

so they probably should be stripped at packaging time like the others.

Comment 11 by mmoss@chromium.org, Jul 25 2017

oops, "chrome-sandbox gets to that point s/unstripped/stripped/"

Comment 12 by mmoss@chromium.org, Jul 25 2017

Actually, chrome-sandbox is stripped at packaging time, not with eu-strip like the others, but with "install -s".
Owner: thestig@chromium.org
Status: Started (was: Untriaged)
Ah, thanks that's what I'm missing. I'll send out a CL soon.
Project Member

Comment 14 by bugdroid1@chromium.org, Jul 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2794a331304d0792491f33642b035272522e18e5

commit 2794a331304d0792491f33642b035272522e18e5
Author: Lei Zhang <thestig@chromium.org>
Date: Wed Jul 26 17:13:33 2017

Linux: Strip SwiftShader libraries when packaging.

BUG= 748293 

Change-Id: I667721794f53bcc4556b8c2c2ca020ff8da47711
Reviewed-on: https://chromium-review.googlesource.com/585602
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489678}
[modify] https://crrev.com/2794a331304d0792491f33642b035272522e18e5/chrome/installer/linux/common/installer.include

Project Member

Comment 15 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/332e725c34991826e7c31119efea8cee28fe5b96

commit 332e725c34991826e7c31119efea8cee28fe5b96
Author: Lei Zhang <thestig@chromium.org>
Date: Thu Jul 27 04:46:20 2017

Linux Strip ANGLE libraries when packaging.

Also change the buildbot configs to archive the ANGLE files for official
builds - same as the Swiftshader libs.

BUG= 748293 

Change-Id: If0ea1decee58b180fc50fe8300fcfa79a22c68e0
Reviewed-on: https://chromium-review.googlesource.com/588110
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489858}
[modify] https://crrev.com/332e725c34991826e7c31119efea8cee28fe5b96/chrome/installer/linux/common/installer.include
[modify] https://crrev.com/332e725c34991826e7c31119efea8cee28fe5b96/chrome/tools/build/linux/FILES.cfg

Status: Fixed (was: Started)
I have one more CL to check all the ELF files are stripped. Will land tomorrow.
Project Member

Comment 17 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d86687f637f5caac704dfd884a0b4f80550c7433

commit d86687f637f5caac704dfd884a0b4f80550c7433
Author: Lei Zhang <thestig@chromium.org>
Date: Thu Jul 27 07:58:27 2017

Linux: Check for unstripped file in the installer.

Unstripped files should never be shipped to users.

BUG= 748293 

Change-Id: Ibc1000b8549fc8dac86a96fe2a21917f8c227701
Reviewed-on: https://chromium-review.googlesource.com/585895
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489879}
[modify] https://crrev.com/d86687f637f5caac704dfd884a0b4f80550c7433/chrome/installer/linux/common/installer.include

Sign in to add a comment