Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145550 - sshd login fails to open a pty
Summary: sshd login fails to open a pty
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 145667
Blocks:
  Show dependency tree
 
Reported: 2006-08-29 22:18 UTC by Felix Finch
Modified: 2006-09-15 14:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
cat /proc/mounts (att1,471 bytes, text/plain)
2006-08-30 09:03 UTC, Felix Finch
Details
emerge net-misc/openssh-4.3_p2-r2 (att2,133.04 KB, text/plain)
2006-08-30 09:08 UTC, Felix Finch
Details
/usr/sbin/sshd -eddd output (sshd-eddd,16.40 KB, text/plain)
2006-08-30 09:54 UTC, Felix Finch
Details
strace output from sshd -d -D (sshd-strace,202.30 KB, text/plain)
2006-08-30 09:55 UTC, Felix Finch
Details
ldd output from /usr/sbin/sshd (sshd-ldd,2.56 KB, text/plain)
2006-08-30 09:55 UTC, Felix Finch
Details
config log file from emerge (openssh.log,474.00 KB, text/plain)
2006-08-30 13:32 UTC, Felix Finch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Finch 2006-08-29 22:18:43 UTC
For starters, I have been asking on the forums with lots of help, but no solution in sight.  That's the URL provided.  I won't duplicate all that info here.

Basically, I have three machines.  I can sshd into the ~amd64 machine and the x86 machines.  The ~x86 machine fails due to sshd failing to open a pty.  It tries 1664 variations on /dev/pty*.  All three machines have /dev/ptmx and /dev/pts/*.

Here are the kernel and glibc and openssh versions:

~x86 (fails): sys-libs/glibc-2.4-r3, net-misc/openssh-4.3_p2-r2, sys-kernel/gentoo-sources-2.6.17-r6.

~amd64 (works): sys-libs/glibc-2.4-r3, net-misc/openssh-4.3_p2-r2, sys-kernel/gentoo-sources-2.6.17-r6.

x86 (works): sys-libs/glibc-2.3.6-r4, net-misc/openssh-4.3_p2-r1, sys-kernel/gentoo-sources-2.6.17-r4.I am more than willing to run sshd under gdb, but I don't know what to look for.  Besides, it seems like there should be some more basic way to figure this out.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-08-30 01:52:53 UTC
Reopen w/ emerge --info output from the broken box.
Comment 2 Felix Finch 2006-08-30 07:53:32 UTC
# emerge --info
Portage 2.1.1_rc1-r1 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.17-gentoo-r6 i686)
=================================================================
System uname: 2.6.17-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 3.06GHz
Gentoo Base System version 1.12.4
Last Sync: Mon, 28 Aug 2006 18:30:01 +0000
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.4.3-r2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/lib/postgresql/data /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="af ar az bg bn br bs ca cs cy da de el en_GB eo es et eu fa fi fr fy ga gl he hi hr hu is it ja km ko lt lv mk mn ms nb nds nl nn pa pl pt pt_BR ro ru rw se sk sl sr sr@Latn ss sv ta tg tr uk uz zh_CN zh_TW"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X Xaw3d a52 aac aalib accessibility acpi afs aim alsa amd anthy apache2 apm arts audiofile avi bash-completion bcmath berkdb bidi bitmap-fonts blas bluetooth bonobo bzip2 calendar canna cdb cdparanoia cdr chasen cjk cli crypt ctype cups curl curlwrappers dba dbm dbus dbx dga dio directfb dlloader doc dri dts dv dvb dvd dvdr dvdread eds elibc_glibc emacs emacs-w3 emboss encode esd ethereal evo examples exif expat fam fastcgi fbcon ffmpeg flac flash flatfile fontconfig foomaticdb fortran freetds freewnn ftp gb gcj gd gdbm geoip ggi gif ginac glut gmp gnome gnustep gnutls gphoto2 gpm gps gstreamer gtk gtk2 gtkhtml guile hal haskell iconv icq idn ieee1394 imagemagick imap imlib inifile innodb input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog jabber jack java javascript jbig jpeg jpeg2k junit kde kernel_linux ladcca lapack lash lcms ldap leim libcaca libg++ libgda libwww linguas_af linguas_ar linguas_az linguas_bg linguas_bn linguas_br linguas_bs linguas_ca linguas_cs linguas_cy linguas_da linguas_de linguas_el linguas_en_GB linguas_eo linguas_es linguas_et linguas_eu linguas_fa linguas_fi linguas_fr linguas_fy linguas_ga linguas_gl linguas_he linguas_hi linguas_hr linguas_hu linguas_is linguas_it linguas_ja linguas_km linguas_ko linguas_lt linguas_lv linguas_mk linguas_mn linguas_ms linguas_nb linguas_nds linguas_nl linguas_nn linguas_pa linguas_pl linguas_pt linguas_pt_BR linguas_ro linguas_ru linguas_rw linguas_se linguas_sk linguas_sl linguas_sr linguas_sr@Latn linguas_ss linguas_sv linguas_ta linguas_tg linguas_tr linguas_uk linguas_uz linguas_zh_CN linguas_zh_TW lirc lm_sensors lua m17n-lib mad maildir mailwrapper mcal mikmod mime ming mmap mmx mng mono motif mozilla mp3 mpeg mpi msession msn mysql mysqli nas ncurses nis nls nptl nptlonly nsplugin ocaml odbc offensive ofx ogg oggvorbis openal opengl oscar oss pam pcmcia pcre pda pdf pdflib perl php plotutils png portaudio posix postgres ppds pppd python qdbm qt qt3 qt4 quicktime readline recode reflection ruby samba sasl scanner sdl session sharedext sharedmem shorten simplexml slang slp sndfile snmp soap sockets socks5 sox speex spell spf spl sql sqlite sqlite3 sse sse2 ssl stroke svg svga sysvipc tcltk tcpd tetex theora threads tiff tokenizer truetype truetype-fonts type1-fonts udev unicode usb userland_GNU v4l vcd video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo vorbis wddx wifi win32codecs wmf wxwindows xine xinerama xml xml2 xmlrpc xmms xorg xosd xpm xprint xsl xv xvid yahoo yaz zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 SpanKY gentoo-dev 2006-08-30 08:32:20 UTC
post the output of `cat /proc/mounts` and `emerge openssh` and attachments
Comment 4 Felix Finch 2006-08-30 09:03:12 UTC
Created attachment 95488 [details]
cat /proc/mounts
Comment 5 Felix Finch 2006-08-30 09:08:02 UTC
Created attachment 95489 [details]
emerge net-misc/openssh-4.3_p2-r2

The config section (line 300) can't find openpty:

checking for openpty... no
Comment 6 Felix Finch 2006-08-30 09:08:40 UTC
Added attachments for mounts and emerge output
Comment 7 SpanKY gentoo-dev 2006-08-30 09:34:44 UTC
if you stop sshd on the failing machine and run `/usr/sbin/sshd -eddd`, you should get some detailed information when you then try to make a client connection
Comment 8 Felix Finch 2006-08-30 09:54:39 UTC
Created attachment 95493 [details]
/usr/sbin/sshd -eddd output
Comment 9 Felix Finch 2006-08-30 09:55:20 UTC
Created attachment 95494 [details]
strace output from sshd -d -D
Comment 10 Felix Finch 2006-08-30 09:55:50 UTC
Created attachment 95495 [details]
ldd output from /usr/sbin/sshd
Comment 11 Felix Finch 2006-08-30 09:59:34 UTC
It tries a zillion /dev/pty* variants before giving up.  There must be something very basic wrong with my system to not know to look under /dev/pts/*.  Emerging openssh on the working ~amd64 machine shows (line 300) "checking for openpty... yes" as opposed to the failing machine's "no".  I must have screwed up something very simple on this machine.
Comment 12 SpanKY gentoo-dev 2006-08-30 12:52:59 UTC
post the config.log from the /var/tmp/openssh.../ dir after configure is done running
Comment 13 Felix Finch 2006-08-30 13:32:52 UTC
Created attachment 95512 [details]
config log file from emerge
Comment 14 SpanKY gentoo-dev 2006-08-30 17:42:37 UTC
this is your problem:
configure:11760: i686-pc-linux-gnu-gcc -o conftest -march=i686 -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wno-pointer-sign -std=gnu99   conftest.c -lutil  -lz -lnsl  >&5
/var/tmp/portage/openssh-4.3_p2-r2/temp/ccoQNI91.o: In function `main':
conftest.c:(.text+0x12): undefined reference to `login'
collect2: ld returned 1 exit status
configure:11766: $? = 1

you have a libutil screwing up your system ... try running something like:
gcc -print-file-name=libutil.so
gcc -print-file-name=libutil.a

if that doesnt help, you could try:
echo "int main(){}" | gcc -Wl,--verbose -lutil -x c -
Comment 15 Felix Finch 2006-08-30 18:17:42 UTC
Hmmm  equery belongs /usr/lib/libutil.so.0.0.4 says it belongs to app-accessibility/sphinx3-0.6.  Does this mean I should unmerge this package?  I can't even begin to guess why I emerged it; equery depends says nothing depends on it.  A perl script invoking ldd says there are 388 (!) executables linked against it.  I'll double check that, but I am not sure what you think I should do to fix this.

You have been a great help, and I sure do appreciate it.  I hate to be so dumb ... it's not obvious to me what is wrong with libutil or how to solve it.
Comment 16 Felix Finch 2006-08-30 18:59:56 UTC
I tried unmerging sphinks3, and it looks like every KDE program there is links against it.  I also tried re-emerging openssh, in case libutil was hosed and would have been properly regenerated, but no joy, openssh still fails to find openpty during config.
Comment 17 SpanKY gentoo-dev 2006-08-30 19:19:05 UTC
ok, that is def a very very broken package

i will open a new bug so we dont have all this openssh noise to contend with :)
Comment 18 Felix Finch 2006-08-30 19:26:49 UTC
I tried upgrading sysvinit and also get an openpty failure --

i686-pc-linux-gnu-gcc  -o bootlogd bootlogd.o -lutil
i686-pc-linux-gnu-gcc  -o last last.o
bootlogd.o: In function `findpty':
bootlogd.c:(.text+0x520): undefined reference to `openpty'
collect2: ld returned 1 exit status

I bet there are others.

Thanks for all your help.
Comment 19 SpanKY gentoo-dev 2006-08-30 19:35:03 UTC
for people reading this in the future, the new bug is Bug 145667

to fix your system, i would do:
rm /usr/lib/libutil.so* /usr/lib/libutil.la
ln -s /lib/libutil.so /usr/lib/libutil.so

if that doesnt work, you can `emerge -C sphinx3 ; emerge glibc`
Comment 20 Felix Finch 2006-08-30 20:03:26 UTC
Yes, that fixes it.  I remerged openssh and have remote login again, yay!

Thanks heaps.