On Sun, 3 Jul 2016, [email protected] wrote:
> >Synopsis:    savecore complains on every boot about bad namelist
...
> >Description:
>       With "savecore_flags=-z /var/crash" in /etc/rc.conf.local, on every 
> boot, I see these two errors appear on the console:
>       Jul  2 22:48:55 mail savecore: /var/crash: kvm_nlist: bad namelist
>       Jul  2 22:48:55 mail savecore: /var/crash: _time_second not in namelist
>       I see the identical behaviour on bare metal, this VM just happens to be 
> the easiest place to run "sendbug" from.

This is a misunderstanding of use of the savecore_flags variable, combined 
with an undocumented compatibility behavior.  You do *not* need to include 
the savecore directory in the savecore_flags value; /etc/rc *always* 
supplies /var/crash as the last argument to savecore.  If you change your 
/etc/rc.conf.local to say
        savecore_flags=-z

the error will go away.

The undocumented compat behavior is that if there's a positional argument 
after the crash directory, it's used as the kernel namelist file, ala the 
-N option.  The effect is as if you were invoking
        savecore -N /var/crash -z /var/crash

...which doesn't work, obviously.


I think we should get rid of that old compat behavior:

Index: savecore.c
===================================================================
RCS file: /data/src/openbsd/src/sbin/savecore/savecore.c,v
retrieving revision 1.55
diff -u -p -r1.55 savecore.c
--- savecore.c  18 Oct 2015 03:17:48 -0000      1.55
+++ savecore.c  4 Jul 2016 03:10:55 -0000
@@ -161,12 +161,10 @@ main(int argc, char *argv[])
        argv += optind;
 
        if (!clear) {
-               if (argc != 1 && argc != 2)
+               if (argc != 1)
                        usage();
                dirn = argv[0];
        }
-       if (argc == 2)
-               kernel = argv[1];
 
        (void)time(&now);
        kmem_setup();

Reply via email to