During the boot process, after network configuration and before starting syslogd, nuageinit crashes with a Lua runtime error. The error only occurs when no userdata is provided during VM deployment using the 15.0-BETA2 image. When userdata is provided (such as a shell script), nuageinit processes it successfully without errors. Nothing bad happens in case of error apparently, just the odd message on the console. Console log: Starting dhclient. DHCPDISCOVER on vtnet1 to 255.255.255.255 port 67 interval 8 DHCPOFFER from 169.254.169.253 DHCPREQUEST on vtnet1 to 255.255.255.255 port 67 DHCPACK from 169.254.169.253 bound to 10.114.0.7 -- renewal in 43200 seconds. route: message indicates error: File exists add host 127.0.0.1: gateway lo0 fib 0: route already in table route: message indicates error: File exists add host ::1: gateway lo0 fib 0: route already in table add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Creating and/or trimming log files. Clearing /tmp (X related). Updating /var/run/os-release done. Updating motd:. /usr/libexec/flua: /usr/libexec/nuageinit:716: attempt to index a nil value (loc al 'line') stack traceback: /usr/libexec/nuageinit:716: in main chunk [C]: in ? Starting syslogd.
Add a basic guard against an empty file: https://reviews.freebsd.org/D53239 Thank you for the report! Can you please verify if the patch fixes the issue?
All good, thanks!
15.0-BETA4 still affected :)
15.0-BETA5 still crashing with no user-data
Baptiste, can you take a look at this and see if there's a (very simple and obviously correct) fix which we can get into 15.0?
(In reply to Colin Percival from comment #5) Note that there is a proposed fix in: https://reviews.freebsd.org/D53239
nuageinit not crashing anymore in RC1 images (both ufs and zfs), checked with/without #!/bin/sh script.
-RC2 good too.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=57d25b6333523491ac7a3e869bd5d16127203eed commit 57d25b6333523491ac7a3e869bd5d16127203eed Author: Jose Luis Duran <jlduran@FreeBSD.org> AuthorDate: 2025-10-21 13:11:50 +0000 Commit: Jose Luis Duran <jlduran@FreeBSD.org> CommitDate: 2025-11-22 17:23:20 +0000 nuageinit: Add guards against empty user data Add guards against attempting to process a user data file with an empty first line or contents. PR: 290395 Reviewed by: bapt (earlier), dtxdf, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53239 libexec/nuageinit/nuageinit | 8 ++++++++ 1 file changed, 8 insertions(+)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=a7cadff8ccccfa3f3cde9a501a0fe9a78299d41a commit a7cadff8ccccfa3f3cde9a501a0fe9a78299d41a Author: Jose Luis Duran <jlduran@FreeBSD.org> AuthorDate: 2025-10-21 13:11:50 +0000 Commit: Jose Luis Duran <jlduran@FreeBSD.org> CommitDate: 2025-11-25 00:39:37 +0000 nuageinit: Add guards against empty user data Add guards against attempting to process a user data file with an empty first line or contents. PR: 290395 Reviewed by: bapt (earlier), dtxdf, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53239 (cherry picked from commit 57d25b6333523491ac7a3e869bd5d16127203eed) libexec/nuageinit/nuageinit | 8 ++++++++ 1 file changed, 8 insertions(+)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=646c0a2fe64651dc6315ff4b0ed6ba00924ca080 commit 646c0a2fe64651dc6315ff4b0ed6ba00924ca080 Author: Jose Luis Duran <jlduran@FreeBSD.org> AuthorDate: 2025-10-21 13:11:50 +0000 Commit: Jose Luis Duran <jlduran@FreeBSD.org> CommitDate: 2025-11-25 00:42:36 +0000 nuageinit: Add guards against empty user data Add guards against attempting to process a user data file with an empty first line or contents. PR: 290395 Reviewed by: bapt (earlier), dtxdf, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53239 (cherry picked from commit 57d25b6333523491ac7a3e869bd5d16127203eed) libexec/nuageinit/nuageinit | 8 ++++++++ 1 file changed, 8 insertions(+)