I'm new to NS3. I studied vanet-routing-compair.cc script. I tried to run it by these commands (vanet-routing-compare.cc is in scratch folder).
./waf --run scratch/vanet-routing-compare
./waf --run "vanet-routing-compare --scenario=1 --saveconfig=scenario1.txt"
But I'm getting confused with the results. I get following error messages.
msg="Could not connect callback to /NodeList/*/DeviceList/*/ns3::WifiNetDevice/Phy/PhyTxDrop", file=../src/core/model/config.cc, line=920 terminate called without an active exception
Command ['/home/azra/Desktop/ns-allinone-3.31/ns-3.31/build/scratch/vanet-routing-compare'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --gdb").
And by using the gdb debugger, I see this message.
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/azra/Desktop/ns-allinone-3.31/ns-3.31/build/scratch/vanet-routing- compare --scenario=1 --saveconfig=scenario1.txt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
msg="Could not connect callback to /NodeList/*/DeviceList/*/ns3::WifiNetDevice /Phy/PhyTxDrop", file=../src/core/model/config.cc, line=920
terminate called without an active exception
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig#entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 }
I appreciate who can help me understand why this is happening and how I can solve it.
I got the same error in version 3.31, but the version 3.30 is ok. Maybe you can also try version 3.30.
I believe since version 3.31 the names changed from ns3:: to $ns3::
https://groups.google.com/g/ns-3-users/c/VWTV9ZdY7fs/m/MxRdIoLoAAAJ[Here][1]
The workaround I use is to copy the entire file from here:gitlab of ns3 development branch
As you can see, there were few (more than a few) changes in the code.
i am coding in Qt 5.7 on win 7. my app is run correctly. but when i use the debugger, a error dialog box showed: the GDB process terminated unexpectedly (exit code3).
last part of debugger log :
>~"../../../../src/gdb-7.10.1/gdb/utils.c:1071: internal-error: virtual memory exhausted.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nCreate a core file of GDB? "
>~"(y or n) [answered Y; input not from terminal]\n"
dUNEXPECTED GDB STDERR:
dThis application has requested the Runtime to terminate it in an unusual way.
dPlease contact the application's support team for more information.
dGDB PROCESS FINISHED, status 0, exit code 3
dNOTE: ENGINE ILL ******
dFORWARDING STATE TO InferiorShutdownFailed
dState changed BY FORCE from InferiorStopOk(14) to InferiorShutdownFailed(17) [master]
dState changed from InferiorShutdownFailed(17) to EngineShutdownRequested(19) [master]
dQUEUE: SHUTDOWN ENGINE
dCALL: SHUTDOWN ENGINE
dPLAIN ADAPTER SHUTDOWN 19
dINITIATE GDBENGINE SHUTDOWN IN STATE 14, PROC: 0
dNOTE: ENGINE SHUTDOWN OK
dState changed from EngineShutdownRequested(19) to EngineShutdownOk(21) [master]
dState changed from EngineShutdownOk(21) to DebuggerFinished(22) [master]
dQUEUE: FINISH DEBUGGER
dNOTE: FINISH DEBUGGER
dHANDLE RUNCONTROL FINISHED
sDebugger finished.
in a part of my code i used QVector:
int logic_points_number=5;
int logic_input_points[16][logic_points_number] ;
QVector<double> x1_1(2*logic_points_number);
QVector<double> y1_1(32*logic_points_number);
x1_position=x1_last_position_logic;//start from last drawn point
for(int logic_channel=0;logic_channel<16;logic_channel++){
for (int i=0;i<logic_points_number ;i++){
if (logic_channel==0)// set x1_1 only for first channel
x1_1[2*i]= x1_position;
y1_1[(2*logic_channel*logic_points_number)+(2*i)]=(16.2-logic_channel)+(0.6*logic_input_points[logic_channel][i]);
if (logic_channel==0){// set x1_1 and x1_position only for first channel
x1_position = x1_position + x1_step_logic;
x1_1[(2*i)+1]= x1_position;
}
y1_1[(2*logic_channel*logic_points_number)+(2*i)+1]=(16.2-logic_channel)+(0.6*logic_input_points[logic_channel][i]);
}
}
x1_last_position_logic= x1_position;//Set new last drawn point
}
in run there is no problem. when i delete the above code, there is no problem in debugger.
there is no helpful answer in google.what i shall to do?
thanks
In my case error code was 'the cdb process terminated unexpectedly (code -805306181)'. Changing debugger from 32 bit app debugger to 64 bit app debugger fixed this issue
I have been following this tutorial for reference:
http://valgrind.org/docs/manual/ms-manual.html
When I am using it to profile my Application Using the command:
valgrind --tool=massif --time-unit=B ./run.o
It finishes but does not produce any output file.
Here is the log while running it using the mentioned command.
https://www.dropbox.com/s/yae78rm9wmdbph1/ValGring_massif_Log?dl=0
Kindly suggest why it won't produce a massif.out.xxxxx file ?
If you look in your log file you will see that Valgrind has
crashed, and it explains why, and what you should do to fix it.
valgrind: m_mallocfree.c:304 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed.
valgrind: Heap block lo/hi size mismatch: lo = 91849568, hi = 1425748016.
This is probably caused by your program erroneously writing past the
end of a heap block and corrupting heap metadata. If you fix any
invalid writes reported by Memcheck, this assertion failure will
probably go away. Please try that before reporting this as a bug.
Use Valgrind's memcheck to fix
your program and try again.
I'm going over a very basic erlang book while using yaws. I'm editing a single yaws file and refreshing the browser. Often (3rd time now) the process will just start to show this error. and i look and look for a syntax error or anything, and eventually i just restart the process and everything works. without any change to the source file.
right now this is the source file that triggered the error this last time
<erl>
out(Arg) ->
{ehtml,
{table, [{width, "100%"}],
{tr,[],
[{td, [{width, "50%"}], "hello world!"},
{td, [{width, "50%"}], "hi again."}]
}
}
}.
</erl>
I tried searching the error, but where all the search results have a meaningful context like "no access" all i get is "<<>>"
=ERROR REPORT==== 26-Nov-2013::20:17:32 ===
Yaws process died: {{badmatch,<<>>},
[{yaws_server,skip_data,2,
[{file,"yaws_server.erl"},{line,2951}]},
{yaws_server,deliver_dyn_file,6,
[{file,"yaws_server.erl"},{line,2717}]},
{yaws_server,aloop,4,
[{file,"yaws_server.erl"},{line,1152}]},
{yaws_server,acceptor0,2,
[{file,"yaws_server.erl"},{line,1013}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}
Some version info:
Yaws 1.94
Debian GNU/Linux 7.2 (wheezy)
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]
Any ideas what this is telling me?
Also, any suggestions for debuggers that are good for beginners is very welcome.
For debugging, I think using Erlang tracing will be helpful. We want to figure out why the yaws_server:skip_data/2 function would be getting a badmatch exception, and specifically why it's getting an empty binary passed to it as that's the only way it could encounter that error. So we need to trace that condition. Try these steps (and don't forget the trailing period on each Erlang shell command):
Run yaws in interactive mode: yaws -i
Once yaws comes up, hit enter to get an Erlang shell prompt.
Create a tracing function for dbg so we get a reasonably formatted backtrace from the trace data: F = fun({trace,_,_,_,Dump},[]) -> io:format("~s~n", [binary_to_list(Dump)]), [] end.
Turn on tracing with this command: dbg:tracer(process, {F, []}).
Trace calls in all processes: dbg:p(all, call).
Now trace the condition of yaws_server:skip_data/2 getting an empty binary as a first argument, and when it does, get a backtrace:
dbg:tpl(yaws_server,skip_data,dbg:fun2ms(fun([<<>>, _]) -> message(process_dump()) end)).
With this in place, start hitting your .yaws page until you provoke the condition, at which point a backtrace will be displayed in your Erlang shell. If you get that backtrace, please copy it into a gist or pastebin and post a link to it as a follow-up here.
If I am correct the output of the out function is supposed to be a list. I didn't check your whole code but the following should work:
<erl>
out(Arg) ->
[{ehtml,
{table, [{width, "100%"}],
{tr,[],
[{td, [{width, "50%"}], "hello world!"},
{td, [{width, "50%"}], "hi again."}]
}
}
}].
</erl>
I want to use the LSM framework with kernel ubuntu 2.6.36.
When I compiled the kernel module, it wrote:
WARNING: "register_security " undefined!
After a lot of googlings, I found the reason is that the register_security() symbol is no longer exported in the 2.6 kernel.
So I added EXPORT_SYMBOL(register_security) in the ../security/security.c file, and recompiled the kernel.
After booting with the new kernel, I added extern int register_security(struct security_operations *ops) in my kernel module file, and compiled the module again.
However, the WARNING information still existed. If I continued to insmode the module, the dmesg told me that
Unknown symbol register_security
What should I do? How can I register a Linux Security Module?
Make sure newly loaded kernel is the one, which is compiled by you.
Check the Licence of your module (Ref: http://lists.jammed.com/linux-security-module/2004/08/0053.html)
In modern kernels register_security symbol does not exported. It means that you can't register LSM module as a module. But if you really wish to do that you can do that :) Look at the exported LSM-symbols like security_sb_copy_data. They are simple wrappers over the security_ops->some_lsm_method. So, you can use their code to determine security_ops pointer value. It needs disassembler though.
Unknown symbol register_security
Happened at the line that you unregister your LSM.
So add unregister_security() in security.c and export it:
/**
* unregister_security - allows security modules to be moved
* #ops : a pointer to the struct security_options that had been registered before.
*/
int unregister_security(struct security_operations *ops)
{
if (ops != security_ops)
{
printk (KERN_INFO "%s: trying to unregister "
"a security_opts structure that is not "
"registered, failing.\n", __FUNCTION__);
return -EINVAL;
}
security_ops = &dummy_security_ops;
return 0;
}
EXPORT_SYMBOL(unregister_security);
And recompiled the kernel.