IP 192.168.25.1,大概几个小时重启一次,core文件:/opt/tsg/sapp/core.226553**liuxueli** commented on *2022-07-21T13:19:26.679+0800*:
* 查看core现场,DNS解析层处理长度标识跨包的逻辑存在问题导致SAPP重启:
** 版本:
*** sapp-4.2.87.846204e-1.el7.x86_64
*** dns-2.1.2.20270fa-1.x86_64
** 栈信息如下:
***
{code:java}
Program terminated with signal 11, Segmentation fault.
#0 0x00007ffeca35f552 in get_dns_hdr_info (dns_hdr=dns_hdr@entry=0x7ff8fefc8ed0, payload=payload@entry=0x7fea80787da8 <Address 0x7fea80787da8 out of bounds>) at /usr/src/debug/dns-2.1.2.20270fa-Linux/libraries/src_0/src/dns.cpp:1052
#0 0x00007ffeca35f552 in get_dns_hdr_info (dns_hdr=dns_hdr@entry=0x7ff8fefc8ed0, payload=payload@entry=0x7fea80787da8 <Address 0x7fea80787da8 out of bounds>) at /usr/src/debug/dns-2.1.2.20270fa-Linux/libraries/src_0/src/dns.cpp:1052
#1 0x00007ffeca360c01 in parse_dns_protocol (a_stream=a_stream@entry=0x7fff58a6e06c, opstate=3 '\003', payload=0x7fea80787da8 <Address 0x7fea80787da8 out of bounds>, payload_len=payload_len@entry=918, pme=pme@entry=0x7fecba5e76cc, thread_seq=thread_seq@entry=32, a_packet=a_packet@entry=0x7fea807880ea)
at /usr/src/debug/dns-2.1.2.20270fa-Linux/libraries/src_0/src/dns.cpp:1839
#2 0x00007ffeca361514 in DNS_TCP_ENTRY (a_tcp=0x7fff58a6e06c, pme=0x7fecba5e76cc, thread_seq=32, a_packet=0x7fea807880ea) at /usr/src/debug/dns-2.1.2.20270fa-Linux/libraries/src_0/src/dns.cpp:2113
#3 0x000000000042f2d7 in plugin_call_streamentry (type=type@entry=2, pFunInfo=pFunInfo@entry=0x7fecba5e76b4, a_stream=a_stream@entry=0x7fff58a6e06c, transport_hdr=transport_hdr@entry=0x0, thread_seq=thread_seq@entry=32, a_packet=a_packet@entry=0x7fea807880ea)
at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/dealpkt/callapp.c:308
at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/dealpkt/callapp.c:803
#6 0x0000000000432d88 in tcp_deal_unorder (pindex=pindex@entry=0x7fff58a6e04c, a_tcp=a_tcp@entry=0x7fff58a6e06c, rcv=rcv@entry=0x7fee52fd1274, orderflag=orderflag@entry=0, snd=<optimized out>) at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/dealpkt/deal_tcp.c:2130
#7 0x0000000000434387 in tcp_free_stream (pindex=0x7fff58a6e04c, this_ip_hdr=this_ip_hdr@entry=0x0, transport_hdr=transport_hdr@entry=0x0, raw_pkt=raw_pkt@entry=0x0) at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/dealpkt/deal_tcp.c:1309
#8 0x000000000043dcc1 in del_stream_by_time (plist=plist@entry=0x7ffff2fa82cc, current_drive_index=current_drive_index@entry=0x7fff58bbef4c) at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/dealpkt/stream_manage.c:643
#9 0x000000000043dd75 in lrustream (pindex=pindex@entry=0x7fff58bbef4c) at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/dealpkt/stream_manage.c:670
#10 0x0000000000435a5e in deal_tcp_stream (offset_to_raw_pkt_hdr=<optimized out>, raw_pkt=0x7ff8feffcd40, tcplen=231, this_tcphdr=0x7f55b119169a, this_iphdr=0x7f55b1191686, pindex=<optimized out>) at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/dealpkt/deal_tcp.c:2886
at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/dealpkt/deal_ethernet.c:174
#20 0x0000000000428207 in mesa_default_pkt_cb (p_raw_pkt=0x7ff8feffcd40, dir=<optimized out>, thread_num=32) at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/packet_io/packet_io.c:649
#21 0x00000000004a51c1 in marsio4_pkt_hand (dir=0 '\000', raw_pkt=0x7ff8feffcd40, rx_buff=0x7f55b11914c0, tid=32) at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/packet_io/packet_io_marsio.c:646
#22 marsio4_process_packet (tid=tid@entry=32, raw_pkt=raw_pkt@entry=0x7ff8feffcd40) at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/packet_io/packet_io_marsio.c:682
#23 0x00000000004a5bb0 in marsio4_worker (arg=<optimized out>) at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/packet_io/packet_io_marsio.c:848
#24 0x00007ffff79ade25 in start_thread () from /lib64/libpthread.so.0
#25 0x00007ffff5c0a34d in clone () from /lib64/libc.so.6
(gdb) f 6
#6 0x0000000000432d88 in tcp_deal_unorder (pindex=pindex@entry=0x7fff58a6e04c, a_tcp=a_tcp@entry=0x7fff58a6e06c, rcv=rcv@entry=0x7fee52fd1274, orderflag=orderflag@entry=0, snd=<optimized out>) at /usr/src/debug/sapp-4.2.87.846204e-Linux/executable/src_0/src/dealpkt/deal_tcp.c:2130
#2 0x00007ffeca361514 in DNS_TCP_ENTRY (a_tcp=0x7fff58a6e06c, pme=0x7fecba5e76cc, thread_seq=32, a_packet=0x7fea807880ea) at /usr/src/debug/dns-2.1.2.20270fa-Linux/libraries/src_0/src/dns.cpp:2113
(gdb) p ((struct tcpdetail *)a_tcp->ptcpdetail)->datalen
$15 = 32
(gdb)
{code}
---
**zhangzhihan** commented on *2022-07-21T15:26:15.128+0800*:
IP 192.168.25.2 ,也有重启的现场,core文件:/opt/tsg/sapp/core.28786
---
**liuxueli** commented on *2022-08-01T09:43:50.190+0800*:
* 已更新,连续运行48小时,暂无重启。
---
**gitlab** commented on *2022-08-01T15:28:15.301+0800*:
[刘学利|https://git.mesalab.cn/liuxueli] mentioned this issue in [a merge request|https://git.mesalab.cn/MESA_Platform/dns/-/merge_requests/28] of [MESA Platform / dns|https://git.mesalab.cn/MESA_Platform/dns] on branch [bugfix-OMPUB-563|https://git.mesalab.cn/MESA_Platform/dns/-/tree/bugfix-OMPUB-563]:{quote}OMPUB-563: 处理长度标识跨包的逻辑存在问题: 1)区分数据包方向导致偏移的长度出现负值导致访问越界,2)错误使用累计传输长度作为单包长度限制判断导致部分请求与应答未正常解析{quote}
---
**gitlab** commented on *2022-08-01T15:28:18.313+0800*:
[刘学利|https://git.mesalab.cn/liuxueli] mentioned this issue in [a commit|https://git.mesalab.cn/MESA_Platform/dns/-/commit/fa0ebd48e689499d495852915c16d15a206c134e] of [MESA Platform / dns|https://git.mesalab.cn/MESA_Platform/dns] on branch [bugfix-OMPUB-563|https://git.mesalab.cn/MESA_Platform/dns/-/tree/bugfix-OMPUB-563]:{quote}OMPUB-563: 处理长度标识跨包的逻辑存在问题: 1)区分数据包方向导致偏移的长度出现负值导致访问越界,2)错误使用累计传输长度作为单包长度限制判断导致部分请求与应答未正常解析{quote}
---
**gitlab** commented on *2022-08-01T16:59:26.278+0800*:
[刘学利|https://git.mesalab.cn/liuxueli] mentioned this issue in [a commit|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/commit/ba31aaf503fd17cc01df4b8a6a5f9aee4f0c236c] of [TSG / tsg-os-buildimage|https://git.mesalab.cn/tsg/tsg-os-buildimage] on branch [update-22.08-firewall-v1|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/tree/update-22.08-firewall-v1]:{quote}更新: tsg_master、app_sketch_local、dns、ssl、bgp、libmaatframe、app_proto_identify, 新增或修复:{quote}
---
**gitlab** commented on *2022-08-01T17:00:16.325+0800*:
[刘学利|https://git.mesalab.cn/liuxueli] mentioned this issue in [a merge request|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/merge_requests/844] of [TSG / tsg-os-buildimage|https://git.mesalab.cn/tsg/tsg-os-buildimage] on branch [update-22.08-firewall-v1|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/tree/update-22.08-firewall-v1]:{quote}更新: tsg_master、app_sketch_local、dns、ssl、bgp、libmaatframe、app_proto_identify, 新增或修复:{quote}
---
**gitlab** commented on *2022-08-01T17:10:49.425+0800*:
[刘学利|https://git.mesalab.cn/liuxueli] mentioned this issue in [a commit|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/commit/79895af8ea3e565b38ecbc6784d2cfaefc7c8c6b] of [TSG / tsg-os-buildimage|https://git.mesalab.cn/tsg/tsg-os-buildimage] on branch [update-22.08-firewall-v1|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/tree/update-22.08-firewall-v1]:{quote}更新: tsg_master、app_sketch_local、dns、ssl、bgp、libmaatframe、app_proto_identify, 新增或修复:{quote}
---
**gitlab** commented on *2022-08-01T17:11:19.957+0800*:
[刘学利|https://git.mesalab.cn/liuxueli] mentioned this issue in [a merge request|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/merge_requests/845] of [TSG / tsg-os-buildimage|https://git.mesalab.cn/tsg/tsg-os-buildimage] on branch [update-22.08-firewall-v1|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/tree/update-22.08-firewall-v1]:{quote}更新: tsg_master、app_sketch_local、dns、ssl、bgp、libmaatframe、app_proto_identify, 新增或修复:{quote}
---
**gitlab** commented on *2022-08-04T09:45:41.226+0800*:
[刘学利|https://git.mesalab.cn/liuxueli] mentioned this issue in [a commit|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/commit/111f13724e253f7a6cb6addb2a49c99710d379d6] of [TSG / tsg-os-buildimage|https://git.mesalab.cn/tsg/tsg-os-buildimage] on branch [update-22.07-firewall-v4|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/tree/update-22.07-firewall-v4]:{quote}更新dns、ssl、libmaatframe,修复:{quote}
---
**gitlab** commented on *2022-08-04T09:47:40.932+0800*:
[刘学利|https://git.mesalab.cn/liuxueli] mentioned this issue in [a merge request|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/merge_requests/853] of [TSG / tsg-os-buildimage|https://git.mesalab.cn/tsg/tsg-os-buildimage] on branch [update-22.07-firewall-v4|https://git.mesalab.cn/tsg/tsg-os-buildimage/-/tree/update-22.07-firewall-v4]:{quote}更新dns、ssl、libmaatframe,修复:{quote}
---
**gitlab** commented on *2024-01-08T09:37:46.509+0800*:
[莫迪凯|https://git.mesalab.cn/modikai] mentioned this issue in [a commit|https://git.mesalab.cn/modikai/sapp-dns-protocol/-/commit/fa0ebd48e689499d495852915c16d15a206c134e] of [莫迪凯 / sapp-dns-protocol|https://git.mesalab.cn/modikai/sapp-dns-protocol]:{quote}OMPUB-563: 处理长度标识跨包的逻辑存在问题: 1)区分数据包方向导致偏移的长度出现负值导致访问越界,2)错误使用累计传输长度作为单包长度限制判断导致部分请求与应答未正常解析{quote}