Error in system information after logging in to your account
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
Fix Committed
|
Medium
|
Simon Poirier | ||
landscape-client (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
In Progress
|
Medium
|
Unassigned | ||
Cosmic |
In Progress
|
Medium
|
Unassigned | ||
Disco |
Won't Fix
|
Medium
|
Unassigned | ||
Eoan |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Impact]
* An error message is included in when rendering landscape-sysinfo
statistics through pam_motd if there are processes with a non-ascii
command. This is due to the fact that environment is not passed
by pam-motd.
* As landscape-sysinfo is present on cloud-images, this bug affects
all images since bionic.
* This change sets locale variables in the landscape-sysinfo wrapper,
so the python interpreter can know which locale to load.
[Test Case]
* Make sure the system default locale is configured with a valid
charset (e.g. /etc/default/locale contains "LANG=C.UTF-8").
* Spawn a process with non-ascii parameters (which are part of the
configured charset): sh -c 'sleep 60; echo holà mundo' & sudo login
* Check the output of the motd
[Regression Potential]
* Since this changes only alters the landscape-sysinfo wrapper script,
its effects shouldn't alter other functionalities.
* Although it is still possible to have a misconfigured locale file,
and run commands, the effect would be limited to an error message
similar to the one which is currently displayed.
[Original Description]
Exception after login:
-------
Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-24-generic x86_64)
* Documentation: https:/
* Management: https:/
* Support: https:/
System information as of Wed Jul 4 10:41:09 CEST 2018
System load: 0.0 Swap usage: 5%
Usage of /home: unknown Users logged in: 0
Memory usage: 16% IP address for enp3s0: 192.168.20.12
=> There were exceptions while processing one or more plugins. See
/var/
* Meltdown, Spectre and Ubuntu: What are the attack vectors,
how the fixes work, and everything else you need to know
- https:/
* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https:/
0 pakietów może zostać zaktualizowanych.
0 aktualizacji jest aktualizacjami zabezpieczeń.
-------
sysinfo.log:
2018-06-19 23:19:34,877 ERROR Processes plugin raised an exception.
Traceback (most recent call last):
File "/usr/lib/
result = plugin.run()
File "/usr/lib/
for process_info in info.get_
File "/usr/lib/
process_info = self.get_
File "/usr/lib/
cmd_line = file.readline()
File "/usr/lib/
return codecs.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 152: ordinal not in range(128)
-----------------
the problem concerned the decoding of utf8 forms, attached patch resolve my problem, after patch my login
screen looks normal:
-----------------
Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-24-generic x86_64)
* Documentation: https:/
* Management: https:/
* Support: https:/
System information as of Wed Jul 4 11:10:20 CEST 2018
System load: 0.2 Processes: 187
Usage of /home: unknown Users logged in: 1
Memory usage: 18% IP address for enp3s0: 192.168.20.12
Swap usage: 5%
* Meltdown, Spectre and Ubuntu: What are the attack vectors,
how the fixes work, and everything else you need to know
- https:/
* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https:/
0 pakietów może zostać zaktualizowanych.
0 aktualizacji jest aktualizacjami zabezpieczeń.
Changed in landscape-client: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in landscape-client: | |
assignee: | nobody → Simon Poirier (simpoir) |
Changed in landscape-client: | |
status: | In Progress → Fix Committed |
description: | updated |
Changed in landscape-client (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: patch |
Changed in landscape-client (Ubuntu Disco): | |
status: | In Progress → Won't Fix |
Thank you for reporting this bug. We believe it is an actual issue and will look into having it fixed.
For the record, I've been able to reproduce it easily on a pristine bionic container, by spawning a command and launching a login shell, which empties the environment and calls pam_motd:
simpoir@qs:~$ sh -c 'sleep 60; echo ಠ_ಠ' &
[1] 2514
simpoir@qs:~$ sudo login
qs login: simpoir
Password:
Last login: Wed Jul 4 12:31:15 UTC 2018 on pts/0
Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-15-generic x86_64)
* Documentation: https:/ /help.ubuntu. com /landscape. canonical. com /ubuntu. com/advantage
* Management: https:/
* Support: https:/
(None, None)
System information as of Wed Jul 4 12:38:14 UTC 2018
System load: 0.75 Memory usage: 0% Users logged in: 1
Usage of /home: unknown Swap usage: 0% IP address for eth0: 10.4.50.157
=> There were exceptions while processing one or more plugins. See log/landscape/ sysinfo. log for more information.
/var/