-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - unit-test conda-store-server (ubuntu) hangs on CI #666
Comments
Currently looking into this.
subprocess.check_output(
[
"fakechroot",
"chroot",
new_root,
"/_conda.exe",
"install",
"--offline",
"--file",
"/opt/conda/pkgs/env.txt",
"-y",
"--prefix",
"/opt/conda",
],
env=env,
cwd=host_conda_opt,
# stdout=subprocess.DEVNULL,
# stderr=subprocess.DEVNULL,
)
# FIXME: this should reall be check_output(), but chroot or fakechroot is
# giving some weird segfault after the install command completes ¯\_(ツ)_/¯ |
Reported upstream: conda-incubator/conda-docker#23 |
When #653 was merged 3 days ago, all tests passed (not skipped). Will diff the test logs to see if anything is different now. |
These messages are printed by PyInstaller:
You can set this env var to turn warnings into errors, however, conda-docker won't fail as is because no exit-code checking is done
|
The above warning repros on a CI builder after re-running the problematic test (to populate the test dir) and doing:
I changed The full command (not the help one) works fine without fakechroot. Looking at strace, this keeps executing new processes, which is why it hangs:
You can also see this in the process tree. |
I can reproduce locally outside of CI:
So, as mentioned before, locally this fails due to libmamba.so.2 not being found, which means the process doesn't loop like on CI. Still trying to figure out what causes the loop. I suspect it might have something to do with LD environment variables. fakechroot relies on LD_PRELOAD and LD_LIBRARY_PATH is also set (I copied env and grep to the chroot dir to make them accessible):
PyInstaller, which is used by standalone conda, also uses LD_LIBRARY_PATH. People were having issues related to that in that past. Again, it could be that fakechroot just doesn't work with PyInstaller and we didn't notice because libmamba import was failing. Could be that the versions matter:
I'll try with the same version locally and report back. |
This comment was marked as outdated.
This comment was marked as outdated.
I think this might be the cause:
|
Yes, it's a PyInstaller/fakechroot-specific problem.
|
I've diffed the logs that passed before against the recent ones that fail. I think it might be due to a change in the conda-standalone package that's installed by GitHub Actions: + conda-standalone [-23.9.0-]{+23.10.0+} ha770c72_0 conda-forge/linux-64 [-34MB-]{+32MB+} Again, the cause is the PyInstaller/fakechroot thing. But the above change is what's likely highlighted the problem. I'm going to try reproducing with an old version of conda-standalone. |
On CI, I tried adding the following to
As expected, this makes the tests "pass", but only because:
Here's an actual test result from CI after enabling error checking and enabling stdout/stderr printing:
Changes I had to make to get this: diff --git a/conda-store-server/conda_store_server/action/base.py b/conda-store-server/conda_store_server/action/base.py
index e0c5e7a..41a2aae 100644
--- a/conda-store-server/conda_store_server/action/base.py
+++ b/conda-store-server/conda_store_server/action/base.py
@@ -16,10 +16,10 @@ def action(f: typing.Callable):
action_context = ActionContext()
with contextlib.ExitStack() as stack:
# redirect stdout -> action_context.stdout
- stack.enter_context(contextlib.redirect_stdout(action_context.stdout))
+ # stack.enter_context(contextlib.redirect_stdout(action_context.stdout))
# redirect stderr -> action_context.stdout
- stack.enter_context(contextlib.redirect_stderr(action_context.stdout))
+ # stack.enter_context(contextlib.redirect_stderr(action_context.stdout)) And changed the fakechroot command as follows in subprocess.check_output(
[
"fakechroot",
"chroot",
new_root,
"/_conda.exe",
"install",
"--offline",
"--file",
"/opt/conda/pkgs/env.txt",
"-y",
"--prefix",
"/opt/conda",
],
env=env,
cwd=host_conda_opt,
# stdout=subprocess.DEVNULL,
# stderr=subprocess.DEVNULL,
) |
|
Jaime says conda-standalone ( |
Status update: #667 has landed, which disables conda-docker in conda-store, but a fix still needs to be implemented in conda-docker. |
Marked as blocked because I need to focus on other tasks for now. |
Tania said we need to discuss whether we will be supporting Docker artifact generation going forward. |
This is no longer an issue so will close this |
Describe the bug
Open a no-op PR against current main a5680f8, like in #665.
unit-test conda-store-server (ubuntu) hangs.
Expected behavior
Test passes, no hang.
How to Reproduce the problem?
.
Output
No response
Versions and dependencies used.
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: