What is the history of the ERROR_ARENA_TRASHED error code?

The Old New Thing (Raymond Chen) News

Summary

An exploration of the origin of the ERROR_ARENA_TRASHED error code from MS-DOS, its meaning in memory management, and why it's no longer used in Win32 but persists as a legacy code.

<p>Error code 7 is <code>ERROR_<wbr />ARENA_<wbr />TRASHED</code>. What does this mean? It sounds like a heavy metal band ran amok and made a mess of the performance area that they rented.</p> <p>This error message was inherited from MS-DOS. MS-DOS internally kept track of memory in the form of a sequence of variable-sized memory blocks, each prefixed by a 16-byte block known as an <a href="https://github.com/microsoft/MS-DOS/blob/2d04cacc5322951f187bb17e017c12920ac8ebe2/v2.0/source/DOSSYM.ASM#L636">arena</a>:</p> <pre>arena STRUC arena_signature DB ? ; 4D for valid item, 5A for last item arena_owner DW ? ; owner of arena item arena_size DW ? ; size in paragraphs of item arena ENDS </pre> <p>The <code>arena_owner</code> is the PDB of the process that allocated the memory, or zero if the memory is free. Each arena signature is <tt>0x4D</tt> (ASCII capital M), except for the final one which is <tt>0x5A</tt> (ASCII capital Z). Yes, those are the initials of Mark Zbikowski.</p> <p>When walking through the memory blocks, say, when searching for memory to satisfy an allocation request, if MS-DOS saw that the signature was neither <tt>0x4D</tt> nor <tt>0x5A</tt>, then it declared that the arenas were &#8220;trashed&#8221; (corrupted)¹ and <a href="https://github.com/microsoft/MS-DOS/blob/2d04cacc5322951f187bb17e017c12920ac8ebe2/v2.0/source/ALLOC.ASM#L177"> returned <code>ERROR_<wbr />ARENA_<wbr />TRASHED</code></a>.</p> <p>This is an MS-DOS specific error code. It is not used by Win32.²</p> <p>Since it is a vestigial error code (like <a title="What is the thread reaper?" href="https://devblogs.microsoft.com/oldnewthing/20231031-00/?p=108944"> <code>EMPTY_<wbr />THREAD_<wbr />REAPER_<wbr />LIST</code></a>), it is a handy error code to use when mocking error conditions, because you can be fairly confident that if you see error 7, it came from your test harness and not from a genuine system error.</p> <p>The fact that the error message is not used casts suspicions on the many web sites that claim to be able to help you &#8220;fix&#8221; the problem. If you read their explanation of &#8220;what this error means&#8221;, it&#8217;s just a bunch of vague text about how, y&#8217;know, sometimes computers aren&#8217;t doing all that great and they encounter errors, or maybe there is a hardware conflict, or a corrupted system file. But somehow, despite having no idea what the error means, they still are quite confident in the steps you should take to fix it. (Usually performing a system scan, a system file check, and checking for driver updates.)</p> <p>¹ The use of the slang term &#8220;trashed&#8221; is further evidence that Microsoft developers were <a title="The Microsoft/IBM joint development was built on mutual respect, wait, is respect the right word?" href="https://devblogs.microsoft.com/oldnewthing/20240827-00/?p=110186"> just a bunch of undisciplined hackers</a>.</p> <p>² Well, at least, it is not used by the Win32 kernel. I do see that there are a few user-mode components which use it to indicate that internal data structures have been corrupted, which is at least in the same spirit as the original meaning of the error.</p> <p>The post <a href="https://devblogs.microsoft.com/oldnewthing/20260519-00/?p=112339">What is the history of the &lt;CODE&gt;ERROR_&lt;WBR&gt;ARENA_&lt;WBR&gt;TRASHED&lt;/CODE&gt; error code?</a> appeared first on <a href="https://devblogs.microsoft.com/oldnewthing">The Old New Thing</a>.</p>
Original Article
View Cached Full Text

Cached at: 05/20/26, 03:35 AM

