I am not sure what's broken here (and why). When connecting to vsftpd, I get the following error Response: libgcc_s.so.1 must be installed for pthread_cancel to work Google is not very helpful. Most of the hits suggest that something is broken in toolchain, so I did a complete emerge -e system but I still have the same problem mystical ~ # gcc --print-file-name=libgcc_s.so.1 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_s.so.1 I am not sure what's missing here. I also rebuilt vsftpd but it did not fix it. I suspect some of the NEEDED libraries does not link against libgcc_s (where it should) but I haven't investigated that yet Portage 2.2.0_alpha149 (default/linux/amd64/10.0/developer, gcc-4.6.3, glibc-2.16.0, 3.6.11-gentoo-dark-jedi x86_64) ================================================================= System uname: Linux-3.6.11-gentoo-dark-jedi-x86_64-AMD_Phenom-tm-_II_X6_1055T_Processor-with-gentoo-2.2 Timestamp of tree: Unknown ld GNU ld (GNU Binutils) 2.23.1 app-shells/bash: 4.2_p39-r1 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.3-r3, 3.2.3-r2 dev-util/cmake: 2.8.10.2 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.9.6-r3, 1.11.6, 1.12.6 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.6.3 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.16.0 Repositories: gentoo qt sunrise hwoarang ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /var/bind" CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/mnt/virtual/sources/distfiles/" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs candy collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-elog splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://ftp.cc.uoc.gr/mirrors/linux/gentoo/" LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu,--enable-new-dtags -Wl,--as-needed" MAKEOPTS="-j7" PKGDIR="/mnt/virtual/packages/mystical/" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/home/hwoarang/development/gentoo-cvs/gentoo-x86" PORTDIR_OVERLAY="/home/hwoarang/development/overlays/qt /home/hwoarang/development/overlays/sunrise /home/hwoarang/development/overlays/hwoarang" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 avi branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dga divx dri dts dvd dvdr dvdread emboss encode exif ffmpeg firefox flac fortran gdbm gif glib glitz gmedia gpm iconv ipv6 java jpeg kdrive lcms libnotify mad mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib ncurses nls nptl nsplugin ogg opengl openmp pam pango pcre pdf perl png policykit polkit ppds pppd private-headers python qt3support qt4 readline realmedia sdl session slang snmp spell sqlite sse sse2 ssl startup-notification svg symlink tcpd threads tiff truetype udev udisks unicode upower usb userlocales v4l vcd vdpau vorbis wmp wxwidgets x264 xcb xft xine xinerama xml xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard synaptics mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB en_US el" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTA
make sure: - `ldconfig -p | grep libgcc_s.so.1` shows the lib - /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf contains the right path - /etc/env.d/gcc/x86_64-pc-linux-gnu-4.6.3 has LDPATH set correctly
(In reply to comment #1) > make sure: > - `ldconfig -p | grep libgcc_s.so.1` shows the lib > - /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf contains the right path > - /etc/env.d/gcc/x86_64-pc-linux-gnu-4.6.3 has LDPATH set correctly mystical ~ # ldconfig -p |grep libgcc_s.so.1 libgcc_s.so.1 (libc6,x86-64) => /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_s.so.1 libgcc_s.so.1 (libc6) => /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/32/libgcc_s.so.1 mystical ~ # cat /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/32 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3 mystical ~ # grep LDPATH /etc/env.d/gcc/x86_64-pc-linux-gnu-4.6.3 LDPATH="/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3:/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/32" everything looks good :/
that error message is coming from libpthread itself, and it uses dlopen() to find things. and that uses the same logic as `ldconfig -p`. from the toolchain side, i don't see anything wrong. maybe you're using a chroot and didn't copy libgcc_s.so.1 into it.
(In reply to comment #3) > that error message is coming from libpthread itself, and it uses dlopen() to > find things. and that uses the same logic as `ldconfig -p`. from the > toolchain side, i don't see anything wrong. > > maybe you're using a chroot and didn't copy libgcc_s.so.1 into it. Nope it is not a chroot. It is a normal box that afaik it broken after updating to the latest glibc. The update was too big (around 350+ packages) so glibc may not be responsible for that. I can try and do emerge -e world and see if that fixes it. Although it would be nice to understand what the real problem is
(In reply to comment #4) what i mean is do you have vsftp chrooting into user dirs ? or running in a chroot itself ? this is a very common ftp daemon technique for isolating things a remote user can do.
(In reply to comment #5) > (In reply to comment #4) > > what i mean is do you have vsftp chrooting into user dirs ? or running in a > chroot itself ? this is a very common ftp daemon technique for isolating > things a remote user can do. ah yes I do but I can reproduce a problem in a non-chroot configuration as well. I will have another look to make sure chroot is disabled
(In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > > what i mean is do you have vsftp chrooting into user dirs ? or running in a > > chroot itself ? this is a very common ftp daemon technique for isolating > > things a remote user can do. > > ah yes I do but I can reproduce a problem in a non-chroot configuration as > well. I will have another look to make sure chroot is disabled emerge -e world did not fix it. non-chroot did not fix it as well.
(In reply to comment #7) probably best to find the simplest ftp server setup that hits the issue. like trying running vsftpd by hand in anonymous/foreground mode and see if connections still fail. if so, then try stracing the whole thing (and its children), or throw it into gdb and set follow fork mode to child.
(In reply to comment #8) > (In reply to comment #7) > > probably best to find the simplest ftp server setup that hits the issue. > like trying running vsftpd by hand in anonymous/foreground mode and see if > connections still fail. > > if so, then try stracing the whole thing (and its children), or throw it > into gdb and set follow fork mode to child. Seems like the server breaks when I use the pam_mysql module for user logins using the local MySQL server. Still no time to dig further. A wild guess is that this module does not work with the latest MySQL which also got updated recently.
(In reply to comment #9) > (In reply to comment #8) > > (In reply to comment #7) > > > > probably best to find the simplest ftp server setup that hits the issue. > > like trying running vsftpd by hand in anonymous/foreground mode and see if > > connections still fail. > > > > if so, then try stracing the whole thing (and its children), or throw it > > into gdb and set follow fork mode to child. > > Seems like the server breaks when I use the pam_mysql module for user logins > using the local MySQL server. Still no time to dig further. A wild guess is > that this module does not work with the latest MySQL which also got updated > recently. Indeed, downgrading back to dev-db/mysql-5.1.62-r1 fixes the problem.
You can also emerge a later version of vsftpd which solves the problem too.
i don't think there's a great answer here other than making the respective packages that use chroots deal with it themselves. that can be accomplished by the main program by doing dlopen("libgcc_s.so.1") before it does the chroot.
(In reply to ny wiley from comment #11) > You can also emerge a later version of vsftpd which solves the problem too.