Global Atom Table - '-D4%' prefixed atoms

Robert Massart 6 Reputation points
2020-09-28T18:47:37.343+00:00

Trying to get an answser to the following:

Here's what we see if we batch convert text document through word over a 1 hour period, converting 10 in parallel at a time on an 8 core system:

Atom Monitor 1.4

Pattern: ControlOfs[0-9A-Z!?/+-]+ Counts: 2
Pattern: ConIME.[A-Za-z.]+ Counts: 0
Pattern: {[0-9A-Z-]+} Counts: 14
Pattern: ^T[A-Za-z_-]+ Counts: 54
Pattern: AtomTestXXXX Counts: 0
Pattern: AtomTestBXXXX[0-9A-Z!?/
+-]+ Counts: 0
Pattern: RWMTestXXXX Counts: 0
Pattern: RWMTestBXXXX[0-9A-Z!?/+-]+ Counts: 0
Pattern: MyFormTestXXXX Counts: 0
Pattern: TQRE[A-Za-z]+ Counts: 0
Pattern: commdlg_help Counts: 1
Pattern: commdlg_FindReplace Counts: 1
Pattern: WndProcPtr[0-9A-Z!?/
+-]+ Counts: 1
Pattern: UXTHEME.DLL Counts: 0
Pattern: OPDESTROYCLOSEBTN Counts: 0
Pattern: BDSUnthemedDesigner Counts: 0
Pattern: TaskbarCreated Counts: 0
Pattern: MSWHEEL_ROLLMSG Counts: 1
Pattern: SHELLHOOK Counts: 1
Pattern: Delphi[0-9A-Z!?/*+-]+ Counts: 1

Pattern: -%D4#!.* Counts: 6655

Total Atoms (Global Atom Table): 6772

Total Atoms (RWM Atom Table): 641

Total Atoms: 7413

Some lines from the Atom List:

C069 = -%D4#!
``Y@"

`@D%

``  --GlobalAtom
C06A = -%D4#!

``35!

`@D%

--GlobalAtom C06B = -%D4#!3O$

`@D%

``  --GlobalAtom
C06C = -%D4#!

``2@!

`@D%

--GlobalAtom C06D = -%D4#!!`"

`@D%

``  --GlobalAtom
C06E = -%D4#!

``;M"

`@D%

--GlobalAtom C06F = -%D4#!6`!

`@D%

``  --GlobalAtom

CPU is being stressed so again thinking is just not enough time for actual cleanup of the Atom Table to occur.   

Stopping the worker threads does allow these Atoms to eventually get cleaned up but it takes a really long time.

MS, how do we prevent this backup of deletions from happening?



originally posted on WDK but I think it might be more appropriate here. [ms-word-foreign-language-editions-splwow64-global-atoms-starting-with-d4][1]


  [1]: https://social.msdn.microsoft.com/Forums/windowshardware/en-US/d0ee44d3-ea96-4a1c-8036-b9f36d29107b/ms-word-foreign-language-editions-splwow64-global-atoms-starting-with-d4?forum=wdk
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,611 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Drake Wu - MSFT 991 Reputation points
    2020-10-02T03:17:14.18+00:00

    Hi @Robert Massart It seems that your program is leaking the global atom table. The program should use GlobalDeleteAtom to reduce its reference count when it no longer needs to use local atoms. If the atom's reference count reaches zero, GlobalDeleteAtom removes the string associated with the atom from the global atom table.

    According to this document: Atom Table Size:

    If there is concern about the application causing user atom table issues, you can investigate the root cause by connecting the kernel debugger and breaking into the process on calls to UserAddAtomEx (bae1 win32kbase!UserAddAtomEx /p <eprocess> "kc10;g"). Look for user32! on the callstack to see which API is being called. The methodology is similar to the global atom table issue detection explained in Identifying Global Atom Table Leaks. Another way to dump the contents of the user atom table is by calling GetClipboardFormatName over the range of possible atoms from 0xC000 to 0xFFFF. If the total atom count steadily goes up while the application is running or does not return to baseline when the app is closed, there is a problem.


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.