Crash in SelfConfig on amd64

Bug #533870 reported by Asif Youssuff on 2010-03-07
80
This bug affects 13 people
Affects Status Importance Assigned to Milestone
liboobs
Invalid
Undecided
Unassigned
system-tools-backends
Fix Released
Undecided
Unassigned
system-tools-backends (Ubuntu)
Medium
Unassigned
Lucid
Undecided
Unassigned

Bug Description

Binary package hint: gnome-system-tools

Steps to reproduce:

1. Open Users and Groups panel
2. Click "Change..." next to the user's name
3. Click "OK" in the resulting "Change username and login" dialog

What happens:

I get an error saying: The configuration could not be saved

An unknown error occurred.

Expected behavior:

No error message -- information didn't even change. This does not occur again after the first time trying it. However, closing and launching users-admin again causes it to occur again.

Attaching a video. u

ProblemType: Bug
Architecture: amd64
CheckboxSubmission: b5741632ce80140fe62dfd1ff63467c7
CheckboxSystem: 55ba142b3b792c71cc61171c782c3b13
Date: Sun Mar 7 10:51:21 2010
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20091209)
Package: gnome-system-tools 2.29.91-0ubuntu2
ProcEnviron:
 PATH=(custom, user)
 LANG=C
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-15.22-generic
SourcePackage: gnome-system-tools
Uname: Linux 2.6.32-15-generic x86_64

Asif Youssuff (yoasif) wrote :
Milan Bouchet-Valat (nalimilan) wrote :

Thanks for the report and the screencast. Does the error happen when trying to change other settings (e.g. account type)? Could you reproduce the bug following the instructions "For Users" at https://wiki.ubuntu.com/DebuggingGnomeSystemTools and attach the result here? Thanks!

Changed in gnome-system-tools (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Asif Youssuff (yoasif) wrote :
Asif Youssuff (yoasif) wrote :
Asif Youssuff (yoasif) wrote :

Changing other settings does not exhibit the same problems -- trying to change the account type brings up a policykit dialog, and changing the account type or password without changing anything in them causes no issues.

Attaching resulting files.

Milan Bouchet-Valat (nalimilan) wrote :

Hmm, very weird. I can't reproduce this problem here. Are you able to change Real name *when setting it to a different value*?

Changed in gnome-system-tools (Ubuntu):
status: Incomplete → Triaged
Asif Youssuff (yoasif) wrote :

Something even weirder happens when I try to change the name to a different value:

1. Open users and groups
2. Click change next to name
3. Add a letter, hit OK

What happens:

4. I get an error saying: The configuration could not be saved

An unknown error occurred.

5. The name *changes* in the users settings window (to the name i input).

If I then close the window, and reopen it, the setting has not been applied -- my old Real Name appears.

Adding the logs when doing this set of events as well (up to closing the window).

Asif Youssuff (yoasif) wrote :
Asif Youssuff (yoasif) wrote :

Actually, that error should only happen when you try to change your *own* name. The fact that the name seems to change while it doesn't is an unrelated bug that should be easy to fix.

I'd need deeper debugging to understand what's going on. Could you install the package for your architecture from:
http://ddebs.ubuntu.com/pool/main/s/system-tools-backends/

and then run
sudo killall system-tools-backends
sudo gdb /usr/sbin/system-tools-backends
break dispatcher.c:547

then reproduce the problem, and when gdb stops, type
print (message_uid == uid)
print message_uid
print uid
and print the result here.

In short, it seems that we're not detecting the right UID for your user, which means you're not allowed to change your own information. Thanks for your help!

Changed in gnome-system-tools (Ubuntu):
status: Triaged → Incomplete

Oh, and I forgot one step: after
break dispatcher.c:547
and before starting users-admin, type
run
in gdb.

...and since you say the second time the problem doesn't occur, once you've followed my above instructions, please type in gdb
continue

And then reproduce the problem once again, repeating the last steps in gdb. Then we'll see if something is different. Hope it's not too confusing...

Asif Youssuff (yoasif) wrote :

Even weirder stuff.

After starting up gdb with the commands you instructed, starting users-admin shows no users in the list, making it impossible for me to reproduce the problem.

Showing the gdb log here anyway, hope it can be some help.

asif@asif-laptop:~$ sudo killall system-tools-backends
system-tools-backends: no process found
asif@asif-laptop:~$ sudo gdb /usr/sbin/system-tools-backends
GNU gdb (GDB) 7.0.1-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/system-tools-backends...Reading symbols from /usr/lib/debug/usr/sbin/system-tools-backends...done.
(no debugging symbols found)...done.
(gdb) break dispatcher.c:547
Breakpoint 1 at 0x40431f: file dispatcher.c, line 547.
(gdb) run
Starting program: /usr/sbin/system-tools-backends
[Thread debugging using libthread_db enabled]

Breakpoint 1, dispatch_self_config (connection=<value optimized out>,
    message=0x61c190, data=<value optimized out>) at dispatcher.c:547
547 dispatcher.c: No such file or directory.
 in dispatcher.c
(gdb) print (message_uid == uid)
$1 = 1
(gdb) print message_uid
$2 = <value optimized out>
(gdb) print uid
$3 = <value optimized out>
(gdb)

Asif Youssuff (yoasif) wrote :

Oh, and:

asif@asif-laptop:~$ apt-cache policy system-tools-backends-dbgsym
system-tools-backends-dbgsym:
  Installed: 2.9.2-0ubuntu1
  Candidate: 2.9.2-0ubuntu1
  Version table:
 *** 2.9.2-0ubuntu1 0
        100 /var/lib/dpkg/status

In case the "no debugging symbols found" means something -- i *did* install that first package. :)

Sorry, silly me. The breakpoint is reached when users-admin starts, so you should simply type
continue
in gdb right after running users-admin, and then follow the procedure as stated.

"no debugging symbols" is not really a problem, it seems that the basic symbols are here.

Asif Youssuff (yoasif) wrote :

Here is the updated debug log.

asif@asif-laptop:~$ sudo killall system-tools-backends
system-tools-backends: no process found
asif@asif-laptop:~$ sudo gdb /usr/sbin/system-tools-backends
GNU gdb (GDB) 7.0.1-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/system-tools-backends...Reading symbols from /usr/lib/debug/usr/sbin/system-tools-backends...done.
(no debugging symbols found)...done.
(gdb) break dispatcher.c:547
Breakpoint 1 at 0x40431f: file dispatcher.c, line 547.
(gdb) run
Starting program: /usr/sbin/system-tools-backends
[Thread debugging using libthread_db enabled]

Breakpoint 1, dispatch_self_config (connection=<value optimized out>,
    message=0x61c190, data=<value optimized out>) at dispatcher.c:547
547 dispatcher.c: No such file or directory.
 in dispatcher.c
(gdb) continue
Continuing.

Breakpoint 1, dispatch_self_config (connection=<value optimized out>,
    message=0x618250, data=<value optimized out>) at dispatcher.c:547
547 in dispatcher.c
(gdb) print (message_uid == uid)
$1 = 1
(gdb) print message_uid
$2 = <value optimized out>
(gdb) print uid
$3 = <value optimized out>
(gdb)

Now, without closing users-admin (this is what I mean by the second time -- doing the same steps during the same session is still reproducible, it is only if I try it again without closing users-admin that I don't see an error), I get a new dialog after I click on change:

You are not allowed to modify the system configuration.

An error occurred while checking for authorizations: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
You may report this as a bug.

Thanks! Here's another procedure to get more information:
sudo killall system-tools-backends
sudo gdb /usr/sbin/system-tools-backends
break dispatcher.c:547

Then, type this block everytime gdb stops, i.e. once when you start users-admin, and once everytime you change your name:
next
print (message_uid == uid)
print message_uid
print uid
continue

The error during the second attempt was coming from the fact that gdb was blocking the program - it needed 'continue' to go on.

Asif Youssuff (yoasif) wrote :

Reading symbols from /usr/sbin/system-tools-backends...Reading symbols from /usr/lib/debug/usr/sbin/system-tools-backends...done.
(no debugging symbols found)...done.
(gdb) break dispatcher.c:547
Breakpoint 1 at 0x40431f: file dispatcher.c, line 547.
(gdb) run
Starting program: /usr/sbin/system-tools-backends
[Thread debugging using libthread_db enabled]

Breakpoint 1, dispatch_self_config (connection=<value optimized out>,
    message=0x61f8c0, data=<value optimized out>) at dispatcher.c:547
547 dispatcher.c: No such file or directory.
 in dispatcher.c
(gdb) continue
Continuing.

Breakpoint 1, dispatch_self_config (connection=<value optimized out>,
    message=0x6136d0, data=<value optimized out>) at dispatcher.c:547
547 in dispatcher.c
(gdb) next
556 in dispatcher.c
(gdb) print (message_uid == uid)
$1 = 0
(gdb) print message_uid
$2 = 140733193389032
(gdb) print uid
$3 = <value optimized out>
(gdb) continue
Continuing.

Breakpoint 1, dispatch_self_config (connection=<value optimized out>,
    message=0x6136d0, data=<value optimized out>) at dispatcher.c:547
547 in dispatcher.c
(gdb) next
556 in dispatcher.c
(gdb) print (message_uid == uid)
$4 = 0
(gdb) print message_uid
$5 = 140733193389032
(gdb) print uid
$6 = <value optimized out>
(gdb)

Thanks for these details. What's your UID (you can find this out using the 'id' command)?

Could you also install debugging packages for liboobs? See
http://ddebs.ubuntu.com/pool/main/libo/liboobs/

Then, please run 'gdb users-admin' and type:
break oobs-selfconfig.c:87
break oobs-selfconfig.c:178
run
next
print priv->uid
print getuid()
continue

Then reproduce the problem, and type
print priv->uid

Asif Youssuff (yoasif) wrote :

my uid is 1000.

asif@asif-laptop:~$ gdb users-admin
GNU gdb (GDB) 7.0.1-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/users-admin...(no debugging symbols found)...done.
(gdb) break oobs-selfconfig.c:87
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (oobs-selfconfig.c:87) pending.
(gdb) break oobs-selfconfig.c:178
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 2 (oobs-selfconfig.c:178) pending.
(gdb) run
Starting program: /usr/bin/users-admin
[Thread debugging using libthread_db enabled]

(users-admin:7931): atk-bridge-WARNING **: AT_SPI_REGISTRY was not started at session startup.

(users-admin:7931): atk-bridge-WARNING **: IOR not set.

(users-admin:7931): atk-bridge-WARNING **: Could not locate registry

Breakpoint 1, oobs_self_config_init (config=0x6d7410) at oobs-selfconfig.c:87
87 oobs-selfconfig.c: No such file or directory.
 in oobs-selfconfig.c
(gdb) next
89 in oobs-selfconfig.c
(gdb) print priv->uid
Cannot access memory at address 0x0
(gdb) print getuid()
$1 = 1000
(gdb) continue
Continuing.

(users-admin:7931): Liboobs-WARNING **: There was an unknown error communicating asynchronously with the backends: Malformed message was sent

Breakpoint 2, oobs_self_config_commit (object=0x6d7410)
    at oobs-selfconfig.c:178
178 in oobs-selfconfig.c
(gdb) print priv->uid
$2 = 1000
(gdb) continue
Continuing.

(users-admin:7931): Liboobs-WARNING **: There was an unknown error communicating with the backends: Malformed message was sent

Thanks again. Seems to be fine here, but it's tricky to debug with missing source, the first error about address 0x0 must come from "next" not working due to that. Shouldn't really matter, though.

So I'm running a little out of ideas now. It can come from a D-Bus issue, likely in conjunction with 64bits arch.
Yet another try, again on the backend side:
sudo killall system-tools-backends
sudo gdb /usr/sbin/system-tools-backends
break dispatcher.c:547
print dbus_message_get_args (message, NULL, DBUS_TYPE_UINT32, &message_uid, DBUS_TYPE_INVALID)
print message_uid
continue
[reproduce problem]
print dbus_message_get_args (message, NULL, DBUS_TYPE_UINT32, &message_uid, DBUS_TYPE_INVALID)
print message_uid

Another question: you say the second time you try without closing users-admin, it works. But the gdb trace from above shows that the very same issue occurs. Can you confirm the name is actually changed, or is it simply that no error is reported?

After that, if I don't find the issue I'll try to test this myself on a 64 bits CPU.

Asif Youssuff (yoasif) wrote :

The second time I try to change my name, it still doesn't work -- I changed the name the second time and reopened users admin, my previous name still appeared.

The instructions you gave last don't seem to be doing much:

Reading symbols from /usr/sbin/system-tools-backends...Reading symbols from /usr/lib/debug/usr/sbin/system-tools-backends...done.
(no debugging symbols found)...done.
(gdb) break dispatcher.c:547
Breakpoint 1 at 0x40431f: file dispatcher.c, line 547.
(gdb) print dbus_message_get_args (message, NULL, DBUS_TYPE_UINT32, &message_uid, DBUS_TYPE_INVALID)
No symbol "message" in current context.
(gdb) print message_uid
No symbol "message_uid" in current context.
(gdb) continue
The program is not being run.
(gdb)

Am I missing a step (loading users-admin) here? :)

Yeah, by "reproduce the problem" I meant starting users-admin. But don't worry, I think I've found the problem. The UID we found out thanks to your debugging was 140733193389032, whose hexadecimal representation is 0x7FFF000003E8: if you only keep the lowest 8 bytes, you get 0x3E8, which is 1000 in decimal. So that means the code is wrong and doesn't work on 64 bits CPUs: garbage appears on the second half of the number.

Looking at the code in liboobs, I could check that this part is the only one which doesn't copy the UID/GID to a guint32 before passing it to dbus_message_append_args(). Instead, it passes directly an uid_t integer, which is likely to be only 32 bits on every architecture. These games with integer types are quite complex!

Much thanks for your help, I'll try to check on a 64 bits machine that this fix actually works, and push it before we release the next version. Please continue testing the gnome-system-tools in Lucid to get them as bug-free as we can!

affects: gnome-system-tools (Ubuntu) → liboobs (Ubuntu)
Changed in liboobs (Ubuntu):
status: Incomplete → Triaged
Changed in liboobs:
status: New → Confirmed

I've a possible fix in my PPA, in the system-tools-backends. Could you install my package from
https://launchpad.net/~nalimilan/+archive/ppa/+files/system-tools-backends_2.9.2-0ubuntu1+ppa0_amd64.deb when it's ready (in about 2h), and test if that works?

Asif Youssuff (yoasif) wrote :

Sorry to report that it is still broken with the debug package -- this doesn't replace the system-tools-backends package, right?

Yes, that's what it should do - else you haven't installed it... :-)

You can check that by running apt-cache policy system-tools-backends.

Asif Youssuff (yoasif) wrote :

It seems like I have them both installed --

asif@asif-laptop:~$ apt-cache policy system-tools-backends
system-tools-backends:
  Installed: 2.9.2-0ubuntu1
  Candidate: 2.9.2-0ubuntu1
  Version table:
 *** 2.9.2-0ubuntu1 0
        500 http://us.archive.ubuntu.com lucid/main Packages
        100 /var/lib/dpkg/status
asif@asif-laptop:~$ apt-cache policy system-tools-backends-dbgsym
system-tools-backends-dbgsym:
  Installed: 2.9.2-0ubuntu1
  Candidate: 2.9.2-0ubuntu1
  Version table:
 *** 2.9.2-0ubuntu1 0
        100 /var/lib/dpkg/status

Not, that means you have the official version installed only... ;-)

Are you sure you opened my PPA package with GDebi and correctly installed it? You may remove the -dbgsym package before if that causes problems. Also, instead of running GDebi on my package, you can call 'sudo dpkg -i PATH_TO_FILE'.

Asif Youssuff (yoasif) wrote :

asif@asif-laptop:~/Downloads$ apt-cache policy system-tools-backendssystem-tools-backends:
  Installed: 2.9.2-0ubuntu1+ppa0
  Candidate: 2.9.2-0ubuntu1+ppa0
  Version table:
 *** 2.9.2-0ubuntu1+ppa0 0
        100 /var/lib/dpkg/status
     2.9.2-0ubuntu1 0
        500 http://us.archive.ubuntu.com lucid/main Packages

Not fixed in this version, sadly.

Hmm, be sure to restart the system-tools-backends by rebooting your computer after installing the package and before testing.

If you've already done this and that doesn't work, please install this fixed liboobs package too, reboot and retry:
https://launchpad.net/~nalimilan/+archive/ppa/+build/1559161/+files/liboobs-1-4_2.29.91-0ubuntu1+ppa0_amd64.deb

Thanks for your time!

Asif Youssuff (yoasif) wrote :

Success!

Rebooting and using your patched system-tools-backends works without a hitch. I can change my name without any errors, and change it to the same name, and reopening users-admin shows the correct name if I changed it previously.

Great work, thanks a ton!

Cool. Thanks for your help debugging that!

This fix will be released upstream with 2.10.0, in about 10 days. I've also committed the changes to liboobs, to be sure we don't run in similar issues later.

Please continue to test Lucid, and especially the gnome-system-tools!

affects: liboobs (Ubuntu) → system-tools-backends (Ubuntu)
Changed in system-tools-backends:
status: New → Fix Committed
Changed in liboobs:
status: Confirmed → Invalid
summary: - Changing the long name in users-admin to the same name results in an
- error
+ Crash in SelfConfig on amd64
816_8055 (816-8055) wrote :

why is 2.10.0 still not released ?

Are you in a hurry? I said "in about 10 days", and I'm going to release it tonight, so that will make 15 days, which is the same from the POV of Lucid inclusion. The only requirement is to be here for GNOME 2.30, which is released this week, and it's better to wait for testers to report bugs instead of having to wait for another released to get the fixes.

Changed in system-tools-backends:
status: Fix Committed → Fix Released
Changed in system-tools-backends (Ubuntu):
status: Triaged → Fix Released
Fred (eldmannen+launchpad) wrote :

Running system-tools-backends 2.10.0-2 on on Maverick 10.04 alpha 3.
I confirm this as fixed.

Still affecting me on Ubuntu 10.04 64, updated today.

Changed in system-tools-backends (Ubuntu Lucid):
status: New → Fix Committed

Accepted system-tools-backends into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Martin Pitt (pitti) wrote :

Any testers of the lucid-proposed package? As this has been in -proposed for nearly three months, I'll remove the proposed package soon if there is no feedback. Thank you!

Charlie Kravetz (charlie-tca) wrote :

I attempted to verify this using a fresh installation of Xubuntu 10.04, fully updated, in VirtualBox. I followed the steps in the original report above to reproduce error saying: The configuration could not be saved. I then installed -proposed and added the system-tools-backends. I restarted and reproduced the error following the same steps.

tags: added: verification-failed
removed: verification-needed
Marc Deslauriers (mdeslaur) wrote :

I was able to successfully verify the package in -proposed.

I started with a Lucid VM with the latest released updates. When following the steps in the original report, I got the error message. After updating to the package in -proposed and rebooting, I could now edit and save the user successfully.

@Charlie: Did you reboot after updating the package? The system-tools-backends daemon was probably still running...

tags: added: verification-done
removed: verification-failed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-tools-backends - 2.9.4-0ubuntu1.1

---------------
system-tools-backends (2.9.4-0ubuntu1.1) lucid-proposed; urgency=low

  * debian/patches/03-lp616682.patch: backport fixes from 2.10.0 to fix
    various issues (LP: #616682):
    - Fix crash on authentication error (LP: #534154)
    - Fix crash due to wrong int size with SelfConfig (LP: #533870)
    - Identify users and groups by login instead of UID (LP: #542183)
    - Major performance improvements when committing groups (LP: #546873)
 -- Marc Deslauriers <email address hidden> Mon, 06 Dec 2010 09:19:18 -0500

Changed in system-tools-backends (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers