上次换包后系统出现一个奇怪的问题,函数A返回后按理应该继续往下走,结果却一直僵在那卡住,注释掉函数A调用则返回正常。排除数据库锁的问题,一直找不到问题所在。
向小强咨询,提示可以用procstack和truss查看一下进程状态,怎么把这两个家伙给忘了。
运行procstack如下:
procstack 1851632
0x3294b738
UcsSubsComponent::~UcsSubsComponent()(0x7a21d988, 0x2) + 0x10
0x329571ac void
std::_Destroy<UcsSubsComponent>(UcsSubsComponent*)(0x7a21d988)
+ 0x18
0x329559cc
std::allocator<UcsSubsComponent>::destroy(UcsSubsComponent*)(0x2ff1f1d4,
0x7a21d988) + 0x18
0x329548d8
std::vector<UcsSubsComponent,std::allocator<UcsSubsComponent>
>::_Destroy(UcsSubsComponent*,UcsSubsComponent*)(0x2ff1f1d4,
0x7a21d988, 0x3fe64f58) + 0x24
0x329673a0
std::vector<UcsSubsComponent,std::allocator<UcsSubsComponent>
>::_Clear()(0x2ff1f1d4) + 0x24
0x32960004
std::vector<UcsSubsComponent,std::allocator<UcsSubsComponent>
>::~vector()(0x2ff1f1d4, 0x2) + 0x18
0x323fe3b4
cu_rnd_entity::MuOp::~MuOp()(0x2ff1f1d0, 0x2, 0x0) + 0x98
0x323ef498 dealMuCtl(const
BAF_Transaction&,const
BMS_USER&)(0x310d24a0, 0x2ff1f340) + 0x1e8
0x323b5078 User_Normalize(const
BAF_Transaction&,BAF_FuncResult&)(0x310d24a0,
0x2ff20238) + 0xd28
0x31f0b404
cb_FixNewComplete(bmsOrder&,BAF_Transaction&)(0x2ff219b8,
0x310d24a0) + 0x19d8
0x311fe048
cb_OrderDecomposeXML(bmsOrder&,BAF_Transaction&)(0x2ff219b8,
0x310d24a0) + 0xe38
0x3020f25c OrderTransection::run()(0x2ff219b8) +
0x2c4
0x3012b250
Bms_Action_Batch(void*,Tcl_Interp*,int,const char**)(0x0,
0x3000d578, 0x3, 0x2ff21c00) + 0x164
0xd2634a94 TclInvokeStringCommand() + 0x98
0xd2633efc TclEvalObjvInternal() + 0x1d0
0xd2635f0c Tcl_EvalEx() + 0x1a8
0xd265b784 Tcl_FSEvalFile() + 0x1e8
0xd2680edc Tcl_Main() + 0x2f0
0x10000350 main() + 0x10
0x100001c0 __start() + 0x98
发现果然和小强说的一样,一直在进行析构。估计应该和UcsSubsComponent析构有关,排查代码发现,有2个库都有同样的UcsSubsComponent类声明和实现,而且都没有加名称空间。怀疑是这个原因导致库连接混乱。注释掉一个后,运行正常。