Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 286352 - app-editors/nvi-1.81.6-r2 fails on execution with "unexpected file type or format" for /var/tmp/vi.recover/vi.*
Summary: app-editors/nvi-1.81.6-r2 fails on execution with "unexpected file type or fo...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Harald van Dijk (RETIRED)
Depends on:
Reported: 2009-09-25 02:57 UTC by Max Kresch
Modified: 2010-05-11 23:14 UTC (History)
0 users

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

output of "strace -f -o strace_nvi nvi" (strace_nvi,16.62 KB, text/plain)
2009-09-25 02:58 UTC, Max Kresch

Note You need to log in before you can comment on or make changes to this bug.
Description Max Kresch 2009-09-25 02:57:28 UTC
A few days ago, after performing:

$ emerge -aDNu world
$ emerge --deep --depclean
$ revdep-rebuild
nvi stopped working.  When I try to run the program, instead of getting the text editor I know and love, I receive error messages about /var/tmp/vi.recover and /tmp/vi.*.

Reproducible: Always

Steps to Reproduce:
1.type "vi"

Actual Results:  
$ vi
fop_read_meta: /var/tmp/vi.recover/vi.BD76yy: unexpected file type or format
/var/tmp/vi.recover/vi.BD76yy: Invalid type 5 specified
fop_read_meta: /var/tmp/vi.recover/vi.JuVKFr: unexpected file type or format
/var/tmp/vi.recover/vi.JuVKFr: Invalid type 5 specified
ex/vi: Error: /tmp/vi.pg1gcg: Invalid argument
ex/vi: Error: /tmp/vi.Hd1Qi9: Invalid argument

Expected Results:  
nvi should be launched.  

$ which vi
$ ll /usr/bin/vi
lrwxrwxrwx 1 root root 13 Sep 23 21:44 /usr/bin/vi -> //usr/bin/nvi*

The output of "emerge --info nvi" is given at the bottom of this section.

I have the same problems on my x86 (32 bit) machine after a similar update; however, I've only performed the following on my 64 bit box:

1) I've tried downgrading to 1.81.6-r1 and 1.81.6 with no luck.
2) I've tried removing and/or emptying /var/tmp/vi.recover and also all vi.* files in /tmp -- no luck.  
3) The output of "strace -f -o strace_nvi nvi" is attached. This seems the most promising path forward, but I don't know enough to take it.
4) I tried to use gdb with no luck.  First, I re-emerged using:
$ FEATURES="nostrip" USE="debug" CFLAGS="-01 -pipe -ggdb" CXXFLAGS="-01 -pipe -ggdb" emerge nvi

and then I ran

$ gdb vi
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
(gdb) run
Starting program: /usr/bin/vi 
[Thread debugging using libthread_db enabled]
fop_read_meta: /var/tmp/vi.recover/vi.SGWeAC: unexpected file type or format
/var/tmp/vi.recover/vi.SGWeAC: Invalid type 5 specified
fop_read_meta: /var/tmp/vi.recover/vi.w1blpm: unexpected file type or format
/var/tmp/vi.recover/vi.w1blpm: Invalid type 5 specified
ex/vi: Error: /tmp/vi.surfjn: Invalid argument
ex/vi: Error: /tmp/vi.aJKh86: Invalid argument

Program exited with code 01.
(gdb) quit

$ emerge --info nvi
Portage (default/linux/amd64/2008.0/desktop, gcc-4.4.1, glibc-2.10.1-r0, 2.6.31 x86_64)
                        System Settings
System uname: Linux-2.6.31-x86_64-Intel-R-_Core-TM-2_CPU_T7600_@_2.33GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 25 Sep 2009 02:05:01 +0000
app-shells/bash:     4.0_p33
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r2, 3.1.1-r1
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=athlon64 -O2 -pipe"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dts dvd dvdr eds emboss encode esd evo fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde ldap libnotify mad mikmod mmx modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis x264 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"

                        Package Settings

app-editors/nvi-1.81.6-r2 was built with the following:
USE="(multilib) perl unicode (-tcl)"
CFLAGS="-pipe -ggdb -D_PATH_MSGCAT="\"/usr/share/vi/catalog/\"""
CXXFLAGS="-pipe -ggdb -D_PATH_MSGCAT="\"/usr/share/vi/catalog/\"""
Comment 1 Max Kresch 2009-09-25 02:58:30 UTC
Created attachment 205180 [details]
output of "strace -f -o strace_nvi nvi"
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2009-09-25 05:20:09 UTC
Could you please check which version of db your nvi is using? `ldd /usr/bin/nvi` should be enough.
Comment 3 Max Kresch 2009-09-25 11:28:20 UTC
Sure thing...

$ ldd /usr/bin/nvi =>  (0x00007fff395ff000) => /usr/lib/ (0x00007fa7eeae3000) => /usr/lib/ (0x00007fa7ee7bf000) => /lib/ (0x00007fa7ee5a3000) => /lib/ (0x00007fa7ee38b000) => /lib/ (0x00007fa7ee187000) => /lib/ (0x00007fa7edf04000) => /lib/ (0x00007fa7edccc000) => /lib/ (0x00007fa7edac9000) => /lib/ (0x00007fa7ed76e000) => /lib/ (0x00007fa7ed511000) => /usr/lib/ (0x00007fa7ed19d000)
	/lib64/ (0x00007fa7eed8c000)
Comment 4 Harald van Dijk (RETIRED) gentoo-dev 2009-09-26 08:50:04 UTC
Thanks. I've added a nvi-1.81.6-r3 which makes sure it's linked to db 4.7 or older. I'll keep this bug open because it's not really fixed until nvi is modified to work with 4.8 as well.
Comment 5 Max Kresch 2009-09-26 11:30:08 UTC
1.81.6-r3 works. Thank you! :)
Comment 6 Harald van Dijk (RETIRED) gentoo-dev 2009-10-05 18:58:53 UTC
The short story is that DB 4.8 no longer allows DB_CREATE | DB_TRUNCATE to overwrite existing empty files, and I'm not sure if this is a bug or a feature. Such questions should go to Oracle's DB forum, but registration there requires business name and phone number, personal home address, and the likes. If anyone else wants to make sure DB 4.8 is supported, step right in, but I'm going to leave this forced at DB 4.7 or lower.
Comment 7 Harald van Dijk (RETIRED) gentoo-dev 2010-05-11 23:11:58 UTC
Re-opening to...
Comment 8 Harald van Dijk (RETIRED) gentoo-dev 2010-05-11 23:14:58 UTC
...close this properly, db 4.8.30 reverts to the older behaviour that nvi expects, and that version is now allowed in the nvi ebuild. Thanks to Debian's Sean Finney and Oracle's George Feinberg for seeing to it that this got fixed.