Results 1 to 18 of 18

Thread: csh segmentation fault

  1. #1
    Join Date
    May 2008
    Posts
    7

    csh segmentation fault

    After install DA on FreeBSD 7.0, csh does not work, it return error: segmentation fault.

    Some DA users have same problem:
    http://www.bsdforums.org/forums/show...threadid=58772

  2. #2
    Join Date
    Jun 2003
    Posts
    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.
    leadQC.com -- Lead verification system for scrubbing bogus leads and sign-ups.

  3. #3
    Join Date
    May 2008
    Posts
    7
    DA (custombuild by default) installed on fresh FreeBSD 7.0 system.

  4. #4
    Join Date
    May 2006
    Location
    United Kingdom
    Posts
    261
    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

  5. #5
    Join Date
    May 2008
    Posts
    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

  6. #6
    Join Date
    May 2008
    Posts
    7
    Work for me:

    Code:
    pkg_add -r -f libiconv

  7. #7
    Join Date
    Aug 2005
    Location
    Auckland, New Zealand
    Posts
    122

    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

    Anyhow, all is good now, lucky it's just a backup dns server
    Barry Murphy
    Technical Director
    http://www.vibecommunications.co.nz

  8. #8
    Join Date
    Apr 2006
    Location
    Thailand
    Posts
    200
    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

  9. #9
    Join Date
    Apr 2006
    Location
    Thailand
    Posts
    200
    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

  10. #10
    Join Date
    Jun 2003
    Posts
    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 by bjseiler; 07-15-2008 at 07:42 AM.
    leadQC.com -- Lead verification system for scrubbing bogus leads and sign-ups.

  11. #11
    Join Date
    Jun 2003
    Posts
    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?
    leadQC.com -- Lead verification system for scrubbing bogus leads and sign-ups.

  12. #12
    Join Date
    Jul 2005
    Posts
    2,008
    If you forgot the root password no you cannot go into root without knowing the password. Unless you had sudo setup.

  13. #13
    Join Date
    Jun 2003
    Posts
    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.
    leadQC.com -- Lead verification system for scrubbing bogus leads and sign-ups.

  14. #14
    Join Date
    Jul 2005
    Posts
    2,008
    Do this:

    su - root -c /bin/sh

  15. #15
    Join Date
    Jun 2003
    Posts
    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.
    leadQC.com -- Lead verification system for scrubbing bogus leads and sign-ups.

  16. #16
    Join Date
    Mar 2006
    Posts
    148
    I am surprised it hasn't been mentioned to install and use something like BASH instead. Solves the problem for me.

  17. #17
    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

  18. #18
    Join Date
    Sep 2004
    Posts
    137
    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.

Similar Threads

  1. Segmentation fault (11)
    By sergiu in forum CentOS
    Replies: 1
    Last Post: 07-02-2012, 02:54 PM
  2. segmentation fault
    By martexx in forum System-Level Technical Discussion
    Replies: 3
    Last Post: 09-19-2011, 08:53 AM
  3. Segmentation fault
    By elbarto in forum General Technical Discussion & Troubleshooting
    Replies: 5
    Last Post: 01-06-2010, 10:00 AM
  4. Segmentation fault
    By klassik in forum DirectAdmin Version Updates
    Replies: 2
    Last Post: 07-16-2008, 11:18 AM
  5. Segmentation fault, Help
    By hci in forum General Technical Discussion & Troubleshooting
    Replies: 2
    Last Post: 08-12-2006, 06:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •