Skip to content
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

Two alr processes in the same folder #1670

Open
reznikmm opened this issue Apr 23, 2024 · 1 comment
Open

Two alr processes in the same folder #1670

reznikmm opened this issue Apr 23, 2024 · 1 comment
Labels
type: enhancement Improvements to existing functionality
Milestone

Comments

@reznikmm
Copy link
Contributor

ALS launches two alr processes in the same file to find a project file and environment (alr --non-interactive printenv and alr --non-interactive show). It seems they unable to work properly.

To Reproduce

  1. Unpack reproducer.tar.gz from ALS #1192. I used a docker container built by vscode to have a clean environment.
  2. Change directory to no-code-navigation and run
    for J in `seq 1 10`; do alr -n show > /tmp/alr-$J.log 2>&1 & done; wait
  3. For failed alr process you will see Exit 1. Check /tmp/alr-$J.log for their output

Expected Behavior
Generally speaking it would be nice to success all concurrent alr executions, but I see that it's probable hard to achieve and verify by CI/tests. So I'm going to change ALS to launch alr processes in a sequence.

alr version

alr version: 2.0.1

alr logs

'alr --non-interactive show' failed:
Warning: Could not completely remove /root/.local/share/alire/releases/xmlada_24.0.0_ae5a015b/alire/alire.toml.upstream
ERROR: file "/root/.local/share/alire/releases/xmlada_24.0.0_ae5a015b/alire/alire.toml.upstream" could not be deleted
ERROR: alr encountered an unexpected error, re-run with -d for details.
ERROR: error location: 0x6347e939877f ada__directories__delete_file at ???

'alr --non-interactive printenv' failed:
Warning: Could not completely remove /root/.local/share/alire/releases/xmlada_24.0.0_ae5a015b/alire/alire.toml.upstream
ERROR: file "/root/.local/share/alire/releases/xmlada_24.0.0_ae5a015b/alire/alire.toml.upstream" could not be deleted
ERROR: alr encountered an unexpected error, re-run with -d for details. ERROR: error location: 0x62f95b2fa77f ada__directories__delete_file at ???

'alr --non-interactive printenv' failed:
ERROR: file "alire" not found ERROR:
alr encountered an unexpected error, re-run with -d for details. ERROR: error location: 0x579f6a2450c9 ada__directories__rename at ???

Warning: Could not completely remove /root/.local/share/alire/releases/gnatcoll_24.0.0_11c512d1
Warning: Contents listing failed with code:  2
ERROR: Deployment of source archive gnatcoll-core-24.0.0.zip at https://github.com/adacore/gnatcoll-core/archive/v24.0.0/gnatcoll-core-24.0.0.zip with hash sha512:11c512d1b4adec34953bb4247c92d01a1333d6246a925317a5b3d2b30ff05f32246d6e7cfec12df243f4e58d4820e91ac506ff758e8856e527cb0674c1ee029a to /root/.local/share/alire/releases/gnatcoll_24.0.0_11c512d1 failed

Warning: Could not completely remove /root/.local/share/alire/releases/gnatcoll_24.0.0_11c512d1
ERROR: Deployment of source archive gnatcoll-core-24.0.0.zip at https://github.com/adacore/gnatcoll-core/archive/v24.0.0/gnatcoll-core-24.0.0.zip with hash sha512:11c512d1b4adec34953bb4247c92d01a1333d6246a925317a5b3d2b30ff05f32246d6e7cfec12df243f4e58d4820e91ac506ff758e8856e527cb0674c1ee029a to /root/.local/share/alire/releases/gnatcoll_24.0.0_11c512d1 failed

@mosteo
Copy link
Member

mosteo commented May 14, 2024

Thanks for the reproducer, @reznikmm. I'll see if this is easily fixable, I don't see an evident reason why show and printenv should collide.

@mosteo mosteo added the type: enhancement Improvements to existing functionality label May 14, 2024
@mosteo mosteo added this to the 2.x milestone May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvements to existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants