| Ticket UUID: | 5f7ba8c5a38b13d6a143908dd7c0caca094b5e58 | |||
| Title: | Leakage in trunk, with --disable-xft build | |||
| Type: | Bug | Version: | 9.1 | |
| Submitter: | jan.nijtmans | Created on: | 2026-10-09 13:47:56 | |
| Subsystem: | (unused) | Assigned To: | jan.nijtmans | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2026-10-18 13:47:27 | |
| Resolution: | Fixed | Closed By: | nemethi | |
| Closed on: | 2026-10-18 13:47:27 | |||
| Description: |
Building trunk with "configure --enable-symbols=all --disable-xft" two new failures can be seen, in "entry" and in "place":
entry.test
==== entry-5.20 -locale: the normalized value is not leaked FAILED
==== Contents of test case:
list [growth {.e configure -locale ab_CD}] [growth {entry .w; destroy .w}]
---- Result was:
0 40
---- Result should have been (exact matching):
0 0
==== entry-5.20 FAILED
...
place.test
==== place-14.1 memory leak testing FAILED
==== Contents of test case:
The same failures also arise on MacOS with XQuarz, but the fact that it can be reproduced on Ubuntu shows that it's not an XQuarz problem. I'll try to do a bisect | |||
| User Comments: |
nemethi (claiming to be Csaba Nemethi) added on 2026-10-18 13:47:27:
Merged by Jan into main and core-9-0-branch by commits [372a3d9e] and [6d2a074b]. Backported to core-8-6-branch by commit [7f1d1aff]. Closing the ticket. serhiy.storchaka added on 2026-10-11 12:02:09: The follow-up [74f808aa59] is still needed: without it deleted X error handlers were freed late, and entry-5.20 failed on Linux with Xft. entry-5.20 and place-14.1 still fail in the macOS X11 memory job for another reason. embed.test, which runs earlier in the same process, embeds a window, and after that every destroyed window was kept in deletedWinTable until the server had processed the requests made before its deletion. The memory tests do not process events, so these entries piled up. Only the windows of an embedded toplevel can be destroyed by the container, so only they need to be recorded: proposed fix in branch deleted-windows-embedded-only, test unixEmbed-12.1. Please do not back out the fixes. serhiy.storchaka added on 2026-10-09 18:11:49: entry-5.20 with --enable-xft --disable-bidi: also not a real leak. Tk_MeasureChars in tkUnixRFont.c creates and deletes an X error handler for each measurement, and deleted handlers were freed only at every 10th deletion, and then only those processed before the previous round trip with the server. Proposed fix in branch error-handler-free-early: a handler during which no request was made is freed at once, and the cleanup uses the serial after the round trip. entry-5.20 and place-14.1 now pass in this configuration too. jan.nijtmans added on 2026-10-09 17:15:49: I tested it with --enable-symbols=all and --disable-xft. The previously failing testcases now pass. Nice solution! Merged to trunk now. I'll do the backport later. jan.nijtmans added on 2026-10-09 17:08:40: > This is not a real leak Thank you! Makes sense. I'm just trying to get 9.0 and 9.1 without any test-failures on all possible configuration variations. Better be careful ... serhiy.storchaka added on 2026-10-09 15:55:29: This is not a real leak: the table of recently deleted windows, added by the fix for [4a25f316f7], got an entry for every deleted window, and the entries were removed only when another window was deleted after the server had processed the requests made before the deletion. In a loop which creates and destroys windows without a round trip to the server, as in entry-5.20 and place-14.1, the entries are kept until the end, so the memory tests see the growth. Recording the windows of other applications than embedded ones was unnecessary: only an embedded application can have its windows destroyed by someone else (the container). Now the windows are recorded only after a toplevel of the application has been embedded. Proposed fix in branch embed-container-destroyed, which restores the backed out fix with this change on top of main. entry-5.20 and place-14.1 pass with --enable-symbols=all, with and without Xft. The fix for [f1fe739a4f] (branch embed-container-destroyed-pixmap) uses a similar table for pixmaps created for windows which no longer exist. It did not make the memory tests fail, but it now has the same restriction, since it is also only needed in embedded applications. entry-5.20 also fails with --enable-xft --disable-bidi (tkUnixRFont.c), 64 bytes for each -locale change and each created entry, also without the fix for [4a25f316f7]. jan.nijtmans added on 2026-10-09 13:56:34: The bisect points to [dd18288b38855f19|this] commit | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki