First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 95958
Alias:
Product:
Component:
Status: RESOLVED
Resolution: DUPLICATE of bug 74815
Assigned To: Daniel Black <dragonheart@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Peter Kerwien <peter@kerwien.homeip.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 95958 depends on: Show dependency tree
Bug 95958 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-06-13 04:14 0000
When tabbing in lftp to fill in the rest of the pathnames, it sometimes 
segmentation faults.

Not of any help, but it looks like this:

lftp user@ftpserver:/> cd download/FreeBSD/freebsd-5.3-amd64/Segmentation fault


Reproducible: Sometimes
Steps to Reproduce:
1. Using tab in lftp while moving between directories
2.
3.

Actual Results:  
It crashed due to segmentation fault.


System uname: 2.6.11.7 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Jun  9 2005, 23:11:28)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share
/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/shar
e/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://mirror.pudas.net/gentoo 
http://trumpetti.atm.tut.fi/gentoo http://gentoo.inode.at/ 
ftp://ftp.linux.ee/pub/gentoo/distfiles/ ftp://gentoo.inode.at/source/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X apache2 arts avi berkdb bitmap-fonts cdr crypt cups curl emboss 
encode esd fam flac foomaticdb fortran gd gdbm gif gpm gtk gtk2 imagemagick 
imap imlib java jpeg kde libg++ libwww mad maildir mikmod motif mozilla mp3 
mpeg mysql ncurses nls nptl nptlonly ogg oggvorbis opengl oss pam pdflib perl 
png python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd tiff 
truetype truetype-fonts type1-fonts vorbis xml2 xmms xv zlib userland_GNU 
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, 
PORTDIR_OVERLAY

------- Comment #1 From Peter Kerwien 2005-06-14 08:14:41 0000 -------
Can this be related to the upgrade of readline to readline-5.0-r2?

------- Comment #2 From Peter Kerwien 2005-06-14 12:05:54 0000 -------
Here is what I got from the core dump:

peter@server1 ~ $ gdb /usr/bin/lftp core
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB 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.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(no debugging symbols found)...Using host libthread_db library "/lib/libthread_d
                            b.so.1".

Core was generated by `lftp'.
Program terminated with signal 11, Segmentation fault.

warning: current_sos: Can't read pathname for load map: Input/output error

Reading symbols from /lib/libreadline.so.5...(no debugging symbols found)...
done.
Loaded symbols for /lib/libreadline.so.5
Reading symbols from /usr/lib/libssl.so.0.9.7...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libssl.so.0.9.7
Reading symbols from /usr/lib/libcrypto.so.0.9.7...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.7
Reading symbols from /usr/lib/libexpat.so.0...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libexpat.so.0
Reading symbols from /lib/libutil.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/libncurses.so.5...(no debugging symbols found)...
done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
---Type <return> to continue, or q <return> to quit---
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libgcc_s.
                            so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libgcc_s.so
                            .1
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libgpm.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgpm.so.1
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/gconv/ISO8859-1.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/gconv/ISO8859-1.so
#0  0xb7fc4f9e in rl_redisplay () from /lib/libreadline.so.5
(gdb) bt
#0  0xb7fc4f9e in rl_redisplay () from /lib/libreadline.so.5
(gdb)

------- Comment #3 From Daniel Black 2005-06-14 14:22:30 0000 -------
I was going to to a version bump and see if that fixed it. 3.1.4 and 3.2.1 are 
available. 
 
Just getting odd QA errors that I don't know whats causing it: 
DEPEND.badindev                5 
   net-ftp/lftp/lftp-3.1.4.ebuild: ~ppc-macos(default-darwin/macos/10.3) 
['sys-apps/shadow'] 
   net-ftp/lftp/lftp-3.0.13.ebuild: ~ppc-macos(default-darwin/macos/10.3) 
['sys-apps/shadow'] 
 
You could be right with readline though 

------- Comment #4 From Daniel Black 2005-06-18 23:47:50 0000 -------
3.1.4 and 3.2.1 added. hopely fixed in one of those versions. please confirm. 

------- Comment #5 From Peter Kerwien 2005-06-19 01:53:46 0000 -------
I have now tested both lftp-3.1.4 and lftp-3.2.1. Both crashed in exactly the
same way as 3.1.3.

------- Comment #6 From Jeffrey Litvin 2005-06-19 08:34:56 0000 -------
I cannot reproduce this.  I remember this was a problem in an older version.
Can
you give me steps on a public ftp server and let me know which version of
readline you are using?

------- Comment #7 From Peter Kerwien 2005-06-19 09:34:11 0000 -------
How to reproduce: Log in anonymous to ftp.sunet.se. Type the following key
sequence when using the cd command:

"p TAB L TAB k TAB . TAB s TAB"

Hopefully you will get a segfault:

> lftp
lftp :~> open ftp.sunet.se
lftp ftp.sunet.se:~> cd pub/Linux/kernel.org/sSegmentation fault
> 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, OpenSSL 0.9.7e 25 Oct 2004

I'm having readline-5.0-r2 installed.

------- Comment #8 From Jeffrey Litvin 2005-06-19 11:14:29 0000 -------
I cannot reproduce this.

> lftp
@:~-> open ftp.sunet.se
@ftp.sunet.se:~-> cd pub/Linux/kernel.org/software/                            
                                admin/  benchmark/  devel/  editors/  graphics/
 libs/  network/  scm/  utils/  web/
@ftp.sunet.se:~-> cd pub/Linux/kernel.org/software/

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, OpenSSL 0.9.7e 25 Oct 2004



------- Comment #9 From Peter Kerwien 2005-06-20 20:56:55 0000 -------
Maybe I forgot one TAB in the sequence. Try this:

"p TAB L TAB k TAB . TAB s TAB TAB"

------- Comment #10 From Jeffrey Litvin 2005-06-21 06:17:35 0000 -------
Hitting tab again is what I did and pasted you above (it prints out all valid
directories as expected).

------- Comment #11 From Peter Kerwien 2005-06-23 14:41:30 0000 -------
I'm a complete n00b regarding debugging with gdb, but I recompiled
readline-5.0-r2 with -g and used FEATURES=nostrip and managed to extract this
information:

...
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libgcc_s.so.1...done.
Loaded symbols for /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libgpm.so.1...done.
Loaded symbols for /lib/libgpm.so.1
---Type <return> to continue, or q <return> to quit---
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
Loaded symbols for /usr/lib/gconv/ISO8859-1.so
#0  0xb7fc1f94 in rl_redisplay () at ../display.c:622

warning: Source file is more recent than executable.

622           inv_lbreaks[++newlines] = temp;
(gdb) frame 0
#0  0xb7fc1f94 in rl_redisplay () at ../display.c:622
622           inv_lbreaks[++newlines] = temp;
(gdb) info locals
in = 134827929
out = 82
c = -1073746028
linenum = 128
cursor_linenum = 128
line = 0x81815a0 ""
c_pos = -1
inv_botlin = 0
lb_botlin = -1208134664
lb_linenum = -1073745624
newlines = 179064
lpos = 82
temp = 0
modmark = 0
n0 = 0
num = 0
prompt_this_line = 0xb7fd8f00 "pub/Linux/kernel.org: Getting directory contents
(0) [Making data connection...]> "
wc = 135153428
wc_bytes = 128
wc_width = 135432776
ps = {__count = 135153428, __value = {__wch = 134863090, __wchb = "

------- Comment #12 From Peter Kerwien 2005-06-23 14:41:30 0000 -------
I'm a complete n00b regarding debugging with gdb, but I recompiled
readline-5.0-r2 with -g and used FEATURES=nostrip and managed to extract this
information:

...
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libgcc_s.so.1...done.
Loaded symbols for /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libgpm.so.1...done.
Loaded symbols for /lib/libgpm.so.1
---Type <return> to continue, or q <return> to quit---
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
Loaded symbols for /usr/lib/gconv/ISO8859-1.so
#0  0xb7fc1f94 in rl_redisplay () at ../display.c:622

warning: Source file is more recent than executable.

622           inv_lbreaks[++newlines] = temp;
(gdb) frame 0
#0  0xb7fc1f94 in rl_redisplay () at ../display.c:622
622           inv_lbreaks[++newlines] = temp;
(gdb) info locals
in = 134827929
out = 82
c = -1073746028
linenum = 128
cursor_linenum = 128
line = 0x81815a0 ""
c_pos = -1
inv_botlin = 0
lb_botlin = -1208134664
lb_linenum = -1073745624
newlines = 179064
lpos = 82
temp = 0
modmark = 0
n0 = 0
num = 0
prompt_this_line = 0xb7fd8f00 "pub/Linux/kernel.org: Getting directory contents
(0) [Making data connection...]> "
wc = 135153428
wc_bytes = 128
wc_width = 135432776
ps = {__count = 135153428, __value = {__wch = 134863090, __wchb = "òØ\t\b"}}
_rl_wrapped_multicolumn = 0
(gdb) Quit

If I downgrade readline to readline-4.3-r5 the problem disappear for me.

------- Comment #13 From Peter Kerwien 2005-06-25 01:53:15 0000 -------
It also segfaults on my amd64 system when I use readline-5.0-r2.

It depends on the terminal width if lftp segfaults while tabbing or not, smaller
column => crashes with shorter directory paths.

------- Comment #14 From Lars Wendler (Polynomial-C) 2005-07-03 08:59:47 0000 -------
Hi,

I'm also affected by this crash. I encountered this with lftp-3.2.1 on a ~x86 box

Poly

------- Comment #15 From Peter Kerwien 2005-09-21 13:50:52 0000 -------
Any news on this problem?

------- Comment #16 From Jeroen Roovers 2005-09-26 11:51:29 0000 -------
(In reply to comment #14)
> Any news on this problem?

lftp-3.3.0 also segfaults, on x86.

------- Comment #17 From Jeroen Roovers 2005-09-26 16:06:40 0000 -------
(In reply to comment #15)

> lftp-3.3.0 also segfaults, on x86.

Same on hppa, with sys-libs/readline-5.0-r2 on both systems.

------- Comment #18 From Daniel Black 2005-09-27 13:49:12 0000 -------
pushed upstream: 
These lists are archived at 
   http://www.mail-archive.com/lftp%40uniyar.ac.ru/ 
   http://www.mail-archive.com/lftp-devel%40uniyar.ac.ru/ 
 
I didn't do a full look of the archives so If someone finds a good solution 
there please tell me. 

------- Comment #19 From Jeroen Roovers 2005-09-27 14:32:59 0000 -------
user@host ~ $ lftp ftp://ftp.kernel.org/

...

lftp ftp.kernel.org:/> cd pub/linux/kernel/people/ch[R][TAB]
chris/  christoph/  chrisw/  chuyee/
lftp ftp.kernel.org:/> cd pub/linux/kernel/people/chris[/][TAB]
chris/  christoph/  chrisw/
---> CWD /pub/linux/kernel/people/chris
<--- 250 Directory successfully changed.
---> PASV
<--- 227 Entering Passive Mode (204,152,191,5,214,235)
---- Connecting data socket to (204.152.191.5) port 55019
---- Data connection established
---> LIST
<--- 150 Here comes the directory listing.
<--- 226 Directory send OK.
---- Got EOF on data connection
---- Closing data socket
---> CWD /pub/linux/kernel/people/chris/hdlc
<--- 250 Directory successfully changed.
---> PASV
<--- 227 Entering Passive Mode (204,152,191,5,182,32)
---- Connecting data socket to (204.152.191.5) port 46624
---- Data connection established
---> LIST
<--- 150 Here comes the directory listing.
<--- 226 Directory send OK.
Segmentation fault
user@host ~ $

------- Comment #20 From Jeroen Roovers 2005-09-27 14:35:56 0000 -------
Er, sorry. I ought to explain, I had set debug 9 on the lftp command line too, 
hence all the extra output. Apparently the problem occurs perhaps not while or 
because of tabbing, but during lftp's look through some directories.

------- Comment #21 From Jeffrey Litvin 2005-09-27 14:59:59 0000 -------
Jer:

I cannot reproduce your problem.  No seg faults... and tab completing works just
perfectly.

lftp -version:
LFTP | Version 3.3.0 | 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, OpenSSL 0.9.7e 25 Oct 2004

------- Comment #22 From Jeroen Roovers 2005-09-27 15:14:55 0000 -------
Jeffrey Litvin: I really don't see why you would want to mention three times 
that you cannot reproduce the problem. How is that helpful without either asking 
for or offering more specific information?

And don't tell me you tried to replicate my exact keystrokes; that's not what 
this is about. Sometimes I need 20 or 30 tabs to "reproduce" the segfault, 
sometimes the first one does it. In that respect the problem is random, but that 
try with 'debug 9' might have shown that the problem does not occur at the 
readline level at all, but much deeper in the code that retrieves directory 
listings /during/ one of these tabbing exercises...


------------------------------------
henke ~ # lftp --version
LFTP | Version 3.3.0 | 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
------------------------------------

------- Comment #23 From Jeffrey Litvin 2005-09-27 15:30:01 0000 -------
Jer:

Well if it was reproducable, that would tell us something and we could figure
out your problem.  Since its not, its helpful in that it tells us nothing and we
are back to square one and still dont even know if this is a direct lftp
releated problem at all.

------- Comment #24 From Lars Wendler (Polynomial-C) 2005-09-27 18:08:43 0000 -------
Hi,

after reading your small dispute here I tried to reproduce the segfault and was
able to reproduce it with the very first try. I logged into ftp://ftp.kernel.org
and "tabbed" into /pub/linux/kernel/ when lftp-3.3.0 was segfaulting. I also
have sys-libs/readline-5.0-r2 installed currently. I have no clue why you can't
reproduce it Jeffrey but believe me, I would rather prefer to have your
situation of not being able to reproduce the segfault :-/

Greetz 
Poly

------- Comment #25 From Jeroen Roovers 2005-09-27 23:31:40 0000 -------
(In reply to comment #22)
> Jer:
> 
> Well if it was reproducable, that would tell us something and we could figure
> out your problem.  Since its not, its helpful in that it tells us nothing and 
we
> are back to square one and still dont even know if this is a direct lftp
> releated problem at all.

The bug *is* reproducable, but occurs randomly, so there's no fixed recipe. 
Maybe you're just not trying hard enough?

------- Comment #26 From Lars Wendler (Polynomial-C) 2005-10-26 15:57:52 0000 -------
Hi,
it's still reproduceable with lftp-3.3.3 (not in portage currently but I created
my own ebuild from 3.3.0-ebuild). I hope someone will find a fix for this as
it's veeery annoying.

Greetz
Poly

------- Comment #27 From Daniel Black 2005-10-26 16:31:20 0000 -------
I've this bug to the author's mailist and got no response. I suggest you 
report it there as well. 

------- Comment #28 From Dmitrii Tisnek 2005-12-12 07:20:20 0000 -------
Default build lftp-3.0.13 +nls -socks5 +ssl crashes for me as described. Crash 
happens when the line (host+path+'Getting directory entries (or some such)') 
gets longer than $COLUMNS. That is spill on the next line appears to trigger the 
crash.


I would propose using ./configure --with-included-readline, which does not crash 
for me.

------- Comment #29 From Lars Wendler (Polynomial-C) 2005-12-16 13:00:57 0000 -------
Hi,

--with-included-readline seems to work for me. I couldn't reproduce the crashes
after compiling lftp with this option. Devs please consider to include this
option into the next ebuild of lftp.

Greetz
Poly

------- Comment #30 From Daniel Black 2006-01-05 02:03:36 0000 -------

*** This bug has been marked as a duplicate of 74815 ***

First Last Prev Next    No search results available      Search page      Enter new bug