Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 168516 - net-misc/vtun-2.6-r1 segfaults on amd64
Summary: net-misc/vtun-2.6-r1 segfaults on amd64
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-27 00:17 UTC by Thomas Capricelli
Modified: 2009-09-05 19:48 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2007-02-27 00:17:27 UTC
I've nailed it down to :

farfalla etc # /usr/sbin/vtund -n -- farfallafh xx.xx.xx.xx
vtund[9409]: VTun client ver  02/27/2007 started
vtund[9409]: Connecting to 82.225.154.2
vtund[9409]: Session farfallafh[82.225.154.2] opened
vtund[9409]: UDP connection initialized
vtund[9409]: LZO compression[level 9] initialized
vtund[9409]: BlowFish encryption initialized
Segmentation fault


I tried reinstalling the following package to be sure that there are no mismatch between newer libs than at compile time :
     Tue Feb 27 00:56:02 2007 >>> dev-libs/lzo-2.02-r1
     Tue Feb 27 01:08:42 2007 >>> dev-libs/crypto++-5.4-r1
     Tue Feb 27 01:08:53 2007 >>> net-misc/vtun-2.6-r1

I dont know what to do more.

Reproducible: Always




Portage 2.1.2-r10 (default-linux/amd64/2006.1, gcc-4.1.2, glibc-2.5-r0, 2.6.20 x86_64)
=================================================================
System uname: 2.6.20 x86_64 AMD Turion(tm) 64 Mobile Technology MT-32
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 22 Feb 2007 15:50:01 +0000
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.3.6, 2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/"
LINGUAS="en it fr de"
MAKEOPTS="-j 1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage-fh"
SYNC="rsync://82.225.154.2/gentoo-portage"
USE="X a52 aac alsa amd64 arts berkdb bidi bitmap-fonts browserplugin cairo cdda cdio cli cracklib crypt cups dbus dga divx divx4linux dri dts dv dvb dvd dvdread edl encode exif fbcon fbdev ffmpeg flac font-server fortran freetype gdbm gnutls gphoto2 gpm httpd iconv imap innodb ipv6 isdnlog john jpeg kde libg++ live lua mad madwifi matroska midi mp3 ncurses nls nptl nptlonly nsplugin ogg oggvorbis opengl pam pch pcre pdf perl perlsuid pic png ppds pppd python qt3 qt4 quicktime readline realmedia reflection rtc sasl session speex spl sqlite3 ssl stream svg tcpd theora tiff truetype truetype-fonts type1-fonts unicode v4l v4l2 vcd vlm vorbis wifi wxwindows xorg xv xvid xvmc 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en it fr de" USERLAND="GNU" VIDEO_CARDS="radeon ati"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Thomas Capricelli 2007-02-27 00:55:35 UTC
googling a little i've found that

https://launchpad.net/ubuntu/+source/vtun/+bug/57974
http://sourceforge.net/mailarchive/forum.php?thread_id=8205403&forum_id=1827

Summary : it's a vtun bug, disabling compression helps. Using zlib instead of lzo could help, but i dont find USE flags that could help me do that on gentoo.
Comment 2 Simon Stelling (RETIRED) gentoo-dev 2007-02-28 15:21:38 UTC
Does 2.6 work?
Comment 3 Renato Caldas 2007-06-10 10:46:11 UTC
I'd recommend trying out the 3.0.1 experimental version. It is based on 3.0.0 and has a native support for lzo2. There's an ebuild here, please try it out:

http://bugs.gentoo.org/show_bug.cgi?id=179901
Comment 4 Renato Caldas 2007-06-10 10:46:46 UTC
BTW, I'm on amd64 and it works perfectly.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2007-07-05 17:29:28 UTC
3.0.1 is now in tree, please test.
Comment 6 Jaak Ristioja 2009-09-05 19:03:13 UTC
(In reply to comment #5)
> 3.0.1 is now in tree, please test.
> 

Version 3.0.2 still segfaults on amd64 when compression is turned on:

Starting program: /usr/sbin/vtund -n -f /etc/vtun.otherhost.conf otherhost localhost 5000
vtund[8120]: VTun client ver 3.X 09/05/2009 started                                  
vtund[8120]: Connecting to localhost                                                 
vtund[8120]: Remote Server sends <TuL9KE1>                                           
.                                                                                    
vtund[8120]: Session otherhost[localhost] opened                                       
vtund[8120]: LZO compression[level 9] initialized                                    
vtund[8120]: Blowfish-128-ECB encryption initialized                                 

Program received signal SIGSEGV, Segmentation fault.
lfd_linker () at linkfd.c:113                       
113          for(mod = lfd_mod_head; mod && len > 0; mod = mod->next )
(gdb) bt                                                              
#0  lfd_linker () at linkfd.c:113                                     
#1  0x000000000040a6f6 in linkfd (host=0xb0e390) at linkfd.c:406      
#2  0x0000000000408228 in tunnel (host=0xb0e390) at tunnel.c:223      
#3  0x0000000000406953 in client (host=0xb0e390) at client.c:141      
#4  0x00000000004034a3 in main (argc=7, argv=0x7fff79aa66a8, env=0x7fff79aa66e8) at main.c:201
(gdb) thread apply all bt
(gdb) bt full
#0  lfd_linker () at linkfd.c:113
        fd1 = 7                  
        fd2 = 8                  
        len = 87                 
        fl = <value optimized out>
        tv = {tv_sec = 5, tv_usec = 952343}
        buf = 0xb11d30 "!E"                
        out = 0xb11d30 "!E"                
        fdset = {__fds_bits = {256, 0 <repeats 15 times>}}
        maxfd = 9                                         
        idle = 0                                          
        tmplen = <value optimized out>                    
#1  0x000000000040a6f6 in linkfd (host=0xb0e390) at linkfd.c:406
        sa = {__sigaction_handler = {sa_handler = 0x409cc0 <sig_hup>, sa_sigaction = 0x409cc0 <sig_hup>}, sa_mask = {__val = {0 <repeats 16 times>}}, 
  sa_flags = 0, sa_restorer = 0}                                                                                                                      
        sa_oldterm = {__sigaction_handler = {sa_handler = 0x406600 <sig_term>, sa_sigaction = 0x406600 <sig_term>}, sa_mask = {__val = {0, 139983244600784, 
      6374016, 6369632, 139983256060306, 0, 4256771, 64, 1, 140735234596800, 140735234596864, 11605536, 6374016, 6369632, 4244993, 7526475291077602370}},   
  sa_flags = 67108866, sa_restorer = 0x7f506393df50 <__restore_rt>}                                                                                         
        sa_oldint = {__sigaction_handler = {sa_handler = 0x406600 <sig_term>, sa_sigaction = 0x406600 <sig_term>}, sa_mask = {__val = {0, 139983244600784,  
      6374016, 6369632, 139983256060306, 0, 4256771, 64, 1, 140735234596800, 140735234596864, 11605536, 6374016, 6369632, 4244993, 7526475291077602370}},   
  sa_flags = 67108866, sa_restorer = 0x7f506393df50 <__restore_rt>}                                                                                         
        sa_oldhup = {__sigaction_handler = {sa_handler = 0x1, sa_sigaction = 0x1}, sa_mask = {__val = {0, 139983244600784, 6374016, 6369632, 139983256060306, 
      0, 4256771, 64, 1, 140735234596800, 140735234596864, 11605536, 6374016, 6369632, 4244993, 7526475291077602370}}, sa_flags = 67108866,                   
  sa_restorer = 0x7f506393df50 <__restore_rt>}                                                                                                                
        old_prio = 0                                                                                                                                          
#2  0x0000000000408228 in tunnel (host=0xb0e390) at tunnel.c:223                                                                                              
        null_fd = <value optimized out>                                                                                                                       
        opt = 1                                                                                                                                               
        fd = {8, -1}                                                                                                                                          
        dev = "tun1", '\0' <repeats 15 times>                                                                                                                 
        interface_already_open = 0                                                                                                                            
#3  0x0000000000406953 in client (host=0xb0e390) at client.c:141
        my_addr = {sin_family = 2, sin_port = 0, sin_addr = {s_addr = 0}, sin_zero = "\000\000\000\000\000\000\000"}
        svr_addr = {sin_family = 2, sin_port = 34835, sin_addr = {s_addr = 16777343}, sin_zero = "\000\000\000\000\000\000\000"}
---Type <return> to continue, or q <return> to quit---
        sa = {__sigaction_handler = {sa_handler = 0x406600 <sig_term>, sa_sigaction = 0x406600 <sig_term>}, sa_mask = {__val = {0 <repeats 16 times>}},
  sa_flags = 2, sa_restorer = 0}
        s = 7
        opt = 1
        reconnect = 1
#4  0x00000000004034a3 in main (argc=7, argv=0x7fff79aa66a8, env=0x7fff79aa66e8) at main.c:201
        svr = 0
        daemon = 0
        sock = 0
        dofork = <value optimized out>
        fd = 0
        opt = <value optimized out>
        host = (struct vtun_host *) 0xb0e390
        sa = {__sigaction_handler = {sa_handler = 0x7fff00000001, sa_sigaction = 0x7fff00000001}, sa_mask = {__val = {4294967295, 0, 3424768, 5979045888,
      139983258009648, 139983258190680, 140735234598432, 139983258189824, 4200684, 1, 0, 7, 140735234598568, 139983244586648, 4245616, 0}}, sa_flags = 4204187,
  sa_restorer = 0}
        hst = <value optimized out>