Bug 2108032 - Wine 7.10+ hangs when C++ program links statically with sqlite3
Summary: Wine 7.10+ hangs when C++ program links statically with sqlite3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: wine
Version: 36
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michael Cronenworth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-18 10:36 UTC by Joel Uckelman
Modified: 2023-02-21 14:10 UTC (History)
4 users (show)

Fixed In Version: wine-8.0-0.rc4.1.fc37 wine-8.0-0.rc4.1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-21 03:31:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Joel Uckelman 2022-07-18 10:36:49 UTC
Description of problem:

A trivial C++ program compiled with mingw and statically linked with sqlite3 causes Wine 7.10 and Wine 7.12 to hang.

Version-Release number of selected component (if applicable):

wine-7.12-1.fc36.x86_64
mingw64-gcc-c++-11.2.1-5.fc36.x86_64
mingw64-sqlite-static-3.36.0.0-3.fc36.noarch

How reproducible:

Reproducible every time following the steps below.

Steps to Reproduce:

1. Make augh.cpp the following C++ program:

#include <sqlite3.h>

int main(int argc, char**argv) {
  return 0;
}

void not_called() {
  sqlite3_initialize();
}

2. Compile, link, and run it:

$ x86_64-w64-mingw32-g++ -c -g -o augh.o augh.cpp
$ x86_64-w64-mingw32-g++ -static -fstack-protector -g -o augh.exe augh.o -lsqlite3
$ wine augh.exe

Actual results:

[juckelman@midas augh]$ ./augh.exe 
002c:fixme:winediag:LdrInitializeThunk wine-staging 7.12 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
0080:err:x11drv:X11DRV_ChangeDisplaySettingsEx Failed to write L"\\\\.\\DISPLAY1" display settings to registry.
0080:err:system:NtUserChangeDisplaySettings Changing L"\\\\.\\DISPLAY1" display settings returned -3.
0080:err:explorer:initialize_display_settings Failed to initialize registry display settings for L"\\\\.\\DISPLAY1".
0114:err:sync:RtlpWaitForCriticalSection section 00000002DE99D010 "?" wait timed out in thread 0114, blocked by 0000, retrying (60 sec)

The final line repeats endlessly and the program never exits.

Expected results:

[juckelman@midas augh]$ ./augh.exe 
002c:fixme:winediag:LdrInitializeThunk wine-staging 7.12 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
0080:err:x11drv:X11DRV_ChangeDisplaySettingsEx Failed to write L"\\\\.\\DISPLAY1" display settings to registry.
0080:err:system:NtUserChangeDisplaySettings Changing L"\\\\.\\DISPLAY1" display settings returned -3.
0080:err:explorer:initialize_display_settings Failed to initialize registry display settings for L"\\\\.\\DISPLAY1".
[juckelman@midas augh]$

This is the result when I comment out sqlite3_initialize() (which is in a function that's never called!). The program exits successfully.

Additional info:

On Fedora 35 with

    mingw64-gcc-c++-11.2.1-3.fc35.x86_64
    wine-7.2-1.fc35.x86_64
    mingw64-sqlite-static-3.36.0.0-2.fc35.noarch

the program exits successfully either way, regardless of the presence of sqlite3_initialize().

On Fedora 36, if I dynamically link with sqlite3 instead, the program also exits successfully.

Comment 1 Joel Uckelman 2022-07-18 17:34:42 UTC
I can confirm that the problem still occurs with wine-7.12-2.fc36.x86_64.

Comment 2 Craig Toset 2022-08-07 17:49:48 UTC
I ran into this bug as well, but it was during installation of Python 3 in wine. Downgrading to 7.2-1.fc36 made things work, but obviously that is less than ideal. The winehq packages (tested 7.12 and 7.14) work fine.

Comment 3 Joel Uckelman 2022-08-07 18:24:14 UTC
Downgrading to 7.2-1.fc36 fixes the problem for me as well, but that blocks of any upgrade path until the problem is fixed.

Comment 4 Joel Uckelman 2023-01-16 21:23:47 UTC
The problem no longer occurs for me with wine 7.22-2-2.fc36 (which I've verified on several different systems).

Comment 5 Fedora Update System 2023-01-18 00:07:20 UTC
FEDORA-2023-083202f1ba has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-083202f1ba

Comment 6 Fedora Update System 2023-01-18 00:08:28 UTC
FEDORA-2023-eb7925ec53 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2023-eb7925ec53

Comment 7 Fedora Update System 2023-01-18 02:37:19 UTC
FEDORA-2023-083202f1ba has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-083202f1ba`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-083202f1ba

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-01-18 03:39:59 UTC
FEDORA-2023-eb7925ec53 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-eb7925ec53`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-eb7925ec53

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2023-01-21 03:31:31 UTC
FEDORA-2023-083202f1ba has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2023-01-22 01:48:29 UTC
FEDORA-2023-eb7925ec53 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Joel Uckelman 2023-02-21 13:44:11 UTC
I can reproduce the problem with the above test case with wine-8.0-1.fc37.

Some change between 7.22-2-2.fc36 and wine-8.0-1.fc37 has broken this once again.

Comment 12 Joel Uckelman 2023-02-21 14:10:06 UTC
The problem still occurs with wine-8.1-1.fc37.


Note You need to log in before you can comment on or make changes to this bug.