Edit: Too slow.
]]>Closing
]]>sudo startx
now look your screen ;-)
]]>I also now have unclean shutdowns followed by no corruption.
]]>I'am thinking, that this issue is not related to unclean shutdown. As I'am working on embedded box, I switched off all disk (NAND) writes and I'am using volatile memory as a journal storage. Obviously, message during start disappeared. But when I did "journalctl --verify", there were some bad messages. Strange thing is that this happened with 2 MB journal runtime size. After boot, there were ~800 kB used (journalctl --disk-usage).
When I switched runtime size to 50 MB, "journalctl --verify" was successful after reboot.
I'am using 3.3 kernel with some additions for our own embedded board, systemd 195, Angstrom distribution build by OpenEmbedded.
S.
]]>If I do a "sudo halt" I get error messages like "Not all DM devices detached, 2 left." etc. and the system is haltet (no power off as before).
If I do a "systemctl poweroff" everything works fine.
Cheers,
berny
I ran
kill -USR2 `pidof systemd-journald`
to force journald to rotate its logs. After that I waited a bit until some log entries could be found in the new log file. Now it's getting interesting:
root # journalctl --verify --verify-key="my-key-is-secret"
PASS: /var/log/journal/82d11945e2770cf18c6a25454a5b797f/system.journal
=> No sealing yet, 10min 26s 594ms 119us of entries not sealed.
root # kill -USR2 `pidof systemd-journald`
root # journalctl --verify --verify-key="my-key-is-secret"
Tag failed verification at 567368███████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 48%
File corruption detected at /var/log/journal/82d11945e2770cf18c6a25454a5b797f/system@a52a0139951b453ebb061bfed00d2d73-0000000000000516-0004cd9923c1b74c.journal:567368 (of 569344, 99%).
FAIL: /var/log/journal/82d11945e2770cf18c6a25454a5b797f/system@a52a0139951b453ebb061bfed00d2d73-0000000000000516-0004cd9923c1b74c.journal (Bad message)
So if I tell journald to rotate its logs the old log file gets corrupted near the end. The same thing could happen when journald closes its files on shutdown.
Can anyone confirm these observations?
---
edit:
I just had to see that the logs not only get corrupted when they are rotated but also without any obvious reason after some time:
root # journalctl --verify --verify-key="my-key-is-secret"
Tag failed verification at 562280███████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 48%
File corruption detected at /var/log/journal/82d11945e2770cf18c6a25454a5b797f/system.journal:562280 (of 569344, 98%).
FAIL: /var/log/journal/82d11945e2770cf18c6a25454a5b797f/system.journal (Bad message)
Tag failed verification at 567368███████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 48%
File corruption detected at /var/log/journal/82d11945e2770cf18c6a25454a5b797f/system@a52a0139951b453ebb061bfed00d2d73-0000000000000516-0004cd9923c1b74c.journal:567368 (of 569344, 99%).
FAIL: /var/log/journal/82d11945e2770cf18c6a25454a5b797f/system@a52a0139951b453ebb061bfed00d2d73-0000000000000516-0004cd9923c1b74c.journal (Bad message)
---
edit 2:
I just disabled forward sealing and can't reproduce the problem anymore. So if you don't use that feature this seems to be a different problem.
Unfortunately, I still have no idea what your problem is.
]]>Where do I have to search for shutdown errors? I can't find the right log...
On my embedded box, I'am using console (over serial line). It's done by this settings in /etc/systemd/system.conf:
LogLevel=debug
LogTarget=console
(BTW, I'am using systemd v195. And this is not Arch, but system Angstrom generated by OpenEmbedded.)
]]>My journal is corrupted
[ 27.326195] uhci_hcd 0000:00:1a.0: power state changed by ACPI to D2
[ 27.329735] uhci_hcd 0000:00:1a.2: power state changed by ACPI to D2
[ 27.343413] ehci_hcd 0000:00:1a.7: power state changed by ACPI to D3cold
[ 27.360073] ehci_hcd 0000:00:1d.7: power state changed by ACPI to D3cold
[ 27.650798] ehci_hcd 0000:00:1a.7: power state changed by ACPI to D0
[ 27.753607] ehci_hcd 0000:00:1a.7: setting latency timer to 64
[ 27.930481] ehci_hcd 0000:00:1d.7: power state changed by ACPI to D0
[ 28.033623] ehci_hcd 0000:00:1d.7: setting latency timer to 64
[ 28.088768] uhci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[ 28.088936] uhci_hcd 0000:00:1a.0: setting latency timer to 64
[ 28.133556] uhci_hcd 0000:00:1a.2: power state changed by ACPI to D0
[ 28.133718] uhci_hcd 0000:00:1a.2: setting latency timer to 64
[ 36.704964] systemd-journald[210]: File /var/log/journal/f663e6519fbbc5da304be4a50000135d/user-1000.journal corrupted or uncleanly shut down, renaming and replacing.
[ 92.824132] fuse init (API version 7.20)
And like others in this thread I get the error on shutdown/reboot that dm devices cannot be detached. (Where do I have to search for shutdown errors? I can't find the right log...)
As both of these errors occurred right after my switch to systemd today I will switch back to initscripts and hope that my system will shutdown properly again...
EDIT: I have everything on one partition except /boot and /home; furthermore I use ext4.
]]>