Guide to using valgrind (troubleshooting Segmentation fault error)

5,172 views
Skip to first unread message

Christo Kleu

unread,
May 11, 2011, 7:05:20 AM5/11/11
to Castalia Simulator
SCENARIO
While implementing a protocol, you change a lot of code, and after simulating, you receive the "Segmentation fault" error.
There is no indication to where the actual problem is!

I decided to write this guide, after seeing some posts on the discussion group, but they did not take a newbie like myself into consideration :P

Guide to using valgrind (troubleshooting Segmentation fault error)
Step 1: Installing valgrind
Step 2: Edit makemake file
Step 3: Running simulation using valgrind
Step 4: Examine output

Step 1: INSTALLING valgrind
I am using Ubuntu 10.10 (inside a VirtualBox).
terminal$ sudo apt-get install valgrind
- I needed to download about 50MB of data (this took about 30 minutes on a 384Kbps ADSL line)

Step 2: Edit makemake file
Find the makemake file located in "~/Castalia-3.2/" (this depends where you installed it)
In the OPTS line, change the "-M release" to "-M debug" (remember to change this back afterwards,  this will speed up simulation again)

Step 3: Running simulation using valgrind
In your shell, goto the location of your simulation (in my case: "~/Castalia-3.2/Simulations/ultraSleepTest$")
Execute CastaliaBin using valgrind: "valgrind --track-origins=yes ~/Castalia-3.2/CastaliaBin" (this depends where you installed it)

Step 4: Examine output

SAMPLE OUTPUT
  ## output omitted
  Running simulation...
  ** Event #1   T=0   Elapsed: 0.021s (0m 00s)  0% completed   ev/sec=0
  ==6659== Invalid read of size 4
  ==6659==    at 0x458CB1: USMAC::timerFiredCallback(int) (USMAC.cc:245)
  ## output omitted
  ==6659== Process terminating with default action of signal 11 (SIGSEGV)
  ==6659==  Access not within mapped region at address 0x8
  ==6659==    at 0x458CB1: USMAC::timerFiredCallback(int) (USMAC.cc:245)
  ## output omitted
  Segmentation fault

