Hello Folks,

I used to play with TestDip in simulating DIP in TOSSIM. However, when I
downloaded/installed the tinyos VM image(
http://sing.stanford.edu/tinyos/dists/xubuntos-2.1-vm.tar.gz) from the link
of
http://docs.tinyos.net/index.php/Running_a_XubunTOS_Virtual_Machine_Image_in_VMware_Playerin
Windows 7 64bit with VM Player after HDD failure, and I ran it but it
gave me "Segmentation Fault (core dumped)". I have tried to figure this out
for a couple of weeks, but I can't find the solution.

I used to get the log like following.
----
DEBUG (0): Decision to DATA
DEBUG (0): Converting key 7 to index 6
DEBUG (0): Converting key 7 to index 6
DEBUG (0): Data sent with key 5 and version 00010000
DEBUG (0): Attempting to send data in the air
DEBUG (0): Data send successfully in the air
DEBUG (0): Window size requested, give 1024
DEBUG (0): Firing Trickle Event Timer
----

However, now I got the following problem with clean installation of above
image (I used to use above and it worked very well)

------
DEBUG (0): Decision to DATA
DEBUG (0): Converting key 1 to index 0
DEBUG (0): Converting key 1 to index 0
DEBUG (0): Data sent with key 1 and version 00010000
DEBUG (0): Attempting to send data in the air
Segmentation fault (core dumped)
xubun...@xubuntos-tinyos:/opt/tinyos-2.1.0/apps/tests/TestDip$
-------

It looks got this issue right before sending a message (from app.c).

-----------------app.c
#line 42
  sim_log_debug(177U, "AMDipP", "Attempting to send data in the air\n");
  err = AMDipP$NetAMSend$send(AM_BROADCAST_ADDR, &AMDipP$am_msg[sim_node()],
len);
  if (err == SUCCESS) {
      AMDipP$busy[sim_node()] = TRUE;
    }
  return err;
}
------------------------

As Preeti said in the mailing list, I added one more flag (-shared) in
PLATFORM_BUILD_FLAGS like this
PLATFORM_BUILD_FLAGS= -fpic *-shared* -W1,--enabled-auto-image-base

As Phil said
"*Segmentation faults:* If trying to do this causes TOSSIM to throw a
segmentation violation (segfault), then chances are you are using a version
of gcc that does not work well with the dynamic linking that TOSSIM is
doing. In particular, it has been verified to work properly with 4.0.2 and
3.6, but some people have encountered problems with gcc 4.1.1. " in
http://docs.tinyos.net/index.php/TOSSIM.

I checked my environment like following, but I can't get resolved.
Could you tell me what's wrong with this? Or can you tell which VM has no
issue like above?

---------------
xubun...@xubuntos-tinyos:/opt/tinyos-2.1.0/apps/tests/TestDip$ make
--version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i486-pc-linux-gnu
xubun...@xubuntos-tinyos:/opt/tinyos-2.1.0/apps/tests/TestDip$ gcc --version
gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

xubun...@xubuntos-tinyos:/opt/tinyos-2.1.0/apps/tests/TestDip$
---------------

Best Regards,
-Seungweon



On Fri, Nov 14, 2008 at 4:41 PM, Seungweon Park <[email protected]> wrote:

> Hello,
>
> I'm working on test of dissemination protocol which is DIP with Micaz. When
> I simulate DIP (TestDip) several times, it looks working fine. That is, I
> can see SUMMARY/VECTOR/DATA except INVALID. However, when I tested it with
> Micaz, I couldn't see SUMMARY message in Listen application(I see this via
> SerialForwarder MIB510 with USB serial port).  My test environment is as
> follow.
>
> ----------------------------------------------------------------------
> Micaz#1 - Node ID 0
> Micaz#2 - Node ID 1
> Micaz#3 - Node ID 2
>
> Micaz#4(Listener) - USB serial port 1(MIB510)
> Micaz#5(Injecter) - USB serial port 2(MiB510)
> ----------------------------------------------------------------------
>
> It seems they only send/receive VECTOR/DATA. So I looked at the source code
> DipLogicP.nc in /opt/tinyos-2.x/tos/lib/net/dip, and I can see
>
>
> --------------------------
>     dbg("DipLogicP", "D=%u, E=%u, L=%u, V=%u, C=%u\n", D, E, L, V, C);
>     if((D - E) < (L / (C * V))) {
>       return ID_DIP_SUMMARY;
>     }
>     return ID_DIP_VECTOR;
> --------------------------
>
> So I can come up to two ideas.
>
> 1. SerialForwarder can't listen only the SUMMARY packet in my
> environment(???)
> 2. The routine doesn't send SUMMARY at all. In reality, it doesn't return
> ID_DIP_SUMMARY.
>
> Can you help me how I can see SUMMARY packet? Any idea is welcome!!
> Just in case, I included a part of simulation log with only 2 Micaz.
>
> Thank you,
> Seungweon
>
>
> Simulation log.txt
> ----------------------------
> DEBUG (0): Key registration complete!
> DEBUG (0): Key 1
> DEBUG (0): Key 2
> DEBUG (0): Key 3
> DEBUG (0): Key 4
> DEBUG (0): Key 5
> DEBUG (0): Key 6
> DEBUG (0): Key 7
> DEBUG (0): Key 8
> DEBUG (0): Real Total: 8, Dip Total: 8
> DEBUG (0): Real Total: 8, DIP New Total: 8
> DEBUG (0): DATA_ESTIMATE initialized to 3
> DEBUG (0): MAX_ESTIMATE initialized to 3
> DEBUG (0): VECT_ESTIMATE initialized to 2
> DEBUG (0): DIP ready
> DEBUG (0): Booted at 0:0:0.000000200
> DEBUG (0): ActiveMessageC started!
> DEBUG (0): Updating data items
> DEBUG (0): App notified key 5 is new
> DEBUG (0): Converting key 5 to index 4
> DEBUG (0): Converting key 5 to index 4
> DEBUG (0): App notified key 7 is new
> DEBUG (0): Converting key 7 to index 6
> DEBUG (0): Converting key 7 to index 6
> DEBUG (0): App notified key 6 is new
> DEBUG (0): Converting key 6 to index 5
> DEBUG (0): Converting key 6 to index 5
> DEBUG (0): App notified key 1 is new
> DEBUG (0): Converting key 1 to index 0
> DEBUG (0): Converting key 1 to index 0
> DEBUG (0): Window size requested, give 1024
> DEBUG (0): Firing Trickle Event Timer
> DEBUG (0): Trickle Timer fired!
> DEBUG (0): Index-0 Estimate-3
> DEBUG (0): Index-1 Estimate-0
> DEBUG (0): Index-2 Estimate-0
> DEBUG (0): Index-3 Estimate-0
> DEBUG (0): Index-4 Estimate-3
> DEBUG (0): Index-5 Estimate-3
> DEBUG (0): Index-6 Estimate-3
> DEBUG (0): Index-7 Estimate-0
> DEBUG (0): Decision to DATA
> DEBUG (0): Converting key 1 to index 0
> DEBUG (0): Converting key 1 to index 0
> DEBUG (0): Data sent with key 1 and version 00010000
> DEBUG (0): Attempting to send data in the air
> DEBUG (0): Data send successfully in the air
> DEBUG (0): Window size requested, give 1024
> DEBUG (0): Firing Trickle Event Timer
> DEBUG (0): Trickle Timer fired!
> DEBUG (0): Index-0 Estimate-2
> DEBUG (0): Index-1 Estimate-0
> DEBUG (0): Index-2 Estimate-0
> DEBUG (0): Index-3 Estimate-0
> DEBUG (0): Index-4 Estimate-3
> DEBUG (0): Index-5 Estimate-3
> DEBUG (0): Index-6 Estimate-3
> DEBUG (0): Index-7 Estimate-0
> DEBUG (0): Decision to DATA
> DEBUG (0): Converting key 5 to index 4
> DEBUG (0): Converting key 5 to index 4
> DEBUG (0): Data sent with key 5 and version 00010000
> DEBUG (0): Attempting to send data in the air
> DEBUG (0): Data send successfully in the air
> DEBUG (0): Window size requested, give 1024
> DEBUG (0): Firing Trickle Event Timer
> DEBUG (0): Trickle Timer fired!
> DEBUG (0): Index-0 Estimate-2
> DEBUG (0): Index-1 Estimate-0
> DEBUG (0): Index-2 Estimate-0
> DEBUG (0): Index-3 Estimate-0
> DEBUG (0): Index-4 Estimate-2
> DEBUG (0): Index-5 Estimate-3
> DEBUG (0): Index-6 Estimate-3
> DEBUG (0): Index-7 Estimate-0
> DEBUG (0): Decision to DATA
> DEBUG (0): Converting key 6 to index 5
> DEBUG (0): Converting key 6 to index 5
> DEBUG (0): Data sent with key 6 and version 00010000
> DEBUG (0): Attempting to send data in the air
> DEBUG (0): Data send successfully in the air
> DEBUG (0): Window size requested, give 1024
> DEBUG (0): Firing Trickle Event Timer
> DEBUG (0): Trickle Timer fired!
> DEBUG (0): Index-0 Estimate-2
> DEBUG (0): Index-1 Estimate-0
> DEBUG (0): Index-2 Estimate-0
> DEBUG (0): Index-3 Estimate-0
> DEBUG (0): Index-4 Estimate-2
> DEBUG (0): Index-5 Estimate-2
> DEBUG (0): Index-6 Estimate-3
> DEBUG (0): Index-7 Estimate-0
> DEBUG (0): Decision to DATA
> DEBUG (0): Converting key 7 to index 6
> DEBUG (0): Converting key 7 to index 6
> DEBUG (0): Data sent with key 7 and version 00010000
> DEBUG (0): Attempting to send data in the air
> DEBUG (0): Data send successfully in the air
> DEBUG (0): Window size requested, give 1024
> DEBUG (0): Firing Trickle Event Timer
> DEBUG (0): Trickle Timer fired!
> DEBUG (0): Index-0 Estimate-2
> DEBUG (0): Index-1 Estimate-0
> DEBUG (0): Index-2 Estimate-0
> DEBUG (0): Index-3 Estimate-0
> DEBUG (0): Index-4 Estimate-2
> DEBUG (0): Index-5 Estimate-2
> DEBUG (0): Index-6 Estimate-2
> DEBUG (0): Index-7 Estimate-0
> DEBUG (0): Decision to VECTOR
> DEBUG (0): Converting key 1 to index 0
> DEBUG (0): Converting key 1 to index 0
> DEBUG (0): Converting key 6 to index 5
> DEBUG (0): Converting key 6 to index 5
> DEBUG (0): Attempting to send data in the air
> DEBUG (0): Data send successfully in the air
> DEBUG (0): Window size requested, give 1024
> DEBUG (0): Firing Trickle Event Timer
> DEBUG (0): Trickle Timer fired!
> DEBUG (0): Index-0 Estimate-1
> DEBUG (0): Index-1 Estimate-0
> DEBUG (0): Index-2 Estimate-0
> DEBUG (0): Index-3 Estimate-0
> DEBUG (0): Index-4 Estimate-2
> DEBUG (0): Index-5 Estimate-1
> DEBUG (0): Index-6 Estimate-2
> DEBUG (0): Index-7 Estimate-0
> DEBUG (0): Decision to VECTOR
> DEBUG (0): Converting key 5 to index 4
> DEBUG (0): Converting key 5 to index 4
> DEBUG (0): Converting key 7 to index 6
> DEBUG (0): Converting key 7 to index 6
> DEBUG (0): Attempting to send data in the air
> DEBUG (0): Data send successfully in the air
> DEBUG (0): Window size requested, give 1024
> DEBUG (0): Firing Trickle Event Timer
> DEBUG (0): Trickle Timer fired!
> DEBUG (0): Index-0 Estimate-1
> DEBUG (0): Index-1 Estimate-0
> DEBUG (0): Index-2 Estimate-0
> DEBUG (0): Index-3 Estimate-0
> DEBUG (0): Index-4 Estimate-1
> DEBUG (0): Index-5 Estimate-1
> DEBUG (0): Index-6 Estimate-1
> DEBUG (0): Index-7 Estimate-0
> DEBUG (0): D=3, E=1, L=4, V=2, C=1
> DEBUG (0): Decision to VECTOR
> DEBUG (0): Converting key 1 to index 0
> DEBUG (0): Converting key 1 to index 0
> DEBUG (0): Converting key 6 to index 5
> DEBUG (0): Converting key 6 to index 5
> DEBUG (0): Attempting to send data in the air
> DEBUG (0): Data send successfully in the air
> DEBUG (0): Window size requested, give 1024
> DEBUG (0): Firing Trickle Event Timer
> DEBUG (0): Trickle Timer fired!
> DEBUG (0): Index-0 Estimate-0
> DEBUG (0): Index-1 Estimate-0
> DEBUG (0): Index-2 Estimate-0
> DEBUG (0): Index-3 Estimate-0
> DEBUG (0): Index-4 Estimate-1
> DEBUG (0): Index-5 Estimate-0
> DEBUG (0): Index-6 Estimate-1
> DEBUG (0): Index-7 Estimate-0
> DEBUG (0): D=3, E=1, L=4, V=2, C=1
> DEBUG (0): Decision to VECTOR
> DEBUG (0): Converting key 5 to index 4
> DEBUG (0): Converting key 5 to index 4
> DEBUG (0): Converting key 7 to index 6
> DEBUG (0): Converting key 7 to index 6
> DEBUG (0): Attempting to send data in the air
> DEBUG (0): Data send successfully in the air
> DEBUG (0): Window size requested, give 2048
> DEBUG (0): Firing Trickle Event Timer
> DEBUG (0): Trickle Timer fired!
> DEBUG (0): Index-0 Estimate-0
> DEBUG (0): Index-1 Estimate-0
> DEBUG (0): Index-2 Estimate-0
> DEBUG (0): Index-3 Estimate-0
> DEBUG (0): Index-4 Estimate-0
> DEBUG (0): Index-5 Estimate-0
> DEBUG (0): Index-6 Estimate-0
> DEBUG (0): Index-7 Estimate-0
> DEBUG (0): D=3, E=0, L=8, V=2, C=1
> DEBUG (0): Decision to SUMMARY
> DEBUG (0): Highest key at 0 with estimate 0 and thus len 8
> DEBUG (0): First range: 0, 8 = 0
> DEBUG (0): Iterating from 0 to 8
> DEBUG (0): Found range 0, 8
> DEBUG (0): Hash Entry: 00000008 e7075cc0 b0283040
> DEBUG (0): Highest key at 0 with estimate 0 and thus len 8
> DEBUG (0): First range: 0, 8 = 0
> DEBUG (0): Iterating from 0 to 8
> DEBUG (0): Found range 0, 8
> DEBUG (0): Hash Entry: 00000008 e7075cc0 b0283040
> DEBUG (0): Attempting to send data in the air
> DEBUG (0): Data send successfully in the air
> DEBUG (0): Window size requested, give 4096
> DEBUG (0): Firing Trickle Event Timer
> DEBUG (0): Trickle Timer fired!
> DEBUG (0): Index-0 Estimate-0
> DEBUG (0): Index-1 Estimate-0
> DEBUG (0): Index-2 Estimate-0
> DEBUG (0): Index-3 Estimate-0
> DEBUG (0): Index-4 Estimate-0
> DEBUG (0): Index-5 Estimate-0
> DEBUG (0): Index-6 Estimate-0
> DEBUG (0): Index-7 Estimate-0
> DEBUG (0): D=3, E=0, L=8, V=2, C=1
> DEBUG (0): Decision to SUMMARY
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to