Bug 1533595 - systemd-run -M fails to run a command with UTF8 chars
Summary: systemd-run -M fails to run a command with UTF8 chars
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-11 17:30 UTC by Davide Principi
Modified: 2021-02-15 07:34 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-15 07:34:32 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Davide Principi 2018-01-11 17:30:09 UTC
Description of problem:

For certain UTF8 string lengths systemd-run fails to run a command in a separate machine

Version-Release number of selected component (if applicable):

- CentOS 7.4
- systemd-219-42.el7_4.4.x86_64
- Linux vm5.dpnet.nethesis.it 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:

always

Steps to Reproduce:

1. prepare the container chroot:
   yum -y --releasever=/ --installroot=/var/lib/machines/c1 install bash systemd

2. spawn a container:
   /usr/bin/systemd-nspawn --boot --machine=c1 -D /var/lib/machines/c1

3. open a new terminal and run the script:
 
   for ((I=1; I<10; I++)); do USERNAME=$(printf 'à%.0s' `seq 1 $I`); systemd-run -M c1 -q -t /usr/bin/echo $I $USERNAME; done

Actual results:

1 à
2 àà
3 ààà
4 àààà
5 ààààà
Failed to start transient service unit: Message did not receive a reply (timeout by message bus)

Expected results (with "a" instead of "à"):

1 a
2 aa
3 aaa
4 aaaa
5 aaaaa
6 aaaaaa
7 aaaaaaa
8 aaaaaaaa
9 aaaaaaaaa

Additional info:

LANG=en_US.UTF-8
Running in KVM
This bug was originally reported here:

https://github.com/NethServer/dev/issues/5400

Comment 2 Jan Synacek 2018-01-31 13:28:06 UTC
https://github.com/systemd/systemd/issues/8056

Comment 3 Jan Synacek 2018-01-31 13:37:20 UTC
Meanwhile, an obvious thing to do is: don't do it.

Comment 4 Jan Synacek 2018-02-01 09:08:33 UTC
Apparently, this has been fixed in https://github.com/systemd/systemd/commit/2e59b241ca86b8338c706a7a704d301fde908581.

Comment 8 RHEL Program Management 2021-02-15 07:34:32 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


Note You need to log in before you can comment on or make changes to this bug.