Skip to content

flushchanges: Input/output error after using it twice #35

@Wuodan

Description

@Wuodan

I can persistently reproduce this, thus this bug report.

Summary:

flushchanges causes Input/output error on /var/log/Xorg.0.log.old after using flushchanges twice with reboot after each time. This means I can't start X-Server, startx fails.

This is the output of ls -alh /var/log/Xorg.0.log*

ls: cannot access '/var/log/Xorg.0.log.old': Input/output error
-rw-r--r-- 1 root users 60K Jun 1 08:26 /var/log/Xorg.0.log
ls.Xorg.log.out.log

This is the output of startx:

hostname: Unknown host
(EE)
Fatal server error:
(EE) Cannot move old log file "/var/log/Xorg.0.log" to "/var/log/Xorg.0.log.old"
(EE)
(EE)
Please consult the The X.Org Foundation support at http://wiki.x.org for help.
(EE)
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

startx.out.log

Steps to reproduce:

  1. Use Rufus on Windows to burn the autobuild iso pentoo-full-amd64-hardened-2020.0_p20200527.iso to USB stick
  2. Boot the USB stick
  3. start Networkmanager, then startx
  4. logout of X-Server
  5. use flushchanges, then reboot
  6. startx, then logout of X-Server
  7. use flushchanges, then reboot
  8. then startx fails due to Input/output error on /var/log/Xorg.0.log.old

Analysis

  1. 1st usage of flushchanges produces /mnt/cdrom/modules/zz_changes-00.lzm
  2. 2nd usage of flushchanges produces /mnt/cdrom/modules/zz_changes-01.lzm

My workaround

  1. umount /mnt/overlay/.zz_changes_01 (umount the second overlay file)
  2. rm /mnt/cdrom/modules/zz_changes-01.lzm (delete second overlay file)
    After this I can at least boot to how the USB stick was after first flushchanges.

What I tried so far

A) Check the usb stick for problems => Nope
Rufus can check the usb stick and I did it twice. This was my first guess.

B) Is it the Networkmanager? => Seems not
Networkmanager only connects to WiFi in X-Server with NetworkManager Applet. But after logout of X-Server, the connection is still up and running. I guessed somehow Networkmanager and X-Server were still accessing Xorg.0.log during flushchanges.
So I tried this:
Don't run Networkmanager during the second boot and second run of flushchanges.
Did not work, same I/O error on /var/log/Xorg.0.log.old

C) Rename the Xorg log files => not really a solution
I renamed the files /var/log/Xorg.0.log before running flushchanges. After reboot, I can startx, but see I/O error on the renamed /var/log/Xorg.0.log.old

D) Looked at dmesg output => not really helpful imho
Checking the dmesg output did not give me much insight. And I think the squashfs overlay happens before, during the boot process.
Here's the output of dmesg when there are I'O errors:
dmesg.out.log

Conclusion

flushchanges was working, I remember years ago having 99 such overlay files. We could probably tell squashfs not to include those log files of the X-Server, but I suspect those are not the only files with I/O errors. I'm clueless at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions