Hello everyone !

I met a weird problem and I found that some people have discussed it in the
mailing list before. Unfortunately, their comments cannot help much so that
I post it again.

My program attempts to inspect the communication among 9 nodes. There was no
error while compiling as shown below.

$ make pc
mkdir -p build/pc
compiling TestVoteC to a pc binary
ncc -o build/pc/main.exe -g -O0 -pthread -fnesc-nido-tosnodes=1000
-fnesc-simulate -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=pc
-fnesc
-cfile=build/pc/app.c -board=micasb -DIDENT_PROGRAM_NAME=\"TestVoteC\"
-DIDENT_USER_ID=\"MuchenWang\" -DIDENT_HOSTNAME=\"name-091993cd84\"
-DIDENT_USE
R_HASH=0xf328d04aL -DIDENT_UNIX_TIME=0x4741fe50L
-DIDENT_UID_HASH=0xdca2c9c2L TestVoteC.nc -lm
gcc: unrecognized option `-pthread'
/opt/tinyos-1.x/tos/platform/pc/PowerStateM.nc: In function
`__nesc_nido_initialise':
/opt/tinyos-1.x/tos/platform/pc/PowerStateM.nc:837: warning: passing arg 1
of `memset' discards qualifiers from pointer target type
compiled TestVoteC to build/pc/main.exe

However, when I ran the program, I got following output:

$ build/pc/main.exe -rf=RVE_10a.nss -l=0.7 9
SIM: EEPROM system initialized.
Initializing lossy model from RVE_10a.nss.
0: RFM connectivity graph constructed.
SIM: event queue initialized.
SIM: Random seed is 984375
SIM: Initializing sockets
SIM: Created server socket listening on port 10584.
SIM: Created server socket listening on port 10585.
SIM: eventAcceptThread running.
SIM: Time for mote 0 initialized to 4680444.
SIM: commandReadThread running.
SIM: Time for mote 1 initialized to 21114991.
SIM: Time for mote 2 initialized to 15420999.
SIM: Time for mote 3 initialized to 13402051.
SIM: Time for mote 4 initialized to 11610136.
SIM: Time for mote 5 initialized to 9689035.
SIM: Time for mote 6 initialized to 22557593.
SIM: Time for mote 7 initialized to 5083616.
SIM: Time for mote 8 initialized to 33486617.
8: BOOT: Scheduling for boot at 0:0:1.17011100.
8: BOOT: Scheduling for boot at 0:0:5.27874775.
8: BOOT: Scheduling for boot at 0:0:3.85524975.
8: BOOT: Scheduling for boot at 0:0:3.35051275.
8: BOOT: Scheduling for boot at 0:0: 2.90253400.
8: BOOT: Scheduling for boot at 0:0:2.42225875.
8: BOOT: Scheduling for boot at 0:0:5.63939825.
8: BOOT: Scheduling for boot at 0:0:1.27090400.
8: BOOT: Scheduling for boot at 0:0:8.37165425.
8: Popping event for mote 0 with time 0:0: 1.17011100.
0: Setting TOS_LOCAL_ADDRESS to 0
0: BOOT: Mote booting at time 0:0:1.17011100.
0: CLOCK: Setting clock rate to interval 231, scale 3
0: malloc data entry for clock event: 0xa060258
0: RANDOM_LFSR initialized.
Segmentation fault (core dumped)

I also added some DBG message in StdControl.init and StdControl.start,
however, none of them showed up.

Can anybody tell me what might be the reason?

Thank you very much!

PS: The footprint of the program is around 21KB -- I noticed that some
people said that exceeding 16KB would sometime trigger the "Segmentation
fault", I don't know whether it could be a reason for it.

Bests,
joseph
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to