In line (USMAC.cc:245)I had the following line:
  if (slotCounter > 100 * routingTable.front().sleepSchedule.maxLevel) {
The reason for the segmentation fault, at the stage the line got executed, vector<USmacRoutingTableEntry> routingTable was still empty.

How did I solve this?
Implement better error checking, to ensure it only performs the code when there is actually an entry in the routingTable.

I hope this guide provides some useful information for someone along the way.

Regards,
Christo Kleu

Christo Kleu

unread,
May 11, 2011, 7:15:35 AM5/11/11
to Castalia Simulator
I forgot to add some details:

*Step 2: Edit makemake file*
Find the makemake file located in "~/Castalia-3.2/" (this depends
where you
installed it)
In the OPTS line, change the "-M release" to "-M debug" (remember to
change
this back afterwards, this will speed up simulation again)
You need to recompile after changing these settings (and then again
after you change them back)
shell$make clean
shell$./makemake
shell$make

On May 11, 1:05 pm, Christo Kleu <christok...@gmail.com> wrote:
> *SCENARIO*
> While implementing a protocol, you change a lot of code, and after
> simulating, you receive the "Segmentation fault" error.
> There is no indication to where the actual problem is!
>
> I decided to write this guide, after seeing some posts on the discussion
> group, but they did not take a newbie like myself into consideration :P
>
> Guide to using valgrind (troubleshooting Segmentation fault error)
> Step 1: Installing valgrind
> Step 2: Edit makemake file
> Step 3: Running simulation using valgrind
> Step 4: Examine output
>
> *Step 1: INSTALLING valgrind*
> I am using Ubuntu 10.10 (inside a VirtualBox).
> terminal$ sudo apt-get install valgrind
> - I needed to download about 50MB of data (this took about 30 minutes on a
> 384Kbps ADSL line)
>
> *Step 2: Edit makemake file*
> Find the makemake file located in "~/Castalia-3.2/" (this depends where you
> installed it)
> In the OPTS line, change the "-M release" to "-M debug" (remember to change
> this back afterwards,  this will speed up simulation again)
>
> *Step 3: Running simulation using valgrind*
> In your shell, goto the location of your simulation (in my case: "
> ~/Castalia-3.2/Simulations/ultraSleepTest$")
> Execute CastaliaBin using valgrind: "valgrind --track-origins=yes
> ~/Castalia-3.2/CastaliaBin" (this depends where you installed it)
>
> *Step 4: Examine output*

Christo Kleu

unread,
May 11, 2011, 7:26:19 AM5/11/11
to Castalia Simulator
Also, you might need to increase the line buffer size on your terminal (based on your output generated by valgrind):

Terminal
Edit -> Profile preferences
Scrolling tab
Scrollback: tick unlimited

Regards,
Christo Kleu


--
You received this message because you are subscribed to the Google Groups "Castalia Simulator" group.
To post to this group, send email to castalia-...@googlegroups.com.
To unsubscribe from this group, send email to castalia-simula...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/castalia-simulator?hl=en.


idrees alkocher

unread,
May 11, 2011, 12:13:04 PM5/11/11
to castalia-...@googlegroups.com
Thanks,
For your routing table below:
vector<USmacRoutingTableEntry> routingTable

I assumed struct USmacRoutingTableEntry {---};
can you clarify by simple piece of code how to update this table?
you are life saver|||||

Idrees

Christo Kleu

unread,
May 11, 2011, 1:37:03 PM5/11/11
to castalia-...@googlegroups.com
Please create a separate thread for your question, this thread is allocated towards questions regarding "Segmentation fault" errors and using valgrind.

Regards,
Christo Kleu

Pedro Mesquita Moura

unread,
May 13, 2011, 5:30:21 PM5/13/11
to Castalia Simulator
Hello,

I'm looking for some way to debug segmentation fault for a long time.

I installed valgrind and I ran it. But when I ran it using the script
Castalia located in /bin I get the errors of the python script and if
i use the CastaliaBin as you suggested i can't set the parameters like
in the script and it gives me the error.

<!> Error during startup: Error at `../Parameters/Castalia.ini' line
20: no section header seen yet.

Could you please explain me how did you ran the CastaliaBin more
accurately?

Thanks in advance.
Pedro

On 11 maio, 14:37, Christo Kleu <christok...@gmail.com> wrote:
> Please create a separate thread for your question, this thread is allocated
> towards questions regarding "Segmentation fault" errors and using valgrind.
>
> Regards,
> Christo Kleu
>
> On Wed, May 11, 2011 at 6:13 PM, idrees alkocher <alkoche...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Thanks,
> > For your routing table below:
> > vector<USmacRoutingTableEntry> routingTable
>
> > I assumed  struct USmacRoutingTableEntry {---};
> > can you clarify by simple piece of code how to update  this table?
> > you are life saver|||||
>
> > Idrees
>
> > On 5/11/11, Christo Kleu <christok...@gmail.com> wrote:
> > > Also, you might need to increase the line buffer size on your terminal
> > > (based on your output generated by valgrind):
>
> > > Terminal
> > > Edit -> Profile preferences
> > > Scrolling tab
> > > Scrollback: tick unlimited
>
> > > Regards,
> > > Christo Kleu
>
> > > On Wed, May 11, 2011 at 1:15 PM, Christo Kleu <christok...@gmail.com>

Athanassios Boulis

unread,
May 13, 2011, 8:49:21 PM5/13/11
to castalia-...@googlegroups.com
As you point out you need to run CastaliaBin directly under valgrind.
This means you can only run one configuration. Make this configuration to be [General] for your ease (the valgrind command that Christo gives will run the General config).

In the [General] configuration you will set all the parameters that you need. If you are unsure about valid OMNeT syntax you can consult the omnet manual. Another trick you can do is to run your normal Castalia command (with all the configuration options) and stop it (Ctrl+c) before it finishes. You will then see an extra file called omnetpp.tmp. This is the temporary file that the Castalia script uses to call CastaliaBin. This has only the [General] configuration, so you could use it as an input file when you run CastaliaBin with valgrind.
You can the use this file (or any other ini file other than the default omnetpp.ini) by typing
CastaliaBin -f omnetpp.tmp    <- you can use this in your valgrind command. 

Pedro Mesquita Moura

unread,
May 13, 2011, 10:29:01 PM5/13/11
to Castalia Simulator
Thanks Athanassios! The CTRL+C trick worked for me, very well thought.

Very happy this method works, segmentation fault has been my main
cause of stress lately.

On 13 maio, 21:49, Athanassios Boulis

Lina Josif

unread,
Jun 23, 2013, 1:02:12 PM6/23/13
to castalia-...@googlegroups.com, chris...@gmail.com

please I need help . always after installing the videoSensor model , the videoSensor model works properly . but when i run another model i stuck with the following error

Castalia| what:General (1)
Castalia| when:2013-06-23 19:33
Castalia| label:General
Assigned runID=General-0-20130623-19:33:33-7863
Setting up network `SN'...
Initializing...
Segmentation fault

 I tried to solve the problem  using valgrind , but the problem still not solved
 if anyone has an idea plz give me a feedback

thanks in advance

Tyag

unread,
Aug 5, 2013, 7:44:39 AM8/5/13
to castalia-...@googlegroups.com, chris...@gmail.com
hello

Yours steps for installing valgrind are helpful .
I used all your steps and installed valgrind. I ran debug(step 4 : examining output) .
Like your example code in step 4(cc.245 in your case), it doesnt show me a specific line where the error occurs in my code.
If you have any tips for workaround or some other tips , greatly appreciate.

thanks.
Regards
Tyag
Message has been deleted
Message has been deleted

Shaz

unread,
Oct 18, 2016, 8:12:28 AM10/18/16
to Castalia Simulator, chris...@gmail.com
Hi Christo Kleu,

Just wanted to express (years after your post :D ) Thank you for the guidline!. It was indeed needed!
 
Stay blessed!
Shaz

rim negra

unread,
Jul 12, 2017, 6:37:26 AM7/12/17
to Castalia Simulator, chris...@gmail.com
Hi All, 
When I run my simulation on omnet, simulation finishes normally. Even when I debug the simulation, it finishes normally
When running simulation on terminal using ../../bin/Castalia 
I get 
rim@rim-Inspiron-3521:~/thesisworkspace/Medical/Simulations/BANtest$ ../../bin/Castalia -c BaselineMAC
Running Castalia: Configuration 1/1 Run 1/1 Complete 0% 

I followed these steps using valgrind, here what I found, 
Can someone explain me what probably could be the error ? 


rim@rim-Inspiron-3521:~/thesisworkspace/Medical/Simulations/BANtest$ valgrind --track-origins=yes -v '/home/rim/thesisworkspace/Medical/out/gcc-debug/CastaliaBin' 
==3191== Memcheck, a memory error detector
==3191== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==3191== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==3191== Command: /home/rim/thesisworkspace/Medical/out/gcc-debug/CastaliaBin
==3191== 
--3191-- Valgrind options:
--3191--    --track-origins=yes
--3191--    -v
--3191-- Contents of /proc/version:
--3191--   Linux version 4.8.0-58-generic (buildd@lgw01-21) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017
--3191-- 
--3191-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-rdtscp-sse3-avx
--3191-- Page sizes: currently 4096, max supported 4096
--3191-- Valgrind library directory: /usr/lib/valgrind
--3191-- Reading syms from /home/rim/thesisworkspace/Medical/out/gcc-debug/CastaliaBin
--3191-- Reading syms from /lib/x86_64-linux-gnu/ld-2.23.so
--3191--   Considering /lib/x86_64-linux-gnu/ld-2.23.so ..
--3191--   .. CRC mismatch (computed 9bc477cd wanted 3da2f12a)
--3191--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.23.so ..
--3191--   .. CRC is valid
--3191-- Reading syms from /usr/lib/valgrind/memcheck-amd64-linux
--3191--   Considering /usr/lib/valgrind/memcheck-amd64-linux ..
--3191--   .. CRC mismatch (computed eea41ea9 wanted 2009db78)
--3191--    object doesn't have a symbol table
--3191--    object doesn't have a dynamic symbol table
--3191-- Scheduler: using generic scheduler lock implementation.
--3191-- Reading suppressions file: /usr/lib/valgrind/default.supp
==3191== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-3191-by-rim-on-???
==3191== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-3191-by-rim-on-???
==3191== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-3191-by-rim-on-???
==3191== 
==3191== TO CONTROL THIS PROCESS USING vgdb (which you probably
==3191== don't want to do, unless you know exactly what you're doing,
==3191== or are doing some strange experiment):
==3191==   /usr/lib/valgrind/../../bin/vgdb --pid=3191 ...command...
==3191== 
==3191== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==3191==   /path/to/gdb /home/rim/thesisworkspace/Medical/out/gcc-debug/CastaliaBin
==3191== and then give GDB the following command
==3191==   target remote | /usr/lib/valgrind/../../bin/vgdb --pid=3191
==3191== --pid is optional if only one valgrind process is running
==3191== 
--3191-- REDIR: 0x401cf90 (ld-linux-x86-64.so.2:strlen) redirected to 0x3809e181 (???)
--3191-- Reading syms from /usr/lib/valgrind/vgpreload_core-amd64-linux.so
--3191--   Considering /usr/lib/valgrind/vgpreload_core-amd64-linux.so ..
--3191--   .. CRC mismatch (computed 2567ccf6 wanted 49420590)
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
--3191--   Considering /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so ..
--3191--   .. CRC mismatch (computed 0e27c9a8 wanted ac585421)
--3191--    object doesn't have a symbol table
==3191== WARNING: new redirection conflicts with existing -- ignoring it
--3191--     old: 0x0401cf90 (strlen              ) R-> (0000.0) 0x3809e181 ???
--3191--     new: 0x0401cf90 (strlen              ) R-> (2007.0) 0x04c31020 strlen
--3191-- REDIR: 0x401b8e0 (ld-linux-x86-64.so.2:index) redirected to 0x4c30bc0 (index)
--3191-- REDIR: 0x401bb00 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c320d0 (strcmp)
--3191-- REDIR: 0x401dcf0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c35270 (mempcpy)
--3191-- Reading syms from /home/rim/omnetpp-4.6/lib/gcc/liboppcmdenvd.so
--3191-- Reading syms from /home/rim/omnetpp-4.6/lib/gcc/liboppenvird.so
--3191-- Reading syms from /home/rim/omnetpp-4.6/lib/gcc/liboppsimd.so
--3191-- Reading syms from /lib/x86_64-linux-gnu/libdl-2.23.so
--3191--   Considering /lib/x86_64-linux-gnu/libdl-2.23.so ..
--3191--   .. CRC mismatch (computed cf3e24b0 wanted fd1ac2a8)
--3191--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.23.so ..
--3191--   .. CRC is valid
--3191-- Reading syms from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
--3191--   Considering /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 ..
--3191--   .. CRC mismatch (computed 834c912e wanted c67ab13d)
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /lib/x86_64-linux-gnu/libm-2.23.so
--3191--   Considering /lib/x86_64-linux-gnu/libm-2.23.so ..
--3191--   .. CRC mismatch (computed 8bd88005 wanted 32b88176)
--3191--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.23.so ..
--3191--   .. CRC is valid
--3191-- Reading syms from /lib/x86_64-linux-gnu/libgcc_s.so.1
--3191--   Considering /lib/x86_64-linux-gnu/libgcc_s.so.1 ..
--3191--   .. CRC mismatch (computed b9a68419 wanted 29d51b00)
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /lib/x86_64-linux-gnu/libc-2.23.so
--3191--   Considering /lib/x86_64-linux-gnu/libc-2.23.so ..
--3191--   .. CRC mismatch (computed b2979fac wanted 1affc958)
--3191--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.23.so ..
--3191--   .. CRC is valid
--3191-- Reading syms from /home/rim/omnetpp-4.6/lib/gcc/liboppcommond.so
--3191-- Reading syms from /home/rim/omnetpp-4.6/lib/gcc/liboppnedxmld.so
--3191-- Reading syms from /usr/lib/openmpi/lib/libmpi_cxx.so.1.1.3
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /usr/lib/openmpi/lib/libmpi.so.12.0.2
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.23.so
--3191--   Considering /usr/lib/debug/.build-id/27/f189ef8db8c3734c6a678e6ef3cb0b206d58b2.debug ..
--3191--   .. build-id is valid
--3191-- Reading syms from /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /usr/lib/libibverbs.so.1.0.0
--3191--   Considering /usr/lib/libibverbs.so.1.0.0 ..
--3191--   .. CRC mismatch (computed 5350383d wanted a2778c99)
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /usr/lib/openmpi/lib/libopen-rte.so.12.0.2
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /usr/lib/openmpi/lib/libopen-pal.so.13.0.2
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /lib/x86_64-linux-gnu/libz.so.1.2.8
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /lib/x86_64-linux-gnu/liblzma.so.5.0.0
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /usr/lib/x86_64-linux-gnu/libhwloc.so.5.6.8
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /lib/x86_64-linux-gnu/librt-2.23.so
--3191--   Considering /lib/x86_64-linux-gnu/librt-2.23.so ..
--3191--   .. CRC mismatch (computed 53afabad wanted 7e68d3a3)
--3191--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/librt-2.23.so ..
--3191--   .. CRC is valid
--3191-- Reading syms from /lib/x86_64-linux-gnu/libutil-2.23.so
--3191--   Considering /lib/x86_64-linux-gnu/libutil-2.23.so ..
--3191--   .. CRC mismatch (computed c77397e6 wanted 14c599da)
--3191--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libutil-2.23.so ..
--3191--   .. CRC is valid
--3191-- Reading syms from /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /usr/lib/x86_64-linux-gnu/libnuma.so.1.0.0
--3191--    object doesn't have a symbol table
--3191-- Reading syms from /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.1
--3191--   Considering /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.1 ..
--3191--   .. CRC mismatch (computed 8f61a187 wanted cdc1b5b4)
--3191--    object doesn't have a symbol table
--3191-- REDIR: 0x645da00 (libc.so.6:strcasecmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x6459280 (libc.so.6:strcspn) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x645fcf0 (libc.so.6:strncasecmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x645b6f0 (libc.so.6:strpbrk) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x645ba80 (libc.so.6:strspn) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x645d14b (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x645c630 (libc.so.6:strstr) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x6457a80 (libc.so.6:index) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x645cbb0 (libc.so.6:bcmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x6459b20 (libc.so.6:strncmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x645b3c0 (libc.so.6:strncpy) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x645d1b0 (libc.so.6:memset) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x6459ae0 (libc.so.6:strncat) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x64e4260 (libc.so.6:__memmove_chk) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x64623f0 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x6459160 (libc.so.6:strcpy) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x6457cd0 (libc.so.6:strcmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x64e41d0 (libc.so.6:__memcpy_chk) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x6457880 (libc.so.6:strcat) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x645d850 (libc.so.6:stpcpy) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
--3191-- REDIR: 0x645b400 (libc.so.6:rindex) redirected to 0x4c308a0 (rindex)
--3191-- REDIR: 0x6452130 (libc.so.6:malloc) redirected to 0x4c2db20 (malloc)
--3191-- REDIR: 0x645c060 (libc.so.6:__GI_strstr) redirected to 0x4c354d0 (__strstr_sse2)
--3191-- REDIR: 0x645c860 (libc.so.6:memchr) redirected to 0x4c32170 (memchr)
--3191-- REDIR: 0x6462470 (libc.so.6:__GI_memcpy) redirected to 0x4c32b00 (__GI_memcpy)
--3191-- REDIR: 0x64524f0 (libc.so.6:free) redirected to 0x4c2ed80 (free)
--3191-- REDIR: 0x6452d10 (libc.so.6:calloc) redirected to 0x4c2faa0 (calloc)
--3191-- REDIR: 0x6459720 (libc.so.6:strlen) redirected to 0x4c30f60 (strlen)
--3191-- REDIR: 0x645cff0 (libc.so.6:__GI_memmove) redirected to 0x4c347e0 (__GI_memmove)
--3191-- REDIR: 0x6464760 (libc.so.6:strchrnul) redirected to 0x4c34da0 (strchrnul)
--3191-- REDIR: 0x645d3b0 (libc.so.6:__GI_mempcpy) redirected to 0x4c34fa0 (__GI_mempcpy)
--3191-- REDIR: 0x6463480 (libc.so.6:strcasestr) redirected to 0x4c356e0 (strcasestr)
--3191-- REDIR: 0x6478070 (libc.so.6:__strstr_sse2_unaligned) redirected to 0x4c35460 (strstr)
--3191-- REDIR: 0x645cbf0 (libc.so.6:__GI_memcmp) redirected to 0x4c33b90 (__GI_memcmp)
--3191-- REDIR: 0x646d570 (libc.so.6:__strcmp_sse2_unaligned) redirected to 0x4c31f90 (strcmp)
--3191-- REDIR: 0x5bbae60 (libstdc++.so.6:operator new(unsigned long)) redirected to 0x4c2e080 (operator new(unsigned long))
--3191-- REDIR: 0x5bb8f10 (libstdc++.so.6:operator delete(void*)) redirected to 0x4c2f1e0 (operator delete(void*))
--3191-- REDIR: 0x646d820 (libc.so.6:__memcpy_sse2_unaligned) redirected to 0x4c324a0 (memcpy@@GLIBC_2.14)
--3191-- REDIR: 0x653c3f0 (libc.so.6:__memcmp_sse4_1) redirected to 0x4c33cd0 (__memcmp_sse4_1)
--3191-- REDIR: 0x652c420 (libc.so.6:__memmove_ssse3_back) redirected to 0x4c32230 (memcpy@GLIBC_2.2.5)
--3191-- REDIR: 0x5bbaf10 (libstdc++.so.6:operator new[](unsigned long)) redirected to 0x4c2e7a0 (operator new[](unsigned long))
--3191-- REDIR: 0x6407850 (libc.so.6:putenv) redirected to 0x4c35960 (putenv)
--3191-- REDIR: 0x6457ab0 (libc.so.6:__GI_strchr) redirected to 0x4c30a00 (__GI_strchr)
--3191-- REDIR: 0x64598c0 (libc.so.6:strnlen) redirected to 0x4c30ee0 (strnlen)
--3191-- REDIR: 0x6459b70 (libc.so.6:__GI_strncmp) redirected to 0x4c31710 (__GI_strncmp)
--3191-- REDIR: 0x64526c0 (libc.so.6:realloc) redirected to 0x4c2fce0 (realloc)
OMNeT++ Discrete Event Simulation  (C) 1992-2014 Andras Varga, OpenSim Ltd.
Version: 4.6, build: 141202-f785492, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer
--3191-- REDIR: 0x64739d0 (libc.so.6:__strcpy_sse2_unaligned) redirected to 0x4c31040 (strcpy)
--3191-- REDIR: 0x5bb8f40 (libstdc++.so.6:operator delete[](void*)) redirected to 0x4c2f6e0 (operator delete[](void*))
--3191-- REDIR: 0x6513a50 (libc.so.6:__strncmp_sse42) redirected to 0x4c317f0 (__strncmp_sse42)
--3191-- REDIR: 0x645d240 (libc.so.6:__GI_memset) redirected to 0x4c344c0 (memset)
--3191-- REDIR: 0x6464550 (libc.so.6:rawmemchr) redirected to 0x4c34dd0 (rawmemchr)
Setting up Cmdenv...
--3191-- REDIR: 0x6457d10 (libc.so.6:__GI_strcmp) redirected to 0x4c31fe0 (__GI_strcmp)
Loading NED files from /home/rim/thesisworkspace/Medical/src: 35

Preparing for running configuration General, run #0...
Scenario: $repetition=0
Assigned runID=General-0-20170712-11:31:15-3191
Setting up network `SN'...
Initializing...

Running simulation...
** Event #1   T=0   Elapsed: 0.013s (0m 00s)  0% completed   ev/sec=0
** Event #2048   T=13.441927261936   Elapsed: 2.075s (0m 02s)  26% completed   ev/sec=990.329
** Event #5120   T=32.045943973857   Elapsed: 4.194s (0m 04s)  62% completed   ev/sec=1447.69
** Event #8192   T=50.841693489135   Elapsed: 6.300s (0m 06s)  99% completed   ev/sec=1459.38
** Event #8223   T=51.003536244016   Elapsed: 6.336s (0m 06s)  100% completed   ev/sec=857.143

<!> Simulation time limit reached -- simulation stopped at event #8223, t=51.003536244016.


Calling finish() at end of Run #0...
Castalia| module:SN.wirelessChannel
Castalia| histogram name:Fade depth distribution
Castalia| histogram_min:-50 histogram_max:15
Castalia| histogram_values 0 0 4 8 16 27 60 154 287 422 388 121 7 0
Castalia| module:SN.node[0].ResourceManager
Castalia| simple output name:Consumed Energy
Castalia| 3.16051 
Castalia| simple output name:Estimated network lifetime (days)
Castalia| 3.49487 
Castalia| simple output name:Remaining Energy
Castalia| 18716.8 
Castalia| module:SN.node[0].Communication.Radio
Castalia| simple output name:RX pkt breakdown
Castalia| 4 Failed with NO interference
Castalia| 2 Failed, below sensitivity
Castalia| 243 Received with NO interference
Castalia| module:SN.node[0].Application
Castalia| index:3 simple output name:Packets loss rate
Castalia| 0.0240964 total
Castalia| index:3 simple output name:Packets received per node
Castalia| 243 
Castalia| index:3 simple output name:Packets reception rate
Castalia| 0.975904 total
Castalia| histogram name:Application level latency, in ms
Castalia| histogram_min:0 histogram_max:600
Castalia| histogram_values 243 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Castalia| module:SN.node[1].ResourceManager
Castalia| simple output name:Consumed Energy
Castalia| 3.162 
Castalia| simple output name:Remaining Energy
Castalia| 18716.8 
Castalia| module:SN.node[1].Communication.Radio
Castalia| simple output name:RX pkt breakdown
Castalia| 249 Received with NO interference
Castalia| module:SN.node[2].ResourceManager
Castalia| simple output name:Consumed Energy
Castalia| 3.16002 
Castalia| simple output name:Remaining Energy
Castalia| 18716.8 
Castalia| module:SN.node[2].Communication.Radio
Castalia| simple output name:RX pkt breakdown
Castalia| 1 Failed with NO interference
Castalia| 3 Failed, below sensitivity
Castalia| 245 Received with NO interference
Castalia| module:SN.node[3].ResourceManager
Castalia| simple output name:Consumed Energy
Castalia| 3.14338 
Castalia| simple output name:Remaining Energy
Castalia| 18716.9 
Castalia| module:SN.node[3].Communication.Radio
Castalia| simple output name:TXed pkts
Castalia| 249 TX pkts
Castalia| module:SN.node[3].Application
Castalia| simple output name:Energy nJ/bit
Castalia| 15399.6 
Castalia| module:SN.node[4].ResourceManager
Castalia| simple output name:Consumed Energy
Castalia| 3.16132 
Castalia| simple output name:Remaining Energy
Castalia| 18716.8 
Castalia| module:SN.node[4].Communication.Radio
Castalia| simple output name:RX pkt breakdown
Castalia| 1 Failed with NO interference
Castalia| 248 Received with NO interference
Castalia| module:SN.node[5].ResourceManager
Castalia| simple output name:Consumed Energy
Castalia| 3.16184 
Castalia| simple output name:Remaining Energy
Castalia| 18716.8 
Castalia| module:SN.node[5].Communication.Radio
Castalia| simple output name:RX pkt breakdown
Castalia| 5 Failed with NO interference
Castalia| 3 Failed, below sensitivity
Castalia| 238 Received with NO interference

End.
==3191== 
==3191== HEAP SUMMARY:
==3191==     in use at exit: 77,004 bytes in 10 blocks
==3191==   total heap usage: 56,436 allocs, 56,426 frees, 12,763,750 bytes allocated
==3191== 
==3191== Searching for pointers to 10 not-freed blocks
==3191== Checked 619,992 bytes
==3191== 
==3191== LEAK SUMMARY:
==3191==    definitely lost: 96 bytes in 1 blocks
==3191==    indirectly lost: 4,044 bytes in 4 blocks
==3191==      possibly lost: 0 bytes in 0 blocks
==3191==    still reachable: 72,864 bytes in 5 blocks
==3191==         suppressed: 0 bytes in 0 blocks
==3191== Rerun with --leak-check=full to see details of leaked memory
==3191== 
==3191== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==3191== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)


Thanks in advance
Reply all
Reply to author
Forward
0 new messages