[Bug 278195] daemon in jail is exiting without informing that it failed to execute

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 07 Apr 2024 05:17:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278195

Zhenlei Huang <zlei@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zlei@FreeBSD.org

--- Comment #1 from Zhenlei Huang <zlei@FreeBSD.org> ---
(In reply to skenizen from comment #0)
> When launching a daemon in the jail (as a specified user) /usr/sbin/daemon was exiting with return code 0 and not outputting anything in the syslogs.

> This happened on a jail I've erroneously upgraded from FreeBSD 13.2-RELEASE to FreeBSD 13.3-RELEASE on a system host with 13.2-RELEASE.

For stable branches, the kernel ABI compatibility ensures that old binaries can
still run on new kernels. i.e., 13.3 kernel with 13.2 userland. But not the
opposite.

> I've seen other users mentioning similar issues on TrueNAS forums pinpointing to kqueuex() being the culprit for ABI incompatibility (https://www.truenas.com/community/threads/warning-dont-upgrade-your-truenas-core-jails-to-freebsd-13-3-just-yet.117018).

I think that is a good example to illuminate the ABI compatibility issue.

> Although my bug report is not about this, but more about the lack of information on the user that something wrong happened. I'd expect at minimum a different return code than 0 (and preferably an explicit error in the log too).

Run daemon(8) from FreeBSD 13.3 on 13.1:
```
root@:~ # /tmp/daemon -l daemon echo OK
ld-elf.so.1: /tmp/daemon: Undefined symbol "kqueuex@FBSD_1.7"
```

The parent does return 0. The child will complain with "Undefined symbol".

-- 
You are receiving this mail because:
You are the assignee for the bug.