Skip to content

[Bug] Fail to launch daemonize jailer v1.10.1 #5033

Closed
@xuehaonan27

Description

@xuehaonan27

Describe the bug

jailer(v1.10.1) fail to run with flag --daemonize, and could run without flag --daemonize.

To Reproduce

  1. Built jailer binary from tag v1.10.1.
  2. Run following command:
/root/firecracker_src/build/cargo_target/x86_64-unknown-linux-musl/debug/jailer \
    --exec-file /root/firecracker_src/build/cargo_target/x86_64-unknown-linux-musl/debug/firecracker \
    --id "test-instance" \
    --gid 100 \
    --uid 123 \
    --daemonize
  1. The process exits immediately.
  2. Run following command (without --daemonize this time)
/root/firecracker_src/build/cargo_target/x86_64-unknown-linux-musl/debug/jailer \
--exec-file /root/firecracker_src/build/cargo_target/x86_64-unknown-linux-musl/debug/firecracker \
--id "test-instance" \
--gid 100 \
--uid 123
  1. The console hang with [test-instance:main] Running Firecracker v1.10.1 which means jailer is running well.
  2. Open another console, run tree /srv/jailer/firecracker/test-instance/ and could see output like this:
/srv/jailer/firecracker/test-instance/
└── root
    ├── dev
    │   ├── kvm
    │   ├── net
    │   │   └── tun
    │   ├── urandom
    │   └── userfaultfd
    ├── firecracker
    ├── firecracker.pid
    └── run
        └── firecracker.socket

There's a firecracker.socket which means it's running well too.

Expected behaviour

When running jailer with --daemonize, the process could be started and expose the API socket for communication.

Environment

  • Firecracker version: v.1.10.1
  • Host and guest kernel versions: Host kernel 6.8.0-51-generic; Guest kernel not used (bare jailer process).
  • Rootfs used: Not used (bare jailer process).
  • Architecture: x86_64 (x86_64 x86_64 x86_64 GNU/Linux)

Additional context

[Author TODO: How has this bug affected you?]
I am developing a firecracker SDK in Rust, this bug prevents me to test functionality with daemonized instances.

[Author TODO: What are you trying to achieve?]
Start the daemonized jailer and communicate with it via API socket.

[Author TODO: Do you have any idea of what the solution might be?]
I repeated exactly the same on firecracker / jailer v1.7.0. And it succeeds with a running daemonized firecracker and a API socket exposed.
PR #4259 (Commit da92bf6) seemed to have changed the behavior of daemonization.

Checks

  • [y] Have you searched the Firecracker Issues database for similar problems?
  • [y] Have you read the existing relevant Firecracker documentation?
  • [y] Are you certain the bug being reported is a Firecracker issue?

Metadata

Metadata

Assignees

Labels

Priority: HighIndicates than an issue or pull request should be resolved ahead of issues or pull requests labelledStatus: WIPIndicates that an issue is currently being worked on or triaged

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions