Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CRITICAL] Continuous error spamming to the log file: "[ERROR] [../src/output-state.c:45] Failed to commit frame", сonsumes too much disk space and damages the SD card's write resource #345

Open
qrp73 opened this issue Dec 30, 2024 · 7 comments

Comments

@qrp73
Copy link

qrp73 commented Dec 30, 2024

Steps to reproduce

  1. boot to Raspberry Pi Bookworm with Labwc desktop
  2. switch to a virtual terminal
  3. type: tail -f .xsession-errors

Expected result: no continuous error spamming

Actual result: the following error appears in the log about 33 times per second: [ERROR] [../src/output-state.c:45] Failed to commit frame

As result, the .xsession-errors is spammed with megabytes of the same error text, сonsumes disk space and damages the SD card's write resource.

It seems that the same issue happens when display going into sleep mode, which makes this issue even more critical.

here is a part of the log:

...
24:46:17.972 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.005 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.038 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.063 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.073 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.104 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.137 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.169 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.202 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.235 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.268 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.301 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.334 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.367 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.399 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.432 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.465 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.498 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.531 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.535 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.564 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.596 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.629 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.662 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.695 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.728 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.760 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.792 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.824 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.859 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.892 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.925 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.955 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:18.987 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:19.019 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:19.053 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:19.063 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:19.086 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:19.119 [ERROR] [../src/output-state.c:45] Failed to commit frame
24:46:19.152 [ERROR] [../src/output-state.c:45] Failed to commit frame
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
[GFX1-]: glxtest: DRM render node not clearly detectable. Falling back to using the only one that was found.
[Parent 169472, Main Thread] WARNING: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files: 'glib warning', file ./toolkit/xre/nsSigHandlers.cpp:201

(firefox:169472): dbind-WARNING **: 20:08:55.417: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server

After 24 hours of uptime, I have a .xsession-errors file of 19 megabytes, filled with hundreds of thousands of entries with this error.

Update: As a temporary workaround until a fix is released, you can remove the ~/.xsession-errors file each time after boot, or add this line to ~/.config/labwc/autostart to do it automatically:

/usr/bin/rm /home/pi/.xsession-errors

When this file is removed, it does not seem to be recreated until the next reboot. This approach can help protect your SD card from unnecessary wear and save disk space by removing the file on each OS boot.

@qrp73 qrp73 changed the title Continuous error spamming to the log file: "[ERROR] [../src/output-state.c:45] Failed to commit frame", сonsumes too much disk space and damages the SD card's write resource [CRITICAL] Continuous error spamming to the log file: "[ERROR] [../src/output-state.c:45] Failed to commit frame", сonsumes too much disk space and damages the SD card's write resource Dec 30, 2024
@ghollingworth
Copy link
Contributor

You have not provided any reproduction information, as such I'll close this until it's provided. Note, step 1 of any reproduction information must be "install a new Raspberry Pi OS (lite / desktop) (32bit / 64 bit)

@qrp73
Copy link
Author

qrp73 commented Dec 31, 2024

I'm talking about Raspberry Pi OS Bookworm Desktop 64 bit with all latest updates, device Raspberry Pi 4 with 4GB:

$ uname -a
Linux raspi 6.6.62+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1 (2024-11-25) aarch64 GNU/Linux

$ cat /etc/rpi-issue
Raspberry Pi reference 2023-09-22
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 40f37458ae7cadea1aec913ae10b5e7008ebce0a, stage4

$ vcgencmd version
Nov 26 2024 12:52:28 
Copyright (c) 2012 Broadcom
version 2ae30f53898ae2f1ba77ff570a92991bedfb0398 (clean) (release) (start)

as such I'll close this until it's provided

Closing a ticket about critical bug that causes rapid and irreversible depletion of the SD card's write cycles without any fix raises the question of whether this might be an attempt to conceal malicious actions, isn't it?

@qrp73
Copy link
Author

qrp73 commented Dec 31, 2024

Just tested it on a clean install of Raspberry Pi OS Desktop 64-bit and can reproduce this critical bug.

Steps to reproduce

  1. Install a new Raspberry Pi OS with desktop 64-bit, detailed info about image used for installation:
https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
Raspberry Pi OS with desktop
    Release date: November 19th 2024
    System: 64-bit
    Kernel version: 6.6
    Debian version: 12 (bookworm)
    Size: 1,179MB
    SHA256: ea6e68c48d14c3d78af5471c0b288bbf6522fdd775241f74d8295d106d344300
$ sha256sum ~/.cache/Raspberry\ Pi/Imager/lastdownload.cache
ea6e68c48d14c3d78af5471c0b288bbf6522fdd775241f74d8295d106d344300
  1. Reboot and do sudo apt install && sudo apt upgrade

  2. Reboot and do sudo apt install && sudo apt upgrade again

  3. Use taskbar update icon to install latest raspberry pi ui mods (which is not installed with sudo apt upgrade for some unknown reason

  4. Reboot

  5. Open takbar menu "Add / Remove plugins", remove "Update" icon and add "CPU", "CPU Temp" and "GPU" icons

  6. switch to virtual terminal and execute tail -f .xsession-errors

Expected result: no log spamming with thousands of errors

Actual result: the log is spammed with [ERROR] [../src/output-state.c:45] Failed to commit frame 30 times per second

Note: the same issue happens when you staying on desktop screen and display is going to sleep (display blank).

@ghollingworth
Copy link
Contributor

Does it happen on a lite image? Or only on a desktop image when switched to the VT?

@ghollingworth ghollingworth reopened this Dec 31, 2024
@qrp73
Copy link
Author

qrp73 commented Dec 31, 2024

I didn't tested it on lite version, but since it is related to UI, I think it is relevant for desktop image only. But if you install desktop on lite version, I think you will get the same issue.

@ghollingworth
Copy link
Contributor

The logging message is coming from labwc which is triggering wlr_output_commit (with no display to commit to). But the upstream code no longer has this line (this code has been changed recently).

Will have a look at it when we're all back in the office, it's not going to affect most people since they'll be running the desktop. It only affects you because you've switched to the VC.

Not sure why you're getting 30 per second though, I only get 1 per second...

@qrp73
Copy link
Author

qrp73 commented Dec 31, 2024

Will have a look at it when we're all back in the office, it's not going to affect most people since they'll be running the desktop. It only affects you because you've switched to the VC.

The issue affects anyone who using labwc desktop with display sleep or with switching to a virtual terminal.

Not sure why you're getting 30 per second though, I only get 1 per second...

1 second looks like result of the taskbar clock update every second.

I found that the issue occurs when you add the "CPU," "GPU," and "CPU Temp" widgets to the taskbar. Without these widgets, this error is raised rarely. However, when these widgets are added to the desktop taskbar, the error is logged about 30 times per second.

My display refresh rate is 75 Hz, not sure but it may also affect the error rate.

I discovered this issue because I noticed a strange decrease in disk space when the system was idle (during desktop sleep or when switched to a virtual terminal). The root cause turned out to be the rapid growth of the ~/.xsession-errors file. The rest of the details you know from my posts above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants