[Bug 59283] New: Berkeley DB version mismatch crashes 32-bit GTK+ applications in Wine 11
http://bugs.winehq.org/show_bug.cgi?id=59283 Bug ID: 59283 Summary: Berkeley DB version mismatch crashes 32-bit GTK+ applications in Wine 11 Product: Wine Version: 11.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@list.winehq.org Reporter: nen24t@gmail.com Distribution: --- Created attachment 80208 --> http://bugs.winehq.org/attachment.cgi?id=80208 Full backtrace reaper 32bit ## Bug Summary **Title:** Berkeley DB version mismatch causes crashes in 32-bit applications using GTK+ **Component:** wine (core) **Severity:** normal **Priority:** P2 **Version:** Wine 11.0 **Hardware:** x86_64 **OS:** Linux (Ubuntu 24.04) --- ## Description Wine 11.0 exhibits Berkeley DB (libdb) version mismatch errors when running certain 32-bit Windows applications that use GTK+ libraries. The error occurs before the application can fully initialize, resulting in a crash. ### Error Message ``` BDB1539 Build signature doesn't match environment Cannot open DB environment: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch wine: Unhandled page fault on execute access to 0x00000000 ``` ### Affected Applications - REAPER 32-bit (Digital Audio Workstation) - Garritan CFX Lite 32-bit (VST instrument host) - Other applications using GTK+ with Berkeley DB backend ### Impact Applications crash immediately on startup, before reaching their main functionality. This affects audio production software and other professional tools that rely on GTK+ libraries. --- ## Steps to Reproduce 1. Install Wine 11.0 (wine-stable or custom build) 2. Set up a 32-bit Wine prefix 3. Install REAPER 32-bit or similar GTK+-based application 4. Run the application: ```bash WINEPREFIX=~/.wine wine "C:\Program Files (x86)\REAPER\reaper.exe" ``` 5. Observe crash with BDB error ### Environment - **Wine version:** wine-11.0 - **Distribution:** Ubuntu 24.04 LTS - **Kernel:** 6.14.0-1019-oem - **System libdb:** libdb-5.3.so (from libdb5.3-dev package) - **Architecture:** x86_64 (running 32-bit Windows apps via WoW64) --- ## Expected Behavior Application should start normally without Berkeley DB errors. GTK+ libraries should either: 1. Use a compatible libdb version, or 2. Handle version mismatches gracefully, or 3. Not use persistent Berkeley DB storage that can become outdated --- ## Actual Behavior Application crashes with page fault at NULL pointer (0x00000000) after Berkeley DB version mismatch error. The crash occurs in system libraries before the application's main code executes. ### Backtrace ``` Unhandled exception: page fault on write access to 0x00000000 in wow64 32-bit code (0x003600a9). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:003600a9 ESP:0141a864 EBP:00688f36 EFLAGS:00010203 EAX:00000000 EBX:006885e0 ECX:018eb0b0 EDX:00000000 Modules: Module Address Debug info Name (146 modules) PE 400000- 1317000 Deferred reaper ELF f2271000-f2464000 Deferred libdb-5.3.so [... more modules ...] ``` --- ## Analysis ### Root Cause The issue appears to be related to: 1. **GTK+ uses Berkeley DB** for recently-used file tracking (`.local/share/recently-used.xbel`) 2. **System libdb version** (5.3.x) may be incompatible with Wine's expectations 3. **Database files persist** between Wine versions, causing signature mismatch 4. **32-bit applications more affected** - possibly due to WoW64 library loading ### Not Application-Specific This is NOT an application bug. We verified this by: - Testing with multiple applications (REAPER, CFX Lite) - Creating a minimal test program that does NOT use Berkeley DB - works perfectly - The crash occurs in Wine/GTK+ code, not application code --- ## Workarounds ### Temporary Solutions 1. **Remove stale database files:** ```bash rm -rf ~/.wine/.local/share/recently-used.xbel* find ~/.wine -name "*.db" -delete ``` 2. **Use 64-bit applications** (not always possible) 3. **Downgrade to Wine 10.x** (loses Wine 11 improvements) ### Limitations These workarounds are temporary - the issue recurs after GTK+ recreates database files. --- ## Additional Information ### Testing Details - **Wine 11 new WoW64:** Crashes - **Wine 11 old WoW64 (wine-stable):** Crashes - **Wine 10.x:** Also affected (issue predates Wine 11) - **64-bit applications:** Generally unaffected ### Relevant Files - System libdb: `/lib/x86_64-linux-gnu/libdb-5.3.so` (64-bit) - System libdb: `/lib/i386-linux-gnu/libdb-5.3.so` (32-bit) - Wine loads: `ELF f2271000-f2464000 Deferred libdb-5.3.so` ### Related Issues This may be related to GTK+'s use of Berkeley DB for: - Recently used files tracking - Icon cache - Other persistent data structures --- ## Suggested Fixes 1. **Pin libdb version:** Bundle compatible libdb version with Wine 2. **Handle version mismatch:** Gracefully recreate database on version mismatch 3. **Alternative backend:** Consider switching GTK+ to use SQLite or other database 4. **Clear on upgrade:** Automatically clear incompatible databases when Wine version changes --- ## Impact Assessment - **Severity:** Medium-High - Affects professional audio production tools - **Scope:** 32-bit GTK+ applications on Wine 11 - **Workaround:** Available but temporary - **User Impact:** Cannot use certain professional Windows software on Linux --- ## Test Case A minimal test case that demonstrates the issue: 1. Create Wine prefix: ```bash WINEPREFIX=~/.wine wineboot ``` 2. Install REAPER 32-bit (or any GTK+ app) 3. Run with debug output: ```bash WINEDEBUG=+all wine reaper.exe 2>&1 | grep -i "bdb\|berkeley" ``` 4. Observe BDB error followed by crash --- ## References - **WineASIO project:** https://github.com/giang17/wineasio - **Issue documented in:** TEST-RESULTS.md (comprehensive 32-bit testing analysis) - **Berkeley DB:** https://www.oracle.com/database/technologies/related/berkeleydb.html - **GTK+ documentation:** https://www.gtk.org/ --- ## Reporter Information - **Reporter:** WineASIO v1.4.1 testing team - **Date:** January 21, 2026 - **Tested configurations:** Multiple Wine 11 builds, Ubuntu 24.04 - **Verification:** Extensive testing with multiple applications --- ## Additional Notes This bug was discovered during Wine 11 porting of WineASIO (ASIO to JACK audio driver). While investigating what appeared to be a WineASIO bug, we determined the root cause is a Wine/GTK+/Berkeley DB compatibility issue. The WineASIO library itself works correctly - we confirmed this with a minimal test program that bypasses GTK+. The crash occurs in Wine's GTK+ implementation before WineASIO is even initialized. --- **Follow-up questions for WineHQ developers:** 1. Is Wine's libdb build compatible with system libdb 5.3? 2. Should Wine bundle its own libdb version? 3. Can GTK+ database initialization be made more robust? 4. Is there a way to force database recreation on version mismatch? -- 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=59283 --- Comment #1 from gng <nen24t@gmail.com> --- Created attachment 80209 --> http://bugs.winehq.org/attachment.cgi?id=80209 Full backtrace garritan cfx lite 32bit -- 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=59283 Zeb Figura <z.figura12@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com --- Comment #2 from Zeb Figura <z.figura12@gmail.com> --- Can you please redo this without AI? There is so much cruft in this bug report it's hard to find the actual useful information. -- 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=59283 --- Comment #3 from gng <nen24t@gmail.com> --- Sorry for the verbose initial report. Here's the essential info: **Wine:** 11.0 (also wine-stable 11.0) **OS:** Ubuntu 24.04 x86_64 **Problem:** 32-bit apps crash on startup with NULL pointer access. 64-bit versions work fine. **Repro:** 1. `WINEPREFIX=~/test wineboot` 2. Install REAPER 32-bit (reaper.fm) 3. `wine "C:\Program Files (x86)\REAPER\reaper.exe"` **Backtrace:** ``` Unhandled exception: page fault on write access to 0x00000000 in wow64 32-bit code (0x003600a9). EIP:003600a9 ESP:0141a864 EBP:00688f36 EAX:00000000 EBX:006885e0 ECX:018eb0b0 EDX:00000000 =>0 0x003600a9 (0x00688f36) 0x003600a9: addb %al, (%eax) ``` Crash address is outside all loaded modules. Also reproduced with Garritan CFX Lite 32-bit. Full logs available on request. -- 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=59283 mata <sutupud@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sutupud@yahoo.com --- Comment #4 from mata <sutupud@yahoo.com> ---
**Follow-up questions for WineHQ developers:**
1. Is Wine's libdb build compatible with system libdb 5.3? 2. Should Wine bundle its own libdb version? 3. Can GTK+ database initialization be made more robust? 4. Is there a way to force database recreation on version mismatch?
That makes no sense, where woulda "Wine'S libdb build" come from? It does not even link to libdb. You know what does? libjack. It's used to read the metadata the server writes e.g. to the /dev/shm/jack_db-1000/ folder. Your logs are incomplete and truncated, but I bet that's where ther version missmatch comes from, not from gtk. For sure your AI is hallucinating about recently-used.xbel, that's an xml file. -- 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=59283 gng <nen24t@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #5 from gng <nen24t@gmail.com> --- Hi Mata, You are absolutely right - apologies for the confusion in my earlier analysis. The AI-assisted debugging led me down the wrong path with the Berkeley DB/GTK theory. **The actual problem was in our WineASIO code, not Wine itself.** After extensive debugging, we discovered the root cause: **Wine 11 WoW64 Architecture:** In Wine 11 WoW64, 32-bit PE DLLs use 64-bit Unix libraries. We were incorrectly: 1. Building the Unix .so with -m32 (should be -m64) 2. Installing to i386-unix/ (should be x86_64-unix/) 3. Allocating audio buffers on the Unix side (should be PE side due to address space mismatch) 32-bit PE (wineasio.dll) -> WoW64 Thunking -> 64-bit Unix (wineasio.so) **The fix (WineASIO v1.4.2):** - Build Unix .so with -m64 even for 32-bit PE - Install wineasio.so to x86_64-unix/ (not i386-unix/) - Allocate audio buffers on PE side with HeapAlloc() - Pass buffer pointers to Unix side as UINT64 32-bit REAPER and Garritan CFX Lite now work perfectly with WineASIO on Wine 11. **This is NOT a Wine bug.** It was our misunderstanding of the WoW64 architecture. Wine 11 is working correctly. The fix is released: https://github.com/giang17/wineasio/releases/tag/v1.4.2 Please feel free to close this bug report. Thanks for pointing me in the right direction! -- 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=59283 Gijs Vermeulen <gijsvrm@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Gijs Vermeulen <gijsvrm@gmail.com> --- Closing INVALID. -- 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