csh segmentation fault

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
197
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.
 

soslan

Verified User
Joined
May 4, 2008
Messages
7
DA (custombuild by default) installed on fresh FreeBSD 7.0 system.
 

iceuk626

Verified User
Joined
May 6, 2006
Messages
261
Location
United Kingdom
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
 

soslan

Verified User
Joined
May 4, 2008
Messages
7
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
 

icepick

Verified User
Joined
Aug 19, 2005
Messages
122
Location
Auckland, New Zealand
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 :)
 

kke

Verified User
Joined
Apr 4, 2006
Messages
202
Location
Thailand
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
 

kke

Verified User
Joined
Apr 4, 2006
Messages
202
Location
Thailand
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
:)
 

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
197
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:

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
197
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?
 

chatwizrd

Verified User
Joined
Jul 3, 2005
Messages
2,007
If you forgot the root password no you cannot go into root without knowing the password. Unless you had sudo setup.
 

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
197
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.
 

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
197
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.
 

labrocca

Verified User
Joined
Mar 12, 2006
Messages
151
I am surprised it hasn't been mentioned to install and use something like BASH instead. Solves the problem for me.
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,904
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
 

Invader Zim

Verified User
Joined
Sep 4, 2004
Messages
152
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.
 
Top