By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 974

Summary: TDM creates nominal profile directories in /tmp
Product: TDE Reporter: Darrell <darrella>
Component: tdebaseAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: critical CC: bugwatch, darrella
Priority: P1    
Version: R14.0.0 [Trinity]   
Hardware: All   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:

Description Darrell 2012-04-21 00:04:29 CDT
TDM creates nominal profile directories in /tmp. All such directories use a numeric name string. TDM runs as non-user, but should not be creating any profile directories. Not needed and the profile directories are never purged.

The creation of these profile directories never happened in KDE3.
Comment 1 Timothy Pearson 2012-04-21 01:02:44 CDT
I suspect this is due to the fact that TDM now attempts to read TDE configuration settings for things like monitor configuration on startup.  I am not sure off the top of my head why it would create a profile structure in /tmp though.
Comment 2 Darrell 2012-04-21 09:34:16 CDT
Some distros provide cleanup scripts upon halt/reboot or through cron, some don't. Regardless, login and logout a half dozen times and then view the /tmp directory. Imagine what this will look like on systems where people seldom reboot. Consider that many people assign /tmp to tmpfs. This kind of behavior will fill the directory and cause problems.

This bug report could be bumped to Major or Critical for a heavily used multi-user system.
Comment 3 Timothy Pearson 2012-04-21 13:33:57 CDT
(In reply to comment #2)
> Some distros provide cleanup scripts upon halt/reboot or through cron, some
> don't. Regardless, login and logout a half dozen times and then view the /tmp
> directory. Imagine what this will look like on systems where people seldom
> reboot. Consider that many people assign /tmp to tmpfs. This kind of behavior
> will fill the directory and cause problems.
> 
> This bug report could be bumped to Major or Critical for a heavily used
> multi-user system.

Agreed.
Comment 4 Darrell 2012-04-21 14:54:46 CDT
Ok, good! :)
Comment 5 Timothy Pearson 2012-04-22 03:14:41 CDT
(In reply to comment #0)
> TDM creates nominal profile directories in /tmp. All such directories use a
> numeric name string.

Are you saying that the "profile directory" is all numbers; i.e. no letters are present anywhere in the string?
Comment 6 Timothy Pearson 2012-04-22 03:16:00 CDT
(In reply to comment #5)
> (In reply to comment #0)
> > TDM creates nominal profile directories in /tmp. All such directories use a
> > numeric name string.
> 
> Are you saying that the "profile directory" is all numbers; i.e. no letters are
> present anywhere in the string?

Never mind, answered my own question.  This looks DCOP related.
Comment 7 Timothy Pearson 2012-04-22 03:17:51 CDT
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #0)
> > > TDM creates nominal profile directories in /tmp. All such directories use a
> > > numeric name string.
> > 
> > Are you saying that the "profile directory" is all numbers; i.e. no letters are
> > present anywhere in the string?
> 
> Never mind, answered my own question.  This looks DCOP related.

Starting twin starts dcop, so the creation of the temporary DCOP socket directory is normal, and the only real problem here is cleanup on session exit.
Comment 8 Darrell 2012-04-22 14:09:06 CDT
Cleanup hides but does not cure the root cause. :) The profile directories should not be created at all.

I checked a KDE3 setup. KDM does not create any files. Nothing in /tmp, /var/tmp, or tmpfs.

I realize twin is not the original kwin and there are differences. The newer twin needing a dcop socket is not a problem. That need is not related to these profile directories. The creation of a dcop socket should not create these profile directories.

There is a function somewhere that when a user account is used and a nominal profile directory does not exist, to create a nominal profile directory. TDM runs as root and must be indirectly using that function. That function needs an exception to TDM so the profile directories are not created. Or, test whether root is actually logged in (a real login and not a pseudo login with TDM) before creating the nominal profile.
Comment 9 Darrell 2012-04-27 13:50:14 CDT
I am continuing here the discussion from bug report 625 because this bug report is the appropriate place for that discussion.

Here is a typical nominal profile directory, created just now by TDM, with the latest patches:

ls -R /tmp/1407593669
/tmp/1407593669:
total 24
drwx------ 4 root root 4096 Apr 27 13:14 ./
drwxrwxrwt 6 root root 4096 Apr 27 13:14 ../
drwxr-xr-x 2 root root 4096 Apr 27 13:14 .qt/
drwx------ 3 root root 4096 Apr 27 13:14 .trinity/
lrwxrwxrwx 1 root root   36 Apr 27 13:14 .DCOPserver_testbox_:0 -> /tmp/1407593669/.DCOPserver_testbox__0
-rw-r--r-- 1 root root   54 Apr 27 13:14 .DCOPserver_testbox__0
-rw------- 1 root root  189 Apr 27 13:14 .ICEauthority

/tmp/1407593669/.qt:
total 12
drwxr-xr-x 2 root root 4096 Apr 27 13:14 ./
drwx------ 4 root root 4096 Apr 27 13:14 ../
-rw------- 1 root root    0 Apr 27 13:14 .tqt_plugins_3.4rc.lock
-rw-r--r-- 1 root root  331 Apr 27 13:14 tqt_plugins_3.4rc

/tmp/1407593669/.trinity:
total 12
drwx------ 3 root root 4096 Apr 27 13:14 ./
drwx------ 4 root root 4096 Apr 27 13:14 ../
drwx------ 4 root root 4096 Apr 27 13:14 share/

/tmp/1407593669/.trinity/share:
total 16
drwx------ 4 root root 4096 Apr 27 13:14 ./
drwx------ 3 root root 4096 Apr 27 13:14 ../
drwx------ 2 root root 4096 Apr 27 13:14 apps/
drwx------ 2 root root 4096 Apr 27 13:14 config/

This nominal profile directory was created with no logins. Only starting TDM.

Don't log in. Just restart the X server (Alt-E). A new nominal profile directory is created.

Login. Logout. A new nominal profile directory is created.

Now, with that said, is this still a problem based on the patching performed of late? I don't think so.

What I now see is only one nominal profile directory at any one time. They no longer accumulate like a monster from a cheap B movie. That in itself is significant. One profile directory at any one time is palatable. :-)

I have some more specific tests I want to run, but I think this bug report is close to being closed. :-)
Comment 10 Timothy Pearson 2012-04-27 16:01:10 CDT
(In reply to comment #9)
> I am continuing here the discussion from bug report 625 because this bug report
> is the appropriate place for that discussion.
> 
> Here is a typical nominal profile directory, created just now by TDM, with the
> latest patches:
> 
> ls -R /tmp/1407593669
> /tmp/1407593669:
> total 24
> drwx------ 4 root root 4096 Apr 27 13:14 ./
> drwxrwxrwt 6 root root 4096 Apr 27 13:14 ../
> drwxr-xr-x 2 root root 4096 Apr 27 13:14 .qt/
> drwx------ 3 root root 4096 Apr 27 13:14 .trinity/
> lrwxrwxrwx 1 root root   36 Apr 27 13:14 .DCOPserver_testbox_:0 ->
> /tmp/1407593669/.DCOPserver_testbox__0
> -rw-r--r-- 1 root root   54 Apr 27 13:14 .DCOPserver_testbox__0
> -rw------- 1 root root  189 Apr 27 13:14 .ICEauthority

The three files above are used for DCOP communication and ICE authentication and are therefore mandatory.

> /tmp/1407593669/.qt:
> total 12
> drwxr-xr-x 2 root root 4096 Apr 27 13:14 ./
> drwx------ 4 root root 4096 Apr 27 13:14 ../
> -rw------- 1 root root    0 Apr 27 13:14 .tqt_plugins_3.4rc.lock
> -rw-r--r-- 1 root root  331 Apr 27 13:14 tqt_plugins_3.4rc

Qt creates this automagically--I can't do anything about it really.

> /tmp/1407593669/.trinity:
> total 12
> drwx------ 3 root root 4096 Apr 27 13:14 ./
> drwx------ 4 root root 4096 Apr 27 13:14 ../
> drwx------ 4 root root 4096 Apr 27 13:14 share/
> 
> /tmp/1407593669/.trinity/share:
> total 16
> drwx------ 4 root root 4096 Apr 27 13:14 ./
> drwx------ 3 root root 4096 Apr 27 13:14 ../
> drwx------ 2 root root 4096 Apr 27 13:14 apps/
> drwx------ 2 root root 4096 Apr 27 13:14 config/

TDE seems to create these empty directories when dcop is started.  I don't think they are needed, but fixing this would be at worst a paper cut bug, as these directories take up all of a few tens of Kb.
Comment 11 Darrell 2012-04-27 16:09:05 CDT
This is good information. Thanks.

As I wrote in my previous comment, one directory is not a problem. The accumulation was the problem. I have a few more tests to run (can't be in two places at once!), but I think this bug report is close to being closed as resolved. I should be able to get to this by the end of the day.
Comment 12 Darrell 2012-04-27 20:28:03 CDT
Unless you have a reason otherwise, we can close this bug report. Invalid?
Comment 13 Darrell 2012-04-27 20:29:21 CDT
Opps. Wrong bug report. We can close this report as RESOLVED. Somewhere in the string of recent patches the housekeeping improved. Now only one nominal profile directory exists at a time. good enough.