- Package:
- libwww-dict-leo-org-perl
- Source:
- libwww-dict-leo-org-perl
- Submitter:
- Stephan Lachnit
- Date:
- 2022-06-04 21:03:02 UTC
- Severity:
- grave
- Tags:
The package does not seem to work anymore. Calling it results in `Connection failed:` with no further information. Tested on multiple networks and machines. A debug log is given below. Probably an upstream issue. Cheers, Stephan Debug log: $ leo --debug test %DEBUG: connecting to site: dict.leo.org port 443 %DEBUG: GET /dictQuery/m-vocab/ende/query.xml?lp=ende&search=test HTTP/1.0 Connection failed: $
Control: tag + confirmed bookworm sid A bit of debugging in the code shows that the "only" problem is 216 close $conn or die "Connection failed: $!\n"; in /usr/share/perl5/WWW/Dict/Leo/Org.pm. If I change the die() to a warn() or comment out the line, everything works. I have no idea why "close $conn" fails, it might be related to changes in OpenSSL3 and/or IO::Socket::SSL ($conn = new IO::Socket::SSL(...)). -- $conn->close() fails as well without any further information. So this is easy to workaround, I'd still appreciate if someone has more clues what's going on here in order to produce a proper fix. Cheers, gregor
Hi, just run into this, too. gregor herrmann wrote: Indeed, it still works on Debian 11 Bullseye, so it is clearly no change on the server side. (Which is reverse-proxied at Cloudflare and Cloudflare known to be quite easy on blocking specific user agents. And there seem to be User-Agent header related issues, too: https://rt.cpan.org/Public/Bug/Display.html?id=131931 — so that and the ancient "HTTP/1.0" were my first guesses for potential causes.) Interesting, thanks! I suspect OpenSSL3 as well because that was quite a bump in changes. Nevertheless, IO::Socket::SSL is inbetween, so I looked at its documentation. From the IO::Socket::SSL POD: IO::Socket::SSL tries to emulate the usual socket behavior as good as possible, but full emulation can not be done. Specifically a read on the SSL socket might also result in a write on the TCP socket or a write on the SSL socket might result in a read on the TCP socket. Also "accept" and close on the SSL socket will result in writing and reading data to the TCP socket too. Especially the hidden writes might result in a connection reset if the underlying TCP socket is already closed by the peer. Unless signal PIPE is explicitly handled by the application this will usually result in the application crashing. It is thus recommended to explicitly IGNORE signal PIPE so that the errors get propagated as EPIPE instead of causing a crash of the application. Tried that, but it didn't help. I also checked what close() returns. It is actually "undef". Also IO::Socket::SSL does not document any return value for close(). So the return code is actually not meant to mean anything. Additionally the POD also states on close(): The default behavior is thus to only send a close notify but not wait for the close notify of the peer. If this is required "SSL_fast_shutdown" need to be explicitly set to false. So it also does have nothing on which a success or failure could be determined. So IMHO we can and should just drop that "or die()". Will do and also add some more debug output to be easier able to debug such issues. Will also use that debug output to debug and possibly fix https://rt.cpan.org/Public/Bug/Display.html?id=131931 Regards, Axel
Hello, Bug #1012120 in libwww-dict-leo-org-perl reported by you has been fixed in the Git repository and is awaiting an upload. You can see the commit message below and you can check the diff of the fix at: https://salsa.debian.org/perl-team/modules/packages/libwww-dict-leo-org-perl/-/commit/b313afa554f2d7d884cc61eb94e385ae316d2b7a ------------------------------------------------------------------------ Add patch to no more check the return value of "close()" There is nothing it could indicate and there's no return code documented in IO::Socket::SSL(3) either. Closes: #1012120 ------------------------------------------------------------------------ (this message was generated automatically) -- Greetings https://bugs.debian.org/1012120
We believe that the bug you reported is fixed in the latest version of
libwww-dict-leo-org-perl, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1012120@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Axel Beckert <abe@debian.org> (supplier of updated libwww-dict-leo-org-perl package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 04 Jun 2022 16:19:58 +0200
Source: libwww-dict-leo-org-perl
Architecture: source
Version: 2.02-3
Distribution: unstable
Urgency: high
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Changed-By: Axel Beckert <abe@debian.org>
Closes: 1012120
Changes:
libwww-dict-leo-org-perl (2.02-3) unstable; urgency=high
.
* Add patch to show also HTTP headers in debug output.
* Add patch to fix sending of the User-Agent header. (Fixes upstream RT
bug report #131931.)
* Add patch to no more check the return value of "close()", there is
nothing it could indicate and there's no return code documented in
IO::Socket::SSL(3) either. (Closes: #1012120)
* Add myself to Uploaders.
* Declare compliance with Debian Policy 4.6.1. (No changes needed.)
* Bump debhelper-compat to 13.
* Update packaging copyright years in debian/copyright and add myself.
Checksums-Sha1:
a6e8fcc9fde0cc3d32c798a99ad35ceafc16ff07 2301 libwww-dict-leo-org-perl_2.02-3.dsc
d029e510a527f49d227ef0b2bdc20d3a32b7b2f5 4108 libwww-dict-leo-org-perl_2.02-3.debian.tar.xz
f420db5667666c12d42fad54d4cdfcfffbae96d6 6285 libwww-dict-leo-org-perl_2.02-3_source.buildinfo
Checksums-Sha256:
f31961c4a556229a9e0479859cd5d40aff9ff1cd75fbcdb76cd7c97161660710 2301 libwww-dict-leo-org-perl_2.02-3.dsc
566a9c1fbd7ddeab97eb8bc367930b777fb04bfd4678bcbd0617bd740b38cd77 4108 libwww-dict-leo-org-perl_2.02-3.debian.tar.xz
603d5afcfa28d334d28c69265523e4b2419bd856d067d4c48a63a6e05bd11c85 6285 libwww-dict-leo-org-perl_2.02-3_source.buildinfo
Files:
c381071c9104affd24b2b17e9663111e 2301 perl optional libwww-dict-leo-org-perl_2.02-3.dsc
e1026debf54a49c9be7d1d65d407beb1 4108 perl optional libwww-dict-leo-org-perl_2.02-3.debian.tar.xz
6cf59fc2870921b3c963d31ccaf7a007 6285 perl optional libwww-dict-leo-org-perl_2.02-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEERoyJeTtCmBnp12Ema+Zjx1o1yXUFAmKbakwACgkQa+Zjx1o1
yXVEKA//bCtUCKtNmVtA51RfDuk3Bcy6zTYo1Uc4ml38zH72uDAIr7ohMiMmHxnO
Nd7IQ5TQJGQ1WdNmt7x7haNOUMIZQBNoY7gOQ1xzn7rdlumFbwY7GBbA2lI6Ey2j
0AZp4v4fc86BhwiEJ9NARWnuugz0GsDvM1y+nhgPHlSjKsLimzhUK9JvlloJjB5K
3d2T/ZOuInVaxFK/XDePL9/nVSAv7dbgdkk3hZIyBp+REp48j9GhyyG0QGf4sC39
fLSV1xJmCTGx0QsvchOtxYCZu4SxrkIR649Dfs/Bbnae31RXBMZqUmkJoa/iWmER
tFP4DpTFU37NxRhgEU7bqmxXMOPKJbEmVYJcSekT8HQEOOumYI+1eSJok4PfXCTY
QihYbOTH5FS0T7uoJ1cNKyVW3Y+/oRXmC6jIvawQ3uSWN0TESA1oAHuykwy4ufBM
QvjkpnwKao9KrzTee9QGNxy0MRSKbzduhxHc1jjr7r3YkkH/TzyIujedp8h7n89k
fvk7r9TyMnWLDjD/8DJwGWSfDvDPj3n/ZNIKifEcqYEGbvmgaXUsXtQan6gdnVUj
8zkOM1whvddM0W2mrv2FFK/DqHkf63ElKQpHhOrk9wQFsL4lbVGzQgsT58uamsaW
KXYb5fmQUW5QNQeoIY+1X0uBXhnv8VVHAi4MQeHb/t7gDhb9Ttg=
=yt+t
-----END PGP SIGNATURE-----
Thanks for investigating this further! Full ack. Thanks for adding the fix and uploading! Cheers, gregor