New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 767750 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

virtualenv: "Could not find platform dependent libraries <exec_prefix>" in infra.git

Project Member Reported by vadimsh@chromium.org, Sep 22 2017

Issue description

Happened on "Luci-go Linux Trusty 64 Tester" in this CL: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/678242

https://luci-logdog.appspot.com/v/?s=infra%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8967785424460049408%2F%2B%2Fsteps%2Finit_infra_go_env%2F0%2Fstdout

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named json

It is probably emitted from this horrible chunk of code (which is supposed to invoke python with virtualenv that has YAML package installed): https://chromium.googlesource.com/infra/infra/+/master/go/deps.py#134

 

Comment 1 by d...@chromium.org, Sep 22 2017

So this is not a vpython issue. "vpython" isn't invoked here at all AFAICT; it's just one of the environment variables that is dumped.

I've seen similar things with infra/ENV when ENV was built with one version of Python (/bundle) and another version is rolled out, but ENV is not rebuilt? Otherwise, this is pretty bizarre.

Comment 2 by d...@chromium.org, Sep 22 2017

"vpython" solves this by hashing the Python interpreter and its path and storing those alongside the VirtualEnv, then rebuilding it if those change. Should probably add this to "runhooks" too.
Tryjobs are supposed to rebuild infra/ENV from scratch in runhooks stage :-/

Comment 4 by d...@chromium.org, Sep 22 2017

"json" is also a Python module, not a builtin, so an import failure here suggests ENV corruption.

Comment 5 by d...@chromium.org, Sep 22 2017

Or sys.path corruption I suppose...
Cc: no...@chromium.org
Summary: virtualenv: "Could not find platform dependent libraries <exec_prefix>" in infra.git (was: vpython (?) error "Could not find platform dependent libraries <exec_prefix>" in infra.git)
I have a theory. I think we get broken runs when we hit a warm builder cache directory on Swarming. Looks like virtualenv somehow is not compatible with our caching implementation.

Here's log of "runhooks" of a healthy run: https://luci-logdog.appspot.com/v/?s=infra%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8967746586697383296%2F%2B%2Fsteps%2Fgclient_runhooks%2F0%2Fstdout

(Notice how it has a lot of stuff)

Here's log of "runhooks" of a broken run: https://luci-logdog.appspot.com/v/?s=infra%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8967784217932228464%2F%2B%2Fsteps%2Fgclient_runhooks%2F0%2Fstdout

(Notice how it skips everything).

Comment 7 by d...@chromium.org, Sep 22 2017

Hmm, makes me think it's #1/2 then.
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/e499b5005fa92f18f2ab1e3ffbafdbfd8d3f81f7

commit e499b5005fa92f18f2ab1e3ffbafdbfd8d3f81f7
Author: Dan Jacques <dnj@chromium.org>
Date: Fri Sep 22 20:29:33 2017

Incorporate interpreter into manifest.

The "bootstrap.py" VirtualEnv bootstrap script generates a manifest of
its contents derived solely from the input packages. However,
VirtualEnv are additionally sensitive to the Python interpreter that
they are installed from.

Expand the manifest to include the path (hard-coded by VirtualEnv) and
hash of the Python interpreter into the manifest. This will cause a
VirtualEnv generated by a different interpreter to be properly
regenerated.

This should also allow us to remove a hack to hard-code Windows Python
location versatility into the VirtualEnv. If Windows Python path
changes, it will now regenerate.

BUG= chromium:767750 
TEST=local

Change-Id: I96800136589244e828af1c1ffae1bef72a3ca1fe
Reviewed-on: https://chromium-review.googlesource.com/679055
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>

[modify] https://crrev.com/e499b5005fa92f18f2ab1e3ffbafdbfd8d3f81f7/bootstrap/util.py
[modify] https://crrev.com/e499b5005fa92f18f2ab1e3ffbafdbfd8d3f81f7/bootstrap/bootstrap.py

Comment 11 by d...@chromium.org, Sep 22 2017

Owner: d...@chromium.org
So far several builders that were consistently failing aren't now. I think this might be fixed?

Comment 12 by s...@google.com, Sep 23 2017

Status: Fixed (was: Untriaged)

Sign in to add a comment