Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 173335 - net-misc/nemesis doesn't work on Core 2 Duo
Summary: net-misc/nemesis doesn't work on Core 2 Duo
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-04 11:33 UTC by bubba
Modified: 2008-12-08 02:14 UTC (History)
3 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 bubba 2007-04-04 11:33:22 UTC
I've setup my Intel Core 2 Duo using the AMD64 setup with -march=nocona and everything works well, but when I installed and then tried to use nemesis I got:

# nemesis tcp -S 10.11.12.13 -D 10.1.0.139 -fA -x 100 -y 200 -a 100 -s 100 -w 100
*** glibc detected *** nemesis: free(): invalid next size (fast): 0x0000000000518010 ***
======= Backtrace: =========
/lib/libc.so.6[0x2b5e2b4d61b5]
/lib/libc.so.6(__libc_free+0x75)[0x2b5e2b4d773e]
nemesis[0x40ee6f]
nemesis[0x40b1ac]
nemesis[0x40c8d8]
nemesis[0x40de17]
/lib/libc.so.6(__libc_start_main+0xe3)[0x2b5e2b48a323]
nemesis[0x401659]
======= Memory map: ========
00400000-00417000 r-xp 00000000 08:06 1045895                            /usr/bin/nemesis
00516000-00517000 rw-p 00016000 08:06 1045895                            /usr/bin/nemesis
00517000-00539000 rw-p 00517000 00:00 0                                  [heap]
2b5e2afd3000-2b5e2afee000 r-xp 00000000 08:06 846641                     /lib64/ld-2.5.so
2b5e2afee000-2b5e2afef000 rw-p 2b5e2afee000 00:00 0
2b5e2b006000-2b5e2b007000 rw-p 2b5e2b006000 00:00 0
2b5e2b0ed000-2b5e2b0ee000 r--p 0001a000 08:06 846641                     /lib64/ld-2.5.so
2b5e2b0ee000-2b5e2b0ef000 rw-p 0001b000 08:06 846641                     /lib64/ld-2.5.so
2b5e2b0ef000-2b5e2b142000 r-xp 00000000 08:06 846477                     /lib64/libm-2.5.so
2b5e2b142000-2b5e2b241000 ---p 00053000 08:06 846477                     /lib64/libm-2.5.so
2b5e2b241000-2b5e2b243000 rw-p 00052000 08:06 846477                     /lib64/libm-2.5.so
2b5e2b243000-2b5e2b252000 r-xp 00000000 08:06 845225                     /lib64/libresolv-2.5.so
2b5e2b252000-2b5e2b352000 ---p 0000f000 08:06 845225                     /lib64/libresolv-2.5.so
2b5e2b352000-2b5e2b354000 rw-p 0000f000 08:06 845225                     /lib64/libresolv-2.5.so
2b5e2b354000-2b5e2b356000 rw-p 2b5e2b354000 00:00 0
2b5e2b356000-2b5e2b369000 r-xp 00000000 08:06 845677                     /lib64/libnsl-2.5.so
2b5e2b369000-2b5e2b468000 ---p 00013000 08:06 845677                     /lib64/libnsl-2.5.so
2b5e2b468000-2b5e2b46a000 rw-p 00012000 08:06 845677                     /lib64/libnsl-2.5.so
2b5e2b46a000-2b5e2b46d000 rw-p 2b5e2b46a000 00:00 0
2b5e2b46d000-2b5e2b599000 r-xp 00000000 08:06 846177                     /lib64/libc-2.5.so
2b5e2b599000-2b5e2b698000 ---p 0012c000 08:06 846177                     /lib64/libc-2.5.so
2b5e2b698000-2b5e2b69b000 r--p 0012b000 08:06 846177                     /lib64/libc-2.5.so
2b5e2b69b000-2b5e2b69d000 rw-p 0012e000 08:06 846177                     /lib64/libc-2.5.so
2b5e2b69d000-2b5e2b6a3000 rw-p 2b5e2b69d000 00:00 0
2b5e2b6a3000-2b5e2b6af000 r-xp 00000000 08:06 408292                     /lib64/libgcc_s.so.1
2b5e2b6af000-2b5e2b7af000 ---p 0000c000 08:06 408292                     /lib64/libgcc_s.so.1
2b5e2b7af000-2b5e2b7b0000 rw-p 0000c000 08:06 408292                     /lib64/libgcc_s.so.1
2b5e2c000000-2b5e2c021000 rw-p 2b5e2c000000 00:00 0
2b5e2c021000-2b5e30000000 ---p 2b5e2c021000 00:00 0
7fff7fac2000-7fff7fad7000 rw-p 7fff7fac2000 00:00 0                      [stack]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]
Aborted


Reproducible: Always

Steps to Reproduce:
1. issue any nemesis tcp command (even with no args)
2.
3.

Actual Results:  
crashes

Expected Results:  
inject packet
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-04-04 11:54:49 UTC
emerge --info please.
Comment 2 bubba 2007-04-04 11:56:58 UTC
(In reply to comment #1)
> emerge --info please.
> 

# emerge --info
Portage 2.1.2.2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r5 x86_64 Intel(R) Core(TM)2 CPU          6400  @ 2.13GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 01 Apr 2007 23:00:06 +0000
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
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.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -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/gconf /etc/terminfo"
CXXFLAGS="-march=nocona -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X alsa amd64 berkdb bitmap-fonts bzip2 cjk clamav cli cracklib crypt cups dri dvd dvdr dvdread fat gdbm gpm gtk gtk2 iconv ipv6 isdnlog kde kdeenablefinal kdm libg++ midi ncurses nls nptl nptlonly nvidia opengl pam pcre perl ppds pppd python qt3 qt3support qt4 rar readline reflection reiser4 reiserfs seamonkey session spl ssl tcpd truetype truetype-fonts type1-fonts unicode xine xorg 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="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i810 mga neomagic nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2007-04-04 14:03:40 UTC
What if you use -O2 instead of -O3 ?  Can you replicate this with other march settings or just -march=nocona?
Comment 4 bubba 2007-04-04 23:02:03 UTC
(In reply to comment #3)
> What if you use -O2 instead of -O3 ?  Can you replicate this with other march
> settings or just -march=nocona?
> 

I tried -02 but same result.  I tried just -march=nocona, same results.  I don't know what other -march options I could try with a 64bit core 2 duo but am happy to try anything you suggest.
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2007-04-05 12:15:51 UTC
Try just "-O2 -pipe" with no -march and see if it works.  If not, then it shouldn't be an issue with the GCC optimization, meaning it could be simply a bug affecting more than Core 2.  Of course, the other possibility is it is a library on the system and it's just showing up in this package, but let's hope that isn't it.
Comment 6 bubba 2007-04-05 20:59:57 UTC
(In reply to comment #5)
> Try just "-O2 -pipe" with no -march and see if it works.  If not, then it
> shouldn't be an issue with the GCC optimization, meaning it could be simply a
> bug affecting more than Core 2.  Of course, the other possibility is it is a
> library on the system and it's just showing up in this package, but let's hope
> that isn't it.
> 

I tried with just -02 and -pipe.  Same result.
Comment 7 Pacho Ramos gentoo-dev 2007-04-16 21:59:39 UTC
Have you tried also with testing version of nemesis (1.4 instead of 1.4beta3) ?

Good luck!
Comment 8 Jonas Pedersen 2007-06-04 21:14:59 UTC
I have just tested with both 1.4 and 1.4beta3 and I get same error with both versions.

Portage 2.1.2.7 (default-linux/amd64/2006.1/desktop, gcc-4.1.2, glibc-2.5-r2, 2.6.20-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.20-gentoo-r8 x86_64 Intel(R) Core(TM)2 CPU          6600  @ 2.40GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 04 Jun 2007 16:50:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
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.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -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/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distcc distlocks metadata-transfer multilib-strict sandbox sfperms strict test"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://ftp.du.se/pub/os/gentoo http://trumpetti.atm.tut.fi/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ds.thn.htu.se/linux/gentoo"
LC_ALL="en_DK.utf8"
MAKEOPTS="-j1"
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acpi aiglx alsa amd64 arts atk berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dga directfb doc dri dts dvd dvdr dvdread eds emboss encode fam fbcn ffmpeg firefox fortran ftp gd gdbm gif gphoto2 gpm gstreamer gtk gtk2 hal iconv icq ieee1394 ipv6 isdnlog java jpeg kde libg++ lm_sensors mad midi mikmod mjpeg mozilla mp3 mpeg mplayer msn mudflap ncurses nls nptl nptlonly ogg oggvorbis opengl openmp pam pcre pda pdf perl png ppds pppd python qt qt3 qt4 quicktime readline reflection samba sdl session spell spl sse3 ssl tcpd test threads tiff truetype truetype-fonts type1-fonts unicode vorbis xcomposite xml xorg xscreensaver 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 9 Stian Skjelstad 2008-01-03 06:45:16 UTC
Could you try to emerge with FEATURES=splitdebug CFLAGS="-g -march=cocona" so that the backtrace can contain some symbols.

Does valgrind work on amd64? If so, can you test that?
Comment 10 lkd-gentoo 2008-04-05 19:00:46 UTC
Able to replicate on my setup.

Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24.4 x86_64)
=================================================================
System uname: 2.6.24.4 x86_64 Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz
Timestamp of tree: Sat, 05 Apr 2008 04:17:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.5.1-r5
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -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/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildsyspkg distlocks metadata-transfer nostrip notitles sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://adelie.polymtl.ca/ http://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.pair.com/ http://mirror.fslutd.org/linux/distributions/gentoo/"
LANG="en_US.utf8"
LINGUAS="en en_US ga ga_IE ja cy br fa"
MAKEOPTS="-l12"
PKGDIR="/usr/local/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/voip /usr/local/portage"
SYNC="rsync://172.16.1.2/local-portage"
USE="7zip X X509 a52 aac acl acpi aim alsa amd64 apache2 arts athena avahi berkdb bidi bluetooth bzip2 canna caps cdparanoia cdr chardet cjk clamav clamd cracklib crypt css cups curl dbus dict directfb divx dri dvd dvdr dvdread dvi emacs encode fame fat fbcon fbdev flac font-server fontconfig gd-external gdbm gif glitz gmp gsm gtk hal iconv ilbc imlib ipv6 jack jack-tmpfs jpeg kde leim lzo mad midi mjpeg mmx mmxext modplug mp3 mp4 mp4live mpeg mpeg2 mpm-prefork mudflap nas ncurses netjack nls nonfsv4 nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp pam pcre perl png pppd python qt4 quicktime readline reflection reiserfs rle rtc sasl screen sdl sensord session smp sndfile speex spell sse sse2 ssl svg sysfs tcpd tetex tga theora tiff truetype type1 ucs2 ucs4 unicode unix98 v4l v4l2 vamp vorbis wma x264 xanim xfs xinerama xorg xpm xv xvid zlib" ALSA_CARDS="dummy ca0106 hda-intel usb-audio" 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" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US ga ga_IE ja cy br fa" USERLAND="GNU" VIDEO_CARDS="fbdev vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 11 lkd-gentoo 2008-04-05 19:05:32 UTC
Program received signal SIGABRT, Aborted.
0x00002aaf293813c5 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00002aaf293813c5 in raise () from /lib/libc.so.6
#1  0x00002aaf2938273e in abort () from /lib/libc.so.6
#2  0x00002aaf293b88e7 in __libc_message () from /lib/libc.so.6
#3  0x00002aaf293bdaad in malloc_printerr () from /lib/libc.so.6
#4  0x00002aaf293bf796 in free () from /lib/libc.so.6
#5  0x00000000004117b6 in libnet_destroy_packet ()
#6  0x000000000040d156 in buildtcp (eth=0x61c840, ip=0x61c850, tcp=0x61c880, 
    pd=0x61c8a0, ipod=0x61c8b0, tcpod=0x61c8c0, device=0x0)
    at nemesis-proto_tcp.c:141
#7  0x000000000040e79a in nemesis_tcp (argc=16, argv=0x7fff8201dbd0)
    at nemesis-tcp.c:113
#8  0x00000000004106ca in main (argc=16, argv=0x7fff8201dbd0) at nemesis.c:112

Note line #5.

If you're lucky, this is nemesis using libnet wrong.  If you're unlucky, this is libnet making a mistake.
Comment 12 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-12-08 02:14:21 UTC
eh? worksforme. CFLAGS="-O2 -march=nocona -pipe -fomit-frame-pointer" /me shrugs