MantisBT - Doomseeker
View Issue Details
0003376Doomseeker[All Projects] Bugpublic2018-02-18 18:442018-10-27 22:53
Zalewa 
Zalewa 
normalmajoralways
closedfixed 
MicrosoftWindowsXP/Vista/7
 
1.21.2 
0003376: Domain names look ups get the process stuck when quitting during look up.
Domain names look ups get the process stuck when quitting during look up.

QHostInfo::lookupHost()

We already have a workaround for this, but a workaround is a workaround and it doesn't solve the same problem when caused by QAbstractSocket::connectToHost().

The proper solution for this is to "delete QApplication" before returning from main().
1. Reverse commit'https://bitbucket.org/Doomseeker/doomseeker/commits/fb1f296bfbcffe767f3c4e6bda16ff9c5f0c6b95 [^]'
2. Look up a domain name that will take long to resolve. Non-existent domain name like "lolcathost" is good for this.
3. During look up, quit Doomseeker.
4. Notice that the process never ends.
Minimal example with explanation when "stuck" happens can be found here:'https://bitbucket.org/zalewa/dotfiles/src/5c2545284971ae6924fd42466041e37d8913336b/dev/qt/hostlookup/?at=default [^]'

See comment in main.cpp, main() function, line 83.
No tags attached.
related to 0003287closed Zalewa IRC: IRC network address hostname lookups use IPv4 when IPv6 connectivity is available 
Issue History
2018-02-18 18:44ZalewaNew Issue
2018-02-18 18:44ZalewaRelationship addedrelated to 0003287
2018-02-18 18:44ZalewaAssigned To => Zalewa
2018-02-18 18:44ZalewaStatusnew => assigned
2018-02-18 19:05ZalewaNote Added: 0019072
2018-02-18 19:05ZalewaStatusassigned => needs testing
2018-09-29 15:14WubTheCaptainTarget Version => 1.2
2018-09-29 15:15WubTheCaptainNote Added: 0019822
2018-09-29 16:10WubTheCaptainNote Added: 0019830
2018-09-29 16:10WubTheCaptainNote Edited: 0019830bug_revision_view_page.php?bugnote_id=19830#r12053
2018-10-01 03:37WubTheCaptainStatusneeds testing => feedback
2018-10-01 04:13Blzut3Note Added: 0019851
2018-10-02 05:47WubTheCaptainNote Added: 0019880
2018-10-02 05:47WubTheCaptainStatusfeedback => needs review
2018-10-02 19:26ZalewaAssigned ToZalewa =>
2018-10-09 10:36WubTheCaptainNote Added: 0020051
2018-10-09 10:36WubTheCaptainStatusneeds review => resolved
2018-10-09 10:36WubTheCaptainFixed in Version => 1.2
2018-10-09 10:36WubTheCaptainResolutionopen => fixed
2018-10-09 10:36WubTheCaptainAssigned To => Zalewa
2018-10-27 22:53WubTheCaptainStatusresolved => closed

Notes
(0019072)
Zalewa   
2018-02-18 19:05   
Two changes, second is indirectly dependent on the first:

1. "delete QApplication instance" added in this commit:'https://bitbucket.org/Doomseeker/doomseeker/commits/3cabc2fba79f3f787e6e46f4c3fdb612b50eb1d5 [^]'

2. LookupHost workaround removed and replaced with proper QHostInfo::lookupHost() here:'https://bitbucket.org/Doomseeker/doomseeker/commits/75080a1a29cb749489dabcbe1ad89a4148d20fce [^]'

Program should be now tested for any case where the process gets stuck running forever on quit.
(0019822)
WubTheCaptain   
2018-09-29 15:15   
Not sure if related, but something like described is still experienced on OpenBSD 6.4-current. Needs testing (especially on that operating system), for sure.
(0019830)
WubTheCaptain   
2018-09-29 16:10   
Could this also be related to 0003494?

(0019851)
Blzut3   
2018-10-01 04:13   
This was an hang on exit, I'm not sure how that's related to no traffic being sent?

In any case you an disable the hostname lookups in the options.
(0019880)
WubTheCaptain   
2018-10-02 05:47   
Probably still needs to be reviewed/tested why OpenBSD 6.4-current hangs on exit in a virtual machine, but not for intox8907 on bare metal (assumed).
(0020051)
WubTheCaptain   
2018-10-09 10:36   
Since OpenBSD has some other weird networking problems with Qt5 and Doomseeker and intox8907 couldn't reproduce the issue, and I can't reproduce the issue in this ticket with Qt 5.11 on Debian GNU/Linux, I guess this is resolved.

I agree the patches by Zalewa are correct.