i'm probably having a similar issue to what is discussed here, please also see:
https://qt-project.org/forums/viewthread/11763
i've created a minimal QCoreApplication example and engineered a network setup which is reproducible on your system, so in a nutshell: you can now reproduce this bug, see:
https://github.com/qknight/qt-QNetwo...9f2ef661d4dcb1
*there is one difference though*:
i had this issue also with *QNetworkAccessManager* but after playing with the issue for a while (/etc/resolv.conf) i now think it is DNS related so i was looking into *QHostInfo::lookupHost*
but the *README.MD* contains a detailed description of the setup and tests i was using/doing.
i'm using:
* qt-4.8.4
* nixos linux (nixos.org)
* kernel 3.4.56
some experiments
i made some experiments with iptables and since DNS uses UDP on my system (not TCP as shown in the rules above) i modified them slightly:
iptables -D OUTPUT -d 8.8.8.8 -j DROP
surprisingly this rule made the shutdown process, which would normally timeout with 40 seconds, succeed in no time (say 5ms). for some reason a local process just knows that the DNS resolver fails.
gethostip shows the same behaviour:
% time gethostip lastlog.de
lastlog.de: Unknown host
gethostip lastlog.de 0.00s user 0.00s system 75% cpu 0.005 total
summary: using the iptables rule does not help to reproduce the issue but hides it instead! so better use this setup to reproduce it:
host pc ---- switch1 ---- switch2 ----- internet
and then unplug switch2 so that networkmanager/ifplugd (or similar) won't notice that the cable has been unplugged.
anyway, have a look at the README.MD file in the repo above. as described there i will now try to modify the Qt toolkit to ignore the DNS resoler on shutdown - maybe that is possible.
feedback welcome. my jabber: flux@jabber.ccc.de
best wishes,
joachim schiele
Bookmarks