[bananapi] systemd services fail on startup

Ask questions about Arch Linux ARM. Please search before making a new topic.

[bananapi] systemd services fail on startup

Postby smohr » Tue Aug 09, 2016 3:58 pm

Hey guys,
when I boot my pi (/proc/version)
$this->bbcode_second_pass_code('', 'Linux version 3.4.90 (bananapi@lemaker) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) )')
some services don't start properly:
$this->bbcode_second_pass_code('', '
root@sPi ~ # systemctl
UNIT LOAD ACTIVE SUB DESCRIPTION
proc-sys-fs-binfmt_misc.automount loaded active waiting Arbitrary Executable File Formats File System Automount Point
dev-mmcblk0p2.device loaded activating tentative /dev/mmcblk0p2
dev-mmcblk0p4.device loaded activating tentative /dev/mmcblk0p4
-.mount loaded active mounted /
sys-fs-fuse-connections.mount loaded active mounted FUSE Control File System
sys-kernel-config.mount loaded active mounted Configuration File System
sys-kernel-debug.mount loaded active mounted Debug File System
tmp.mount loaded active mounted Temporary Directory
org.cups.cupsd.path loaded active waiting CUPS Scheduler
systemd-ask-password-console.path loaded active waiting Dispatch Password Requests to Console Directory Watch
systemd-ask-password-wall.path loaded active waiting Forward Password Requests to Wall Directory Watch
init.scope loaded active running System and Service Manager
alsa-restore.service loaded active exited Save/Restore Sound Card State
avahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stack
cronie.service loaded active running Periodic Command Scheduler
dbus.service loaded active running D-Bus System Message Bus
dhcpcd.service loaded active running dhcpcd on all interfaces
getty@tty1.service loaded active running Getty on tty1
getty@ttyS0.service loaded active running Getty on ttyS0
haveged.service loaded active running Entropy Harvesting Daemon
initialise-disk.service loaded active exited Set up disk parameters
initialise-leds.service loaded active exited Initialise status LEDs
iptables.service loaded active exited Packet Filtering Framework
kmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel
ldconfig.service loaded active exited Rebuild Dynamic Linker Cache
lighttpd.service loaded active running Lighttpd Web Server
mpd.service loaded active running Music Player Daemon
ntpd.service loaded active running Network Time Service
● postgresql.service loaded failed failed PostgreSQL database server
prosody.service loaded active running XMPP (Jabber) Server
pulseaudio.service loaded active running PulseAudio Sound Server in system-wide mode
● rngd.service loaded failed failed Hardware RNG Entropy Gatherer Daemon
shairport-sync.service loaded active running ShairportSync AirTunes receiver
slapd.service loaded active running OpenLDAP server daemon
sshd.service loaded active running OpenSSH Daemon
systemd-hwdb-update.service loaded active exited Rebuild Hardware Database
systemd-journal-catalog-update.service loaded active exited Rebuild Journal Catalog
● systemd-journald.service loaded failed failed Journal Service
● systemd-logind.service loaded failed failed Login Service
systemd-random-seed.service loaded active exited Load/Save Random Seed
systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems
systemd-sysctl.service loaded active exited Apply Kernel Variables
systemd-sysusers.service loaded active exited Create System Users
systemd-tmpfiles-setup-dev.service loaded active exited Create Static Device Nodes in /dev
systemd-tmpfiles-setup.service loaded active exited Create Volatile Files and Directories
systemd-udev-trigger.service loaded active exited udev Coldplug all Devices
systemd-udevd.service loaded active running udev Kernel Device Manager
systemd-update-done.service loaded active exited Update is Completed
systemd-update-utmp.service loaded active exited Update UTMP about System Boot/Shutdown
systemd-user-sessions.service loaded active exited Permit User Sessions
systemd-vconsole-setup.service loaded active exited Setup Virtual Console
tmux@root.service loaded active running Start tmux in detached session
-.slice loaded active active Root Slice
system-getty.slice loaded active active system-getty.slice
system-netctl\x2difplugd.slice loaded active active system-netctl\x2difplugd.slice
system-serial\x2dgetty.slice loaded active active system-serial\x2dgetty.slice
system-tmux.slice loaded active active system-tmux.slice
system.slice loaded active active System Slice
user.slice loaded active active User and Session Slice
avahi-daemon.socket loaded active running Avahi mDNS/DNS-SD Stack Activation Socket
dbus.socket loaded active running D-Bus System Message Bus Socket
dm-event.socket loaded active listening Device-mapper event daemon FIFOs
lvm2-lvmetad.socket loaded active listening LVM2 metadata daemon socket
org.cups.cupsd.socket loaded active listening CUPS Scheduler
systemd-coredump.socket loaded active listening Process Core Dump Socket
systemd-initctl.socket loaded active listening /dev/initctl Compatibility Named Pipe
● systemd-journald-audit.socket loaded failed failed Journal Audit Socket
● systemd-journald-dev-log.socket loaded failed failed Journal Socket (/dev/log)
● systemd-journald.socket loaded failed failed Journal Socket
systemd-udevd-control.socket loaded active running udev Control Socket
systemd-udevd-kernel.socket loaded active running udev Kernel Socket
dev-mmcblk0p4.swap loaded active active /dev/mmcblk0p4
basic.target loaded active active Basic System
cryptsetup.target loaded active active Encrypted Volumes
getty.target loaded active active Login Prompts
graphical.target loaded active active Graphical Interface
local-fs-pre.target loaded active active Local File Systems (Pre)
local-fs.target loaded active active Local File Systems
multi-user.target loaded active active Multi-User System
network-online.target loaded active active Network is Online
network-pre.target loaded active active Network (Pre)
network.target loaded active active Network
paths.target loaded active active Paths
remote-fs.target loaded active active Remote File Systems
slices.target loaded active active Slices
sockets.target loaded active active Sockets
sysinit.target loaded active active System Initialization
timers.target loaded active active Timers
logrotate.timer loaded active waiting Daily rotation of log files
man-db.timer loaded active waiting Daily man-db cache purge
shadow.timer loaded active waiting Daily verification of password and group files
systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories

LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.

92 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
')

Here the status of systemd-journald.socket:
$this->bbcode_second_pass_code('', '
root@sPi ~ # systemctl status systemd-journald.socket
● systemd-journald.socket - Journal Socket
Loaded: loaded (/usr/lib/systemd/system/systemd-journald.socket; static; vendor preset: disabled)
Active: failed (Result: service-start-limit-hit) since Tue 2016-08-09 16:19:25 CEST; 8min ago
Docs: man:systemd-journald.service(8)
man:journald.conf(5)
Listen: /run/systemd/journal/stdout (Stream)
/run/systemd/journal/socket (Datagram)
')

Here the status of systemd-journald.service:
$this->bbcode_second_pass_code('', '
root@sPi ~ # systemctl status systemd-journald.service
● systemd-journald.service - Journal Service
Loaded: loaded (/usr/lib/systemd/system/systemd-journald.service; static; vendor preset: disabled)
Active: failed (Result: start-limit-hit) since Tue 2016-08-09 16:19:25 CEST; 10min ago
Docs: man:systemd-journald.service(8)
man:journald.conf(5)
Process: 380 ExecStart=/usr/lib/systemd/systemd-journald (code=exited, status=228/SECCOMP)
Main PID: 380 (code=exited, status=228/SECCOMP)
')

Has anybody an idea what the problem is about?
What config/log-files should I post here?

I have already tried several reboots, a full system update (pacman -Syu) and a reinstallation of all packages (pacman -S $(pacman -Qnq)).

Thanks a lot for your help!
Sam
smohr
 
Posts: 1
Joined: Tue Aug 09, 2016 3:52 pm

Re: systemd services fail on startup

Postby h0tw1r3 » Tue Aug 09, 2016 8:13 pm

Same problem on my odroid-u2. Apparently SECCOMP support is "forced" in the current systemd build.
If you look at the log messages is states things like:

$this->bbcode_second_pass_code('', '
[ 5.114470] systemd[1]: systemd-journald.service: Main process exited, code=exited, status=228/SECCOMP
[ 5.204230] systemd[1]: Failed to start Journal Service.

[ 8.739487] systemd[196]: systemd-networkd.service: Failed at step SECCOMP spawning /usr/lib/systemd/systemd-networkd: Invalid argument
[ 8.875057] systemd[1]: systemd-networkd.service: Main process exited, code=exited, status=228/SECCOMP
[ 8.989340] systemd[1]: Failed to start Network Service.
[ 9.024360] systemd[1]: systemd-networkd.service: Unit entered failed state.
[ 9.028842] systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
')

It's because the kernel is not built with SECCOMP support, but libseccomp does not expose a check to systemd for determining if it's actually enabled at runtime.

https://github.com/systemd/systemd/issues/3882

I am going to try patch and rebuild the package:
https://bugs.debian.org/cgi-bin/bugrepo ... ch;msg=128
h0tw1r3
 
Posts: 7
Joined: Fri May 23, 2014 1:09 am

Re: [bananapi] systemd services fail on startup

Postby h0tw1r3 » Thu Aug 11, 2016 3:36 am

So I rebuilt with the patch above and now systemd works again.
h0tw1r3
 
Posts: 7
Joined: Fri May 23, 2014 1:09 am

Re: [bananapi] systemd services fail on startup

Postby moonman » Thu Aug 11, 2016 5:44 am

$this->bbcode_second_pass_quote('h0tw1r3', 'S')o I rebuilt with the patch above and now systemd works again.

odroidu2 kernel has seccomp enabled now so no need to rebuild anything. Also, officially all exynos 4412 devices were switched over to mainline linux-armv7 (i.e. new rootfs tarballs come with mainline kernel now)

@smohr bananapi is not officially supported. That kernel is too old (systemd requires 3.7.x at a minimum). seccomp can still be enabled though if you are happy with everything else.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: [bananapi] systemd services fail on startup

Postby necbot » Mon Aug 22, 2016 12:36 am

I'm having this exact same problem in my Odroid U3, (uses the Odroid U2 image). I tried the suggestions by WarheadsSE and Chazy here...

viewtopic.php?f=60&t=10650&start=30

These solutions did not work for me.

@moonman
You mentioned that odroidu2 kernal has seccomp enabled so I don't have to rebuild. The date on the image I pulled is August 2, 2016. Did this patch make it in?
necbot
 
Posts: 14
Joined: Fri Jun 20, 2014 11:26 pm

Re: [bananapi] systemd services fail on startup

Postby moonman » Mon Aug 22, 2016 3:20 am

Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: [rpi2] systemd services fail on startup

Postby pedruski » Fri Sep 09, 2016 2:20 pm

I am having the same problem on standard Raspberry Pi 2 (Archlinux Armv7) after updating :

systemd[359]: systemd-logind.service: Failed at step SECCOMP spawning /usr/lib/systemd/systemd-logind: Invalid Argument
systemd[1]: Failed to start Login Service.
systemd[361]: systemd-logind.service: Failed at step SECCOMP spawning /usr/lib/systemd/systemd-logind: Invalid Argument
systemd[1]: Failed to start Login Service.
systemd[363]: systemd-logind.service: Failed at step SECCOMP spawning /usr/lib/systemd/systemd-logind: Invalid Argument
systemd[1]: Failed to start Login Service.
systemd[365]: systemd-logind.service: Failed at step SECCOMP spawning /usr/lib/systemd/systemd-logind: Invalid Argument
systemd[1]: Failed to start Login Service.
systemd[367]: systemd-logind.service: Failed at step SECCOMP spawning /usr/lib/systemd/systemd-logind: Invalid Argument
systemd[1]: Failed to start Login Service.
systemd[1]: Failed to start Login Service.

systemctl indicates that Journal Service, Login Service, Load Kernel Modules, Network Service do not load

it seems this is a recognized bug or omission on arm* , SECCOMP is not enabled, is there any news of an update that would fix this ? or should i try to apply h0tw1r3's patch ?

thanks
p/
pedruski
 
Posts: 3
Joined: Fri Sep 09, 2016 2:01 pm

Re: [bananapi] systemd services fail on startup

Postby WarheadsSE » Fri Sep 09, 2016 5:59 pm

1) necro
2) you've probably not gotten your /boot mounted while doing the upgrade, because this should be there and perfectly functional.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [bananapi] systemd services fail on startup

Postby pedruski » Fri Sep 09, 2016 11:33 pm

hello WarheadSE

thanks for your reply

1) what do u mean by necro ?
2) how should i fix this ?

best
p/
Last edited by pedruski on Sat Sep 10, 2016 5:22 am, edited 2 times in total.
pedruski
 
Posts: 3
Joined: Fri Sep 09, 2016 2:01 pm

Re: [bananapi] systemd services fail on startup

Postby WarheadsSE » Sat Sep 10, 2016 1:10 am

Fix it by ensuring that /boot is mounted, and then re-install the package (the kernel.img is key, here)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Next

Return to User Questions

Who is online

Users browsing this forum: Google [Bot] and 16 guests