timesyncd service does not start - bad file descriptor

This forum is for discussion about general software issues.

timesyncd service does not start - bad file descriptor

Postby baseball » Tue Nov 06, 2018 3:58 am

I have the following situation:
I have an Odroid XU running arch linux ARM. Recently I updated a bunch of packages using the normal pacman approach (no aur). Since then the machine is starting always in a degenerated state failing the services systemd-networkd and systemd-timesyncd.
Because there is not RTC on the machine and the timesyncd does not work well, the logs are full of waste of multiple boots intermixed. This makes finding the correct errors troublesome. However I found that both services quit with similar information:
systemctl status systemd-timesyncd wrote:
* systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2017-02-14 07:56:32 UTC; 29min ago
Docs: man:systemd-timesyncd.service(8)
Process: 20700 ExecStart=/usr/lib/systemd/systemd-timesyncd (code=exited, status=226/NAMESPACE)
Main PID: 20700 (code=exited, status=226/NAMESPACE)

Feb 14 07:56:31 odroid-xu-0 systemd[1]: systemd-timesyncd.service: Unit entered failed state.
Feb 14 07:56:31 odroid-xu-0 systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
Feb 14 07:56:32 odroid-xu-0 systemd[1]: systemd-timesyncd.service: Service has no hold-off time, scheduling restart.
Feb 14 07:56:32 odroid-xu-0 systemd[1]: Stopped Network Time Synchronization.
Feb 14 07:56:32 odroid-xu-0 systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
Feb 14 07:56:32 odroid-xu-0 systemd[1]: Failed to start Network Time Synchronization.
Feb 14 07:56:32 odroid-xu-0 systemd[1]: systemd-timesyncd.service: Unit entered failed state.
Feb 14 07:56:32 odroid-xu-0 systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.

In the journal there I find only one line regarding the service:
journalctl _PID=20700 wrote:
Feb 14 07:56:31 odroid-xu-0 systemd[20700]: systemd-timesyncd.service: Failed at step NAMESPACE spawning /usr/lib/systemd/systemd-timesyncd: Bad file descriptor


I have to admit that the logs above are not from the boot itself but from a manual start of the service using systemctl start systemctl-timesyncd. The problem is reproducable each time I try to start the services.
However if I start the service manually (that is I call /usr/lib/systemd/systemd-timesyncd directly), the service starts up without any issue. This is also the reason why the time was set correctly in the logs as the timesyncd once corrected the time on the controller.

I searched for the error in the net but did not find anything usable. There are a few cases when /tmp and /var/tmp are symlinked but then the erros message says something about file not found. Further there is neither /tmp nor /var/tmp a symlink on the installation.

Has anyone a clue what might happen here? Any idea what I could do to remove the error message and make the timesync daemon run again?
baseball
 
Posts: 1
Joined: Tue Nov 06, 2018 3:57 am

Re: Systemd server does not start - bad file descriptor

Postby WarheadsSE » Wed Nov 07, 2018 12:28 pm

Find the kernel you've got installed
$this->bbcode_second_pass_code('', 'pacman -Qs linux')

Make sure this lines up with the booted kernel
$this->bbcode_second_pass_code('', 'uname -a')

Be certain your filesystem is in a good state, with an fsck.

Ensure your system is entirely up to date.

I am able to find a bunch of things with "Failed at step NAMESPACE spawning", and all of these seem to come down to a mix of issues between the kernel, systemd, and setcap (capabilities). There is also the possibility that when using the service with namespacing, there is a problem with the path systemd-timesyncd is trying to access. We'd have to know _what_ it was trying to access in order to debug.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to General

Who is online

Users browsing this forum: No registered users and 11 guests