Skip to content

chore(cli): enable docker-init for rollups_node service#435

Merged
endersonmaia merged 1 commit intoprerelease/v2-alphafrom
feat/add-docker-init-to-rollups-node
Mar 3, 2026
Merged

chore(cli): enable docker-init for rollups_node service#435
endersonmaia merged 1 commit intoprerelease/v2-alphafrom
feat/add-docker-init-to-rollups-node

Conversation

@endersonmaia
Copy link
Contributor

When the docker-init is not used, every input sent and processed leaves a zombie process.

➜  my-go-dapp docker compose -p my-go-dapp exec -ti rollups_node ps ux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
cartesi        1  0.2  0.0 2742860 45700 ?       Ssl  18:06   0:00 cartesi-rollups-node
cartesi       50  6.5  0.0      0     0 ?        Z    18:06   0:09 [cartesi-jsonrpc] <defunct>
cartesi     1119  0.0  0.0      0     0 ?        Z    18:07   0:00 [cartesi-jsonrpc] <defunct>
cartesi     2050  0.0  0.0      0     0 ?        Z    18:07   0:00 [cartesi-jsonrpc] <defunct>
cartesi     2947  0.0  0.0      0     0 ?        Z    18:07   0:00 [cartesi-jsonrpc] <defunct>
cartesi     3876  0.0  0.0      0     0 ?        Z    18:07   0:00 [cartesi-jsonrpc] <defunct>
cartesi     4773  0.0  0.0      0     0 ?        Z    18:07   0:00 [cartesi-jsonrpc] <defunct>
cartesi     5699  0.0  0.0      0     0 ?        Z    18:07   0:00 [cartesi-jsonrpc] <defunct>
cartesi     6616  0.0  0.0      0     0 ?        Z    18:08   0:00 [cartesi-jsonrpc] <defunct>
cartesi     7513  0.0  0.0      0     0 ?        Z    18:08   0:00 [cartesi-jsonrpc] <defunct>
cartesi     8435  0.0  0.0      0     0 ?        Z    18:08   0:00 [cartesi-jsonrpc] <defunct>
cartesi     9344  0.0  0.0      0     0 ?        Z    18:08   0:00 [cartesi-jsonrpc] <defunct>

After enabling the docker-init, this is not an issue anymore:

➜  my-go-dapp docker compose -p my-go-dapp exec  -ti rollups_node ps ux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
cartesi        1  0.0  0.0   1068   780 ?        Ss   18:10   0:00 /sbin/docker-init -- cartesi-rollups-node
cartesi        7  0.5  0.0 2742604 43024 ?       Sl   18:10   0:00 cartesi-rollups-node
cartesi     2941  1.9  0.2 1337364 152092 ?      S    18:11   0:00 cartesi-jsonrpc-machine --server-fd=21

@changeset-bot
Copy link

changeset-bot bot commented Mar 3, 2026

🦋 Changeset detected

Latest commit: c57db27

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cartesi/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 95.51% (🎯 0%) 1191 / 1247
🔵 Statements 95.51% 1191 / 1247
🔵 Functions 94.74% 90 / 95
🔵 Branches 0% 0 / 0
📁 File Coverage (12 files)
File Lines Statements Functions Branches Uncovered Lines
apps/cli/src/builder/directory.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/builder/docker.ts 🟢 88.68% 🟢 88.68% 🟡 75% 🔴 0% 83-85, 139-147
apps/cli/src/builder/empty.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/builder/none.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/builder/tar.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/compose/builder.ts 🟢 99.79% 🟢 99.79% 🟢 100% 🔴 0% 228
apps/cli/src/config.ts 🟢 92.63% 🟢 92.63% 🟢 94.12% 🔴 0% 65-66, 217, 226, 235, 255, ...
apps/cli/src/exec/cartesi-machine.ts 🟡 75% 🟡 75% 🟡 66.67% 🔴 0% 10-12, 28-30
apps/cli/src/exec/genext2fs.ts 🟢 96.92% 🟢 96.92% 🟢 100% 🔴 0% 87-88
apps/cli/src/exec/index.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/exec/mksquashfs.ts 🟢 91.23% 🟢 91.23% 🟢 100% 🔴 0% 68-72
apps/cli/src/exec/util.ts 🟢 94.44% 🟢 94.44% 🟢 100% 🔴 0% 47-48

@endersonmaia endersonmaia moved this from Todo to Waiting review in Rollups SDK Mar 3, 2026
@endersonmaia endersonmaia requested a review from mpolitzer March 3, 2026 18:45
@github-project-automation github-project-automation bot moved this from Waiting review to Waiting Merge in Rollups SDK Mar 3, 2026
@endersonmaia endersonmaia merged commit 848cd68 into prerelease/v2-alpha Mar 3, 2026
4 checks passed
@github-project-automation github-project-automation bot moved this from Waiting Merge to Done in Rollups SDK Mar 3, 2026
@endersonmaia endersonmaia deleted the feat/add-docker-init-to-rollups-node branch March 3, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants