Re: [gdm-list] Your gdm changes and SunRay...



Hi Jens,

With my knowledge so far, you need do following things to let SRSS work
with ConsoleKit and new GDM:

1. Apply the ConsoleKit latest patch
http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/ConsoleKit-01-ck-dynamic.diff

2. Apply the Sunray specific patch
http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/ConsoleKit-02-add-sunray-type.diff

3. Apply the GDM patch
http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/gdm-04-dynamic-display.diff

4. Get gdmdynamic wrapper 
http://src.opensolaris.org/source/xref/jds/spec-files/trunk/ext-sources/gdmdynamic

Let me know if you have any issue.

Thanks,
Halton.

On Wed, 2009-11-04 at 15:36 +0100, Jens Langner wrote:
> Hi,
> 
> as Brian Cameron asked me to continue the discussion on the gdm mailing 
> list I am sending my replay about the latest MultiSeat changes in gdm 
> here now.
> 
> As an introduction: We are currently trying to get the latest SunRay 
> Server (SRS) 4.2 version running with Ubuntu 9.10 which in turn uses gdm 
> 2.28. However, as SRS is heavily relying on the previous "gdmdynamic" 
> feature the SRS software is not working out-of-the-box anymore with 
> systems using gdm 2.28+. After searching the internet we found the 
> submitted patches from Brian Cameron and Halton Huo for gdm and 
> consolekit and tried to apply those to the sources used in Ubuntu 9.10. 
> However, as the work from Brian and Halton is still in progress we found 
> some still existing problems and thus are reporting them here now.
> 
> Am 03.11.09 20:11, schrieb Brian Cameron:
> 
> >> Can you please send me a link to the git repository so that I may
> >> eventually create own patch files while you are not able to update them
> >> at the above locations. Thanks.
> >
> > The latest code is here:
> >
> > http://cgit.freedesktop.org/ConsoleKit/log/?h=multi-seat
> > http://cgit.freedesktop.org/ConsoleKit/tree/?h=multi-seat
> >
> > I believe your problems will go away if you use the latest code in that
> > branch. Let me know if you have any further problems, or if this fixes
> > the issues you have noticed.
> >
> > The patches at opensolaris.org should be updated to include the latest
> > fixes from the above git branch in the next day or two, by the end of
> > the week at the latest. Halton or I will make sure that the bugs in
> > bugzilla are updated with the latest patches also so that people do not
> > use the old patches by accident, if they don't know about git.
> 
> Unfortunately the latest patches available in the ConsoleKit git as well 
> as in the gdm git did not fully solve our problems here.
> 
> >>>> -- cut here --
> >>>> if (kind == CK_SEAT_KIND_DYNAMIC) {
> >>>> g_hash_table_steal (manager->priv->sessions, orig_ssid);
> >>>> g_hash_table_remove (manager->priv->sessions, orig_ssid);
> >>>> }
> >>>> -- cut here --
> >>>>
> >>>> now it doesn't crash anymore here. After that change we have been
> >>>> finally able to log in to our SunRay Server. However, after a short
> >>>> test we came across a second problem which I want to outline below:
>  >>>
> >>> Halton, have we fixed this problem in our latest patches?
> >>
> >> FYI: It seems this bug is still present, at least in the patch file
> >> provided at the above location. I also verified that it still crashes by
> >> using your patches. However, after inserting the above
> >> g_hash_table_steal() call the segmentation fault vanishes.
> >
> > Do you still see this problem using the latest code in the git branch?
> > I believe that this is one of the issues that Halton recently fixed,
> > though I am not sure.
> 
> Yes, the problem is still present in the latest code in the git branch. 
> Here I can perfectly reproduce a crash of console-kit-daemon as soon as 
> I log into the SRS. However, by adding the above "g_hash_table_steal()" 
> line right before the remove() finally solves that problem and 
> console-kit-daemon does not crash anymore.
> 
> >>>> 2) With your gdm patches applied it seems that gdm itself does not
> >>>> restart the corresponding X server anymore if either the X server
> >>>> process is killed via (kill PID) or if the session is killed by
> >>>> Ctrl-Bspc-Bspc. This seems to not only be true for the dynamic SunRay
> >>>> sessions, but also for any local session (e.g. on display :0). Please
> >>>> find attached the debug output where you can hopefully spot the problem
> >>>> that gdm tries to start another gdm-simple-slave, however it seems to
> >>>> fail and thus it ends up being aborted. Unfortunately we haven't
> >>>> found a workaround or fix for this problem yet as we are not that
>  >>>> trained with gdm<>consolekit interactions. However, I believe that
>  >>>> this could be caused either by the reason that the display isn't
>  >>>> freed that quickly so that the new gdm slave can not start a new X
>  >>>> server that fast or it might be because there is still something
>  >>>> missing in the gdm<>consolekit interaction which causes the
>  >>>> X server restart to fail.
>  >>>
> >>> I believe that this problem is also fixed? Halton, can you confirm?
> >>
> >> I just grabed the patches from the above directory now and recompiled
> >> consolekit 0.3.1 and gdm 2.28.1 for Ubuntu 9.10 here. However, the net
> >> result is the same. I am able to connect to the running SunRay service,
> >> but as soon as I kill a session with Ctrl+Bspc+Bspc gdm never returns on
> >> that display. The same happens with the local display :0, btw. However,
> >> the debug output of gdm is now slightly different to the first one I
> >> sent to you today. Now gdm is not even trying to restart
> >> gdm-simple-slave as it seems. Perhaps you guys have an idea what might
> >> cause that.
> >
> > Do you still see this problem with the latest code in git? Again, I
> > think this is an issue that Halton recently fixed, though I am again not
> > sure.
> 
> Yes, unfortunately this problem is also still present with the latest 
> changes from the "display-configuration" branch in the gdm git. I can 
> perfectly verify that by simply manually killing the Xorg process. As 
> soon as I kill it here a new Xorg will never be automatically started on 
> display :0 like it is normally done. The same happens on the SRS 
> displays. Only the initial session gets an X-server process but as soon 
> as Xnewt/Xorg is killed it never returns on that display.
> 
> However, after a longer investigation my colleagues and I tracked the 
> problem down to the newly added gdm_dynamic_display_finish() function in 
> daemon/gdm-dynamic-display.c. We found out that there the following 
> statements are used:
> 
> -- cut here --
> gdm_dynamic_display_finish (GdmDisplay *display)
> {
>    g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
> 
>    GDM_DISPLAY_CLASS (gdm_dynamic_display_parent_class)->finish (display);
> 
>    gdm_display_unmanage (display);
> 
>    return TRUE;
> }
> -- cut here --
> 
> However, this seems to cause the display to be finished but never 
> restarted like it is done with a normal local display or with the 
> previous unpatched gdm 2.28. Even the local display :0 seems to be 
> treated as a "dynamic" display now. By replacing the function by the 
> same one used in daemon/gdm-static-display.c it seems to work:
> 
> -- cut here --
> gdm_dynamic_display_finish (GdmDisplay *display)
> {
>    int status;
> 
>    g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
> 
>    /* Don't call parent's finish since we don't ever
>    want to be put in the FINISHED state */
> 
>    /* restart dynamic displays */
>    gdm_display_unmanage (display);
> 
>    status = gdm_display_get_status (display);
>    if (status != GDM_DISPLAY_FAILED) {
>       gdm_display_manage (display);
>    }
> 
>    return TRUE;
> }
> -- cut here --
> 
> After that change the local :0 display gets a new Xorg process as soon 
> as the old one is killed. In addition, with that change the Xserver of 
> the Sunray Server (Xnewt) also gets respawned correctly.
> 
> Finally the above differences allowed us to get SRSS 4.2 running with 
> gdm 2.28 under Ubuntu 9.10.
> 
> It would, however, really be nice if you guys could review my proposed 
> changes and perhaps integrate them into your latest patchsets and/or 
> change them in case my changes are not appropriate for the general case.
> 
> No matter what, I would like to thank Halton and Brian for getting this 
> done in gdm 2.28+. And I would like to request that their changes should 
> be integrated into the latest gdm trunk ASAP so that future Ubuntu 
> versions (e.g. comming LTS 10.04) ship already with a Sunray compatible 
> gdm version.
> 
> best regards,
> jens




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