← Back to team overview

dx-packages team mailing list archive

[Bug 1501244] Re: indicator-session sporadically segfaults if used with winbind

 

** Branch linked: lp:ubuntu/trusty-proposed/indicator-session

-- 
You received this bug notification because you are a member of DX
Packages, which is subscribed to indicator-session in Ubuntu.
Matching subscriptions: dx-packages
https://bugs.launchpad.net/bugs/1501244

Title:
  indicator-session sporadically segfaults if used with winbind

Status in indicator-session package in Ubuntu:
  Fix Released
Status in indicator-session source package in Trusty:
  Fix Committed

Bug description:
  when looking into our pc pool with 44 machines, in around 2-5 sessions
  the System Menu is missing after a crash of indicator-session-service,
  making the users unable to log out using the mouse.

  There are arround 100 ubuntu machines for students with 32000 real
  users from an active directory. The users cannot see any users real
  name.

  I wasn't able to find the right debug symbols, but in the disassembly it looks like a crash in service.c:321 .
  In the attached crash dump the instruction pointer points to 0x4120a0  in memory, which should be the get_current_realname function.

  
  static const char *
  get_current_real_name (IndicatorSessionService * self)
  {
    GHashTableIter iter;
    gpointer key, value;

    /* is it the guest? */
    if (indicator_session_guest_is_active (self->priv->backend_guest))
      return _("Guest");

    /* is it a user? */
    g_hash_table_iter_init (&iter, self->priv->users);
    while (g_hash_table_iter_next (&iter, &key, &value))
      {
        IndicatorSessionUser * user = value;
        if (user->is_current_user) // SEGFAULT PROBABLY HERE (movzx edx, byte ptr [r13]), r13=user ist NULL
          return get_user_label (user);
      }

    return "";
  }

  
  The strange thing is: before inserting into the hashmap, every user is checked to be != NULL. So maybe I guessed the wrong function, or there are threading issues.

  Disassembly:
     0x0000000000412081 <+1484>:	mov    r13,rax
     0x0000000000412084 <+1487>:	setne  al
     0x0000000000412087 <+1490>:	test   al,al
     0x0000000000412089 <+1492>:	je     0x411f56 <_start+1185>
     0x000000000041208f <+1498>:	jmp    0x411f51 <_start+1180>
     0x0000000000412094 <+1503>:	nop    DWORD PTR [rax+0x0]
     0x0000000000412098 <+1507>:	mov    r13,QWORD PTR [rdx+0x20]
     0x000000000041209c <+1511>:	mov    rsi,QWORD PTR [rdx+0x18]
  => 0x00000000004120a0 <+1515>:	movzx  edx,BYTE PTR [r13+0x0]
     0x00000000004120a5 <+1520>:	test   dl,dl
     0x00000000004120a7 <+1522>:	je     0x4120d6 <_start+1569>
     0x00000000004120a9 <+1524>:	mov    rax,QWORD PTR [rip+0x248770]        # 0x65a820 <g_ascii_table>
     0x00000000004120b0 <+1531>:	test   BYTE PTR [rax+rdx*2+0x1],0x1
     0x00000000004120b5 <+1536>:	je     0x411f51 <_start+1180>
     0x00000000004120bb <+1542>:	mov    rdx,r13
     0x00000000004120be <+1545>:	jmp    0x4120cb <_start+1558>

  Some command output:
  $> lsb_release -rd
  Description:	Ubuntu 14.04.3 LTS
  Release:	14.04

  Package version:
  $> dpkg -l | grep indicator-session
  ii  indicator-session                                     12.10.5+14.04.20150404-0ubuntu1                     amd64        indicator showing session management, status and user switching

  ~$> gsettings list-recursively com.canonical.indicator.session
  com.canonical.indicator.session show-real-name-on-panel false
  com.canonical.indicator.session suppress-logout-menuitem false
  com.canonical.indicator.session suppress-restart-menuitem false
  com.canonical.indicator.session suppress-shutdown-menuitem false
  com.canonical.indicator.session suppress-logout-restart-shutdown false
  com.canonical.indicator.session user-show-menu false

   ~$> wbinfo -u | wc -l
  127390

  iw18ejyg@cip-54-54: ~$> python -c 'print(__import__("pwd").getpwnam("iw18ejyg"))'
  pwd.struct_passwd(pw_name='iw18ejyg', pw_passwd='*', pw_uid=1069023, pw_gid=1000513, pw_gecos='', pw_dir='/home/stud/iw18ejyg', pw_shell='/bin/bash')

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/indicator-session/+bug/1501244/+subscriptions


References