Skip to content

Build problem when using latest CLI (alpha.32) #454

@brunomenezes

Description

@brunomenezes

🙂 Expected behavior

When running the cartesi build command, it should successfully build the application using the cartesi/sdk image.

🫠 Actual behavior

The build fails apparently due to permission denied when the system user runs the cartesi-machine that tries to access the linux/bin (Logs attached)

logs
$ cartesi build
✔ Build drives
  ✔ Build drive root
lua5.4: /usr/share/lua/5.4/cartesi-machine.lua:1811: error opening image file '/usr/share/cartesi-machine/images/linux.bin' when initializing RAM: Permission denied
stack traceback:
	[C]: in method 'create'
	/usr/share/lua/5.4/cartesi-machine.lua:1811: in main chunk
	[C]: in ?
Z2: Command failed with exit code 1: docker run --volume '/home/carlo/crashlabs/nodev2_test/py_simple_dapp/.cartesi:/work' --workdir /work --interactive --rm --user '1000:1000' 'cartesi/sdk:0.12.0-alpha.37' cartesi-machine '--env=PATH="/opt/cartesi/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' '--env=GPG_KEY="7169605F62C751356D054A26A821E680E5FA6305"' '--env=PYTHON_VERSION="3.13.2"' '--env=PYTHON_SHA256="d984bcc57cd67caab26f7def42e523b1c015bbc5dc07836cf4f0b63fa159eb56"' '--env=ROLLUP_HTTP_SERVER_URL="http://127.0.0.1:5004"' '--flash-drive=label:root,filename:root.ext2' '--ram-length=128Mi' --final-hash '--workdir="/opt/cartesi/dapp"' '--store=image' -- 'rollup-init python3 dapp.py'
    at s_ (file:///home/carlo/.nvm/versions/node/v25.8.1/lib/node_modules/@cartesi/cli/dist/index.js:254:2370)
    at b9 (file:///home/carlo/.nvm/versions/node/v25.8.1/lib/node_modules/@cartesi/cli/dist/index.js:280:1371)
    at Yo (file:///home/carlo/.nvm/versions/node/v25.8.1/lib/node_modules/@cartesi/cli/dist/index.js:287:35249)
    at Xo (file:///home/carlo/.nvm/versions/node/v25.8.1/lib/node_modules/@cartesi/cli/dist/index.js:287:34969)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async y2 (file:///home/carlo/.nvm/versions/node/v25.8.1/lib/node_modules/@cartesi/cli/dist/index.js:670:9365)
    at async Yq.<anonymous> (file:///home/carlo/.nvm/versions/node/v25.8.1/lib/node_modules/@cartesi/cli/dist/index.js:670:16731) {
  shortMessage: `Command failed with exit code 1: docker run --volume '/home/carlo/crashlabs/nodev2_test/py_simple_dapp/.cartesi:/work' --workdir /work --interactive --rm --user '1000:1000' 'cartesi/sdk:0.12.0-alpha.37' cartesi-machine '--env=PATH="/opt/cartesi/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' '--env=GPG_KEY="7169605F62C751356D054A26A821E680E5FA6305"' '--env=PYTHON_VERSION="3.13.2"' '--env=PYTHON_SHA256="d984bcc57cd67caab26f7def42e523b1c015bbc5dc07836cf4f0b63fa159eb56"' '--env=ROLLUP_HTTP_SERVER_URL="http://127.0.0.1:5004"' '--flash-drive=label:root,filename:root.ext2' '--ram-length=128Mi' --final-hash '--workdir="/opt/cartesi/dapp"' '--store=image' -- 'rollup-init python3 dapp.py'`,
  command: 'docker run --volume /home/carlo/crashlabs/nodev2_test/py_simple_dapp/.cartesi:/work --workdir /work --interactive --rm --user 1000:1000 cartesi/sdk:0.12.0-alpha.37 cartesi-machine --env=PATH="/opt/cartesi/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" --env=GPG_KEY="7169605F62C751356D054A26A821E680E5FA6305" --env=PYTHON_VERSION="3.13.2" --env=PYTHON_SHA256="d984bcc57cd67caab26f7def42e523b1c015bbc5dc07836cf4f0b63fa159eb56" --env=ROLLUP_HTTP_SERVER_URL="http://127.0.0.1:5004" --flash-drive=label:root,filename:root.ext2 --ram-length=128Mi --final-hash --workdir="/opt/cartesi/dapp" --store=image -- rollup-init python3 dapp.py',
  escapedCommand: `docker run --volume '/home/carlo/crashlabs/nodev2_test/py_simple_dapp/.cartesi:/work' --workdir /work --interactive --rm --user '1000:1000' 'cartesi/sdk:0.12.0-alpha.37' cartesi-machine '--env=PATH="/opt/cartesi/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' '--env=GPG_KEY="7169605F62C751356D054A26A821E680E5FA6305"' '--env=PYTHON_VERSION="3.13.2"' '--env=PYTHON_SHA256="d984bcc57cd67caab26f7def42e523b1c015bbc5dc07836cf4f0b63fa159eb56"' '--env=ROLLUP_HTTP_SERVER_URL="http://127.0.0.1:5004"' '--flash-drive=label:root,filename:root.ext2' '--ram-length=128Mi' --final-hash '--workdir="/opt/cartesi/dapp"' '--store=image' -- 'rollup-init python3 dapp.py'`,
  cwd: '/home/carlo/crashlabs/nodev2_test/py_simple_dapp/.cartesi',
  durationMs: 287.774858,
  failed: true,
  timedOut: false,
  isCanceled: false,
  isGracefullyCanceled: false,
  isTerminated: false,
  isMaxBuffer: false,
  isForcefullyTerminated: false,
  exitCode: 1,
  stdio: [ undefined, undefined, undefined ],
  ipcOutput: [],
  pipedFrom: []
}

🧪 Minimal test case

The usual cartesi create --template=<name> project_name, cd project_name and run cartesi build.

More details

OS Version
nodev2_test/py_simple_dapp$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.4 LTS"
PRETTY_NAME="Ubuntu 24.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.4 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

🌎 Environment

It happens when using the cartesi-cli@2.0.0-alpha.32 on Ubuntu 24.04.4 LTS (Noble Numbat) (more details above). It was also tested with cartesi-cli@2.0.0-alpha.30 and the build finished as expected.

✔️ Possible solutions

It is likely a regression, and the access to linux/bin is more restricted than it should be in the latest release.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions