Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43694 - vi segfaults or nothing happens.
Summary: vi segfaults or nothing happens.
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Vim Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-04 02:00 UTC by Erik Ridderby
Modified: 2005-01-05 01:00 UTC (History)
0 users

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


Attachments
Mail from ciaranm@gentoo.org and answer. (bug43694_mail,1.24 KB, text/plain)
2004-03-05 02:03 UTC, Erik Ridderby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Ridderby 2004-03-04 02:00:48 UTC
I have recently installed gentoo and got the 2004.0 version.  I followed the installation-manual. Kernel used are development-sources version 2.6.4-rc1. and I try to run VI 3.7-r4.

When I tried to open /var/log/emerge.log vi allways got segmentaion-fault. I got the seg-fault message and the scrolling in the window was changed to "one-page, no scroll".

I remerged vi just in case. Now nothin happens. Not a tiny little nothing. No errors, no signs, no changes to the window is made.

I would say that vi does not work at all :(

Regards
Erik Ridderby


Reproducible: Always
Steps to Reproduce:
1. vi
2. <nothin happens>
3. 

Actual Results:  
Nothing.

Expected Results:  
vi would open the file or with an empty file.

emerge info
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.4-rc1)
=================================================================
System uname: 2.6.4-rc1 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 1.70GHz
Gentoo Base System version 1.4.3.13
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=pentium4 -funroll-loops -pipe -fomit-frame-pointer"
CHOST="i486-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -mcpu=pentium4 -funroll-loops -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://212.219.247.10/sites/www.ibiblio.org/gentoo/
rsync://trumpetti.atm.tut.fi/gentoo/
http://212.219.247.14/sites/www.ibiblio.org/gentoo/
http://212.219.247.19/sites/www.ibiblio.org/gentoo/
http://212.219.247.16/sites/www.ibiblio.org/gentoo/
http://212.219.247.13/sites/www.ibiblio.org/gentoo/
ftp://ftp.uninett.no/pub/linux/Gentoo ftp://mirror.pudas.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa apm arts avi berkdb cdr crypt cups dga dvd emacs encode esd evo
foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 imlib java jpeg kde libg++
libwww lirc mad mikmod motif mozilla mpeg msn ncurses nls oggvorbis opengl oscar
oss pam pda pdflib perl png python qt quicktime readline sdl slang spell ssl
svga tcltk tcpd tiff truetype unicode usb x86 xml2 xmms xv yahoo zlib"



emerge -sv vi
<cut some stuff>
  app-editors/vi
      Latest version available: 3.7-r4
      Latest version installed: 3.7-r4
      Size of downloaded files: 211 kB
      Homepage:    http://ex-vi.berlios.de/
      Description: The original VI package
      License:     Caldera

<cut some more>
Comment 1 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2004-03-04 13:34:28 UTC
I can't replicate this problem having done the identical steps as this person
Comment 2 Ciaran McCreesh 2004-03-04 14:00:12 UTC
Can you reproduce with CFLAGS="-O2 -pipe -fomit-frame-pointer"?
Comment 3 Erik Ridderby 2004-03-05 02:03:32 UTC
Created attachment 26885 [details]
Mail from ciaranm@gentoo.org and answer.

I was asked to recompile with:
CFLAGS="-O2 -pipe -fomit-frame-pointer"

which made no differens.

The installation I have was made during 28/2-1/3-2004, the same time as the new
gentoo 2004.0 was distributed, wich I was not aware of by the time. I had som
VERY strange problems with this during the installatin though.
Comment 4 Sven-Olaf Hilmer 2004-03-09 10:06:36 UTC
I have the same Problem with 'vi'. I've installed gentoo with stage 1 v 1.4. since I emerged the 2.6.4-rc1 kernel vi crahes.

I have found that vi crashes if the file size is greater than 8192 chars. 
Comment 5 Erik Ridderby 2004-03-09 22:55:58 UTC
I tried the following:
# emerge -puD vi
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild  N    ] sys-kernel/linux-headers-2.4.21

and its obviusly so that vi needs the kernel 2.4-headers. 

So I emerged them but vi still fails :( Then I emerged vi again to recompile but it dint help either.
Comment 6 Aron Griffis (RETIRED) gentoo-dev 2004-03-10 06:12:00 UTC
I'm running a 2.6 kernel and can run "vi /usr/bin/vi" with no problems on x86.  This is bad because it means it's all your fault...  No, no, just kidding :-)  It's just bad because it means I can't easily reproduce.

Here are a couple things for you to try that would be helpful to me:
(1) Build with CFLAGS="-O0 -ggdb" FEATURES="nostrip"
(2) Test to make sure it still breaks
(3) Run under the debugger to get a stack trace:
       $ gdb /usr/bin/vi
       (gdb) run /usr/bin/vi               # will run "vi /usr/bin/vi"
       *** should segfault ***
       (gdb) where
       *** should provide a backtrace ***

Also try the binary at http://gentoo.org/~agriffis/vi.works to see if that one breaks for you too.  It's built with CHOST=i386-pc-linux-gnu so it should work on all x86 platforms.
Comment 7 Erik Ridderby 2004-03-10 07:15:14 UTC
Hi!

I compiled with: 

CFLAGS="-O2 -pipe -fomit-frame-pointer -ggdb"
FEATURES="ccache"

Program received signal SIGSEGV, Segmentation fault.
0x08050092 in getchar ()
(gdb) where
#0  0x08050092 in getchar ()
#1  0x400ee020 in lseek () from /lib/libc.so.6
#2  0x00000004 in ?? ()
#3  0x0804fb5e in getchar ()
#4  0x00000065 in ?? ()
#5  0xbfff60cc in ?? ()
#6  0x00000065 in ?? ()
#7  0x0804fb55 in getchar ()
#8  0x00000306 in ?? ()
(gdb) quit
The program is running.  Exit anyway? (y or n) y


Acording to the instructions:
CFLAGS="-O0 -ggdb"
FEATURES="nostrip"

(gdb) file /usr/bin/vi
Reading symbols from /usr/bin/vi...(no debugging symbols found)...done.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) set args /var/log/emerge.log
(gdb) run
Starting program: /usr/bin/vi /var/log/emerge.log
"/var/log/emerge.log" found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x08050856 in getchar ()
(gdb) where
#0  0x08050856 in getchar ()
#1  0x080505ed in getchar ()
#2  0x0804abd1 in ?? ()
#3  0x00000065 in ?? ()
#4  0x0000001b in ?? ()
#5  0xbfff6108 in ?? ()
#6  0x0804abc3 in ?? ()
(gdb)

The vi.working DO realy work nice on the same environment. Maby this is due to problems in the libraries? I have succeeded with a 

Hope this can help you!

Note: I have not made an emerge sync for a period. Maby that might help (or spoil the chances to trace the bug.


// Erik

Comment 8 Markus Cserna 2004-07-03 02:03:45 UTC
I've had the same problem yesterday that vim stopped working after a kernel upgrade from 2.6.6 to 2.6.7 (strange?). I did not recompile or upgrade vim in this period, after booting it just always crashed with a segmentation fault.

After fiddling around with gdb, I tried to recompile vim a few times, with no result. But after setting my CFLAGS to "" and recompiling vim, it finally works now without crashing on me.

Before: CFLAGS="-Os -march=athlon-xp -funroll-loops -fomit-frame-pointer"
After: CFLAGS=""

I am not sure which of these flags caused the problem, but I can investigate further if it's still needed.

Regards,
Markus
Comment 9 fbusse 2004-07-17 01:26:33 UTC
My vim also started segfaulting after I updated my kernel-headers to 2.6.7 (symlink to /usr/src/linux/include/linux). vim built with 2.4-headers works fine, vim with 2.6-headers segfaults.
I need the 2.6 headers for kwifimanager and wireless-tools compatibility (different wireless.h version).
Any idea how to fix this? 
Why does vim use kernel-headers anyway?
Comment 10 Ciaran McCreesh 2004-07-17 07:33:31 UTC
The vim segfaults are an entirely different issue. If you can reproduce them reliably using headers and a kernel which are actually in portage, please file a new bug.
Comment 11 Ghislain Bourgeois 2004-11-05 21:07:33 UTC
Maybe that's not related, but your CHOST is set to 486 but you have a pentium 4, so it should be 686... Don't know if it will change many thigs, but it wouldn't do any harm.

Hysteric
Comment 12 Ciaran McCreesh 2005-01-05 01:00:08 UTC
Closing as WORKSFORME, since I can't trigger it. Please reopen if anyone tracks it down and makes a patch.