[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Query about .xsession-errors file



On Tue, 9 Sep 2014, Jonathan Dowland wrote:

On Wed, Sep 10, 2014 at 01:54:08AM +0800, Bret Busby wrote:
The file has (kind of) gone, now (it is no longer accessible, but,
appears to still exist, in the ether of the unknown; still taking up
disc space, whilst, in theory, non-existent),

A file continues to use up disk space until all open file handles are closed.
Quite likely Xorg still has the file open, even though you've removed all the
hard links (paths) to it on the filesystem. If you still have the system up in
the same state, you might see it in /proc/$(pidof Xorg)/fd (or it might be
another process other than Xorg, or I might be wrong entirely)

if you have lsof installed, you can find out what processes are still
using the deleted file quite easily:

 $ lsof |grep '\.xsession-errors'

might produce lines like

 xterm 2237 busbyenator 1w REG 8,1 0 359981 /home/busbyenator/.xsession-errors (deleted)
 xterm 2237 busbyenator 2w REG 8,1 0 359981 /home/busbyenator/.xsession-errors (deleted)

the second field is the pid.  the fourth field is the file descriptor
(in this case suffixed with 'w', indicating the process has write
access).

the lines above indicate that the xterm process with pid 2237 is
writing its standard output (fd 1) and standard error (fd 2) to a file
formerly known to the filesystem as .xsession-errors, and which can
still be accessed at /proc/2237/fd/1 (and at /proc/2237/fd/2).

so, in the case above,

 $ cat /proc/2237/fd/1

will output the contents of the file formerly known to the filesystem
as .xsession-errors, and

 $ cp /proc/2237/fd/1 preciousss_xsession-errors

saves them for posterity.

please note, obviously, that pid 2237 is just an example.

-wes

but, when I did briefly examine the contents, hundreds of lines referring to
QPaint problems, were shown.

Historically in my experience lots of Qt and KDE programs were extremely
verbose on stderr, often because they were built with some debug flag enabled.
Depending on the nature of the QPaint messages, this might be the case. Either
way, it's probably a severity: minor bug worth reporting if it hasn't already
(this bug looks relevant: https://bugs.debian.org/598975 - I guess the thing
to do is figure out which program is generating the messages.)





Reply to: