process startup calls access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT |
|||
Issue descriptionThis is "subproblem" discovered while investigating ssh startup times in the test lab: https://bugs.chromium.org/p/chromium/issues/detail?id=734887#c19 The first log has 17 instances of: 18:35:14.017854 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) <0.000106> What's sad is this is a known issue: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/558571 "This isn't a bug, read man ld.so. ... /etc/ld.so.nohwcap When this file is present the dynamic linker will load the non-optimized version of a library, even if the CPU supports the optimized version." I'm still baffled why anyone would check the presence of a file instead of presence of an environment variable. This is so wrong from a performance PoV one may as well not use "optimized libraries" for most common tools. *sigh* Fortunately, someone seems to have been "enlightened" and this behavior seems to have been removed from Debian 8 according to: https://unix.stackexchange.com/questions/283853/file-etc-ld-so-nohwcap-is-missing-in-debian-7 Luis, is this something the tool chain team could "easily" fix for Android and ChromeOS bin-utils? Luis wrote back: > Yunlian, can you please see if there is anything in glibc/ld.so that we can use to avoid this behavior? Yunlian replied: > I will try to fix this on glibc side.
,
Jun 23 2017
env vars can't be managed on a system-wide basis / inserted (you can only modify your current, and pass it to children), and are easy to lose (one blanket reset and it's gone forever), and you have to preserve the value. so the file behavior isn't unreasonable. it's the same reason we have /etc/ld.so.preload -- LD_PRELOAD isn't sufficient. that said, on CrOS, i don't see a problem with patching either out. we don't currently track or change or care about hwcap features (today) in any process.
,
Jun 23 2017
Is this problem in CrOS or Goobuntu?
strace ls 2>&1 | grep /etc/ld.so.nohwcap
returns nothing inside Cros or on DUT, it returns
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
in Goobuntu.
,
Jun 23 2017
Oh...sorry! ihf's traces were from autotest server which are running ubuntu or debian. Ilja? So maybe the right answer is to take the ssh built in the chroot and use that on autotest servers.
,
Jun 23 2017
This is on Goobuntu and possibly Ubuntu. But servers also use ssh from the chroot. So rather messy, as we have 3 different ssh binaries. But I guess the one on Goobuntu is the most important/most commonly used by autotest.
,
Jun 23 2017
By the way, if this is low hanging fruit I am ok to fix this, but if this requires major work we should probably just work on dropping/replacing ssh.
,
Jun 23 2017
Goobuntu/Ubuntu are not yunlian's problem. Can we redirect all ssh calls to one built for the chroot? That's the only one that we (google) "own" the toolchain for.
,
Jun 23 2017
executing ssh out of the chroot but in the host env is a bad idea (due to library version skew), and i don't think it'd help here ... if the access calls are coming from glibc, then running the ssh from the sdk but in the host env would use the host glibc which has those access calls.
,
Jun 23 2017
Mike,I was thinking of using USE=static for the chroot build - then it shouldn't depend on any libs in the goobuntu or ubuntu environment, right? I don't know if that's really entirely true but it _should_ work fine. It's what I've been doing to test other things in the past. In any case, I've given up trying to update anything in goobuntu (or ubuntu) and feel that our test environment should use our own chroot to provide the tools needed to run tests. The fact that three different version of ssh are in use really bothers me.
,
Jun 23 2017
an openssh[static] would be less problematic here, but unfortunately glibc still loads nss modules from the host system for network and user resolution :/
,
Jun 26 2017
Given this is expected behavior for current Goobuntu and ssh isn't going to get updated in Goobuntu, I'm closing this bug as "no fix; WAI". I'll open a new bug to address the fact the we are using three different SSH binaries to run autotest. Yunlian, Luis, my apologies for the false alarm. :(
,
Jun 26 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by llozano@chromium.org
, Jun 23 2017