Closed systemcrash closed 1 year ago
Can you please post the output of opkg list-installed
.
Here, sorry about that.
---trim---
Here, sorry about that.
I've had a wild theory that maybe the image was somehow built with some dependencies missing, but everything seems to be present.
I don't have a technical expertise to troubleshoot it further, I'd like to escalate this to the upstream to seek guidance, it could be beneficial to be on the latest version of libcurl for that.
I've created a PR for the 7.85.0 version of curl in master, I'll cherry-pick it for the release branches within a few days unless there are issues reported for the updated version in a master branch.
The segmentation fault (22.03) only occurs when logging is enabled and verbosity > 0.
N.B. - setting logging / verbosity for 21.02 does not page fault
The segmentation fault (22.03) only occurs when logging is enabled and verbosity > 0.
N.B. - setting logging / verbosity for 21.02 does not page fault
Thanks for adding this. Just so I have the complete information for upstream, can you please update curl/ibcurl to 7.85.0 and include the output for: curl --version
?
opkg list-installed curl libcurl4 - 7.83.1-3
opkg install libcurl Upgrading libcurl4 on root from 7.83.1-3 to 7.85.0-1...
vi /etc/config/https-dns-proxy
service https-dns-proxy restart
Tue Sep 27 18:00:31 2022 user.notice https-dns-proxy: Starting service ✓✓✓✓ Tue Sep 27 18:00:31 2022 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses Tue Sep 27 18:00:31 2022 kern.info kernel: [52874.728769] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 63331e1f Tue Sep 27 18:00:31 2022 kern.info kernel: [52874.738717] epc = 77e0cdc0 in libc.so[77d8e000+a9000] Tue Sep 27 18:00:31 2022 kern.info kernel: [52874.743959] ra = 77e0eb04 in libc.so[77d8e000+a9000]
I can't reproduce this issue with setting verbosity to 2.
Verbosity setting altered from '1' to '2' with no change to the observed result (SIGSEGV).
Kindly post your /etc/config/https-dns-proxy configuration.
As seen in the syslog snippet, 4X DOH servers are configured.
FYI - the device is TP-Link Archer C6 v2
So the trail ends here?
Well, it doesn't seem critical, since it works normally after bootup, when the system settles down. Maybe before config is loaded, the internal default settings trigger the crash?
I need a config from anyone experiencing this issue to try to reproduce this.
output of cat /etc/config/https-dns-proxy
config main 'config'
option update_dnsmasq_config '*'
option force_dns '1'
list force_dns_port '53'
list force_dns_port '853'
config https-dns-proxy
option listen_addr '127.0.0.1'
option user 'nobody'
option group 'nogroup'
option bootstrap_dns '74.82.42.42,2001:470:20::2'
option resolver_url 'https://ordns.he.net/dns-query'
option listen_port '5054'
config https-dns-proxy
option bootstrap_dns '116.202.176.26,1.1.1.1'
option resolver_url 'https://doh.libredns.gr/dns-query'
option listen_port '5055'
config https-dns-proxy
option resolver_url 'https://cloudflare-dns.com/dns-query'
option bootstrap_dns '1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001'
Uncomment both 'logfile' and 'verbosity' options of any one of the four sections -
config main 'config'
option update_dnsmasq_config '*'
option force_dns '1'
list force_dns_port '53'
list force_dns_port '853'
# ports listed below are used by some
# of the dnscrypt-proxy v1 resolvers
# list force_dns_port '553'
# list force_dns_port '1443'
# list force_dns_port '4343'
# list force_dns_port '4434'
# list force_dns_port '5443'
# list force_dns_port '8443'
config https-dns-proxy
option bootstrap_dns '2a01:3a0:53:53::'
option resolver_url 'https://unicast.censurfridns.dk/dns-query'
option use_ipv6_resolvers_only 1
# option logfile '/var/log/DoH_unicast.censurfridns.dk.log'
# option verbosity 1
config https-dns-proxy
option bootstrap_dns '2a07:a8c0::84:5e57,2a07:a8c1::84:5e57'
option resolver_url 'https://dns.nextdns.io/845e57'
option use_ipv6_resolvers_only 1
# option logfile '/var/log/DoH_dns.nextdns.io.log'
# option verbosity 1
config https-dns-proxy
option bootstrap_dns '2001:67c:28a4::'
option resolver_url 'https://anycast.uncensoreddns.org/dns-query'
option use_ipv6_resolvers_only 1
# option logfile '/var/log/DoH_anycast.censurfridns.dk.log'
# option verbosity 1
config https-dns-proxy
option bootstrap_dns '2a07:a8c0::84:5e57,2a07:a8c1::84:5e57'
option resolver_url 'https://secure.avastdns.com/dns-query'
option use_ipv6_resolvers_only 1
# option logfile '/var/log/DoH_secure.avastdns.com.log'
# option verbosity 1
@systemcrash
output of
cat /etc/config/https-dns-proxy
config main 'config' option update_dnsmasq_config '*' option force_dns '1' list force_dns_port '53' list force_dns_port '853' config https-dns-proxy option listen_addr '127.0.0.1' option user 'nobody' option group 'nogroup' option bootstrap_dns '74.82.42.42,2001:470:20::2' option resolver_url 'https://ordns.he.net/dns-query' option listen_port '5054' config https-dns-proxy option bootstrap_dns '116.202.176.26,1.1.1.1' option resolver_url 'https://doh.libredns.gr/dns-query' option listen_port '5055' config https-dns-proxy option resolver_url 'https://cloudflare-dns.com/dns-query' option bootstrap_dns '1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001'
Review the arguments of the spawned processes. Without the 'use_ipv6_resolvers_only' option set, only the IPV4 addresses are passed and using the option, only IPV6 addresses are passed.
option logfile '/var/log/DoH_unicast.censurfridns.dk.log'
I believe /var/log
is owned by root and other users don't have the write permissions there, so nobody/nogroup can't write there. Could the crash be because of that?
No, the process(es) is spawned under 'root' and during initialisation, updates its credentials, as does DNSmasq.
root@pWPW10-2:~# ls -l /var/log/
-rw-r----- 1 root root 251521 Oct 5 10:33 DoH_anycast.censurfridns.dk_IPV6.log
-rw-r----- 1 root root 36170 Oct 5 10:33 DoH_dns.digitale-gesellschaft.ch_IPV6.log
-rw-r----- 1 root root 49522 Oct 5 10:33 DoH_dns.nextdns.io_IPV6.log
-rw-r----- 1 root root 251378 Oct 5 10:33 DoH_secure.avastdns.com_IPV6.log
-rw-r----- 1 root root 249875 Oct 5 10:33 DoH_unicast.censurfridns.dk_IPV6.log
4614 nobody 4180 S /usr/sbin/https-dns-proxy -r https://unicast.censurfridns.dk/dns-query -a 127.0.0.1 -p 5053 -b 2a01:3a0:53
4615 nobody 5352 S /usr/sbin/https-dns-proxy -r https://dns.nextdns.io/845e57 -a 127.0.0.1 -p 5054 -b 2a07:a8c0::84:5e57,2a07
4616 nobody 4180 S /usr/sbin/https-dns-proxy -r https://anycast.uncensoreddns.org/dns-query -a 127.0.0.1 -p 5055 -b 2001:67c:
4617 nobody 4676 S /usr/sbin/https-dns-proxy -r https://dns.digitale-gesellschaft.ch/dns-query -a 127.0.0.1 -p 5056 -b 2606:4
4618 nobody 4180 S /usr/sbin/https-dns-proxy -r https://secure.avastdns.com/dns-query -a 127.0.0.1 -p 5057 -b 2001:67c:28a4::
Under 21.03, this config with logging does not SIGSEGV.
# ps | grep -i https-dns
5059 nobody 3304 S /usr/sbin/https-dns-proxy -r https://ordns.he.net/dns-query -a 127.0.0.1 -p 5054 -b 74.82.42.42 -4 -u nobody -g nogroup
5060 nobody 3336 S /usr/sbin/https-dns-proxy -r https://doh.libredns.gr/dns-query -a 127.0.0.1 -p 5055 -b 116.202.176.26,1.1.1.1 -4 -u nobody -g nogroup
Review the arguments of the spawned processes. Without the 'use_ipv6_resolvers_only' option set, only the IPV4 addresses are passed and using the option, only IPV6 addresses are passed.
I see. This config is generated by using luci GUI. I would have expected that both v4/6 are used from the config without specific intervention. @stangri can there be middle ground option for both v4/6? (don't wish to derail this bug report tho)
No, the process(es) is spawned under 'root' and during initialisation, updates its credentials, as does DNSmasq.
root@pWPW10-2:~# ls -l /var/log/ -rw-r----- 1 root root 251521 Oct 5 10:33 DoH_anycast.censurfridns.dk_IPV6.log -rw-r----- 1 root root 36170 Oct 5 10:33 DoH_dns.digitale-gesellschaft.ch_IPV6.log -rw-r----- 1 root root 49522 Oct 5 10:33 DoH_dns.nextdns.io_IPV6.log -rw-r----- 1 root root 251378 Oct 5 10:33 DoH_secure.avastdns.com_IPV6.log -rw-r----- 1 root root 249875 Oct 5 10:33 DoH_unicast.censurfridns.dk_IPV6.log 4614 nobody 4180 S /usr/sbin/https-dns-proxy -r https://unicast.censurfridns.dk/dns-query -a 127.0.0.1 -p 5053 -b 2a01:3a0:53 4615 nobody 5352 S /usr/sbin/https-dns-proxy -r https://dns.nextdns.io/845e57 -a 127.0.0.1 -p 5054 -b 2a07:a8c0::84:5e57,2a07 4616 nobody 4180 S /usr/sbin/https-dns-proxy -r https://anycast.uncensoreddns.org/dns-query -a 127.0.0.1 -p 5055 -b 2001:67c: 4617 nobody 4676 S /usr/sbin/https-dns-proxy -r https://dns.digitale-gesellschaft.ch/dns-query -a 127.0.0.1 -p 5056 -b 2606:4 4618 nobody 4180 S /usr/sbin/https-dns-proxy -r https://secure.avastdns.com/dns-query -a 127.0.0.1 -p 5057 -b 2001:67c:28a4::
Under 21.03, this config with logging does not SIGSEGV.
Sorry, I'm confused, I thought you said that SIGSEGV happens at boot, yet there are non-zero log files. Could you please clarify the conditions it crashes and conditions it doesn't crash and fills up logs?
I see. This config is generated by using luci GUI. I would have expected that both v4/6 are used from the config without specific intervention. @stangri can there be middle ground option for both v4/6? (don't wish to derail this bug report tho)
Yes, please open a separate issue.
@stangri
Sorry, I'm confused, I thought you said that SIGSEGV happens at boot, yet there are non-zero log files. Could you please clarify the conditions it crashes and conditions it doesn't crash and fills up logs?
Those are logging files under 21.02 to illustrate that 'nobody' is successfully writing to them.
I see. I'll need to test this myself, I'll update this issue on the progress.
Well, I don't think it's dangerous, although fixing it is necessary. After the system is up and stable, no more of those entries.
Maybe something isn't ready during startup.
I'll test when I can, if it comes to that.
I can't reproduce the https-dns-proxy
crash with version 2022-08-12
and the following config:
config https-dns-proxy
option bootstrap_dns '149.112.121.10,149.112.122.10,2620:10A:80BB::10,2620:10A:80BC::10'
option resolver_url 'https://private.canadianshield.cira.ca/dns-query'
option verbosity '2'
option logfile '/var/log/DoH_canadianshield.log'
@Ohfalderal can you re-test with the new version and shortened file names for the logfile? If we can narrow down the source of the problem before reporting upstream, that'd be helpful.
@stangri I notice the update is available in the mirror repository that is configured in the AP and will pull and test it this coming weekend.
@stangri Uhh, no -
root@pWPW10-0:~# vi /etc/config/https-dns-proxy
root@pWPW10-0:~# service https-dns-proxy restart
Stopping https-dns-proxy 2022-08-12-1 ✓
Starting https-dns-proxy 2022-08-12-1 ✓✓✓
root@pWPW10-0:~# logread -l20
Sat Oct 15 09:32:55 2022 daemon.info dnsmasq[1]: using only locally-known addresses for local
Sat Oct 15 09:32:55 2022 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Sat Oct 15 09:32:55 2022 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Sat Oct 15 09:32:55 2022 daemon.info dnsmasq[1]: using only locally-known addresses for mask-h2.icloud.com
Sat Oct 15 09:32:55 2022 daemon.info dnsmasq[1]: using only locally-known addresses for mask.icloud.com
Sat Oct 15 09:32:55 2022 daemon.info dnsmasq[1]: using 1 more local addresses
Sat Oct 15 09:32:55 2022 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Sat Oct 15 09:32:55 2022 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Oct 15 09:32:55 2022 kern.info kernel: [22419.664161] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 634a6227
Sat Oct 15 09:32:55 2022 kern.info kernel: [22419.673903] epc = 77eb0dc0 in libc.so[77e32000+a9000]
Sat Oct 15 09:32:55 2022 kern.info kernel: [22419.679387] ra = 77eb2b04 in libc.so[77e32000+a9000]
Sat Oct 15 09:33:00 2022 kern.info kernel: [22424.768945] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 634a622c
Sat Oct 15 09:33:00 2022 kern.info kernel: [22424.778701] epc = 77e7adf4 in libc.so[77dfc000+a9000]
Sat Oct 15 09:33:00 2022 kern.info kernel: [22424.784060] ra = 77e7cb04 in libc.so[77dfc000+a9000]
Sat Oct 15 09:33:05 2022 kern.info kernel: [22429.810433] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 634a6231
Sat Oct 15 09:33:05 2022 kern.info kernel: [22429.820151] epc = 77e16dc0 in libc.so[77d98000+a9000]
Sat Oct 15 09:33:05 2022 kern.info kernel: [22429.825650] ra = 77e18b04 in libc.so[77d98000+a9000]
Sat Oct 15 09:33:11 2022 kern.info kernel: [22434.848670] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 634a6236
Sat Oct 15 09:33:11 2022 kern.info kernel: [22434.858382] epc = 77eb6dc0 in libc.so[77e38000+a9000]
Sat Oct 15 09:33:11 2022 kern.info kernel: [22434.863713] ra = 77eb8b04 in libc.so[77e38000+a9000]
root@pWPW10-0:~# vi /etc/config/https-dns-proxy
root@pWPW10-0:~# service https-dns-proxy restart
Stopping https-dns-proxy 2022-08-12-1 ✓
Starting https-dns-proxy 2022-08-12-1 ✓✓✓
root@pWPW10-0:~# logread -l20
Sat Oct 15 09:34:13 2022 user.notice https-dns-proxy: Starting service ✓✓✓
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: started, version 2.86 cachesize 150
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: DNS service limited to local subnets
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: UBus support enabled: connected to system bus
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using nameserver 127.0.0.1#5055
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using nameserver 127.0.0.1#5053
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using nameserver 127.0.0.1#5054
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using only locally-known addresses for test
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using only locally-known addresses for local
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using only locally-known addresses for mask-h2.icloud.com
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using only locally-known addresses for mask.icloud.com
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: using 1 more local addresses
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Sat Oct 15 09:34:13 2022 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Oct 15 09:34:27 2022 user.info : luci: accepted login on / for root from 192.168.179.198
root@pWPW10-0:~#
N.B. - 'vi' commands are:
Problem remains in 22.03.2
Here is the build log for the firmware:
---trim---
Sorry for neglecting this. Can you still reproduce with 2022-10-15-10
?
No worries. You've a lot on your plate.
It crashes, but now not only at boot, but also later during uptime.
It may be the mips_24kc exclusive problem, I can't (for the life of me) reproduce on x86_64. I don't even know who I can ask to have a look at it, as I don't think upstream devs use the same platform and I don't know enough about libc to troubleshoot.
Something interesting:
when I restart the daemon via the GUI restart button, I consistently get a crash:
[604017.161423] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 63c73e68
[604017.170910] epc = 77dfedf4 in libc.so[77d80000+a9000]
[604017.176307] ra = 77e00b04 in libc.so[77d80000+a9000]
[604373.787103] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 63c73fcc
[604373.796612] epc = 77e92df4 in libc.so[77e14000+a9000]
[604373.801841] ra = 77e94b04 in libc.so[77e14000+a9000]
[604378.877891] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 63c73fd1
[604378.887685] epc = 77e58dc0 in libc.so[77dda000+a9000]
[604378.892931] ra = 77e5ab04 in libc.so[77dda000+a9000]
The nature of the crash looks a bit better from previous openwrt builds.
When I run an equivalent command line that I see via ps
, e.g.
/usr/sbin/https-dns-proxy -r https://ordns.he.net/dns-query -a 127.0.0.1 -p 5054 -b 74.82.42.42 -4 -u nobody -g nogroup
no crash......
My google fu shows these kinds of crashes are not exclusive to my mips platform, but possibly the platform is more sensitive to things that run OK on x86_64.
If there's an equivalent version built with debug symbols and/or it runs with strace, we may get somewhere further.
Just a thought: could it be the /etc/init.d/https-dns-proxy
script which triggers this?
I haven't looked into details on how PROCD daemonizes processes, actually out of all PROCD-using packages I maintain this is the only one with the true daemon. I'll double check the code.
Is this still happening with the new code to kill/respawn instances on interface restarts?
I didn't mean to bump this, but I'm also getting this error on the same devices & platform. Even after some fresh installation.
Model | TP-Link Archer C7 v2 |
Architecture | Qualcomm Atheros QCA9558 ver 1 rev 0 |
Target Platform | ath79/generic |
Firmware Version | OpenWrt 22.03.3 r20028-43d71ad93e / LuCI openwrt-22.03 branch git-22.361.69894-438c598 |
Kernel Version | 5.10.161 |
https-dns-proxy Version | 2022-10-15-11 |
@aarond10 @baranyaib90 any insight on what may be happening on this specific platform? There have not been any reports of this on other platforms.
That's really weird. Invalid read access and libc.so (if not a red herring) makes me wonder if it's a failed malloc() that isn't being handled properly (i.e. null pointer returned and then dereferenced) but the location looks valid.
I found a similar bug for another package, also Archer C7v2: https://github.com/openwrt/packages/issues/19352 Could it be a platform-wide issue?
It's not inconceivable, although I cannot say I've noticed any ill effects. That said it's only on more recent major releases. 18 and 19 were unaffected. Guess: compiler related.
That would be my guess too -- From the data I can find on QCA9558, it's a single core SoC so memory races are likely not an issue but it seems quite a coincidence that it's the same sort of problem on the same hardware.
One possibility I've considered is that the memory or flash is dying. But not having experienced any other issues, I'm doubtful that's it.
A memtest would be nice but it's an involved process.
I'm fairly sure my flash has been to hell and back tho.
@aarond10 @systemcrash the C7 v5 is also afflicted.
@aarond10 @systemcrash the C7 v5 is also afflicted.
Probably the same underlying hardware platform.
In any case, the symptom continues on 22.03.4. But everything is otherwise working fine.
[ 78.696834] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 643561b1
[ 78.706235] epc = 77e00dc0 in libc.so[77d82000+a9000]
[ 78.711408] ra = 77e02b04 in libc.so[77d82000+a9000]
...
[ 84.318139] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 643561b7
[ 84.327535] epc = 77e34dc0 in libc.so[77db6000+a9000]
[ 84.332698] ra = 77e36b04 in libc.so[77db6000+a9000]
...
[ 89.725811] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 643561bc
[ 89.735310] epc = 77e38df4 in libc.so[77dba000+a9000]
[ 89.740491] ra = 77e3ab04 in libc.so[77dba000+a9000]
...
[ 98.284561] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 643561c5
[ 98.293977] epc = 77dc4dc0 in libc.so[77d46000+a9000]
[ 98.299378] ra = 77dc6b04 in libc.so[77d46000+a9000]
...
[ 103.500905] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 643561ca
[ 103.510325] epc = 77e22dc0 in libc.so[77da4000+a9000]
[ 103.515466] ra = 77e24b04 in libc.so[77da4000+a9000]
[ 108.684551] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 643b3fd9
[ 108.694295] epc = 77e7adc0 in libc.so[77dfc000+a9000]
[ 108.699531] ra = 77e7cb04 in libc.so[77dfc000+a9000]
[ 113.766460] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 643b3fde
[ 113.776216] epc = 77e5cdc0 in libc.so[77dde000+a9000]
[ 113.781404] ra = 77e5eb04 in libc.so[77dde000+a9000]
[ 118.846343] do_page_fault(): sending SIGSEGV to https-dns-proxy for invalid read access from 643b3fe3
[ 118.855804] epc = 77e4edc0 in libc.so[77dd0000+a9000]
[ 118.861817] ra = 77e50b04 in libc.so[77dd0000+a9000]
So I looked at the other linked issue, and apparently:
It was indeed related to the change in time_t (32 bits to 64 bits on a 32 bit system) with musl.
@stangri - perhaps there is some useful info in the commit? Hint: change time types e.g. from long int
to time_t
(altho I don't immediately see those in the source).
@systemcrash - logging generally includes timestamps. Doh!
So I looked at the other linked issue, and apparently:
It was indeed related to the change in time_t (32 bits to 64 bits on a 32 bit system) with musl.
@stangri - perhaps there is some useful info in the commit? Hint: change time types e.g. from
long int
totime_t
(altho I don't immediately see those in the source).
@aarond10 I'm out of my depth here, anything useful in the link above?
I'm still quite confused. There is no use of time_t in https_dns_proxy. I did a bit of a cursory search on github for libev and libcares but can't find direct references to time_t in either of those as well.
On Tue, 18 Apr 2023 at 14:00, Stan Grishin @.***> wrote:
So I looked at the other linked issue https://github.com/openwrt/packages/issues/19510#issuecomment-1283148510, and apparently:
It was indeed related to the change in time_t (32 bits to 64 bits on a 32 bit system) with musl.
@stangri https://github.com/stangri - perhaps there is some useful info in the commit https://github.com/openwrt/packages/commit/f7d592607f876a64d4e641e57d6300ab99d1e9e9? Hint: change time types e.g. from long int to time_t (altho I don't immediately see those in the source).
@aarond10 https://github.com/aarond10 I'm out of my depth here, anything useful in the link above?
— Reply to this email directly, view it on GitHub https://github.com/openwrt/packages/issues/19366#issuecomment-1512400166, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABTOXTUI2FCOPBAEGXOXCLXBYGW5ANCNFSM6AAAAAAQMXDX4A . You are receiving this because you were mentioned.Message ID: @.***>
After compiling the package with warning output one can see the relevant fprintf calls. Fixing this warnings by switching to %lld and casting the parameter to (long long) solved the issue for me.
/usr/src/OpenWRT/openwrt/build_dir/target-mips_24kc_musl/https-dns-proxy-2022-10-15/src/logging.c: In function '_log':
/usr/src/OpenWRT/openwrt/build_dir/target-mips_24kc_musl/https-dns-proxy-2022-10-15/src/logging.c:80:24: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'time_t' {aka 'long long int'} [-Wformat=]
80 | fprintf(logf, "%s %8ld.%06ld %s:%d ", SeverityStr[severity], tv.tv_sec,
| ~~~^ ~~~~~~~~~
| | |
| long int time_t {aka long long int}
| %8lld
/usr/src/OpenWRT/openwrt/build_dir/target-mips_24kc_musl/https-dns-proxy-2022-10-15/src/logging.c:80:30: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'suseconds_t' {aka 'long long int'} [-Wformat=]
80 | fprintf(logf, "%s %8ld.%06ld %s:%d ", SeverityStr[severity], tv.tv_sec,
| ~~~~^
| |
| long int
| %06lld
81 | tv.tv_usec, file, line);
| ~~~~~~~~~~
| |
| suseconds_t {aka long long int}
@aarond10 Is my fix also suitable for upstream patching of your (great :wink:)) project ? If so, do you want to patch it yourself to be conform with all the guidelines, or should I try to provide a PR ?
Ah! Of course! It's the logging code... Thanks for the fix. I think it'll need a little more conditional handling though for cases where time_t is still 32-bit.
Maintainer: @stangri
Description:
added in https-dns-proxy into imagebuilder here. At boot, the kernel log shows: