Thursday, March 28, 2019

.local/share/sddm/xorg-session.log is about 700GB in size!!!

Holy cow, my desktop running Manjaro FireFox suddenly crashed and wouldn't restart. I figured I'd reboot and I might as well do an update first. Well, "yay" said my home partition was out of space!?! I should have had hundreds of GB free. But df -h showed my home was 100% full.
A bit of investigation using du and I located the issue. In ~/.local/share/sddm was a single file named xorg-session.log which was around 700GB in size. I deleted the file but things were loathe to return to normal so I rebooted and all is fine and I have 758GB available again.

So what the heck? SDDM is the login manager, I don't understand why it has an xorg session log in the first place. But I began monitoring it with tail -f and saw nothing going into it.
After a few hours I looked again and WHOAH It's over a GB in size again!
The content looked normal but I realized with this much data there is bound to be some lines repeated many times so I ran

sort xorg-session.log | uniq -c | sort -nr | hea

To count the number of times each line in the file appears and output the top 10 lines in order.

1982576 print-layout-end
1982576 print-layout-begin
1954874 Deal0:
1922847 Deal1:
1660218 Deal2:
1565822 Deal4: |KH |8H |QS |4H |6H |7S |JS |5S |4H |6H
1261551 Deal3: |5H |KS |KH |2H |4H |TH |AH |JH |3H |AH
 775214 Off:
 721025 Deal3:
 416754 Deal4:

I don't know what's happening but it appears that when I print a document it floods a bunch of garbage into this log file. I'll have to reboot to investigate further as I deleted the 1GB file again and now there is no logging taking place.