2022-10-01 09:53:06 |
Ansgar Wiechers |
bug |
|
|
added bug |
2022-10-01 09:55:06 |
Ansgar Wiechers |
description |
When invoking the `logger` command on Ubuntu Jammy (bsdutils 2.37.2) with explicit PID and passing messages via STDIN
```
echo "some message" | logger -p local0.info --id="$$"
```
the command produces the following error:
> logger: send message failed: Invalid argument
The error does not appear when the message is passed as an argument:
```
logger -p local0.info --id="$$" "some message" # this works!
```
When using process substitution the error only appears for the first log message:
```
exec > >(logger -p local0.info --id="$$")
echo "first message" # throws error, message not logged
echo "second message" # no error, message logged correctly
```
The issue does not exist in older versions (e.g. Ubuntu Xenial, bsdutils 2.27.1).
Workaround: Omit `--id` and include the PID in a tag.
```
echo "some message" | logger -p local0.info -t "foo[$$]"
```
Expected Behavior
-----------------
All messages passed via STDIN should be sent to syslog without throwing an error.
OS Release
----------
Description: Ubuntu 22.04 LTS
Release: 22.04
Package Version
---------------
bsdutils:
Installed: 2.37.2-4ubuntu3
Candidate: 2.37.2-4ubuntu3 |
When invoking the `logger` command on Ubuntu Jammy (bsdutils 2.37.2) with explicit PID and passing messages via STDIN
```
echo "some message" | logger -p local0.info --id="$$"
```
the command produces the following error instead of sending the message to syslog:
> logger: send message failed: Invalid argument
The error does not appear when the message is passed as an argument:
```
logger -p local0.info --id="$$" "some message" # this works!
```
When using process substitution the error only appears for the first log message:
```
exec > >(logger -p local0.info --id="$$")
echo "first message" # throws error, message not logged
echo "second message" # no error, message logged correctly
```
The issue does not exist in older versions (e.g. Ubuntu Xenial, bsdutils 2.27.1).
Workaround: Omit `--id` and include the PID in a tag.
```
echo "some message" | logger -p local0.info -t "foo[$$]"
```
Expected Behavior
-----------------
All messages passed via STDIN should be sent to syslog without throwing an error.
OS Release
----------
Description: Ubuntu 22.04 LTS
Release: 22.04
Package Version
---------------
bsdutils:
Installed: 2.37.2-4ubuntu3
Candidate: 2.37.2-4ubuntu3 |
|
2022-10-04 03:15:56 |
Steve Langasek |
util-linux (Ubuntu): status |
New |
Incomplete |
|
2022-10-05 19:20:55 |
Dan Bungert |
util-linux (Ubuntu): status |
Incomplete |
Triaged |
|
2022-10-05 19:22:44 |
Dan Bungert |
util-linux (Ubuntu): importance |
Undecided |
Medium |
|
2022-10-05 19:22:52 |
Dan Bungert |
bug |
|
|
added subscriber Ubuntu Foundations Bugs |
2022-10-05 19:24:08 |
Dan Bungert |
description |
When invoking the `logger` command on Ubuntu Jammy (bsdutils 2.37.2) with explicit PID and passing messages via STDIN
```
echo "some message" | logger -p local0.info --id="$$"
```
the command produces the following error instead of sending the message to syslog:
> logger: send message failed: Invalid argument
The error does not appear when the message is passed as an argument:
```
logger -p local0.info --id="$$" "some message" # this works!
```
When using process substitution the error only appears for the first log message:
```
exec > >(logger -p local0.info --id="$$")
echo "first message" # throws error, message not logged
echo "second message" # no error, message logged correctly
```
The issue does not exist in older versions (e.g. Ubuntu Xenial, bsdutils 2.27.1).
Workaround: Omit `--id` and include the PID in a tag.
```
echo "some message" | logger -p local0.info -t "foo[$$]"
```
Expected Behavior
-----------------
All messages passed via STDIN should be sent to syslog without throwing an error.
OS Release
----------
Description: Ubuntu 22.04 LTS
Release: 22.04
Package Version
---------------
bsdutils:
Installed: 2.37.2-4ubuntu3
Candidate: 2.37.2-4ubuntu3 |
Steps to reproduce:
apt-get install lxd-installer
lxd init
lxc launch ubuntu:jammy ct0
lxc exec ct0 -- bash
Then within the container run
echo foo | logger --id="$$"
Note: the command may work the first time, but subsequent invocations then produced the error described in my bug report.
(original report follows)
-----
When invoking the `logger` command on Ubuntu Jammy (bsdutils 2.37.2) with explicit PID and passing messages via STDIN
```
echo "some message" | logger -p local0.info --id="$$"
```
the command produces the following error instead of sending the message to syslog:
> logger: send message failed: Invalid argument
The error does not appear when the message is passed as an argument:
```
logger -p local0.info --id="$$" "some message" # this works!
```
When using process substitution the error only appears for the first log message:
```
exec > >(logger -p local0.info --id="$$")
echo "first message" # throws error, message not logged
echo "second message" # no error, message logged correctly
```
The issue does not exist in older versions (e.g. Ubuntu Xenial, bsdutils 2.27.1).
Workaround: Omit `--id` and include the PID in a tag.
```
echo "some message" | logger -p local0.info -t "foo[$$]"
```
Expected Behavior
-----------------
All messages passed via STDIN should be sent to syslog without throwing an error.
OS Release
----------
Description: Ubuntu 22.04 LTS
Release: 22.04
Package Version
---------------
bsdutils:
Installed: 2.37.2-4ubuntu3
Candidate: 2.37.2-4ubuntu3 |
|
2023-06-24 17:10:58 |
xhienne |
bug watch added |
|
https://github.com/util-linux/util-linux/issues/2336 |
|