dce的异常和handle SIGUSR1 nostop
来源:互联网 发布:14年nba总决赛数据 编辑:程序博客网 时间:2024/05/04 03:31
这个异常在上gdb的时候才有,如下
0x000000318b20f5db in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:42
42 sig);
Missing separate debuginfos, use: debuginfo-install cairo-1.8.8-3.1.el6.x86_64 gsl-1.13-1.el6.x86_64
(gdb) bt
#0 0x000000318b20f5db in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:42
#1 0x00007ffff7aac435 in ns3::StackTrampoline::StackTrampoline() () at ../model/pthread-fiber-manager.cc:143
#2 0x00007ffff7aa9e09 in ns3::PthreadFiberManager::PthreadFiberManager() () at ../model/pthread-fiber-manager.cc:244
#3 0x00007ffff7ab2237 in ns3::TaskManager::SetFiberManagerType(ns3::TaskManager::FiberManagerType) () at ../model/task-manager.cc:509
#4 0x00007ffff7ab401b in ns3::Ptr<ns3::AttributeAccessor const> ns3::DoMakeAccessorHelperOne<ns3::EnumValue, ns3::TaskManager, ns3::TaskManager::FiberManagerType>(void (ns3::TaskManager::*)(ns3::TaskManager::FiberManagerType))::MemberMethod::DoSet(ns3::TaskManager*, ns3::EnumValue const*) const ()
at /home/gftp/tool/network/newbake/dce/build/include/ns3.23/ns3/attribute-accessor-helper.h:383
#5 0x00007ffff7ab4a45 in ns3::AccessorHelper<ns3::TaskManager, ns3::EnumValue>::Set(ns3::ObjectBase*, ns3::AttributeValue const&) const ()
at /home/gftp/tool/network/newbake/dce/build/include/ns3.23/ns3/attribute-accessor-helper.h:187
#6 0x00007ffff739c4d7 in ns3::ObjectBase::DoSet(ns3::Ptr<ns3::AttributeAccessor const>, ns3::Ptr<ns3::AttributeChecker const>, ns3::AttributeValue const&) ()
at ../src/core/model/object-base.cc:185
#7 0x00007ffff739bc6b in ns3::ObjectBase::ConstructSelf(ns3::AttributeConstructionList const&) () at ../src/core/model/object-base.cc:164
#8 0x00007ffff73a021f in ns3::Object::Construct(ns3::AttributeConstructionList const&) () at ../src/core/model/object.cc:145
#9 0x00007ffff73eb879 in ns3::ObjectFactory::Create() const () at ../src/core/model/object-factory.cc:103
#10 0x00007ffff7b1db3e in ns3::Ptr<ns3::TaskManager> ns3::ObjectFactory::Create<ns3::TaskManager>() const ()
at /home/gftp/tool/network/newbake/dce/build/include/ns3.23/ns3/object-factory.h:198
#11 0x00007ffff7b1c80f in ns3::DceManagerHelper::Install(ns3::NodeContainer) () at ../helper/dce-manager-helper.cc:104
#12 0x0000000000411574 in CreateNode() () at ../myscripts/ns-3-dce-quagga/example/dce-quagga-ospfd.cc:382
#13 0x0000000000412516 in main () at ../myscripts/ns-3-dce-quagga/example/dce-quagga-ospfd.cc:568
(gdb)
Ptr<TaskManager> taskManager = m_taskManagerFactory.Create<TaskManager> ();
derived->Construct (m_parameters);
DoSet (info.accessor, info.checker, *info.initialValue);
代码在
(object->*m_setter)(tmp); at /home/gftp/tool/network/newbake/dce/build/include/ns3.23/ns3/attribute-accessor-helper.h:383
出现raise应该是合理的,如下,
StackTrampoline () { int status = 0; status = pthread_mutex_lock (&g_mutex); g_current = this; NS_ASSERT_MSG (status == 0, "lock failed"); m_stack = malloc (SIGSTKSZ); stack_t newstack; stack_t oldstack; newstack.ss_sp = m_stack; newstack.ss_size = SIGSTKSZ; newstack.ss_flags = 0; m_vgId = VALGRIND_STACK_REGISTER (m_stack,((unsigned long)m_stack) + SIGSTKSZ); status = sigaltstack (&newstack, &oldstack); NS_ASSERT_MSG (status == 0, "first sigaltstack failed stack=" << m_stack << " stacksize=" << SIGSTKSZ); struct sigaction newact; struct sigaction oldact; newact.sa_handler = &StackTrampoline::SignalHandler; newact.sa_flags = SA_ONSTACK | SA_RESETHAND; sigemptyset (&newact.sa_mask); status = sigaction (SIGUSR1, &newact, &oldact); NS_ASSERT_MSG (status == 0, "first sigaction failed");<span style="color:#FF6666;"> status = raise (SIGUSR1);</span> NS_ASSERT_MSG (status == 0, "raise failed"); status = sigaltstack (&oldstack, 0); NS_ASSERT_MSG (status == 0, "second sigaltstack failed"); g_current = 0; status = pthread_mutex_unlock (&g_mutex); NS_ASSERT_MSG (status == 0, "unlock failed"); }
为保证gdb继续工作,我的处理,
(gdb) handle SIGUSR1 nostop
gdb文档来自于 http://www.delorie.com/gnu/docs/gdb/gdb_39.html
原文部分摘录
info signals
info handle
- Print a table of all the kinds of signals and how GDB has been told tohandle each one. You can use this to see the signal numbers of allthe defined types of signals.
info handle
is an alias forinfo signals
. handle signal keywords...
- Change the way GDB handles signal signal. signalcan be the number of a signal or its name (with or without the`SIG' at the beginning); a list of signal numbers of the form`low-high'; or the word `all', meaning all theknown signals. The keywords say what change to make.
The keywords allowed by the handle
command can be abbreviated.Their full names are:
nostop
- GDB should not stop your program when this signal happens. It maystill print a message telling you that the signal has come in.
stop
- GDB should stop your program when this signal happens. This impliesthe
print
keyword as well. print
- GDB should print a message when this signal happens.
noprint
- GDB should not mention the occurrence of the signal at all. Thisimplies the
nostop
keyword as well. pass
noignore
- GDB should allow your program to see this signal; your programcan handle the signal, or else it may terminate if the signal is fataland not handled.
pass
andnoignore
are synonyms. nopass
ignore
- GDB should not allow your program to see this signal.
nopass
andignore
are synonyms.
0 0
- dce的异常和handle SIGUSR1 nostop
- gdb中 handle SIGUSR1 nostop
- DCE和DTE的区别
- DTE和DCE的区分
- C++SIGUSR1和SIGUSR2的学习
- DTE DCE的含义和判断方法
- DTE DCE的含义和判断方法
- APUE--捕捉SIGUSR1和SIGUSR2的简单程序
- ECO的“Handle”和“Handle链”
- DTE和DCE详解
- DCE和DTE区别
- DTE和DCE
- 网格与集群、CORBA、DCE和P2P的比较
- [ZZ]网格与集群、CORBA、DCE和P2P的比较
- signal(SIGUSR1, SIG_IGN) 的意思
- ANR异常以及handle的使用
- RS232---DTE和DCE区别
- Hwnd和Handle的区别
- 不用C++模版实现queue
- CSDN “我要提问”板块,标题长度:中文10-50
- Xcode打包发布过程中闪退(使用Application Loader进行ipa包的上传)
- Animation动画详解
- 晒一晒娱乐圈父子脸在人脸识别相似度检测下的爆笑结果
- dce的异常和handle SIGUSR1 nostop
- 字符串压缩
- GRE词汇记忆法分类
- Android Proguard returned with error code 1. See console 之注意事项
- SAT OG阅读填空题真题词汇
- CopyOnWriteArrayList类原理分析及使用场合
- github入门教程
- 相对路径,绝对路径,当前路径,程序目录
- iTween研究院之学习笔记Move移动篇(一)