Bug 377563 - perlqt-4.14.3: qtgui/t/networkfortune.t test hangs because of IPv6
Summary: perlqt-4.14.3: qtgui/t/networkfortune.t test hangs because of IPv6
Status: RESOLVED UNMAINTAINED
Alias: None
Product: bindings
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-13 13:58 UTC by Petr Pisar
Modified: 2024-05-06 18:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Test work around (1.40 KB, patch)
2017-03-13 14:15 UTC, Petr Pisar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisar 2017-03-13 13:58:21 UTC
When running perlqt-4.14.3 tests, qtgui/t/networkfortune.t hangs here:

$ perl -I/home/test/fedora/perl-Qt/perlqt-4.14.3/build/blib/{arch,lib} /home/test/fedora/perl-Qt/perlqt-4.14.3/qtgui/t/networkfortune.t 
Config: Using QTest library 4.8.7, Qt 4.8.7
ok 1 - Window shown
PASS   : NetworkFortuneTest::initTestCase()

and a dialog window about "connection refused by peer" error appears.

The reason is that the testing server listens on IPv4 0.0.0.0 address, but the client having "Localhost" host name (qtgui/examples/network/fortuneclient/Client.pm:69) connects to IPv6 ::1, receives ECONNREFUSED and does not retry next associated Localhost address, IPv4 127.0.0.1, that would succeed.

This is probably bug in Qt::TcpSocket::connectToHost() (called from sub requestNewFortune() in fortuneclient/Client.pm). It gives up on first connection error instead of trying all addresses resolved from given host name.

Simple workaround in the the Perl binding tests is to connect to 127.0.0.1 instead of Localhost. But I think the real bug is Qt library and it should be fixed there.
Comment 1 Petr Pisar 2017-03-13 14:15:06 UTC
Created attachment 104539 [details]
Test work around

This replaces the "Localhost" with "127.0.0.1" in the client. Feel free to apply or better reassign to Qt C library component.
Comment 2 Justin Zobel 2022-11-03 01:40:14 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Petr Pisar 2022-11-03 15:22:15 UTC
I cannot reproduce it with current software version because perlqt requires for building smokeqt which was removed from my distribution (https://bugzilla.redhat.com/show_bug.cgi?id=1676813). Hence I cannot compile perlqt-4.14.3 and test it.
Comment 4 Christoph Cullmann 2024-05-06 18:20:33 UTC
The bindings we had are no longer maintained and got removed with either KF5 or KF6, depending on the language.