I made some changes to configuration.nix and in doing so made a slight syntactical mistake, which nixos-option reported when I ran it. However, not only did nixos-option report this, but I was also told that a core image had been dumped (it said in German “Speicherabzug geschrieben”, which to my knowledge corresponds to the old “core dumped”).
I have not seen cores being dumped for decades and heard long ago that dumping them was considered bad practice, since such core images may contain sensitive data. Why does NixOS dump cores then? Furthermore, where are these core image files put? I couldn’t find anything respective in the current directory.
In that case, nixos-option on stable is a badly-written C++ program, I’m not surprised. It was rewritten to use the CLI though, and now supports flakes, so it should be better in the next release.
Thanks for this insight. Still, isn’t the decision whether to dump cores or not usually made by the operating system or shell instead of the individual program? And where are those dumped cores now: I can’t see them at least in the current directory.
Dumping in the CWD would be needlessly disorganized (and would cause problems if the CWD was not writable). Look into coredumpctl(1) - Linux manual page
I only remember core dumps from my early time as a student in the late 1990ies on Solaris machines, and there they were dumped as files named core into the current directories indeed.
With the help of the coredumpctl(1) manual page, I found out that indeed there are three nixos-option cores stored. Under “corefile” it says “present” for all three. Will these cores get removed after some time, similar to old log messages being removed?