绑定完请刷新页面
取消
刷新

分享好友

×
取消 复制
EsgynDB 关于收集core信息的小技巧
2022-07-05 10:30:40

EsgynDB数据库的使用中有时候会碰到一些mxosrvr的core的情况,此时需要分析core产生的原因。
常规的做法是执行gdb mxosrvr coreName,然后执行t,看一下堆栈的情况。

一些常规的手段可以收集一下client&server的基本信息, 展示如下:
(gdb) bt
#0 0x00007fac59d9368c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007fac4ec59558 in SB_Thread::CV::wait (this=0x30b9018) at /home/aven/workspace/esgyndb/core/sqf/export/include/seabed/int/thread.inl:558
#2 0x00007fac4ec595d9 in SB_Thread::CV::wait (this=0x30b9018, pv_lock=true) at /home/aven/workspace/esgyndb/core/sqf/export/include/seabed/int/thread.inl:593
#3 0x00007fac5a4000fe in SB_Ms_Event_Mgr::wait (this=0x30b8f20, pv_us=-1) at mseventmgr.inl:346
#4 0x00007fac5a42078e in XWAIT_com (pv_mask=256, pv_time=-1, pv_residual=true) at pctl.cpp:982
#5 0x00007fac5a42053f in XWAIT (pv_mask=256, pv_time=-1) at pctl.cpp:878
#6 0x00007fac5a68e47a in fs_int_fs_file_awaitiox (pp_filenum=0x7fffa921cc7c, ppp_buf=0x7fffa921cb68, pp_xfercount=0x7fffa921cb54, pp_tag=0x7fffa921cb58,
pv_timeout=-1, pp_segid=0x7fffa921cb66, pv_int=false, pv_ts=false) at fsi.cpp:1428
#7 0x00007fac5a687a8c in BAWAITIOX (pp_filenum=0x7fffa921cc7c, ppp_buf=0x0, pp_xfercount=0x7fffa921cbe8, pp_tag=0x7fffa921cc68, pv_timeout=-1, pp_segid=0x0)
at fs.cpp:564
#8 0x00007fac5a68ab8c in XAWAITIOX (pp_filenum=0x7fffa921cc7c, ppp_buf=0x0, pp_xfercount=0x7fffa921cc72, pp_tag=0x7fffa921cc68, pv_timeout=-1, pp_segid=0x0)
at fs.cpp:1610
#9 0x00000000004e0a9e in CNSKListenerSrvr::runProgram (this=0x2fa5020, TcpProcessName=0x7fffa921e5f0 “KaTeX parse error: Expected 'EOF', got '#' at position 86: …rvr_ps.cpp:672 #̲10 0x0000000000…ZTC0”, portNumber=23402, TransportTrace=0) at SrvrMain.cpp:203
#11 0x00000000005d5910 in main (argc=61, argv=0x7fffa921fec8, envp=0x2e750a0) at SrvrMain.cpp:996
(gdb) p srvrGlobal->ApplicationName
$1 = “TrafCI”, ‘\000’ <repeats 506 times>
(gdb) p srvrGlobal->ClientComputerName
$2 = “esgvm-2.novalocal”, ‘\000’ <repeats 47 times>
(gdb) p srvrGlobal->clipVarchar
$3 = 0
(gdb) p srvrGlobal->IpAddress
$4 = “192.168.0.11”, ‘\000’ <repeats 115 times>
(gdb) p srvrGlobal->HostName
$5 = “esgvm-2.novalocal”, ‘\000’ <repeats 110 times>
(gdb) p srvrGlobal->ClientIpAddress
$6 = “172.31.242.111”, ‘\000’ <repeats 110 times>
(gdb)

更多的打印属性可参见Global.h这个文件,或者输入p srvrGlobal->连续按两次tab键,所有可以属性如下:
(gdb) p srvrGlobal->
Display all 176 possibilities? (y or n)
ASProcessName RoleName estCardinality m_stInternalQueriesInRepo sqlCmds
ASSvc_MonitorProxy SystemCatalog estCost m_statisticsPubType sqlCmdsLen
ASSvc_ifch TraceCollector eventFlag mapOptions sqlPlan
ASSvc_proxy WMSSrvrType execSqlCmds mappedProfileName sqlText
ASTimerHandle WmsNid executeApiType mappedSLAName sqlVersion
ApplicationName affinityNum ext_21036 masterPrty srvrContext
CSObject allocatedResources failOverEnabled maxRowsFetched srvrObjRef
CheckTimerHandle appVersion fetchAhead mds srvrPriority
ClientComputerName asSrvrObjRef fnumAS modeSpecial_1 srvrState
ClientIpAddress bAutoCommitOn goingWMSStatus mute srvrType
ClientPort bAutoCommitSet isShapeLoaded mutex srvrVersion
CreatorAccessId bConfigurationChanged isTraceState neoActiveSegments stmtHandleMap
DSG bMultiTenancyEnabled isoMapping neoODBC stopTypeFlag
DSId bRowsetSupported javaConnIdleTimeout neoSegment sutVer
DSName bSkipASTimer lastCQDAdaptiveSegment neoSegmentMax tenantID
DefaultCatalog bSpjEnableProxy lastCleanupTime nskASProcessInfo tenantName
DefaultSchema bWMS_AdaptiveSegment local_xid nskProcessInfo tenantRedefTime
EnvironmentType bspjTxnJoined m_FetchBufferSize nskQSProcessInfo tfileNum
HostName cleanupByConnection m_NodeId numConnection timeLogger
IpAddress cleanupByTime m_ProcName odbcConnIdleTimeout timeLoggerFlag
MXCS_SCHEMA_Version clientACP m_aggr_exec_interval pASHandle tip_gateway
NskSystemCatalogsTableName clientErrorLCID m_aggr_query_* pQSConnRules traceLogger
ProcessAccessId clientKeepaliveIdletime m_aggr_repos_interval portNumber traf_cluster_id
QSDBUserName clientKeepaliveIntervaltime m_aggr_stats_once process_id traf_cluster_name
QSFileSystem clientKeepaliveRetrycount m_aggr_wms_interval prtyChanged traf_instance_id
QSProcessLen clientKeepaliveStatus m_bNewConnection pxid_url traf_instance_name
QSProcessName clientLCID m_bNewService qsOpen tsdURL
QSRoleName clipVarchar m_bPublishStatsToTSDB receiveThrId useCtrlInferNCHAR
QSRuleName cpu m_bStatisticsEnabled redefTime userID
QSServiceId dcsCurrState m_bstart_aggr_timer resGovernOn userSID
QSServiceName debugFlag m_iAggrInterval resourceStatistics wmsActive
QSUserName defaultSchemaAccessOnly m_iQueryPubThreshold schemaVersion xid_length
QStimestamp dialogueId m_query_name segmentname
QStimestamp_current drvrVersion m_rule_endstats_off sessionId
QStimestamp_loaded enableLongVarchar m_rule_wms_off shmLimit
RSCollector envVariableOn m_service_name spjTxnId
————————————————
版权声明:本文为CSDN博主「post_yuan」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/post_yuan/article/details/106915530

分享好友

分享这个小栈给你的朋友们,一起进步吧。

EsgynDB
创建时间:2022-03-30 10:10:17
EsgynDB
展开
订阅须知

• 所有用户可根据关注领域订阅专区或所有专区

• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询

• 专区发布评论属默认订阅所评论专区(除付费小栈外)

技术专家

查看更多
  • itt0918
    专家
戳我,来吐槽~