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
Bug in latest master #1510
Comments
and one more : [2023-09-30 18:48:21,408][ERROR][ nftset.c:591 ] nftset add failed, family:ip, table:raw, set:allows, error:File exists this may be come from : nftset-debug yes |
this issue occurs if upgrading from 41.0.22 or earlier. delete cache file artificially may be helpful.
this issue occurs when smartdns is not run as authorized user (like root) . but I'm not sure if you are |
ok will test after remove.
run as user root. service try to add same rull in nft and nft back file exists. may be need to have check if ip is list in set to not try to add. |
and one other: to many lines with this: [2023-09-30 20:43:40,315][ERROR][ dns_server.c:1908] update packet info failed. |
nftables allows adding the same IP repeatedly without causing errors. Are you compiling smartdns yourself? I suspect it has something to do with compilation |
Hi see this : [2023-10-02 13:58:59,069][ERROR][ dns_server.c:7148] load cert /etc/smartdns/smartdns-cert.pem failed, error:8000000D:system library::Permission denied this is how i compile : make -j 60 |
Perhaps your OS has advanced ACL controls that prevent the smartdns process from accessing some files. It's also possible that libopenssl is incorrect when compiling or running. |
find afgter set permision all is fine : chmod 0700 -R /etc/smartdns/ P.S. Please for this if you have idea : [2023-09-30 20:43:40,315][ERROR][ dns_server.c:1908] update packet info failed. |
Some DNS requests do not have these attributes. If smartdns works fine, please ignore it. |
Thanks for now i will close if find any other will update you. Thanks for support! |
Hi @PikuZheng please see this bug [2023-12-29 22:20:13,358][FATAL][ smartdns.c:635 ] process exit with signal 11, code = 1, errno = 0, pid = 8, self = 396495, pc = 0x951aa0, addr = 0x8, build(Dec 29 2023 14:53:00 x86_64) daemon run with -R smartdns Last-Build-With-Kernel-6.4.13-85-g3d11a8f-dirty |
Upload the configuration file, as well as the frequency of problems and scenarios. |
Hi smartdns.conf bind [::]:53 server 8.8.8.8 cache-size 2621440 tcp-idle-time 120 force-qtype-SOA 65 rr-ttl 600 Enable IPV4, IPV6 dual stack IP optimization selection strategydualstack-ip-selection-threshold [num] (0~1000)dualstack-ip-allow-force-AAAA [yes|no]dualstack-ip-selection no set log levellog-level: [level], level=off, fatal, error, warn, notice, info, debuglog-file: file path of log file.log-console [yes|no]: output log to console.log-size: size of each log file, support k,m,glog-num: number of logs, 0 means disable loglog-level error log-file /var/log/smartdns/smartdns.log enalbe DNS64 featuredns64 [ip/subnet]dns64 64:ff9b::/96nftset-timeout yes enable nftset debug, check nftset setting result, output log when error.nftset-debug [yes|no]nftset-debug yes conf-file msallow.conf scenario , on firewall have rull that block port 53 from internet request. 396494 smartdns Fri Dec 29 20:24:34 2023 02:24:49 00:00:00 /usr/sbin/smartdns -R i try to build service with this : make -j30 but in smardns.log i dont see full debug |
If possible, use "ulimit -c unlimited" enable coredump. When starting smartdns, add the -S parameter to generate coredump file when crash and upload the coredump file and executable file. And better tell what the commit id of the corresponding code is. Or you can run addr2line -e smartdns [address] to show line number in the source code where crash occured. Build command make DEBUG=1 -j |
Hi @pymumu when have time download core dump size is 700mb: https://fileport.io/EZUw7vNdw7Xe P.S. In log file have only one line in this period: [2023-12-31 17:51:45,356][ERROR][ dns_cache.c:96 ] BUG: dns_cache is invalid. before run build with latest master i remove old cache file . One more this is gdb read of core dump : gdb /usr/sbin/smartdns core-smartdns-981335 |
Try the latest code please. I have modified a few possible places, but I am not sure whether it can solve the problem. |
I think all is fine now . Now build latest master and get this warrning please see: dns_conf.c: In function '_get_domain': |
And one more src/dns_server.c if (type == SOCK_STREAM) { listen(fd, 16) - to incress in dmesg i get this error : [Tue Jan 16 13:57:28 2024] TCP: request_sock_TCP: Possible SYN flooding on port [::]:53. Dropping request. and here : https://access.redhat.com/solutions/30453 Increase application socket listen backlog - Search this part recommend to incress. |
|
gcc 13.2.0 |
thanks for fix : |
Hi @pymumu one strange situation when start service all is fine work on 2-9% load.. but in time of work after 1 hour or more start use 100% and more. how to catch why ? |
top,gdb backtrace,log,audit-log |
Config : user root bind [::]:53 server 8.8.8.8 cache-size 2621440 tcp-idle-time 120 force-qtype-SOA 65 rr-ttl 600 Enable IPV4, IPV6 dual stack IP optimization selection strategydualstack-ip-selection-threshold [num] (0~1000)dualstack-ip-allow-force-AAAA [yes|no]dualstack-ip-selection no set log levellog-level: [level], level=off, fatal, error, warn, notice, info, debuglog-file: file path of log file.log-console [yes|no]: output log to console.log-size: size of each log file, support k,m,glog-num: number of logs, 0 means disable loglog-level error log-file /var/log/smartdns/smartdns.log enalbe DNS64 featuredns64 [ip/subnet]dns64 64:ff9b::/96nftset-timeout yes enable nftset debug, check nftset setting result, output log when error.nftset-debug [yes|no]nftset-debug yes Log : [2024-01-23 08:54:12,108][ERROR][ dns_server.c:2163] update packet info failed. top : top - 18:56:19 up 54 days, 1:03, 1 user, load average: 0.96, 0.69, 0.55
1883577 root 20 0 292.1m 25.5m 94.7 0.1 1:04.95 R /usr/sbin/smartdns -R -S autdit-log dont have. for gdb backtrace will need your help how to get. service not crash only start use more cpu . ver : smartdns 1.20240116-1435 |
can you check the file size /var/run/smartdns.cache |
737M /var/run/smartdns.cache |
|
About the log: update packet ttl failed
|
Build with this . see this is gdb from now : Thread 1 (LWP 1905573 "smartdns"): this is top : top - 20:08:59 up 54 days, 2:16, 1 user, load average: 0.55, 0.61, 0.57
1905573 root 20 0 424.6m 110.0m 99.9 0.3 10:50.35 R /usr/sbin/smartdns -R -S now will replease with rebuilded service . P.S. see this in ps fax : 1905572 ? S 0:00 /usr/sbin/smartdns -R -S this is in log folder : -rw-r----- 1 root root 472946 Jan 23 19:39 /var/log/smartdns/smartdns-audit.log |
Try adding this configuration to disable PTR query.
|
is there options to set multi time now in config have : force-qtype-SOA 65 ot add force-qtype-SOA 65 or will be problem |
no problem. |
remove .txt but next record rewrite preview . |
It is a Malformed Packet. The downstream query has a domain name of I'll optimize printing here. |
I was wondering if you have an Internet IP and could it be attacked by DDNS? |
Hi Yes not get full info . After set : force-qtype-SOA 12 service run very well : top - 13:56:14 up 54 days, 20:03, 1 user, load average: 0.24, 0.28, 0.27
1934637 root 20 0 563.7m 300.0m 6.7 0.9 45:41.42 S /usr/sbin/smartdns -R -S @PikuZheng Hi |
could you try to set |
The latest code optimizes the local PTR query code. |
Hi @pymumu Apply changes and will monitor for 12-24 h if see any will update you. Thanks for your hard work !!! smartdns 1.20240124-1554 |
Hi One other when enable dns on port 853 : [2024-01-25 16:07:19,251][ERROR][ dns_client.c:2662] SSL write fail error no: no such file(128) in log get this error : in /etc/smartdns have : -rw------- 1 root root 1013 Nov 30 13:03 smartdns-cert.pem |
This is an error related to remote connections and has nothing to do with local certificates. what is you openssl version? |
OpenSSL 3.0.12 |
don't known why, maybe it's related to openssl. |
hi @pymumu One more bug report: when nft is loaded and smartdns is running. and make nft flush ruleset > load all rule from clean > smartdns stop load ips from nft rull in conf file : nftset /yahoo.com/#4:ip#raw#domain and need to restart smartdns to start load ips in nft . is it possible to make one loop or other check when nft is reset to start load record in nft tables. m. |
The nftset should be set again when the client queries after the domain TTL expires, just have to wait. |
Hi nft table is loaded in smartdns set yahoo.com . on client comupter open yahoo.com and in nft is added rull. after nft flush ruleset open new browser and type yahoo.com. |
Tested, no problem. Try adding debug logs.
|
Ok here is debug: when nft is loaded and service is run after that : [2024-03-01 19:59:10,920][ INFO][ dns_server.c:4901] RULE-MATCH, type: 6, domain: www.msftconnecttest.com, rule: www.msftconnecttest.com. after that i make : nft flush ruleset and try to make same request: [2024-03-01 19:59:48,980][ INFO][ dns_server.c:4901] RULE-MATCH, type: 6, domain: www.msftconnecttest.com, rule: www.msftconnecttest.com. service dont know that nft is flushed and not add rull . service think that rull is in nft . |
before flush : [2024-03-01 20:04:35,901][DEBUG][ dns_server.c:6690] recv query packet from 172.16.0.5, len = 42, type = 0 after flush: [2024-03-01 20:06:35,770][DEBUG][ dns_server.c:6690] recv query packet from 172.16.0.6, len = 41, type = 0 |
You need wait ttl of domain timeout. |
aha after 30 min when expired timeout , and will try to open domain will readd in nft. m. |
Hi please check this report
[2023-09-30 16:46:53,336][ERROR][ dns_client.c:2635] recv failed, server 8.8.4.4:853, Bad address
[2023-09-30 16:46:53,528][ERROR][ dns_cache.c:87 ] BUG: dns_cache is invalid.
[2023-09-30 16:46:53,528][FATAL][ smartdns.c:616 ] process exit with signal 6, code = -6, errno = 0, pid = 1138503, self = 1138503, pc = 0x115f47, addr = 0x115f47, build(Sep 27 2023 19:21:19 x86_64)
[2023-09-30 16:46:53,528][FATAL][ util.c:1443] Stack:
[2023-09-30 16:46:53,528][FATAL][ util.c:1455] #1: 0x42ab9d () from /usr/sbin/smartdns+0x2ab9d
[2023-09-30 16:46:53,528][FATAL][ util.c:1455] #2: 0x40637d () from /usr/sbin/smartdns+0x637d
[2023-09-30 16:46:53,528][FATAL][ util.c:1455] #3: 0x1491cc546d30 () from /lib64/libc.so.6+0x40d30
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #4: 0x1491cc59ac0b pthread_kill() from /lib64/libc.so.6+0x94c0b
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #5: 0x1491cc546c92 raise() from /lib64/libc.so.6+0x40c92
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #6: 0x1491cc52c49f abort() from /lib64/libc.so.6+0x2649f
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #7: 0x1491cc52d27e () from /lib64/libc.so.6+0x2727e
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #8: 0x1491cc5a43f5 () from /lib64/libc.so.6+0x9e3f5
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #9: 0x1491cc5a63c0 () from /lib64/libc.so.6+0xa03c0
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #10: 0x1491cc5a66da () from /lib64/libc.so.6+0xa06da
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #11: 0x1491cc5a8f3f free() from /lib64/libc.so.6+0xa2f3f
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #12: 0x435e11 () from /usr/sbin/smartdns+0x35e11
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #13: 0x435e75 () from /usr/sbin/smartdns+0x35e75
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #14: 0x435ea4 () from /usr/sbin/smartdns+0x35ea4
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #15: 0x416726 () from /usr/sbin/smartdns+0x16726
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #16: 0x416a10 () from /usr/sbin/smartdns+0x16a10
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #17: 0x417430 () from /usr/sbin/smartdns+0x17430
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #18: 0x41e2ef () from /usr/sbin/smartdns+0x1e2ef
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #19: 0x41c350 () from /usr/sbin/smartdns+0x1c350
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #20: 0x41c4cc () from /usr/sbin/smartdns+0x1c4cc
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #21: 0x41c554 () from /usr/sbin/smartdns+0x1c554
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #22: 0x420864 () from /usr/sbin/smartdns+0x20864
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #23: 0x420b53 () from /usr/sbin/smartdns+0x20b53
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #24: 0x40dbfa () from /usr/sbin/smartdns+0xdbfa
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #25: 0x410f60 () from /usr/sbin/smartdns+0x10f60
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #26: 0x413461 () from /usr/sbin/smartdns+0x13461
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #27: 0x1491cc598eba () from /lib64/libc.so.6+0x92eba
[2023-09-30 16:46:53,529][FATAL][ util.c:1455] #28: 0x1491cc623808 () from /lib64/libc.so.6+0x11d808
The text was updated successfully, but these errors were encountered: