Review Request 121710: Avoid risk of starting two kscreen_launchers at the same having race conditions

Raymond Wooninck tittiatcoke at gmail.com
Mon Dec 29 16:05:06 UTC 2014



> On Dec. 29, 2014, 1:55 a.m., Lukáš Tinkl wrote:
> > Unfortunataly it doesn't fix it here, plasmashell starts with a blank screen. kquitapp5 plasmashell && plasmashell brings it back
> 
> Bhushan Shah wrote:
>     Works for me.. :S which XRandr version you have?
> 
> David Edmundson wrote:
>     That's depressing to hear. I need some help on this; logs, traces, something as I can't reproduce here and this bug is super duper critical.
>     
>     Do you agree this change still makes sense though? Even if there is another problem it will be easier if there's one potential bug less.

Unfortunately I seem to have hit a worse situation.  kquitapp5 plasmashell does not work in my case as it just fails. Killing plasmashell and then starting it just delivers the same situation, a black screen with plasmashell running in the background and that is it.  Starting plasmashell shows the following output:
kscreen: launcherDataAvailable: "org.kde.KScreen.Backend.XRandR"
kscreen: Launcher finished with exit code 1 , status 0
kscreen: Service for requested backend already running

And yes I have a kscreen_backend_launcher process running, which is started by kded5. When I try to kill this one, kded5 is automatically restarting it. 

To be honest this patch makes things worse as that plasmashell is not starting at all.


- Raymond


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121710/#review72655
-----------------------------------------------------------


On Dec. 28, 2014, 10:33 a.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121710/
> -----------------------------------------------------------
> 
> (Updated Dec. 28, 2014, 10:33 a.m.)
> 
> 
> Review request for Plasma, Solid and Daniel Vrátil.
> 
> 
> Repository: libkscreen
> 
> 
> Description
> -------
> 
> Avoid risk of starting two kscreen_launchers at the same having a race condition.
> 
> There were three possible bugs:
> CheckIsAlreadyRunning tried to register a service and check if it worked.
> This could clash with another process checking at the same time. Causing them both to fail saying another is running
> Similarly, a daemon doing actual registering could clash with another daemon just checking if the name is free, and then it would fail saying we can't init()
>  
> There was also a risk that two launchers pass the check that nothing is running, then both try to activate a session. DBus server handles this fine and one will gracefully fail. Without this patch the second launcher would just die without returning the path of the service that was activated causing the relevant app to do nothing.
> 
> 
> --
> 
> IMHO, you'd be better off having a fixed service name and using DBus activation for exactly these reasons.
> You could put the different backends at different object paths, and have a method on the root object that says which object path to use rather than using the stdout of a launcher. That's a discussion for another day though.
> 
> 
> Diffs
> -----
> 
>   src/backendlauncher/backendloader.cpp e7da8cd 
>   src/backendlauncher/main.cpp f8bf323 
> 
> Diff: https://git.reviewboard.kde.org/r/121710/diff/
> 
> 
> Testing
> -------
> 
> Send it to bshah. Plasmashell started for him. Previously it didn't.
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20141229/53289b36/attachment.html>


More information about the Plasma-devel mailing list