Hi,

For me, the problem is fixed.  I've tried regular shutdown, kill it
by holding power button, kill it with magic sysrq key S U B--and all
recovered to a clean filesystem (no ignored errors either) eventually.

I can't speak for the other people who had filesystem corruption
recently.  I think we should send them an update on the Guix bug report
asking them to try again and to report any remaining problems.

That said, there are some remaining things that are just dumb that we
totally should fix:

a. I didn't see any of the last messages on the screen on shutdown,
not even when reopening and using /dev/console .
That's because Linux has a notion of "the console" that can move to
some tty.  If the console moved to a tty that's actually used
by Wayland, you don't see messages on shutdown.

For testing, I've always had to manually run the following program
before shutting down:

~/src/choose-vt$ cat a.c 
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/vt.h>

int main() {
        int fd = open("/dev/tty2", O_RDWR);
        if (fd == -1) {
                perror("open");
                exit(1);
        }
        ioctl(fd, VT_ACTIVATE, 2); // switches to that VT
        ioctl(fd, TIOCCONS, 0); // moves "who is the console" to that tty.
        return 0;
}

(I don't think that would be useful for kmscon, though)

In my opinion something like this should be automated in a reasonable way.

Possibilities:
- On shutdown, activate a tty that's guaranteed to be only
used for logging anyway.  That tty should not be kmscon.
- Run Plymouth on shutdown (and on boot would be neat).
  That has a graphical console meant for that.

Text VT in Linux is deprecated and will eventually be removed.  Hmm.

b. Currently, we try remounting 10 times in a loop.  If that doesn't
work, we just reboot or power off anyway.  I agree that there needs
to be forward progress.  But:

For debugging, this is terrible, since there's no way to just halt
WITHOUT turning off the screen.

The following, strangely, did not work for me either:

  sudo herd eval root '((@ (shepherd system) halt))'

c. Since we have the store available at the very end anyway,
guix could always invoke "fuser" at the very end (after the
10 unsuccessful attempts) so we get alerted about future
problems.  But (see b.) that only helps if the user can
see the messages :P
The photos I got of the shutdown messages were done with an
actual digital camera that has fast (50 ms) capture activation
and multiple (complete) attempts.  That's... not ideal to require.

Reply via email to