DAST: kostya --at-- d-sto.com - Iperf
>Date: Thu, 9 Sep 2004 03:37:17 -0500
>From: Apache <apache --at-- ncsa.uiuc.edu>
>To: kostya --at-- d-sto.com
>Subject: DAST: kostya --at-- d-sto.com - Iperf
>
>
>
>Contacting DAST re: Bug report about Iperf
>
>
>Konstantin Nikonenko
>
>Email: kostya --at-- d-sto.com
>
>
>Question/Comment:
>
> # /usr/local/bin/iperf -v
>iperf version 1.7.0 (13 Mar 2003) pthreads
># uname -a
>FreeBSD 6.0-CURRENT #52: Sun Aug 29 04:12:57 EEST 2004
>all 5.x too
># gcc -v
>Using built-in specs.
>Configured with: FreeBSD/i386 system compiler
>Thread model: posix
>gcc version 3.4.2 [FreeBSD] 20040728
># gdb --args ./iperf -c 212.3.111.XX -d
>[skip]
>(gdb) br PerfSocket::Recv_TCP
>Breakpoint 1 at 0x804c058: file PerfSocket_TCP.cpp, line 167.
>(gdb) r
>Starting program: /usr/ports/net/iperf/work/iperf-1.7.0/iperf -c
212.3.111.XX -d
>------------------------------------------------------------
>Server listening on TCP port 5001
>TCP window size: 64.0 KByte (default)
>------------------------------------------------------------
>------------------------------------------------------------
>Client connecting to 212.3.111.XX, TCP port 5001
>TCP window size: 32.5 KByte (default)
>------------------------------------------------------------
>[ 7] local 212.3.111.YYY port 59653 connected with 212.3.111.XX port 5001
>[Switching to Thread 1 (LWP 100299)]
>
>Breakpoint 1, PerfSocket::Recv_TCP (this=0x8060b00) at PerfSocket_TCP.cpp:167
>167 void PerfSocket::Recv_TCP( void ) {
>(gdb) n
>172 SocketAddr remote = getRemoteAddress();
>(gdb) p mSettings->mBufLen
>$1 = -791621424
>(gdb) x mSettings
>0x8058a00: 0xd0d0d0d0
>(gdb) n
>173 iperf_sockaddr peer = *(iperf_sockaddr *)
(remote.get_sockaddr());
>(gdb) n
>178 int *readLenCnt = new int[ mSettings->mBufLen+1 ];
>(gdb) n
>terminate called after throwing an instance of 'std::bad_alloc'
> what(): St9bad_alloc
>
>Program terminated with signal SIGABRT, Aborted.
>The program no longer exists.
>(gdb) list
>173 iperf_sockaddr peer = *(iperf_sockaddr *)
(remote.get_sockaddr());
>174
>175 // keep track of read sizes -> gives some indication of MTU size
>176 // on SGI this must be dynamically allocated to avoid seg faults
>177 int currLen;
>178 int *readLenCnt = new int[ mSettings->mBufLen+1 ];
>179 for ( int i = 0; i <= mSettings->mBufLen; i++ ) {
>180 readLenCnt[ i ] = 0;
>181 }
>(gdb) core-file /tmp/iperf.core
>(gdb) bt
>#0 0x28188d8f in pthread_testcancel () from /usr/lib/libpthread.so.1
>#1 0x28179fad in sigaction () from /usr/lib/libpthread.so.1
>#2 0x2817410d in pthread_kill () from /usr/lib/libpthread.so.1
>#3 0x28173adc in raise () from /usr/lib/libpthread.so.1
>#4 0x28244773 in abort () from /lib/libc.so.5
>#5 0x2811ea1d in __gnu_cxx::__verbose_terminate_handler () from
/usr/lib/libstdc++.so.4
>#6 0x2812316e in __cxxabiv1::__terminate () from /usr/lib/libstdc++.so.4
>#7 0x281231a4 in std::terminate () from /usr/lib/libstdc++.so.4
>#8 0x281230f9 in __cxa_throw () from /usr/lib/libstdc++.so.4
>#9 0x281260f2 in operator new () from /usr/lib/libstdc++.so.4
>#10 0x28126063 in operator new[] () from /usr/lib/libstdc++.so.4
>#11 0x0804c09b in PerfSocket::Recv_TCP (this=0x805a600) at
PerfSocket_TCP.cpp:178
>#12 0x0804dab9 in Server::Run (this=0x805a600) at Server.cpp:86
>#13 0x080509f0 in Thread::Run_Wrapper ()
>#14 0x281759b9 in pthread_create () from /usr/lib/libpthread.so.1
>#15 0x2822fdab in _ctx_start () from /lib/libc.so.5
>
>When thread create with parameters in this pointers to pinters is bad.
>
>
>
>
>
>
--
Mitch Kutzko | mitch --at-- dast.nlanr.net | mitch --at-- ncsa.uiuc.edu | 217-333-1199
http://hobbes.ncsa.uiuc.edu/