| View previous topic :: View next topic |
| Author |
Message |
ville.aakko n00b

Joined: 06 Aug 2006 Posts: 59 Location: Oulu, Finland
|
Posted: Sun Nov 11, 2012 10:39 am Post subject: Disabling .xsession-errors |
|
|
Hi!
I have problems with .xsession-errors (This is on KDE4). It gets really large at times! Firstly, it gets spammed by this line:
| Code: | | HistoryFile::add.seek: Virheellinen argumentti |
until it is around 5GB large or so (actually, that's not too large according to what I've found by Google).
But it gets worse - if I leave a wine application running, at some point the file will be spammed with this line:
| Code: | | fixme:iphlpapi:NotifyAddrChange (Handle (nil), overlapped (nil)): stub |
- in to the terabytes! (I've literally had my whole hard disk - 1.5TB - filled with this line several times now). Of course it will take hours to get to TB log file - nevertheless this behavior can (and has caused) data loss! In my case, I have a MythTV setup also on the same computer, and the recordings can't be made of course, if the hard disk is full.
I have no idea which program is causing the first line, I believe it might be nepomuk (although I have that peace of nice software disabled) or Clementine's Spotify plugin.
Via Google, I can find several users looking for a way to disable the file - but none of the workaround I've found apply for Gentoo, mainly because of different layout in /etx/X11 - I just don't know which file to edit and how! (most of the problems arise from the file being re-created at login). Has anyone disabled .xsession-errors, and if, how did you do it? Or does anyone know how to disable it - i.e. redirect the spam into /dev/null?.
Also, IMNSHO, I think the file should be disabled by default! I've used differen't Linux distributions for years, and didn't even know about the file until now. Now, that I look into the file - there's no way of telling, which line is caused by which program. Also, just googling it tells that the file is causing problems (the same problem I'm facing) but no solutions to any one!
Of course, one could find the program that is causing the spamming of the file, but that won't solve the underlaying problem. Also, in my case, the two lines above are the most common ones - even without them, the file would be in the hundreds of megabytes range just after a few hours of use.
Cheers! _________________ - Ville |
|
| Back to top |
|
 |
ville.aakko n00b

Joined: 06 Aug 2006 Posts: 59 Location: Oulu, Finland
|
Posted: Sun Nov 11, 2012 12:40 pm Post subject: Re: Disabling .xsession-errors |
|
|
About data loss: Actually, the situation with MythTV recordings was worse than I thought - MythTV has deleted all my recordings! .
It has automatic deleting on (if hard disk is filled) of old recordings according to priority! I guess I have to adjust my MythTV settings, or set up quotas for the regular user(s), or something... for not allowing this to happen again.
Never though my whole hard disk (or /home partition) would get filled (at least not in this manner). _________________ - Ville |
|
| Back to top |
|
 |
publiosulpicio Apprentice


Joined: 31 Aug 2008 Posts: 150
|
Posted: Sun Nov 11, 2012 8:35 pm Post subject: |
|
|
You can try
| Code: |
chattr +i .xsession-errors
|
in this way nobody (even root) can write in the file. Note that you have to do this being root, even if the file belongs to your normal account. |
|
| Back to top |
|
 |
ville.aakko n00b

Joined: 06 Aug 2006 Posts: 59 Location: Oulu, Finland
|
Posted: Sun Nov 11, 2012 8:47 pm Post subject: |
|
|
Hi,
| publiosulpicio wrote: |
| Code: |
chattr +i .xsession-errors
|
|
From what I've read on other forums, I believe that doing the above causes all the error messages being diverted into one of the files in /var/tmp instead - which is even worse, since /var/tmp is often tmpfs (as it is in my case). So, instead of hard disk, memory will get filled up .
The behaviour is, I believe, if one of the possible error files (seems tha alternatives are: "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER" - from /etc/X11/Sessions/Xsession or KDE-4) - is not writeable and re-creatable by root, one of the other is used, until a writeable one is found.
I will however, try your suggestion and report what happens. Thanks in any case! _________________ - Ville |
|
| Back to top |
|
 |
publiosulpicio Apprentice


Joined: 31 Aug 2008 Posts: 150
|
Posted: Sun Nov 11, 2012 8:53 pm Post subject: |
|
|
I see. What about
| Code: |
ln -sf /dev/null ~/.xsession-errors
|
? |
|
| Back to top |
|
 |
ville.aakko n00b

Joined: 06 Aug 2006 Posts: 59 Location: Oulu, Finland
|
Posted: Sun Nov 11, 2012 9:09 pm Post subject: |
|
|
That one I already tried (wll, without the -f switch and first deleting .xsession-errors); the symlink will get deleted at the next login to X, and re-created... _________________ - Ville |
|
| Back to top |
|
 |
toralf Advocate


Joined: 01 Feb 2004 Posts: 2421 Location: Hamburg/Germany
|
Posted: Sun Nov 11, 2012 9:10 pm Post subject: |
|
|
something like | Code: | | export WINEDEBUG=-all | might help a little bit ? |
|
| Back to top |
|
 |
publiosulpicio Apprentice


Joined: 31 Aug 2008 Posts: 150
|
Posted: Sun Nov 11, 2012 9:12 pm Post subject: |
|
|
| You can always create a script that delete the file every, say, 30 seconds, and make it run automatically at each login. Not very elegant, but I am pretty sure it will work. |
|
| Back to top |
|
 |
toralf Advocate


Joined: 01 Feb 2004 Posts: 2421 Location: Hamburg/Germany
|
Posted: Sun Nov 11, 2012 9:16 pm Post subject: |
|
|
| publiosulpicio wrote: | | You can always create a script that delete the file every, say, 30 seconds, and make it run automatically at each login. Not very elegant, but I am pretty sure it will work. | better : | Code: | | cp /dev/null ~/.xsession-errors | within /etc/cron.hourly/ or so - or you could use logrotate for that job |
|
| Back to top |
|
 |
ville.aakko n00b

Joined: 06 Aug 2006 Posts: 59 Location: Oulu, Finland
|
Posted: Sun Nov 11, 2012 9:29 pm Post subject: |
|
|
Chattr +1 causes the file size to stay at 0 (or whatever it is), but instead the errors will be directed to /tmp/xerr-[LOGIN]-:0 - which is bad indeed !
| toralf wrote: | something like | Code: | | export WINEDEBUG=-all | might help a little bit ? |
I moved .wine out of the way (well, it was about time since that one dated years back from another Gentoo computer, and had become quite convoluted I believe) and now I don't get the error anymore (at least for time being). But I will try to remember the WINEDEBUG trick.
As for deleting the file - it will disappear from the directory, sure, but it will still be using the disk space as long as any process has the file open. So the space won't be freed up unless one logs out (or, restarts X to be more specific) - and, in my case I even needed to kill nepomukserver (which I have disabled, why is it running?) and gam_server by hand, since the processes just wouldn't stop even if I stopped xdm (or kdm in my case) - if I had run out of disk space. The processes do stop if the log file had not had time to fill the entire hard disk.
I'm not sure how the writing of the .xsession-errors is handled, if every process opens it individually, I believe deleting it at login will prevent new processes from writing to it. But if there's some kind of log relaying (not sure what's the right word here) in use, and the writing process has already started, it won't work. I'm afraid the latter is the case - since, IIRC deleting it at login was already tried at some other discussion I found - but I will try it anyways. Also, there's no point - and no way - in deleting it repeatedly since it is only created once (at every login). It is not re-created during an X session.
Will be busy for the next day or two so I will get back to you later. Thanks anyways! _________________ - Ville |
|
| Back to top |
|
 |
publiosulpicio Apprentice


Joined: 31 Aug 2008 Posts: 150
|
Posted: Sun Nov 11, 2012 9:44 pm Post subject: |
|
|
Instead of a simple rm you can try
| Code: |
truncate --size=0 ~/.xsession-errors
|
this should free the disk space even if the file if open by some process. |
|
| Back to top |
|
 |
ville.aakko n00b

Joined: 06 Aug 2006 Posts: 59 Location: Oulu, Finland
|
Posted: Sun Dec 02, 2012 12:03 pm Post subject: |
|
|
Cleaning .wine seems to make .xsession-errors behave, it does not grow to ridiculous sizes anymore (however, the file is still useless! I guess it is just a matter of time until some other application starts to misbehave...).
Thanks for the truncate tip, publiosulpicio. I will remember it if(or when) this problem re-surfaces again . _________________ - Ville |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|