#610 LXDM / LXDE Logout doesn't kill all session

closed
dgod.osa
lxdm (73)
5
2014-09-08
2013-09-26
Sonicle Srl
No

Hi, I recently built and packaged lxde 0.4.1 for our upcoming XStreamOS Desktop, based on illumos kernel.
While it works ok under startx (running compmgr+cairo-dock+startlxde), and it correctly kills back to text console on logout,
I cannot manage to logout correctly via lxdm.
If I start lxdm as root, then login via the graphical ui, my lxde desktop starts (as with startx), and I can see all the processes of this user.
Once I try to logout, the lxsession-logout screen appears, then once I click Logout, it returns back to the desktop, not completely sane:
- lxsession has been killed
- cairo-dock shows wrong icons here and there
- I can still see the processes of the user, no more children of lxsession, but of process 1, lxsession is dead.

Because lxdm.conf and Xsession in /etc/lxdm works running ck-launch-session, I checked with ck-list-sessions while inside the desktop through lxdm,
and I find one session with ACTIVE=FALSE, and no session id.
The same, anyway, happens if I just startx.

What should I investigate?
Thanx
Gabriele.

Discussion

<< < 1 2 (Page 2 of 2)
  • Sonicle Srl

    Sonicle Srl - 2013-10-08

    Yes, I'm not using the git source, but the latest available tar.gz :)
    I patched, will let you know shortly ;)

     
  • Sonicle Srl

    Sonicle Srl - 2013-10-08

    It works great! Thanks for all your support :)
    Hope someone is going to help me with my lxterminal problem.
    I had to substitute it with the bare vte2_90 that works, lxterminal hangs on second process instance.... :)

     
  • dgod.osa

    dgod.osa - 2013-10-09
    • status: open --> closed
     
  • Sonicle Srl

    Sonicle Srl - 2014-03-11

    Hi, sorry if I reopen this case.
    Hope you can make your mind in it again.

    I suspect that the modifications I placed about pids checking and so on
    is the cause of the problem we're having.

    After logging in through lxdm, once you're inside the desktop, any software
    causing crashing and core dumping will kill the X sessiona and bring you to the login screen.
    Do you think there is any check in the above changes that may confuse lxdm to think it's time to go back to login?

    Thanks for any help!

     
  • dgod.osa

    dgod.osa - 2014-03-12

    I don't think one program exit can cause lxdm to reset the session.
    lxdm only reset session when it recv SIGCHLD and the pid is the lxsession(LXDE desktop case).
    maybe software crash cause the lxsession to quit.

     
  • Sonicle Srl

    Sonicle Srl - 2014-03-14

    I see, but if you look back at the last post of mine, in lxcom_func I had to change the original:

    if((pid==-1 && uid==0) || pid==getpid())

    into

    if(uid==0 || pid==getpid() || pid==0)

    because pid is always 0 and uid always -1 in my case, and I was trying to
    let it logout correctly.
    What I suspect, is that ucred is not sending correct credentials data.
    So, my change is getting all children seg-fault signals, and because pid
    is always 0, lxdm resets.

    I tried to look deeper into the sendmsg handling, and I am confused by this:

    static ssize_t lxcom_write(int s,const void buf,size_t count)
    {
    struct iovec iov[1] ={{(void
    )buf,count,}};
    struct msghdr msg = { 0, 0, iov, 1, 0, 0, 0 };

    if !defined(linux) && !defined(NetBSD)

    ...
    ...
    (some ucred/cmsg msg stuff)
    ...
    ...

    endif

        return sendmsg(s,&msg,0);
    

    }

    Why is the ucred/cmsg stuff completely skipped on linux/bsd?
    Who is putting the pid/uid inside the msg?

    I think this is the main problem

    Thanx for all your help.
    Gabriele.

     
  • dgod.osa

    dgod.osa - 2014-03-14

    in lxcom_init()
    ret=setsockopt(self_server_fd,SOL_SOCKET,SO_PASSCRED,&on,sizeof(on));

    this line let the linux kernel to add cred infomation to the socket message.

     
  • dgod.osa

    dgod.osa - 2014-03-14

    you application seg-faults, so the SIGSEGV is send to it self, if it not deal it gracefully, then this process will exit, and send SIGCHLD to its parent, most time in GUI, the app won't have parent, the SIGCHLD will send to init process.

    so I can't find any where LXDM will do something.

     
<< < 1 2 (Page 2 of 2)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks