← Back to team overview

desktop-packages team mailing list archive

[Bug 60448] Re: .xsession-errors file grows out of control & saturates disk space

 

I also stumbled across this thread as well when my .xsession-errors file
filled up my harddrive completely, twice...

Just like to shed some extra light on this.

First of all, I'm running a CentOS installation atm, and am also bitten.
So this is not a distribution or desktop specific error.

There are several posts telling people to delete the file, or have it
automatically be rotated. However, that will not work unless you also
log out, as there are many processes keeping the file open for future
error messages and the OS will not free the space until all processes
that hold the file have closed it. This might explain some posts saying
that the disk space keeps getting eaten up even after deleting the file.

As we will probably never be able to trust all programmers to handle error output in a suitable manner, we need a common solution that would also handle misbehaving programs. As someone else mentioned, syslog/messages already handles this with 
.... last message repeated X times
Every program writing to syslog do that through a common API. 'someone' with influence need to come up with a similar solution and force every program to use that for user/desktop error reports as well. That is the only long term solution.

Anyway, here are the possible solutions as of now:
1. Log out and in periodically to prevent the file to grow too large. (As I seldom do that, and the systems I run never do, that is not a suitable solution for me....)
2. Have messages normally going to .xsession-errors go to /dev/null instead. This can be done by altering /etc/X11/xinit/Xsession (at least on my system). Of course, this removes the possibility of ever discovering there is a problem, but at least I can keep my hard drive to myself....
3. Wait for someone to make a proper API and have all programs use that for error output....

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gdm in Ubuntu.
https://bugs.launchpad.net/bugs/60448

Title:
  .xsession-errors file grows out of control & saturates disk space

Status in gdm package in Ubuntu:
  Triaged
Status in kdebase package in Ubuntu:
  Confirmed
Status in xinit source package in Dapper:
  Won't Fix

Bug description:
  Hi,

  I'm running Kubuntu Dapper, freshly dist-upgraded, on a Compaq
  Presario V2610CA laptop, with no particular esoteric configuration.

  In the past 2 weeks, my disk space has been saturated **TWICE**, i.e.
  up to 100% occ. on a 60 GB disk with 40 GB previously free, as
  reported by the "df -h" command (in fact app. 10 MB was still
  available, just enough to be able to boot/login!).  The cause of these
  events is what seems an ever-growing .xsession-errors file in one user
  directory. i.e. /home/user.  After a quick search on Google, I've
  found 2 similar reports (one concerning Dapper, the other OpenSuse):

  http://www.nabble.com/X-error-log-t1364627.html

  http://lists.opensuse.org/opensuse/2005-10/msg00044.html

  
  However, I didn't find anything related to this problem on Launchpad...

  It 's quite possible that something is going wrong with my system and
  is filling the .xsession-errors file with various reports.  I did not
  have the chance to pinpoint what's going wrong since my only concern
  was to prevent my system from completely crashing.  That's why I
  deleted the file without trying to look at its content (my system was
  saturated to a point that I could not receive one simple e-mail, Kmail
  complaining about the lack of disk space...).  The only thing I know
  is that since 2 weeks, I use more frequently Skype and I have created
  a second user account for my wife to be able to manger her e-mails
  with Kmail and browse the Web with Konqueror a little bit.  Nothing so
  complex or heavy...

  Anyway, this report is not about what's going wrong with my system,
  but instead about the fact that an error-log file, like .xsession-
  errors, that is supposed to be useful to track problems, should not be
  the cause of a major critical problem like the lack of disk space!  I
  don't know what would be a satifying solution, but in my case I've set
  up a script to erase this file in root and all users directory at each
  hour, by putting an executable file with this content in
  /etc/cron.hourly:

  rm /home/*/.xsession-errors*
  rm /root/.xsession-errors*

  Thanks for your attention.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/60448/+subscriptions