Bug 40153 - DCOP errors with multiple KDE 3 sessions
Summary: DCOP errors with multiple KDE 3 sessions
Status: RESOLVED NOT A BUG
Alias: None
Product: dcop
Classification: Frameworks and Libraries
Component: dcopserver (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Matthias Ettrich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-04 20:33 UTC by anders
Modified: 2003-03-19 14:11 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anders 2002-04-04 20:32:56 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           dcopserver
Version:           KDE 3.0.0 
Severity:          normal
Installed from:    RedHat RPMs
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

I have VNC set up to use XDM so I can log in to my computer remotely. When I open a VNC session from within KDE log in as the same user and start another KDE session the panel shortcuts in the first KDE session stop working. When I click on one I get this message:

Sorry
KLauncher could not be reached via DCOP.

Soon after that I get this message:

DCOP communications error
There was an error setting up inter-process communications for KDE. The message returned by the system was:
Could not open network socket
Please check that the "dcopserver" program is running!

This problem is new with KDE 3.0; it worked fine in KDE 2.2.2.


(Submitted via bugs.kde.org)
Comment 1 Roman Feiler 2002-11-15 09:27:29 UTC
Serious problem - and surprisingly - 7 months old already!. Is it normal that 
environment pretending to be leading doesn't allow to login more that once?! 
I found similar behavior (KDE 3.0 - standard for RH7.3), but I'm not using XDM 
with VNC, only just running startkde from the startup script. When I login from 
the console, or second VNC server - previous session doesn't allow to "launch" 
anything anymore.
VERY annoying. Do something! At least give a peace of advice how to workaround.

pliiz ;)
Comment 2 adoram 2003-01-27 10:11:07 UTC
Is there any workaround to this ?
I have multiple VNC connections for the same user, and the
kill each other so only the last connection works.
This is very annoying, and it worked in KDE 2.x under RedHat 6.2
This is now KDE 3.0.3 under RedHat 7.3.
Any chance of this being addressed ?

Thanks
Comment 3 Thiago Macieira 2003-01-27 18:10:59 UTC
Can you confirm that dcopserver actually got started? If so, what name it took 
(should be a socket name in your ~/.kde). 
 
Output from ~/.xsession-errors or equivalent would be helpful too. 
 
Please note I'm not the developer. Just a guy trying to help. 
Comment 4 Roman Feiler 2003-01-27 19:13:42 UTC
Subject: Re:  DCOP errors with multiple KDE 3 sessions         

On 27 Jan 2003, Thiago Macieira wrote:

> ------- You are receiving this mail because: -------
> You are a voter for the bug, or are watching someone who is.
>
> http://bugs.kde.org/show_bug.cgi?id=40153
> thiagom@mail.com changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |thiagom@mail.com
>
>
>
> ------- Additional Comments From thiagom@mail.com  2003-01-27 18:10 -------
> Can you confirm that dcopserver actually got started? If so, what name it took
> (should be a socket name in your ~/.kde).
>
> Output from ~/.xsession-errors or equivalent would be helpful too.
>
> Please note I'm not the developer. Just a guy trying to help.
>

hi, thanks for your interest...

Files in my .kde are links to /tmp directory:

rf@ocra ~/.kde > ls -la
razem 20
drwxr-xr-x    4 rf       rf           4096 sie 24 00:15 .
drwxr-xr-x   90 rf       rf           8192 sty 27 19:02 ..
drwxr-xr-x    2 rf       rf           4096 lip 15  2002 Autostart
drwxrwxr-x   11 rf       rf           4096 sie 24 11:17 share
lrwxrwxrwx    1 rf       rf             15 sie 24 00:15 socket-ocra -> /tmp/ksocket-rf
lrwxrwxrwx    1 rf       rf             11 sie 24 00:15 tmp-ocra -> /tmp/kde-rf

For testing purposes I removed all my files from /tmp (I assume they are temporary,
because e.g. /tmp can be normally sometimes wiped by admins)

I'm starting first vnc session on display :92, everything works fine.
The situation in /tmp is as follows:

rf@ocra /tmp > ls -laR ksocket-rf/ kde-rf/ mcop-rf/
kde-rf/:
razem 592
drwx------    2 rf       rf           4096 sty 27 19:07 .
drwxrwxrwt   29 root     root        12288 sty 27 19:07 ..
-rw-r--r--    1 rf       rf         581386 sty 27 19:07 ksycoca
-rw-r--r--    1 rf       rf            472 sty 27 19:07 ksycocastamp

ksocket-rf/:
razem 20
drwx------    2 rf       rf           4096 sty 27 19:07 .
drwxrwxrwt   29 root     root        12288 sty 27 19:07 ..
srw-------    1 rf       rf              0 sty 27 19:07 kdeinit-:92
srw-------    1 rf       root            0 sty 27 19:07 kdesud_:92
srwxr-xr-x    1 rf       rf              0 sty 27 19:07 klauncherLN9jCb.slave-socket
-rw-r--r--    1 rf       rf             38 sty 27 19:07 KSMserver__92

mcop-rf/:
razem 48
drwx------    3 rf       rf           4096 sty 27 19:07 .
drwxrwxrwt   29 root     root        12288 sty 27 19:07 ..
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_AudioManager
drwx------    2 rf       rf           4096 sty 27 19:07 artsd-samples
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_MidiManager
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_PlayObjectFactory
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_SimpleSoundServer
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_SoundServer
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_SoundServerV2
srwxr-xr-x    1 rf       rf              0 sty 27 19:07 ocra-5794-3e357576
-rw-------    1 rf       rf             32 sty 27 19:07 secret-cookie

mcop-rf/artsd-samples:
razem 8
drwx------    2 rf       rf           4096 sty 27 19:07 .
drwx------    3 rf       rf           4096 sty 27 19:07 ..
rf@ocra /tmp >

Now I'm running the second VNC session with another KDE on display :93, files in /tmp are:

rf@ocra /tmp > ls -laR ksocket-rf/ kde-rf/ mcop-rf/
kde-rf/:
razem 592
drwx------    2 rf       rf           4096 sty 27 19:09 .
drwxrwxrwt   29 root     root        12288 sty 27 19:09 ..
-rw-r--r--    1 rf       rf         581386 sty 27 19:07 ksycoca
-rw-r--r--    1 rf       rf            472 sty 27 19:07 ksycocastamp

ksocket-rf/:
razem 24
drwx------    2 rf       rf           4096 sty 27 19:09 .
drwxrwxrwt   29 root     root        12288 sty 27 19:09 ..
srw-------    1 rf       rf              0 sty 27 19:07 kdeinit-:92
srw-------    1 rf       rf              0 sty 27 19:09 kdeinit-:93
srw-------    1 rf       root            0 sty 27 19:07 kdesud_:92
srw-------    1 rf       root            0 sty 27 19:09 kdesud_:93
srwxr-xr-x    1 rf       rf              0 sty 27 19:09 klauncheredgjfc.slave-socket
srwxr-xr-x    1 rf       rf              0 sty 27 19:07 klauncherLN9jCb.slave-socket
-rw-r--r--    1 rf       rf             38 sty 27 19:07 KSMserver__92
-rw-r--r--    1 rf       rf             38 sty 27 19:09 KSMserver__93

mcop-rf/:
razem 48
drwx------    3 rf       rf           4096 sty 27 19:09 .
drwxrwxrwt   29 root     root        12288 sty 27 19:09 ..
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_AudioManager
drwx------    2 rf       rf           4096 sty 27 19:07 artsd-samples
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_MidiManager
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_PlayObjectFactory
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_SimpleSoundServer
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_SoundServer
-rw-------    1 rf       rf            156 sty 27 19:07 Arts_SoundServerV2
srwxr-xr-x    1 rf       rf              0 sty 27 19:07 ocra-5794-3e357576
-rw-------    1 rf       rf             32 sty 27 19:07 secret-cookie

mcop-rf/artsd-samples:
razem 8
drwx------    2 rf       rf           4096 sty 27 19:07 .
drwx------    3 rf       rf           4096 sty 27 19:09 ..
rf@ocra /tmp >

In session on :92, when I click e.g. on the terminal icon, KDE throws errors about
DCOP server not running: "could not open network socket", "KLauncher cannot be reached
by DCOP".

Similar situation would be if I run KDE on the local X, and connect through VNC as the
same user. First session would stop responding.

Probably some file-naming bug?

cheers,

Roman


Comment 5 Thiago Macieira 2003-01-27 19:33:06 UTC
Subject: Re:  DCOP errors with multiple KDE 3 sessions

Roman Feiler wrote:
>Files in my .kde are links to /tmp directory:
>
>rf@ocra ~/.kde > ls -la
[...]

Thanks for the input.

One extra file you could check: your ~/.DCOPserver* files. You can remove any 
left overs if you want to do a clean test. Each file must be composed of the 
prefix .DCOPserver, your hostname if any, and your display name. The contents 
should be a Unix socket file on which DCOP is listening and its PID. Check if 
any second instance overwrites that.

When you are doing such a test, leave a konsole window open for tests. When 
you start having dcop problems, run 'dcop' on that konsole. 

Comment 6 adoram 2003-01-28 00:57:25 UTC
OK, I found a workaround.
The problematic line was the one in startkde that loops on all the files
in the the /tmp/.ICE-unix directory and deletes all the files that the current 
user owns. That killed all the previous vnc sessions.
I commented out these lines:

#for i in /tmp/.ICE-unix/* /tmp/.ICE-unix/.*; do
#	[ -O $i ] && rm -f $i
#done

and all works well now.
/etc/rc.sysinit has a rm -rf /tmp/.ICE-unix in it, so at boot time
this directory is getting cleaned.

Am I missing something here, or is it a good workaround ?

Thanks, adoram
Comment 7 Thiago Macieira 2003-01-28 01:36:45 UTC
Subject: Re:  DCOP errors with multiple KDE 3 sessions

adoram wrote:
> 00:57 ------- OK, I found a workaround.
>The problematic line was the one in startkde that loops on all the files
>in the the /tmp/.ICE-unix directory and deletes all the files that the
> current user owns. That killed all the previous vnc sessions.
>I commented out these lines:
>
>#for i in /tmp/.ICE-unix/* /tmp/.ICE-unix/.*; do
>#	[ -O $i ] && rm -f $i
>#done
>
>and all works well now.
>/etc/rc.sysinit has a rm -rf /tmp/.ICE-unix in it, so at boot time
>this directory is getting cleaned.
>
>Am I missing something here, or is it a good workaround ?

Well, my guess is the code was there for a reason: probably to clean up 
left-over files. Even though your system cleans /tmp at boot, that is not 
true for most other systems. It's the recommended behaviour for Linux, 
though.

One would have to cycle over all files and delete them only if there isn't a 
corresponding DCOPserver being run. That is, instead of going over all files 
in /tmp/.ICE-unix/ that are owned by the user, we'd have to check 
~/.DCOPserver*, test if the dcopserver is running and, if not, rm the 
appropriate ICE socket and .DCOPserver PID-file.

Comment 8 Waldo Bastian 2003-03-19 12:46:51 UTC
RedHat bug. The startkde script provided by KDE does not contain these lines.