Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi. I'm having issues with the 'su' command resulting in a segmentation fault. This started yesterday after installing some system updates with portage (I use Gentoo).
Code:
[henry in ~ at 23:35:27]: su
Segmentation fault
I've tried running, recompiling and/or installing the following packages, all to no avail:
# These settings were set by the catalyst build script that automatically built$
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
PORTDIR_OVERLAY=/usr/local/portage
PORT_LOGDIR=/var/log/portage
And my system specs are:
Pentium 4 @ 1400 MHz
I've posted this thread on the Gentoo Linux foroum also, but nobody there has been able to solve my problem yet, so I thought I'd try here.
Since this forum is really, really ghey, I can't post an actual link to that thread, so you'll have to do some copy and pasting.
The link to the thread on Gentoo's forum is forums.gentoo.org/viewtopic.php?p=1903442#1903442
Please help. Thanks.
Try re-emerging coreutils and sudo if you have that installed.
I show su being apart of the following packages:
Searching for /bin/su in * ...
app-admin/sudo-1.6.7_p5-r2
sys-apps/daemontools-0.76-r4
sys-apps/shadow-4.0.6
sys-apps/coreutils-5.2.1-r2
Unless you use qmail I imagine you don't even have daemontools installed. Sudo might not be installed either, obviously if it isn't then it isn't the problem.
You said you already redid shadow so that can't be it, but you definitely have coreutils installed so maybe it is the culprit.
Another good idea is to do an etcat -b /bin/su to see if it shows up in any other packages you have on your system.
Looks like sudo is installed. I'll try re-emerging it now.
Code:
[henry in ~ at 23:00:21]: sudo etcat -b /bin/su
Searching for /bin/su in * ...
app-admin/sudo-1.6.7_p5-r2
sys-apps/shadow-4.0.5-r2
sys-apps/coreutils-5.2.1
If yes, open the core file in gdb and get a stack trace with the where command. It will identify where the segfault is occuring. Even with debugging turned off you should get some sort of trace.
if you don't get a core file then I'd suggest removing the -O adding a -g to the CPP flags and recompile. Run su in gdb and when it crashes you'll have a stack trace.
Well done winword10. You have posted 10 times, but only 5 of them count. In future, think before posting. Just because you want to have enough posts to create a clickable link does not mean you should wreck other people's posts. Great start to the forum.
Thanks XavierP. Glad to see you're as enthusiastic as I am, although it does just break me that only 5 of those posts count. That matters to me. Actually, I'm honored to have emanated such a productive, helpful response. From obtrusive anti-spam policies to contemptuous moderators, this forum has really done its share to welcome my question, and I can only hope to return the favor with my first impressions.
So what, you believe yourself to be a revolutionary? Yeeesh. If you don't like the rules (which you have agreed to) and you don't like the moderators (contemptuous? you are the contemptuous one), why on earth did you go through with the sign up?
I'm wondering that myself. My question isn't getting answered, and my thread has turned from a simple, harmless question into a dispute over 5 posts that mostly said things along the lines of "my favorite color is blue," not exactly "wrecking" those posts by any stretch of the imagination. That's what private messages are for buddy. What a waste of time this has been. Hopefully your demeanor will convince others in my situation to seek help elsewhere.
Yea, I saw the strace on the gentoo forums, but strace only traces out system calls and does not show anything definitive.
An internal stack trace given in either a core file or a running program via gdb will show every internal method call in the su program. After looking at the stack trace there, it would point to a spot in the source code to start investigating.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.