-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
进程耗尽cpu和内存 #341
Comments
你配置的缓存是多少。 |
缓存4096 发生问题后改2048 无改善 |
进程没有生成 coredump 文件 |
把你配置发一下把。 |
|
打开debug日志,看一下smartdns是否出现请求循环把。 感觉你这个应该是iptables配置不正确,导致smartdns循环 |
|
好了我知道怎么回事了。 |
修正以上问题后,仍出现内存耗尽情况。日志如下: |
你说的是日志里面的out-of-memory么? |
其實我也遇到了這個問題,發生是在昨天,這邊的網絡不穩,DNS是我在某地建的,但線路不穩導致DNS time out然後就一直Out of memory,直到重啟才正常 [2020-05-27 00:05:14,204][ERROR][ dns_server.c:2969] dns server process failed. |
问题现象
进程耗尽cpu和内存
运行环境
固件型号
Openwrt X86_64 18.06.5
运营商
无关
重现步骤
概率发生,各种操作无法重现
上游DNS配置。
https://223.5.5.5/dns-query
访问的域名。
无关
信息收集
将/var/log/smrtdns.log日志作为附件上传。
[2020-02-06 23:28:40,105][ERROR][ dns_client.c:2410] send query to 223.5.5.5 failed, Bad address, type: 3
日志里上百行都是这个,没有其他内容
如进程异常,请将coredump功能开启,上传coredump信息文件。
在自定义界面,开启设置->自定义设置->生成coredump配置,重现问题后提交coredump文件
coredump文件在/tmp目录下
注:系统日志
Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.304887] smartdns invoked oom-killer: gfp_mask=0x14201ca(GFP_HIGHUSER_MOVABLE|__GFP_COLD), nodemask=(null), order=0, oom_score_adj=0 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.305341] CPU: 0 PID: 6523 Comm: smartdns Not tainted 4.14.151 #0 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.305588] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 12/12/2018 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.305951] Call Trace: Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.306059] 0xffffffff815bd0c0 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.306183] 0xffffffff811059fb Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.306307] 0xffffffff81104e39 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.306431] ? 0xffffffff81088e8b Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.306559] 0xffffffff811058dd Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.306683] 0xffffffff81109a0e Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.306807] 0xffffffff811032fa Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.306931] 0xffffffff811fef7f Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.307055] 0xffffffff81124fe2 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.307187] 0xffffffff8112acc4 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.307310] 0xffffffff8112b167 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.307434] 0xffffffff81050fba Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.307557] 0xffffffff810510f2 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.307681] ? 0xffffffff8160150c Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.307809] 0xffffffff81601522 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.307933] RIP: 0033:0x5d99f5 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.308055] RSP: 002b:00007fd4e9189898 EFLAGS: 00010246 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.308241] RAX: 00007fd4e918db20 RBX: 0000000000feeab8 RCX: 0000000000007f77 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.308482] RDX: 0000000000000000 RSI: 00000000006d73c0 RDI: 000000000000000c Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.308724] RBP: 00007fd4e918bd30 R08: 0000000000002000 R09: 000000000063a893 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.308965] R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000002d Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.309206] R13: 00007fd4e9189900 R14: 000000000000000c R15: 0000000000000003 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.309449] Mem-Info: Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.309549] active_anon:110993 inactive_anon:163 isolated_anon:0 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.309549] active_file:42 inactive_file:82 isolated_file:0 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.309549] unevictable:0 dirty:0 writeback:0 unstable:0 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.309549] slab_reclaimable:530 slab_unreclaimable:2996 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.309549] mapped:7 shmem:1202 pagetables:390 bounce:0 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.309549] free:4551 free_pcp:170 free_cma:0 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.310619] Node 0 active_anon:443972kB inactive_anon:652kB active_file:168kB inactive_file:328kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:28kB dirty:0kB writeback:0kB shmem:4808kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.311369] DMA free:2396kB min:516kB low:644kB high:772kB active_anon:13196kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB kernel_stack:0kB pagetables:24kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.312230] lowmem_reserve[]: 0 472 472 472 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.312390] DMA32 free:15808kB min:15864kB low:19828kB high:23792kB active_anon:430776kB inactive_anon:652kB active_file:168kB inactive_file:328kB unevictable:0kB writepending:0kB present:507776kB managed:488120kB mlocked:0kB kernel_stack:1904kB pagetables:1536kB bounce:0kB free_pcp:680kB local_pcp:680kB free_cma:0kB Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.313630] lowmem_reserve[]: 0 0 0 0 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.313770] DMA: 1*4kB (M) 1*8kB (M) 1*16kB (M) 0*32kB 1*64kB (M) 0*128kB 1*256kB (M) 0*512kB 0*1024kB 1*2048kB (M) 0*4096kB = 2396kB Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.314177] DMA32: 330*4kB (UE) 341*8kB (UE) 85*16kB (UE) 13*32kB (UE) 8*64kB (UME) 14*128kB (UME) 14*256kB (UME) 2*512kB (UM) 3*1024kB (UM) 0*2048kB 0*4096kB = 15808kB Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.314687] 1337 total pagecache pages Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.314831] 0 pages in swap cache Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.314959] Swap cache stats: add 0, delete 0, find 0/0 Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.315154] Free swap = 0kB Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.315269] Total swap = 0kB Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.315395] 130942 pages RAM Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.315509] 0 pages HighMem/MovableOnly Thu Feb 6 23:08:27 2020 kern.warn kernel: [51517.315652] 4935 pages reserved Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.315774] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.316077] [ 1776] 0 1776 2250 23 11 3 0 0 ubusd Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.316386] [ 1778] 0 1778 682 9 6 3 0 0 askfirst Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.316692] [ 2029] 0 2029 1771 47 9 3 0 0 logd Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.316987] [ 2048] 0 2048 3843 33 14 3 0 0 rpcd Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.317284] [ 2100] 453 2100 1800 26 9 3 0 0 dnsmasq Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.317589] [ 2127] 0 2127 725 9 6 3 0 0 dropbear Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.317900] [ 2185] 0 2185 3880 39 14 3 0 0 netifd Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.318201] [ 2218] 0 2218 2809 28 12 3 0 0 odhcpd Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.318542] [ 2272] 0 2272 684 8 7 3 0 0 p910nd Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.318845] [ 2317] 0 2317 2777 29 11 3 0 0 uhttpd Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.319146] [ 2347] 0 2347 3276 50 12 3 0 0 keepalived Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.319455] [ 2378] 0 2378 3299 74 10 3 0 0 keepalived Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.319767] [ 2440] 0 2440 1214 14 7 3 0 0 odhcp6c Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.320072] [ 2536] 0 2536 689 11 6 3 0 0 vlmcsd Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.320376] [ 2586] 0 2586 771 8 6 3 0 0 ntpd Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.320676] [ 2715] 0 2715 450 189 5 2 0 0 ss-redir Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.320982] [ 2717] 0 2717 108 34 5 3 0 0 obfs-local Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.321293] [ 2750] 0 2750 449 190 4 2 0 0 ss-redir Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.321600] [ 2753] 0 2753 106 31 5 3 0 0 obfs-local Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.321917] [ 6520] 0 6520 110207 109070 219 3 0 0 smartdns Thu Feb 6 23:08:27 2020 kern.err kernel: [51517.322223] Out of memory: Kill process 6520 (smartdns) score 841 or sacrifice child Thu Feb 6 23:08:27 2020 kern.err kernel: [51517.322503] Killed process 6520 (smartdns) total-vm:440828kB, anon-rss:436280kB, file-rss:0kB, shmem-rss:0kB Thu Feb 6 23:08:27 2020 kern.info kernel: [51517.422345] oom_reaper: reaped process 6520 (smartdns), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
The text was updated successfully, but these errors were encountered: