segfault on bad usage of generator

Bug #1714267 reported by Scott Moser on 2017-08-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nplan (Ubuntu)
Mathieu Trudel-Lapierre

Bug Description

netplan's systemd-generator segfaults if called with no arguements.
it should better show usage or something else and exit non-zero.

[Test case]
# /lib/systemd/system-generators/netplan

The above command should not crash, but respond with a suitable error message. Without the update, it behaves like this:

(netplan:842): GLib-CRITICAL **: g_strv_length: assertion 'str_array != NULL' failed
ERROR:src/generate.c:86:main: assertion failed: (g_strv_length(files) == 3)
Aborted (core dumped)

[Regression Potential]
This is a command not meant to be used directly; but spurious crashes or misbehavior of netplan at boot time, such as failing to generate networkd/NM config for a netplan yaml configuration that is valid, would consistute a potential regression of this update.


ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: nplan 0.26
ProcVersionSignature: Ubuntu 4.12.0-11.12-generic 4.12.5
Uname: Linux 4.12.0-11-generic x86_64
ApportVersion: 2.20.7-0ubuntu1
Architecture: amd64
Date: Thu Aug 31 14:24:24 2017
 PATH=(custom, no user)
SourcePackage: nplan
UpgradeStatus: No upgrade log present (probably fresh install)

Scott Moser (smoser) wrote :
Changed in nplan (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Changed in nplan (Ubuntu):
status: Confirmed → Triaged
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Changed in nplan (Ubuntu):
status: Triaged → Fix Committed
Changed in nplan (Ubuntu):
status: Fix Committed → Fix Released
description: updated

Hello Scott, or anyone else affected,

Accepted nplan into xenial-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in nplan (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed verification-needed-xenial

Verification-done on xenial with nplan 0.29~16.04.1:

systemd netplan generator can be called on the command-line and returns a warning message rather than crashing.

tags: added: verification-done-xenial
removed: verification-needed-xenial
tags: removed: verification-needed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers