csh segmentation fault

Did you install it on a fresh FreeBSD 7 system or did you upgrade a system to 7? I had this happen on a system that I updated to 7 but it was my own fault. When I went through the mergemaster process I messed something up and there were merged lines with comments in the files. After eventually figuring that out after struggling to just get logged in (because the shell was dying) it all worked fine.
 
DA (custombuild by default) installed on fresh FreeBSD 7.0 system.
 
We had the same problem with FreeBSD 7, but one of our sys admins managed to repair it. Unfortunatly i cannot tell you how we did it, but this is a snippit of a email we got from John:
My only guess as to the cause of the shell segfault during the setup.sh would be when libssl and libssl-dev wouldbe installed, if csh is using them.
To avoid that (if it's the cause) the solutin would be to install them ahead of time with pkg_add, eg:

pkg_add -r openssl
pkg_add -r libssl
pkg_add -r libssl-dev

that's just a guess though.

Thank you,

John
 
When i try login into system as user(root) with csh shell, system display welcome message and request login and password again and again.

Messages in /var/log/messages:
May 5 00:35:55 res kernel: pid 2241 (csh), uid 0: exited on signal 11
 
same

Well, I just installed my second freebsd 7 system with DA, the first one I had no issues and all is working fine, however this one, when I login as root I get the same segfault error.

I've since booted to single user mode, mounted all the partitions and done a 'chsh root' to change the shell to /bin/sh rather than /bin/csh

All is good now; though makes me wonder why the first install went all fine but this one aint :confused:

Anyhow, all is good now, lucky it's just a backup dns server :)
 
Test it today with fresh FreeBSD 7.0 with latest portstree
After install DA (custombuild) on FreeBSD 7.0 csh will cause segfault on new root login (After login, core dump, then back to login prompt again)

I have fix by reinstall tcsh from port (get version 6.12)

I will try these fix next time
Code:
pkg_add -r -f libiconv

Code:
pkg_add -r openssl
pkg_add -r libssl
pkg_add -r libssl-dev
 
Confirmed that reinstall libiconv will solved the problem :)

Code:
#cd /usr/ports/converters/libiconv
#make deinstall reinstall clean

or

Code:
#pkg_add -r -f libiconv

:)
 
I'm not sure if this has worked for everyone else, but for me, it did not work -

#cd /usr/ports/converters/libiconv
#make deinstall reinstall clean

(to clarify, I ran the above while I was logged in as root. It was not until I rebooted that it would not let me get back in.)
 
Last edited:
I have a user in the wheel group with /bin/sh. Is there any way for me to run

chsh root

Or edit /etc/passwd without having to go to the data center and booting into single user mode?
 
If you forgot the root password no you cannot go into root without knowing the password. Unless you had sudo setup.
 
I didn't forget the root password. I just can not su - to root because root is set for csh and csh is seg faulting.....so it is impossible for me, unless somebody has some other idea (please), for me to do anything as root until I go back to the data center and from single user mode change root's default shell.
 
Thanks for the help! That did not exactly work for me (still seg faulted) but it helped me think about su so I checked the man pages and su -m did get me into root without seg faulting.
 
I am surprised it hasn't been mentioned to install and use something like BASH instead. Solves the problem for me.
 
Update:

I've added this code to the doIconv() function to preempt any compiling of iconv. This will install the port instead which should "in theory" prevent csh from crashing, thus moving DA for FreeBSD7 into "beta". Since there have not been many other issues, this beta won't take too long and should be considered stable soon.
Code:
	if [ "${OS}" = "FreeBSD" ] && [ "`echo $OS_VER | cut -d. -f1`" -ge 7 ]; then
		pkg_add -r http://files.directadmin.com/services/packages-7-stable/Latest/libiconv.tbz
		ldconfig
		return;
	fi
John
 
Shouldn't that be

Code:
	if [ "${OS}" = "FreeBSD" ] && [ "`echo $OS_VER | cut -d. -f1`" -ge 7 ]; then
		make clean install -C /usr/ports/converters/libiconv
		ldconfig
		return;
	fi

to actually build it from ports and not install a precompiled version. I'm sure I'm not the only one who installs the ports tree @ server installation and does a ports update before installing anything else.

Also, this could be used for proftpd, for example, as well.
 
Back
Top