# What is the history of the ERROR_ARENA_TRASHED error code? - The Old New Thing Source: [https://devblogs.microsoft.com/oldnewthing/20260519-00?p=112339](https://devblogs.microsoft.com/oldnewthing/20260519-00?p=112339) Error code 7 is`ERROR\_ARENA\_TRASHED`\. What does this mean? It sounds like a heavy metal band ran amok and made a mess of the performance area that they rented\. This error message was inherited from MS\-DOS\. MS\-DOS internally kept track of memory in the form of a sequence of variable\-sized memory blocks, each prefixed by a 16\-byte block known as an[arena](https://github.com/microsoft/MS-DOS/blob/2d04cacc5322951f187bb17e017c12920ac8ebe2/v2.0/source/DOSSYM.ASM#L636): ``` arena STRUC arena_signature DB ? ; 4D for valid item, 5A for last item arena_owner DW ? ; owner of arena item arena_size DW ? ; size in paragraphs of item arena ENDS ``` The`arena\_owner`is the PDB of the process that allocated the memory, or zero if the memory is free\. Each arena signature is0x4D\(ASCII capital M\), except for the final one which is0x5A\(ASCII capital Z\)\. Yes, those are the initials of Mark Zbikowski\. When walking through the memory blocks, say, when searching for memory to satisfy an allocation request, if MS\-DOS saw that the signature was neither0x4Dnor0x5A, then it declared that the arenas were “trashed” \(corrupted\)¹ and[returned`ERROR\_ARENA\_TRASHED`](https://github.com/microsoft/MS-DOS/blob/2d04cacc5322951f187bb17e017c12920ac8ebe2/v2.0/source/ALLOC.ASM#L177)\. This is an MS\-DOS specific error code\. It is not used by Win32\.² Since it is a vestigial error code \(like[`EMPTY\_THREAD\_REAPER\_LIST`](https://devblogs.microsoft.com/oldnewthing/20231031-00/?p=108944)\), it is a handy error code to use when mocking error conditions, because you can be fairly confident that if you see error 7, it came from your test harness and not from a genuine system error\. The fact that the error message is not used casts suspicions on the many web sites that claim to be able to help you “fix” the problem\. If you read their explanation of “what this error means”, it’s just a bunch of vague text about how, y’know, sometimes computers aren’t doing all that great and they encounter errors, or maybe there is a hardware conflict, or a corrupted system file\. But somehow, despite having no idea what the error means, they still are quite confident in the steps you should take to fix it\. \(Usually performing a system scan, a system file check, and checking for driver updates\.\) ¹ The use of the slang term “trashed” is further evidence that Microsoft developers were[just a bunch of undisciplined hackers](https://devblogs.microsoft.com/oldnewthing/20240827-00/?p=110186)\. ² Well, at least, it is not used by the Win32 kernel\. I do see that there are a few user\-mode components which use it to indicate that internal data structures have been corrupted, which is at least in the same spirit as the original meaning of the error\. ### Category ### Topics ## Author ![Raymond Chen](https://devblogs.microsoft.com/oldnewthing/wp-content/uploads/sites/38/2019/02/RaymondChen_5in-150x150.jpg) Raymond has been involved in the evolution of Windows for more than 30 years\. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie\-jeebies\. The Web site spawned a book, coincidentally also titled The Old New Thing \(Addison Wesley 2007\)\. He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information\.

Similar Articles

A compatibility note on the abuse of Windows window class extra bytes

The Old New Thing (Raymond Chen)

Raymond Chen discusses a historical Windows compatibility issue where some 16-bit programs abused window class extra bytes to store private data, and how Microsoft blocked the loophole for 32-bit and 64-bit programs while maintaining backward compatibility.

Core dump epidemiology: fixing an 18-year-old bug

OpenAI Blog

OpenAI engineers detail the diagnosis of seemingly impossible crashes in Rockset's C++ data infrastructure, revealing both a silent hardware corruption bug on Azure and an 18-year-old race condition in GNU libunwind, resolved through epidemiological analysis of crash data.