Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Problem

Many users (including me) found out from one moment to another that the usage disk space is really strange. One day I had 50Gb free and the next I had 3Gb, it is just crazy.

This happened with different versions of Ubuntu (11.04, 12.04 and 12.10 just to mention).

Some of those user have create question on this site, some of them:

Solution

@NathanWienand have discovered that the problem was caused by the .xsession-errors.old file (it can be found on the $HOME directory) and he and others user solved the problem removing the file. An example of the size that can have this file is ~100Gb, not reasonable..

Question

  • Why does this happen?
  • Is deleting the file the only way to solve it?
  • Isn't there another way to solve this with a large period effect?
  • Does this problem affect only to 64 bits system's users?

If you have something to add here, feel free to edit the question.

share|improve this question
1  
@BiggJJ I tried this and it seemed to work for a few hours. I came back the next day to almsot no disk space AGAIN. As it turns out, if the file is locked, it dumps all of the errors somewhere in the Kcore, which I couldn't access. I unlocked the file and nothing changed, it was still dumping in Kcore. To fix your "solution" I had to do a clean install. Please do not suggest a fix unless you know from personal experience that it works. –  user176387 Jul 18 '13 at 19:57
add comment

1 Answer 1

I am not sure why this happens, but this is a bit big for a comment.

I would just stop them being created by running these command:

rm .xsession-errors.old

touch .xsession-errors.old

sudo chattr +i .xsession-errors.old

So delete the file, create a new one, and then set the immutable attribute to stop anything writing or reading it.

You will need to logout.

Hope it helps.

share|improve this answer
    
I really don't know what the third command does. Explain a bit further please. Do you mean, create the file so nothing can write it? Also, the file is not .xsession-errors but .xsession-errors.old –  Lucio Jun 30 '13 at 19:23
    
Yes, the 3rd command will basically lock the file up so nothing can write or read it. Not even root. The only way to unlock it is by running sudo chattr -i .xsession-error.old Here is a wiki page on the chattr command: chattr –  BiggJJ Jun 30 '13 at 19:46
    
But why I would do something like that? That is not a solution. Don't forget that the file has a purpose for the system. –  Lucio Jun 30 '13 at 19:47
    
It would stop huge amounts of data being written to the file. As I said, I am not sure why it happens, but this is one way to stop it happening. –  BiggJJ Jun 30 '13 at 19:49
1  
You can report the problem as a bug!!! xsession-errors getting spammed filling up the disk –  BiggJJ Jun 30 '13 at 19:54
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.