FedoraForum.org - Fedora Support Forums and Community
Results 1 to 10 of 10
  1. #1
    dave_t Guest

    sshd segfault after yum update

    My FC4 box has been running happily for months. But yesterday I did a yum -y update, and this morning, I can't ssh into it any more. Closer inspection shows that sshd has a segmentation fault when it tries to start:
    Code:
    [dave@blue ~]$ sudo /etc/init.d/sshd status
    sshd is stopped
    [dave@blue ~]$ sudo /etc/init.d/sshd restart
    Stopping sshd:                                             [FAILED]
    Starting sshd: /etc/init.d/sshd: line 100:  2965 Segmentation fault      $SSHD $OPTIONS
                                                               [FAILED]
    [dave@blue ~]$
    I checked my yum log and sure enough, it changed a few things yesterday, relating to ssh:
    Code:
    [dave@blue ~]$ tail --lines=20 /var/log/yum.log
    Jan 19 17:53:42 Updated: openoffice.org-math.i386 1:2.0.1.1-5.1
    Jan 19 17:53:44 Updated: libpcap.i386 14:0.8.3-14.FC4
    Jan 19 17:53:46 Updated: autofs.i386 1:4.1.4-15
    Jan 28 14:48:09 Updated: openssh.i386 4.2p1-fc4.10
    Jan 28 14:48:17 Updated: httpd.i386 2.0.54-10.3
    Jan 28 14:48:18 Updated: info.i386 4.8-8.fc4.1
    Jan 28 14:48:28 Updated: hal.i386 0.5.2-2.fc4.1
    Jan 28 14:48:43 Updated: ImageMagick.i386 6.2.2.0-3.fc4.1
    Jan 28 14:48:44 Updated: flex.i386 2.5.4a-36.fc4
    Jan 28 14:48:46 Updated: openssh-server.i386 4.2p1-fc4.10
    Jan 28 14:48:49 Updated: system-config-soundcard.noarch 1.2.12-4.FC4
    Jan 28 14:48:50 Updated: openssh-clients.i386 4.2p1-fc4.10
    Jan 28 14:49:01 Updated: httpd-manual.i386 2.0.54-10.3
    Jan 28 14:49:05 Updated: logwatch.noarch 7.0-2.fc4
    Jan 28 14:49:05 Updated: mod_ssl.i386 1:2.0.54-10.3
    Jan 28 14:49:06 Updated: openssh-askpass.i386 4.2p1-fc4.10
    Jan 28 14:49:06 Updated: SDL.i386 1.2.8-4
    Jan 28 14:49:08 Updated: texinfo.i386 4.8-8.fc4.1
    Jan 28 14:49:09 Updated: openssh-askpass-gnome.i386 4.2p1-fc4.10
    Jan 28 14:49:09 Updated: dhclient.i386 10:3.0.2-30.FC4
    [dave@blue ~]$
    I also noticed (and this may be unrelated) that the samba server name has changed when i look at my windows shares. Any idea what's happened - anyone else had the same problems?

    Dave

  2. #2
    Join Date
    Nov 2004
    Location
    Mississippi, USA
    Posts
    1,180
    What happens if you manually start sshd from the command line? (/usr/sbin/sshd)

  3. #3
    dave_t Guest
    Doesn't work that way either. Just seems to return, no error messages, nothing. Then when I check sshd status, its not running.
    Code:
    [dave@blue ~]$ sudo /usr/sbin/sshd -d -e
    [dave@blue ~]$ sudo /etc/init.d/sshd status
    sshd is stopped
    [dave@blue ~]$

  4. #4
    Join Date
    Nov 2004
    Location
    Mississippi, USA
    Posts
    1,180
    Weird. I've applied the same rpm updates you did and I've seen no problems. Run "strace /usr/sbin/sshd" and see where it's failing inside sshd.

  5. #5
    dave_t Guest
    Ok, i get this: (sorry for large post)
    Code:
    [dave@blue ~]$ sudo strace /usr/sbin/sshd
    ...
    ...
    ...
    open("/lib/libcrypto.so.5", O_RDONLY)   = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\302\36"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=1089068, ...}) = 0
    old_mmap(NULL, 1101412, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x18d000
    old_mmap(0x285000, 73728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf8000) = 0x285000
    old_mmap(0x297000, 11876, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x297000
    close(3)                                = 0
    open("/lib/libutil.so.1", O_RDONLY)     = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260L8\000"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=15080, ...}) = 0
    old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f4b000
    old_mmap(NULL, 12432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x73b000
    old_mmap(0x73d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x73d000
    close(3)                                = 0
    open("/usr/lib/libz.so.1", O_RDONLY)    = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\226"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=75568, ...}) = 0
    old_mmap(NULL, 76940, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x124000
    old_mmap(0x136000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x136000
    close(3)                                = 0
    open("/lib/libnsl.so.1", O_RDONLY)      = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\265\21"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=96960, ...}) = 0
    old_mmap(NULL, 88064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xc9a000
    old_mmap(0xcac000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0xcac000
    old_mmap(0xcae000, 6144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xcae000
    close(3)                                = 0
    open("/lib/libcrypt.so.1", O_RDONLY)    = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\247"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=27660, ...}) = 0
    old_mmap(NULL, 184604, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4d7000
    old_mmap(0x4dc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x4dc000
    old_mmap(0x4de000, 155932, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4de000
    close(3)                                = 0
    open("/usr/lib/libgssapi_krb5.so.2", O_RDONLY) = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\360"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=99660, ...}) = 0
    old_mmap(NULL, 96684, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x158000
    old_mmap(0x16f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x16f000
    close(3)                                = 0
    open("/usr/lib/libkrb5.so.3", O_RDONLY) = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\365-\000"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=465204, ...}) = 0
    old_mmap(NULL, 466416, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb06000
    old_mmap(0xb75000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6e000) = 0xb75000
    close(3)                                = 0
    open("/usr/lib/libk5crypto.so.3", O_RDONLY) = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300u4\000"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=149028, ...}) = 0
    old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f4a000
    old_mmap(NULL, 146912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x70b000
    old_mmap(0x72e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23000) = 0x72e000
    close(3)                                = 0
    open("/usr/lib/libkrb5support.so.0", O_RDONLY) = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@y\337\000"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=10724, ...}) = 0
    old_mmap(NULL, 12092, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xa08000
    old_mmap(0xa0a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xa0a000
    close(3)                                = 0
    open("/lib/libcom_err.so.2", O_RDONLY)  = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p)\337\000"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=7836, ...}) = 0
    old_mmap(NULL, 9348, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x31e000
    old_mmap(0x320000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x320000
    close(3)                                = 0
    open("/lib/libc.so.6", O_RDONLY)        = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\212Na\000"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=1485672, ...}) = 0
    old_mmap(NULL, 1215452, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x347000
    old_mmap(0x46a000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x123000) = 0x46a000
    old_mmap(0x46e000, 7132, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x46e000
    close(3)                                = 0
    open("/lib/libaudit.so.0", O_RDONLY)    = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\302"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0755, st_size=59224, ...}) = 0
    old_mmap(NULL, 56616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x137000
    old_mmap(0x141000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x141000
    close(3)                                = 0
    old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f49000
    old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f48000
    set_thread_area({entry_number:-1 -> 6, base_addr:0xb7f486c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
    mprotect(0x46a000, 8192, PROT_READ)     = 0
    mprotect(0x4dc000, 4096, PROT_READ)     = 0
    mprotect(0xcac000, 4096, PROT_READ)     = 0
    mprotect(0x73d000, 4096, PROT_READ)     = 0
    mprotect(0x120000, 4096, PROT_READ)     = 0
    mprotect(0x6c4000, 4096, PROT_READ)     = 0
    mprotect(0x18b000, 4096, PROT_READ)     = 0
    munmap(0xb7f4d000, 49941)               = 0
    access("/etc/selinux/", F_OK)           = 0
    brk(0)                                  = 0x88a7000
    brk(0x88c8000)                          = 0x88c8000
    open("/etc/selinux/config", O_RDONLY|O_LARGEFILE) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=448, ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f59000
    read(3, "# This file controls the state o"..., 4096) = 448
    close(3)                                = 0
    munmap(0xb7f59000, 4096)                = 0
    open("/proc/mounts", O_RDONLY|O_LARGEFILE) = 3
    fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f59000
    read(3, "rootfs / rootfs rw 0 0\n/dev /dev"..., 1024) = 457
    close(3)                                = 0
    munmap(0xb7f59000, 4096)                = 0
    geteuid32()                             = 0
    setgroups32(0, [])                      = 0
    getpid()                                = 5873
    open("/proc/5873/fd", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
    fstat64(3, {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0
    fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
    getdents64(3, /* 6 entries */, 1024)    = 144
    getdents64(3, /* 0 entries */, 1024)    = 0
    close(3)                                = 0
    open("/dev/urandom", O_RDONLY|O_NONBLOCK|O_NOCTTY) = 3
    fstat64(3, {st_mode=S_IFCHR|0444, st_rdev=makedev(1, 9), ...}) = 0
    poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 10) = 1
    read(3, "\317q\271\302L{:\36\310G\355 \233g\222w\20:\242\230\213"..., 32) = 32
    close(3)                                = 0
    getuid32()                              = 0
    time(NULL)                              = 1138563214
    open("/etc/ssh/sshd_config", O_RDONLY|O_LARGEFILE) = 3
    fstat64(3, {st_mode=S_IFREG|0600, st_size=3122, ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f59000
    read(3, "#\t$OpenBSD: sshd_config,v 1.72 2"..., 4096) = 3122
    read(3, "", 4096)                       = 0
    close(3)                                = 0
    munmap(0xb7f59000, 4096)                = 0
    socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 3
    connect(3, {sa_family=AF_INET6, sin6_port=htons(22), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
    getsockname(3, {sa_family=AF_INET6, sin6_port=htons(32771), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
    close(3)                                = 0
    socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
    connect(3, {sa_family=AF_INET, sin_port=htons(22), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
    getsockname(3, {sa_family=AF_INET, sin_port=htons(32771), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
    close(3)                                = 0
    --- SIGSEGV (Segmentation fault) @ 0 (0) ---
    +++ killed by SIGSEGV +++
    [dave@blue ~]$
    I've no idea what this means i'm afraid.

  6. #6
    Join Date
    Nov 2004
    Location
    Mississippi, USA
    Posts
    1,180
    Okay, the trace pretty much tracks with mine up until the segv. At the point where yours crashes, mine opens /etc/ssh/ssh_host_key. Does that file exist? You may need to generate a new host key if the existing host key has become corrupted somehow. (I'm speculating now, but it's worth a shot.)

  7. #7
    dave_t Guest
    Ok, i'll give that a shot soon. Currently my wife is hogging the computer playing glines while chatting on the phone (as she does!). Cheers for the help anyway. Dave

  8. #8
    dave_t Guest
    I did what you suggested, and recreated the key (moved the old one), then next time i started sshd, it said it was creating a new key. Then segfault again
    Code:
    [dave@blue ~]$ sudo mv /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.old
    [dave@blue ~]$ sudo /etc/init.d/sshd status
    sshd is stopped
    [dave@blue ~]$ sudo /etc/init.d/sshd start
    Generating SSH1 RSA host key:                              [  OK  ]
    Starting sshd: /etc/init.d/sshd: line 100:  3057 Segmentation fault      $SSHD $OPTIONS
                                                               [FAILED]
    [dave@blue ~]$
    Is there any way to use yum to downgrade to a previous version of sshd?

    P.S. I think the debian people may be having this problem too: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=349526
    Last edited by dave_t; 30th January 2006 at 07:29 PM.

  9. #9
    Join Date
    Nov 2004
    Location
    Mississippi, USA
    Posts
    1,180
    I'm not sitting at my Fedora machine right now (it's at home; I'm at work), but you might try recreating all your host keys in /etc/ssh, not just the ssh1 key. They're named something like ssh_host_dsa_key, ssh_host_rsa_key and so on. Again, it's a longshot, but it's easier than a package downgrade.

    I'm not sure how to coerce yum into downgrading. You'll probably just have to grab the older version package from Fedora and use the rpm command to remove the newer version (rpm -e) followed by an install of the downgraded version (rpm -i).

  10. #10
    dave_t Guest
    Well, I eventually got round to fixing the problem. Just needed to reinstall my sshd - must have got corrupted somehow. Fix was as follows.

    Code:
    $ wget http://www.mirror.ac.uk/mirror/fedora.redhat.com/updates/4/i386/openssh-server-4.2p1-fc4.10.i386.rpm
    $ sudo rpm --install --replacepkgs openssh-server-4.2p1-fc4.10.i386.rpm
    $ sudo /etc/init.d/sshd start
    After that it all worked fine.

Similar Threads

  1. sshd segfault on Fedora 10
    By jdeslip in forum Using Fedora
    Replies: 6
    Last Post: 9th December 2008, 01:23 AM
  2. Replies: 9
    Last Post: 28th March 2008, 06:37 AM
  3. MPD Segfault
    By Bslagowski in forum Using Fedora
    Replies: 10
    Last Post: 18th February 2008, 05:50 AM

Tags for this Thread

Posting Permissions

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