lftp seems to be broken when compiled againt the newest libreadline. if lftp is compiled manually using the --with-included-readline ./configure option lftp works without any problems. Reproducible: Always Steps to Reproduce: 1. Use lftp to access a ftp site 2. use tab completion a few times with mirror/get Actual Results: Segmentation fault Expected Results: No Segmentation fault Nothing special, bug can be reproduced on many diffrent gentoo instalations.
I can't reproduce this problem. lftp-3.0.12 against readline-5.0-r1 works just fine with tab completion. try different lftp version (say, current stable is 3.0.9) and see if that segfaults or not for you. Also, can you provide a gdb backtrace so we can see what is causing the segfault?
works fine overhere on x86 - lftp 3.0.12 + readline 5.0-r1
I had this problem. This is a known problem and is fixed in the next version of lftp. Please see http://www.mail-archive.com/lftp%40uniyar.ac.ru/msg01819.html for the patch. Contact me if you need help applying the patch in the ebuild. Was going post it, but figured the next rev of lftp with the problem fixed is due out soon.
3.0.12-r1 added with patch described in comment 3 (Thanks Jeffery). Thomas I hope this fixes your fault otherwise can you provide a backtrace and reopen this bug.
Thanks Jeffrey that did fix it. The reason i though libreadline was the curlpit was that gdb said the crash occurred in a function loaded from libreadline.so. Oh well, Thanks again.
I seem to be having the exact same problem with net-ftp/lftp-3.0.13, but only on x86 and not on hppa. strace doesn't reveal much, though: --------------------------------------------------------------- read(4, 0x81147e8, 65536) = -1 EAGAIN (Resource temporarily unavailable) read(4, 0x81147e8, 65536) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=4, events=POLLIN}], 1, 18) = 0 gettimeofday({1122845009, 635815}, NULL) = 0 read(4, 0x81147e8, 65536) = -1 EAGAIN (Resource temporarily unavailable) read(4, 0x81147e8, 65536) = -1 EAGAIN (Resource temporarily unavailable) --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ ---------------------------------------------------------------
Do the unstable version lftp-3.1.4 and lftp-3.2.1 work for you? I so I'll move them to stable k? To debug SEGV's properly use gdb - http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap2
(In reply to comment #7) Gosh, that was quick! :) > Do the unstable version lftp-3.1.4 and lftp-3.2.1 work for you? I so I'll move > them to stable k? Currently merging net-ftp/lftp-3.2.1... > To debug SEGV's properly use gdb - > http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap2 I'll do that.
Created attachment 64829 [details] Backtrace from dbg
That first backtrace concerns: jeroen@henke ~ $ lftp --version LFTP | Version 3.2.1 | Copyright (c) 1996-2005 Alexander V. Lukyanov LFTP is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for LFTP. See COPYING for details. Send bug reports and questions to <lftp@uniyar.ac.ru>. Libraries used: Readline 5.0, Expat 1.95.8, GnuTLS 1.2.3
Created attachment 64831 [details] Backtrace from lftp 3.0.13
Created attachment 64835 [details] Obligatory emerge info (i686, lftp 3.0.13)
Created attachment 64836 [details] Obligatory emerge info (i586, lftp 3.2.1)
The tabbing segfault occurs as well with these versions of lftp: henke ~ # qlop -l lftp | grep -o '>>>.*' | sort | uniq ... >>> net-ftp/lftp-3.3.0 >>> net-ftp/lftp-3.3.3 >>> net-ftp/lftp-3.3.4 For instance: jeroen@epia ~ $ lftpkernel cd ok, cwd=/pub/linux/kernel lftp ftp.kernel.org:/pub/linux/kernel> cd / lftp ftp.kernel.org:/> cd pub/linux/kernel/peSegmentation fault jeroen@epia ~ $ So what exactly has been resolved/fixed?
Same with 3.3.4-r1.
Oops.
Interesting to note that in debug mode, lftp crashes a lot less (race condition?). Assuming remote-completion is the problem, I tried to do without (using 3.3.4-r1): ---------- jeroen@epia ~ $ lftp -v LFTP | Version 3.3.4 | Copyright (c) 1996-2005 Alexander V. Lukyanov LFTP is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for LFTP. See COPYING for details. Send bug reports and questions to <lftp@uniyar.ac.ru>. Libraries used: Readline 5.0, Expat 1.95.8, GnuTLS 1.2.3 jeroen@epia ~ $ lftp ftp://ftp.kernel.org/ cd ok, cwd=/ lftp ftp.kernel.org:/> set cmd:remote-completion false lftp ftp.kernel.org:/> cd /<<TAB>>lftp: complete.cc:832: char** lftp_completion (const char*, int, int): Assertion `generator' failed. Aborted jeroen@epia ~ $ ---------- Seems like I can't even turn it off to prevent segfaults.
*** Bug 95958 has been marked as a duplicate of this bug. ***
I finally bit the bullet and went --with-included-readline Sorry it took so long. I'm stuborn in a bad way sometimes.
details - this is included in 3.4.0. Thanks for everyones help.
3.4.0-r1 reverts to using system readline-5.1 as it doesn't break it- thanks Peter Kerwien
(In reply to comment #21) > 3.4.0-r1 reverts to using system readline-5.1 as it doesn't break it- thanks > Peter Kerwien Breaks for me... Same [tab][tab]SEGFAULT problem as before, while 3.4.0 was the first version in a long time that didn't exhibit the bug. Shall we just stick with the --with-included-readline for now? :)
> Breaks for me... Same [tab][tab]SEGFAULT problem as before, while 3.4.0 was the > first version in a long time that didn't exhibit the bug. Shall we just stick > with the --with-included-readline for now? :) > Have you also updated to readline-5.1-r2? I have a bulletproof TAB-sequence that crashed lftp everytime and I also so it disappeared with --with-included-readline but also when upgrading readline from 5.0 to 5.1-r2.
If lftp needs sys-libs/readline-5.1-r2 to get this bug fixed, then >=sys-libs/readline-5.1 should probably be in RDEPEND, which is currently only the case for ppc-macos.
opps should of been RDEPEND=!ppc-macos ( >=readline-5.1 ) sorry. Upgrade readline to >readline-5.1 and you should be good.