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

fails with error 127 calling bash #8

Open
urbanjost opened this issue Nov 13, 2022 · 6 comments
Open

fails with error 127 calling bash #8

urbanjost opened this issue Nov 13, 2022 · 6 comments

Comments

@urbanjost
Copy link

urbanjost commented Nov 13, 2022

I ran the example from the README file and get an error 127 running bash.
Am I doing something obviously wrong?


A job to run test in OpenBSD
failed Nov 13, 2022 in 4m 28s
2s
3s
4m 22s
Run vmactions/openbsd-vm@v0
release: 
nat: 
mem: 4096
Importing VM
Set VM
Run onBeforeStartVM
Run startVM
Run onStarted in VM
Initialize files in VM
envs:MYTOKEN MYTOKEN2
Run onInitialized in VM
Run 'prepare' in VM
Run 'run' in VM
Copy files back from the VM
Error: The process '/bin/bash' failed with exit code 127
1s
0s
@qbit
Copy link

qbit commented Nov 14, 2022

bash is installed to /usr/local/bin/bash, not /bin/bash.

@urbanjost
Copy link
Author

I am not explicitly calling bash. My yaml file looks like

 name: openbsd via macos-12

 on: [push, pull_request]

 jobs:
   test:
     runs-on: macos-12
     name: A job to run test in OpenBSD
     env:
       MYTOKEN : ${{ secrets.MYTOKEN }}
       MYTOKEN2: "value2"
     steps:
     - uses: actions/checkout@v2
     - name: Test in OpenBSD
       id: test
       uses: vmactions/openbsd-vm@v0
       with:
         envs: 'MYTOKEN MYTOKEN2'
         usesh: true
         mem: 4096
         prepare: |
           pkg_add curl

         run: |
           set -x -v
           pwd
           ls -lah
           whoami
           env
           gfortran --version

@mirabilos
Copy link

My jobs started failing for OpenBSD recently, with a similar error:

Copy files back from the VM
  get back by rsync
  /bin/bash /Users/runner/work/_actions/vmactions/openbsd-vm/v0/run.sh rsyncBackFromVM
  Config file: openbsd-7.2.conf
  receiving file list ... done
  mksh/mksh/
  mksh/mksh/build/
  mksh/mksh/build/mksh/
  mksh/mksh/build/mksh/Rebuild.sh
  mksh/mksh/build/mksh/edit.o
  mksh/mksh/build/mksh/eval.o
  mksh/mksh/build/mksh/exec.o
  mksh/mksh/build/mksh/expr.o
  mksh/mksh/build/mksh/funcs.o
  mksh/mksh/build/mksh/histrap.o
  mksh/mksh/build/mksh/jobs.o
  mksh/mksh/build/mksh/lalloc.o
  mksh/mksh/build/mksh/lex.o
  mksh/mksh/build/mksh/main.o
  mksh/mksh/build/mksh/misc.o
  mksh/mksh/build/mksh/mksh
  mksh/mksh/build/mksh/rlimits.gen
  mksh/mksh/build/mksh/sh_flags.gen
  mksh/mksh/build/mksh/shf.o
  mksh/mksh/build/mksh/syn.o
  mksh/mksh/build/mksh/test.res
  mksh/mksh/build/mksh/test.sh
  mksh/mksh/build/mksh/test.wait
  mksh/mksh/build/mksh/tree.o
  mksh/mksh/build/mksh/typescript
  mksh/mksh/build/mksh/ulimit.o
  mksh/mksh/build/mksh/ulimits.gen
  mksh/mksh/build/mksh/var.o
  
  sent 584 bytes  received 1249136 bytes  833146.67 bytes/sec
  total size is 3399150  speedup is 2.72
Error: The process '/bin/bash' failed with exit code 255

This indicates a bug in run.sh on the host side.

@mirabilos
Copy link

oic, no, this is a bug in your JavaScript: the error exit reported here is actually the one from the PREVIOUS step, namely from what was run in the VM, but it fails “too late” and thus with a confusing message

@grayed
Copy link

grayed commented Mar 2, 2023

There's no gfortran binary in either packages anymore. You can use egfortran from the g95 package.

@mirabilos
Copy link

@grayed that explains the 127 errorlevel, but the problem is still that the error code is reported too late (after the copying back step) and with a confusing error message (as if it were the exit status of a program on the guest, or at least attributed to GNU bash).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants