[Bug 60484] New: wine 11.19 dnsapi parsing a large /etc/hosts stalls fresh prefix initialization
http://bugs.winehq.org/show_bug.cgi?id=60484 Bug ID: 60484 Summary: wine 11.19 dnsapi parsing a large /etc/hosts stalls fresh prefix initialization Product: Wine Version: 11.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: dnsapi Assignee: wine-bugs@list.winehq.org Reporter: xash@riseup.net Target Milestone: --- Distribution: --- Created attachment 82331 --> http://bugs.winehq.org/attachment.cgi?id=82331 bash script to repro the issue Steps to reproduce: 1. Run the attached repro-wine-hosts.sh script. It generates two synthetic hosts files, one with two lines and one with 434,612 lines, then starts wineboot -i with a fresh prefix for each. bubblewrap bind-mounts each file as /etc/hosts only for Wine. 2. Compare the two prefixes and the script output after the 30-second timeout. Actual results on my machine: - Both wineboot commands hit the 30-second timeout (exit 124). - With the two-line hosts file, the prefix reaches a 2,226,829-byte system.reg and has a .update-timestamp file before the timeout. - With the 434,612-line hosts file (13,038,334 bytes), the prefix only reaches a 1,212-byte system.reg and has no .update-timestamp file before the timeout. - A separate WINEDEBUG=trace+dnsapi capture using my real 434,612-line hosts file shows wineboot calling DnsQuery_UTF8 for the local computer name, followed by thousands of get_next_host_entry "parsing line" messages. The 20-second capture timed out while those messages were still being emitted. Expected result: The size of /etc/hosts should not prevent a fresh Wine prefix from initializing. The application executable is not needed to reproduce this. Workaround: Starting Wine with a minimal /etc/hosts bind-mounted via bubblewrap lets the prefix initialize. My real hosts file is 12,476,010 bytes and has 434,612 lines. Related source: The 11.19 dnsapi implementation parses /etc/hosts during DNS queries: https://github.com/wine-mirror/wine/blob/wine-11.19/dlls/dnsapi/query.c The raw WINEDEBUG log contains the contents of my actual /etc/hosts and was not attached. Output of the script: ``` wine-11.19 (Staging) Linux 7.2.9-arch1-1 2 34 /tmp/wine-hosts-repro.bikl8L/hosts-small 434612 13038334 /tmp/wine-hosts-repro.bikl8L/hosts-large 434614 13038368 total small: wineboot exit=124 elapsed=30s large: wineboot exit=124 elapsed=30s ``` -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60484 --- Comment #1 from xash@riseup.net --- It's actually reproducible with any initialized prefix too, wineboot.exe will tank a CPU core without ever booting. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60484 Louis Lenders <xerox.xerox2000x@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xerox.xerox2000x@gmail.com --- Comment #2 from Louis Lenders <xerox.xerox2000x@gmail.com> --- Hi, This is probably already fixed in current git by https://gitlab.winehq.org/wine/wine/-/commit/678368097d0087eed7d08e6c59bcc87.... I had a similar issue and the issue is fixed in latest git. Could you try update to latest git, and see if the error is gone? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60484 xash@riseup.net changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #3 from xash@riseup.net --- (In reply to Louis Lenders from comment #2)
Hi,
This is probably already fixed in current git by https://gitlab.winehq.org/wine/wine/-/commit/ 678368097d0087eed7d08e6c59bcc871bf76c03b. I had a similar issue and the issue is fixed in latest git.
Could you try update to latest git, and see if the error is gone?
Hi Louis, Can confirm it's fixed for me as well. Thanks for the heads up. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60484 Louis Lenders <xerox.xerox2000x@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |678368097d0087eed7d08e6c59b | |cc871bf76c03b --- Comment #4 from Louis Lenders <xerox.xerox2000x@gmail.com> --- (In reply to xash from comment #3)
Can confirm it's fixed for me as well. Thanks for the heads up.
Ok, Thanks for the quick response, I've added the commit SHA1 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60484 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard@winehq.org> --- Closing bugs fixed in 11.20. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla