FS#23458 - segfault when running sudo (segfault in libpthread)
Attached to Project:
Arch Linux
Opened by Cody Maloney (maloney) - Saturday, 26 March 2011, 19:45 GMT
Last edited by Allan McRae (Allan) - Monday, 18 April 2011, 03:24 GMT
Opened by Cody Maloney (maloney) - Saturday, 26 March 2011, 19:45 GMT
Last edited by Allan McRae (Allan) - Monday, 18 April 2011, 03:24 GMT
|
Details
Description:
Additional info: #uname -a: Linux login 2.6.37-ARCH #1 SMP PREEMPT Fri Mar 25 15:10:00 CET 2011 x86_64 Intel(R) Xeon(R) CPU E3120 @ 3.16GHz GenuineIntel GNU/Linux sudo: 1.8.0-4 glibc: 2.13-4 kernel26: 2.6.37-5 from everything.log: Mar 26 20:47:17 login kernel: sudo[1693]: segfault at 968 ip 00007fe1f63c38d0 sp 00007fffd3298c30 error 4 in libpthread-2.13.so[7fe1f63be000+17000] Steps to reproduce: Do a system upgrade Try running any command under sudo. ('sudo -s', 'sudo top', 'sudo pacman -Syu') Let me know if any other info would be useful to attach and I'll provide it. |
This task depends upon
Closed by Allan McRae (Allan)
Monday, 18 April 2011, 03:24 GMT
Reason for closing: None
Additional comments about closing: Resolved by submitter
Monday, 18 April 2011, 03:24 GMT
Reason for closing: None
Additional comments about closing: Resolved by submitter
sudo: 1.7.4.p6-1
glibc: 2.13-1
kernel26: 2.6.37-5
# gdb --args sudo -s
GNU gdb (GDB) 7.2
Copyright (C) 2010 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-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/sudo...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/sudo -s
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
(gdb) bt
Target is executing.
(gdb) q
A debugging session is active.
Inferior 1 [process 2073] will be killed.
Quit anyway? (y or n) y
Based on basic googling of the error I tried:
LD_PRELOAD=/lib/libpthread.so.0 gdb --args sudo -s
GNU gdb (GDB) 7.2
Copyright (C) 2010 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-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/sudo...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/sudo -s
[Thread debugging using libthread_db enabled]
[root@login sysadmin]#
But that doesn't really add anything more useful...
I'm still trying to figure out why that call to dlopen is failing (And why it only happens on the path of a non-root user calling sudo with a program to execute. sudo -l works...).
Writing a simple script and running it as the user sudo is being executed under dlopen works just fine, and for all the other programs on my system the pam_unix module seems to be working just fine.
I'm going to keep searching for the explanation, although I have am struggling to come up with a reason why dlopen is segfaulting in this particular case...
On the broken machine I had a custom nss-mysql package installed. With older versions of sudo, it worked fine, but after an upgrade it was segfaulting. We (The sysadmin team I'm on), changed to using ldap instead of mysql with the package in the archlinux repositories and, after removing the mysql line from the nss config, sudo stopped segfaulting. The segfaulting had started occuring in several other coreutils programs as well. Suffice to say, I have no machine to test this on anymore, and it doesn't look like the issue occured for anyone else, so please close.
Sorry for the slow response.