This is not a bug in bash; it is acceptable for the receiving end of the stdout pipe to be closed by grep once grep has found a match and exited. It is a bug in the lsb-release command, which should not throw an exception when stdout is closed.
Confirming this as a genuine bug, but declining it for Canonical to work on as there is a straightforward workaround (redirecting stderr to /dev/null to suppress the exception message).
This is not a bug in bash; it is acceptable for the receiving end of the stdout pipe to be closed by grep once grep has found a match and exited. It is a bug in the lsb-release command, which should not throw an exception when stdout is closed.
Confirming this as a genuine bug, but declining it for Canonical to work on as there is a straightforward workaround (redirecting stderr to /dev/null to suppress the exception message).