REPRODUCIBILITY
: sometimes
OS VERSION
: 4.5.0.19
HARDWARE
: Xperia 10 II
UI LANGUAGE
: English
REGRESSION
: no, AFAIK
DESCRIPTION:
the degraded system state in SFOS 4.5.0.19, it was clear that dnsmasq conflicts with connman (cfr. degraded system state report below)
PRECONDITIONS:
Having installed the dnsmasq
by Simon Kelley available from the Chum
market:
or with pkcon install -y dnsmasq
from a root
console.
Thanks to @nephros for having remembered to me that dnsmasq is not a Jolla pre-installed applicatiom.
STEPS TO REPRODUCE:
Regularly check the systemctl --failed
in particular when the smartphone reboots with WiFi tethering activated before the reboot.
EXPECTED RESULT:
The dnsmasq and connman services never should conflict competing for port 53 assignation
ACTUAL RESULT:
Sometimes - due to random order/timing systemd
boot sequence - connman
takes the port 53 and dnsmasq
fails to raise up.
MODIFICATIONS:
I suggest to integrate this patch into the dnsmasq package, please read the description:
Moreover, considering that the aim of this patch is to let the DNS subsystem performs as quick as possible and in the most reliable way, it worth a consideration to integrate dnsmasq as a default package for SFOS installation.
ADDITIONAL INFORMATION:
This failure condition does not happen regularly but just sometimes and expecially in particular cases whe the WiFi tethering is active at boot time. However, the condition is not totally reproducible cause the random timing about the starting services order (a beaty of systemd). This patch shall prevent that a conflict between these two services can arise because the port 53 (DNS) competion.
# systemctl status dnsmasq
ā dnsmasq.service - DNS caching server.
Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2023-06-21 06:42:01 CEST; 4s ago
Process: 27279 ExecStart=/usr/sbin/dnsmasq -k (code=exited, status=2)
Main PID: 27279 (code=exited, status=2)
Jun 21 06:42:01 Sueza11 systemd[1]: Started DNS caching server..
Jun 21 06:42:01 Sueza11 dnsmasq[27279]: dnsmasq: failed to create listening socket for port 53: Address already in use
Jun 21 06:42:01 Sueza11 dnsmasq[27279]: failed to create listening socket for port 53: Address already in use
Jun 21 06:42:01 Sueza11 dnsmasq[27279]: FAILED to start up
Jun 21 06:42:01 Sueza11 systemd[1]: dnsmasq.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 21 06:42:01 Sueza11 systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
# netstat -ltnp | grep ':53'
tcp 0 0 172.28.172.1:53 0.0.0.0:* LISTEN 5798/connmand
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 5798/connmand
tcp 0 0 ::1:53 :::* LISTEN 5798/connmand
# strings /proc/5798/cmdline
/usr/sbin/connmand
nl80211
--nobacktrace
--noplugin=wifi</small>