** Description changed:
+ [impact]
+
+ if a non-template service file is created as a symlink to a template
+ service file outside the normal unit file paths, systemd will fail
+ assertion and crash
+
+ [test case]
+
+ su -
+ cat <<EOF > /[email protected]
+ [Unit]
+ Description=Template for instance %i
+
+ [Service]
+ ExecStart=/bin/true
+ EOF
+
+ cd /etc/systemd/system
+ ln -s /[email protected] crashsystemd.service
+ systemctl daemon-reload
+ systemctl start crashsystemd
+
+ [regression potential]
+
+ any regression would likely cause a failed assertion and crash, or
+ failure to properly parse and/or load a service file that is a symlink
+
+ [scope]
+
+ this is needed in x/b/f/g/h
+
+ this is fixed upstream by commit
+ 3aa57658434e7a95c6000bebb166c31f1c6d051b which is included in v248-rc1,
+ so this is not fixed in any release yet
+
+ [original description]
+
On an Ubuntu 20.04 server, when I started a newly installed systemd
service 'systemctl start testemail2jira.service', systemd trips on an
assertion (from journalctl):
Jul 16 13:49:12 pangolin-jiraconf systemd[1]: Assertion 'u->instance' failed
at src/core/load-fragment.c:4798, function unit_load_fragment(). Aborting.
Jul 16 13:49:13 pangolin-jiraconf systemd[1]: Caught <ABRT>, dumped core as
pid 2906637.
Jul 16 13:49:13 pangolin-jiraconf systemd[1]: Freezing execution.
apport generates a core dump which I trust is attached.
The server still works, but my terminal keeps showing:
Failed to get properties: Failed to activate service
'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
and pauses for 25s after each command.
In case it's relevant, the <service> i was trying to start had just been
symlinked into /etc/systemd/system/:
root@pangolin-jiraconf # ls -la /etc/systemd/system/testemail2jira.service
lrwxrwxrwx 1 root root 82 Jul 16 13:48
/etc/systemd/system/testemail2jira.service ->
/opt/atlassian/jira/current/emailprocessing/testemail2jira/[email protected]
File contents:
[Unit]
Description=Check that email to %i JIRA works
[Service]
#Type=oneshot
# Note: I keep the config file, testemail2jira.json5 and rsa.* files in
emailprocessing/, one directory below testemail2jira/, so that they can be
version-controlled independently.
# If you want testemail2jira.json5 and rsa.* within testemail2jira/, then add
testemail2jira/ to WorkingDirectory and remove it from the ExecStart command
WorkingDirectory=/opt/atlassian/%i/current/emailprocessing
ExecStart=/opt/atlassian/%i/current/emailprocessing/testemail2jira/venv/bin/python
testemail2jira/testemail2jira.py
User=root
- [Install]
+ [Install]
WantedBy=multi-user.target
-
- Perhaps the problem is that my service file is a template
([email protected]), but I symlinked it as a regular
'testemail2jira.service'.
+ Perhaps the problem is that my service file is a template
+ ([email protected]), but I symlinked it as a regular
+ 'testemail2jira.service'.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: systemd 245.4-4ubuntu3.1
ProcVersionSignature: Ubuntu 5.4.0-39.43-generic 5.4.41
Uname: Linux 5.4.0-39-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
CasperMD5CheckResult: skip
Date: Thu Jul 16 14:13:06 2020
InstallationDate: Installed on 2020-05-27 (49 days ago)
InstallationMedia: Ubuntu-Server 20.04 LTS "Focal Fossa" - Release amd64
(20200423)
Lsusb: Error: command ['lsusb'] failed with exit code 1:
Lsusb-t:
-
+
Lsusb-v: Error: command ['lsusb', '-v'] failed with exit code 1:
MachineType: QEMU Standard PC (Q35 + ICH9, 2009)
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-39-generic root=/dev/sda ro
console=ttyS0,19200n8 net.ifnames=0
SourcePackage: systemd
SystemdFailedUnits: Error: command ['systemctl', 'status', '--full',
'Error:'] failed with exit code 1: Failed to get properties: Failed to activate
service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-q35-3.1
dmi.modalias:
dmi:bvnSeaBIOS:bvrrel-1.12.0-0-ga698c8995f-prebuilt.qemu.org:bd04/01/2014:svnQEMU:pnStandardPC(Q35+ICH9,2009):pvrpc-q35-3.1:cvnQEMU:ct1:cvrpc-q35-3.1:
dmi.product.name: Standard PC (Q35 + ICH9, 2009)
dmi.product.version: pc-q35-3.1
dmi.sys.vendor: QEMU
** Also affects: systemd (Ubuntu Groovy)
Importance: Undecided
Status: New
** Also affects: systemd (Ubuntu Xenial)
Importance: Undecided
Status: New
** Also affects: systemd (Ubuntu Focal)
Importance: Undecided
Status: New
** Also affects: systemd (Ubuntu Bionic)
Importance: Undecided
Status: New
** Also affects: systemd (Ubuntu Hirsute)
Importance: Undecided
Status: Confirmed
** Changed in: systemd (Ubuntu Hirsute)
Importance: Undecided => Medium
** Changed in: systemd (Ubuntu Groovy)
Importance: Undecided => Medium
** Changed in: systemd (Ubuntu Focal)
Importance: Undecided => Medium
** Changed in: systemd (Ubuntu Bionic)
Importance: Undecided => Medium
** Changed in: systemd (Ubuntu Xenial)
Importance: Undecided => Medium
** Changed in: systemd (Ubuntu Hirsute)
Status: Confirmed => In Progress
** Changed in: systemd (Ubuntu Groovy)
Status: New => In Progress
** Changed in: systemd (Ubuntu Focal)
Status: New => In Progress
** Changed in: systemd (Ubuntu Bionic)
Status: New => In Progress
** Changed in: systemd (Ubuntu Xenial)
Status: New => In Progress
** Changed in: systemd (Ubuntu Hirsute)
Assignee: (unassigned) => Dan Streetman (ddstreet)
** Changed in: systemd (Ubuntu Groovy)
Assignee: (unassigned) => Dan Streetman (ddstreet)
** Changed in: systemd (Ubuntu Focal)
Assignee: (unassigned) => Dan Streetman (ddstreet)
** Changed in: systemd (Ubuntu Bionic)
Assignee: (unassigned) => Dan Streetman (ddstreet)
** Changed in: systemd (Ubuntu Xenial)
Assignee: (unassigned) => Dan Streetman (ddstreet)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1887744
Title:
systemd dumps core on starting service: Assertion 'u->instance' failed
at src/core/load-fragment.c:4798
To manage notifications about this bug go to:
https://bugs.launchpad.net/systemd/+bug/1887744/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs