Am 17.07.2023 um 16:55 hat Denis V. Lunev geschrieben: > Commit e6df58a5578fee7a50bbf36f4a50a2781cff855d > Author: Hanna Reitz <hre...@redhat.com> > Date: Wed May 8 23:18:18 2019 +0200 > qemu-nbd: Do not close stderr > has introduced an interesting regression. Original behavior of > ssh somehost qemu-nbd /home/den/tmp/file -f raw --fork > was the following: > * qemu-nbd was started as a daemon > * the command execution is done and ssh exited with success > > The patch has changed this behavior and 'ssh' command now hangs forever. > > According to the normal specification of the daemon() call, we should > endup with STDERR pointing to /dev/null. That should be done at the > very end of the successful startup sequence when the pipe to the > bootstrap process (used for diagnostics) is no longer needed. > > This could be achived in the same way as done for 'qemu-nbd -c' case. > That was commit 0eaf453e, also fixing up e6df58a5. STDOUT copying to > STDERR does the trick. > > This also leads to proper 'ssh' connection closing which fixes my > original problem. > > Signed-off-by: Denis V. Lunev <d...@openvz.org> > CC: Eric Blake <ebl...@redhat.com> > CC: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru> > CC: Hanna Reitz <hre...@redhat.com> > CC: <qemu-sta...@nongnu.org>
This broke qemu-iotests 233 (Eric, please make sure to run the full qemu-iotests suite before sending block related pull requests): --- /home/kwolf/source/qemu/tests/qemu-iotests/233.out +++ /home/kwolf/source/qemu/build-clang/scratch/raw-file-233/233.out.bad @@ -99,14 +99,4 @@ qemu-nbd: TLS handshake failed: The TLS connection was non-properly terminated. == final server log == -qemu-nbd: option negotiation failed: Failed to read opts magic: Cannot read from TLS channel: Software caused connection abort -qemu-nbd: option negotiation failed: Failed to read opts magic: Cannot read from TLS channel: Software caused connection abort -qemu-nbd: option negotiation failed: Verify failed: No certificate was found. -qemu-nbd: option negotiation failed: Verify failed: No certificate was found. -qemu-nbd: option negotiation failed: TLS x509 authz check for DISTINGUISHED-NAME is denied -qemu-nbd: option negotiation failed: TLS x509 authz check for DISTINGUISHED-NAME is denied -qemu-nbd: option negotiation failed: Failed to read opts magic: Cannot read from TLS channel: Software caused connection abort -qemu-nbd: option negotiation failed: Failed to read opts magic: Cannot read from TLS channel: Software caused connection abort -qemu-nbd: option negotiation failed: TLS handshake failed: An illegal parameter has been received. -qemu-nbd: option negotiation failed: TLS handshake failed: An illegal parameter has been received. *** done Do we really want to lose these error messages? This looks wrong to me. Kevin