Package: dropbear-initramfs
Version: 2025.89-1
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

I am reporting an issue where the backgrounded network configuration loop in 
`dropbear-initramfs` survives the transition to the real root filesystem 
(switch_root), causing infinite console spam and resource leakage.

**Description of the script logic:**
In `/scripts/init-premount/dropbear`, the script backgrounds the `run_dropbear` 
function for local mounts:

```sh
run_dropbear &
echo $! >/run/dropbear.pid
```

The `run_dropbear` function calls `configure_networking`. When no `ip=` 
parameter is provided via the kernel command line, `configure_networking` (from 
`/scripts/functions`) enters a long-running or infinite loop waiting for 
network initialization.

**The Issue:**
While the script saves the PID to `/run/dropbear.pid`, the cleanup mechanism 
intended to run at `init-bottom` appears to fail or is bypassed when the rootfs 
is a ZFS dataset or when the pivot occurs under specific conditions in Debian 
Forky/Sid. 

The console is spammed with:
   `dropbear: line 151: cat: not found`
   `dropbear: line 340: sleep: not found`

**Steps to Reproduce:**
1. Use a ZFS root filesystem with native encryption.
2. Do not provide an `ip=` argument in the bootloader.
3. Unlock the ZFS pool via the physical/serial console.
4. After the OS boots, observe the persistent "not found" errors on the console.


**System Information:**
Debian Release: forky/sid
Architecture: arm64
Kernel: 6.19.10+deb14-arm64


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: arm64 (aarch64)

Kernel: Linux 6.19.10+deb14-arm64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dropbear-initramfs depends on:
ii  busybox-static [busybox]  1:1.37.0-10.1
ii  dropbear-bin              2025.89-1
ii  initramfs-tools           0.150
ii  udev                      260.1-1

Versions of packages dropbear-initramfs recommends:
pn  cryptsetup-initramfs  <none>

dropbear-initramfs suggests no packages.

-- no debconf information

Reply via email to