Subject: Segmentation Fault Core Dumps in AODV Simulation under Some Scena rios

From: Wang Qiang <[email-masked]>
Date: Sat, 3 Nov 2001 12:53:21 +0800

Dear ns users:

I'm running AODV in ns-allinone-2.1b7 on RedHat Linux 7.1. Using 30 CBR
sources, 50 nodes in 1500x300 area, random-way point model with max speed
20m/s, 0s pause time, I generate 10 different node movement pattern files to
give 10 different scenarios.  It turns out that the simulator aborts with
segmentation fault core dumps for SOME of these scenarios, while it complete
smoothly for the rest.  If I replace those failed scenario files with some
new ones, the segmentation fault MAY stop. 

I tried to use gdb to examine the core dump, and all these core dump are the
same, as shown b below. Can anyone please give me some insight into such
core dumps?  Thank you.

>gdb ns core
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `ns aodv-test.tcl'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from
/home/Tech/ns-allinone-2.1b7/tkbox/lib/libtk8.3.so...done.
Loaded symbols for /home/Tech/ns-allinone-2.1b7/tkbox/lib/libtk8.3.so
Reading symbols from
/home/Tech/ns-allinone-2.1b7/tclbox/lib/libtcl8.3.so...done.
Loaded symbols for /home/Tech/ns-allinone-2.1b7/tclbox/lib/libtcl8.3.so
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libstdc++-libc6.2-2.so.3...done.
Loaded symbols for /usr/lib/libstdc++-libc6.2-2.so.3
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x080b9986 in AODV::sendRequest () at eval.c:41
	in eval.c
(gdb) bt
#0  0x080b9986 in AODV::sendRequest () at eval.c:41
#1  0x080b8413 in AODV::rt_down () at eval.c:41
#2  0x080b80f0 in AODV::rt_ll_failed () at eval.c:41
#3  0x08095879 in Mac802_11::RetransmitRTS () at eval.c:41
#4  0x08093e85 in Mac802_11::send_timer () at eval.c:41
#5  0x0804c7b9 in Scheduler::dispatch () at eval.c:41
#6  0x0804c7dc in Scheduler::dispatch () at eval.c:41
#7  0x0804c72e in Scheduler::run () at eval.c:41
#8  0x0804c8f5 in Scheduler::command () at eval.c:41
#9  0x080ea48e in TclClass::dispatch_cmd () at eval.c:41
#10 0x080ec6e0 in OTclDispatch (cd=0x836eb08, in=0x81f6938, argc=3,
argv=0xbfffd820) at otcl.c:421
#11 0x400e71f0 in TclInvokeStringCommand () at eval.c:41
#12 0x4010222c in TclExecuteByteCode () at eval.c:41
#13 0x400e7bf2 in Tcl_EvalObjEx () at eval.c:41
#14 0x4010243b in TclExecuteByteCode () at eval.c:41
#15 0x400e7bf2 in Tcl_EvalObjEx () at eval.c:41
#16 0x40125e42 in TclObjInterpProc () at eval.c:41
#17 0x401259dd in TclProcInterpProc () at eval.c:41
#18 0x080ec864 in OTclDispatch (cd=0x836eb08, in=0x81f6938, argc=2,
argv=0xbfffe120) at otcl.c:464
#19 0x400e71f0 in TclInvokeStringCommand () at eval.c:41
#20 0x4010222c in TclExecuteByteCode () at eval.c:41
#21 0x400e7bf2 in Tcl_EvalObjEx () at eval.c:41
#22 0x40125e42 in TclObjInterpProc () at eval.c:41
#23 0x401259dd in TclProcInterpProc () at eval.c:41
#24 0x080ec6e0 in OTclDispatch (cd=0x836a138, in=0x81f6938, argc=2,
argv=0xbfffe890) at otcl.c:421
#25 0x400e71f0 in TclInvokeStringCommand () at eval.c:41
#26 0x4011ec8e in EvalObjv () at eval.c:41
#27 0x4011f387 in Tcl_EvalEx () at eval.c:41
#28 0x401165d0 in Tcl_EvalFile () at eval.c:41
#29 0x40119180 in Tcl_Main () at eval.c:41
#30 0x0804a896 in main () at eval.c:41
#31 0x402ef177 in __libc_start_main (main=0x804a880 <main>, argc=2,
ubp_av=0xbffff39c, init=0x8049f24 <_init>, 
    fini=0x811a008 <_fini>, rtld_fini=0x4000e184 <_dl_fini>,
stack_end=0xbffff38c) at ../sysdeps/generic/libc-start.c:129
(gdb) quit

Your comments are greatly appreciated.

WQ