<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:45:14 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-81018] Access violation error</title>
                <link>https://jira.mongodb.org/browse/SERVER-81018</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When running integration tests in a NodeJs project that integrates with mongoDB via mongoose I receive a timeout error after a short while because the mongoDB database that has been started with mongodb-memory-server crashed after an access violation error.&lt;br/&gt;
This is a copy of this issue I created on the mongodb-memory-server project &lt;a href=&quot;https://github.com/nodkz/mongodb-memory-server/issues/798&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/nodkz/mongodb-memory-server/issues/798&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It occurs with all v5 Versions of mongoDB and is fixed with v6.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Versions&lt;/b&gt;&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;NodeJS: 16.20.2&lt;/li&gt;
	&lt;li&gt;mongodb-memory-server-*: 8.15.1&lt;/li&gt;
	&lt;li&gt;mongodb(the binary version): 5.0.20&lt;/li&gt;
	&lt;li&gt;mongoose: 7.4.3&lt;/li&gt;
	&lt;li&gt;system: Windows 10 Enterprise 12H2&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;package: mongo-memory-server&lt;/p&gt;

&lt;p&gt;&lt;b&gt;What is the Problem?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Testcases time out after 2000ms. The debug output of memory-server shows &lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Unhandled exception&quot;,&quot;attr&quot;:{&quot;exceptionString&quot;:&quot;(access violation)&quot;,&quot;addressString&quot;:&quot;0x00007FF6215CC4D4&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;(full log below)&lt;/p&gt;

&lt;p&gt;Mongod is started in mochaGlobalSetup with:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;mongod = await MongoMemoryReplSet.create({&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; replSet: {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; &#160; &#160; &#160;count: 3,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; &#160; &#160; &#160;args: [&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&apos;--notablescan&apos;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;],&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; },&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; binary: {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; &#160; &#160; &#160; version: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&apos;5.0.20&apos;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; &#160;},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;});&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;The error occurs consistently but not always in the same testmethod. But it can be traced back to a particular line in the code under test, which is:&lt;/p&gt;


&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;await Promise.all(&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; task.countingScopes.map(countingScope =&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;._shelfStockLockDao.findOneAndDelete({&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; &#160; &#160; lock: countingScope.lock,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; &#160; &#160; requester: countingScope.lockRequester,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; &#160; &#160; outletId: countingScope.outletId&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; });&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Commenting this code snippet resolves the error.&lt;/p&gt;

&lt;p&gt;Also executing it in series resolves this error with:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; (const countingScope of task.countingScope) {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; await &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;._shelfStockLockDao.findOneAndDelete({&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; &#160; &#160; lock: countingScope.lock,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; &#160; &#160; requester: countingScope.lockRequester,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; &#160; &#160; &#160; outletId: countingScope.outletId&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;Setting the option `&lt;em&gt;writeConcern&lt;/em&gt;` to `1` also resolves the error but leads to other issues. As soon as `writeConcern` is `2, 3 or majority` the error occurs again.&lt;/p&gt;

&lt;p&gt;`task.countingScope` is right now an array of length 3. Reducing it to length 2 also solves the issue.&lt;/p&gt;

&lt;p&gt;Executing the tests agains a local cluster started with `run-rs` of the same version also resolves the error.&lt;/p&gt;

&lt;p&gt;The only thing even close to the error I&apos;ve found is &lt;a href=&quot;https://github.com/Automattic/mongoose/issues/5376&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/Automattic/mongoose/issues/5376&lt;/a&gt;. An issue from 2017 and for mongoose v4 which recommends setting `&lt;em&gt;useMongoClient&lt;/em&gt;`, an option which is the default by now.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Debug Output&lt;/b&gt;&lt;br/&gt;
I anonymized the debug output. If that leads to missing information please inform me and I&apos;ll fix it.&lt;/p&gt;

&lt;p&gt;The file &lt;em&gt;startup_debug.txt&lt;/em&gt; shows the debug output of mongodb-memory-server on startup&lt;br/&gt;
The file &lt;em&gt;Error-output.txt&lt;/em&gt; shows the access violation error with the entire stacktrace&lt;/p&gt;</description>
                <environment>Windows 10 Enterprise 12H2</environment>
        <key id="2440720">SERVER-81018</key>
            <summary>Access violation error</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13203">Gone away</resolution>
                                        <assignee username="rhea.thorne@mongodb.com">Alison Rhea Thorne</assignee>
                                    <reporter username="eisingerfa@mediamarktsaturn.com">Fabian Eisinger</reporter>
                        <labels>
                            <label>windows-10</label>
                    </labels>
                <created>Wed, 13 Sep 2023 08:51:42 +0000</created>
                <updated>Fri, 29 Dec 2023 22:10:54 +0000</updated>
                            <resolved>Fri, 29 Dec 2023 22:10:53 +0000</resolved>
                                    <version>5.0.19</version>
                    <version>5.0.20</version>
                    <version>5.0.21</version>
                                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5975901" author="JIRAUSER1274755" created="Fri, 29 Dec 2023 22:10:54 +0000"  >&lt;p&gt;Hi @Fabian,&lt;/p&gt;

&lt;p&gt;Thank you for the clarification. The &lt;b&gt;&lt;tt&gt;ephemeralForTest&lt;/tt&gt;&lt;/b&gt; engine was only intended for testing purposes, and has since been deprecated and removed in more recent versions of MongoDB (as you observed). With that in mind, I&apos;m going to go ahead and close this ticket.&lt;/p&gt;</comment>
                            <comment id="5939814" author="JIRAUSER1275111" created="Mon, 11 Dec 2023 10:25:26 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rhea.thorne%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;rhea.thorne@mongodb.com&quot;&gt;rhea.thorne@mongodb.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No I&apos;m still not able to provide a MVP or similar. The error started happening after I added 5 new testcases. I tried added them one by one but couldn&apos;t figure out which testcase caused the issue because the error didn&apos;t happen.&lt;br/&gt;
It is occuring for &lt;em&gt;5.0.22&lt;/em&gt; and I also checked &lt;em&gt;5.0.23, 5.3.2&lt;/em&gt; and &lt;em&gt;6.0.9&lt;/em&gt;. I also wanted to check for &lt;em&gt;6.3.2&lt;/em&gt; but got an error &lt;em&gt;Cannot start server with an unknown storage engine: ephemeralForTest&lt;/em&gt; which is the &lt;a href=&quot;https://nodkz.github.io/mongodb-memory-server/docs/api/interfaces/mongo-memory-instance-opts/#storageengine&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;default storage engine for MongoDBMemoryServer&lt;/a&gt;. After changing the storage engine to &lt;em&gt;wired Tiger&lt;/em&gt; I could not reproduce the &lt;em&gt;Access violation&lt;/em&gt;. So I went back and tested all the above mentioned versions with wired Tiger and was also not able to reproduce the Access violation error.&lt;/p&gt;

&lt;p&gt;This explains why the error never occured when using my local MongoDB Cluster and only with MongoDBMemoryServer.&lt;br/&gt;
I could also not reproduce the error with the ephemeralForTest engine on 5.0.22 and my up-to-date code base. So something changed between Oct. 24 and now. I can track it down but wanted to ask first if you still want to pursue it given that &lt;em&gt;ephermeralForTest&lt;/em&gt; is deprecated and already removed in the newest versions?&lt;/p&gt;</comment>
                            <comment id="5923431" author="JIRAUSER1274755" created="Mon, 4 Dec 2023 16:06:09 +0000"  >&lt;p&gt;We still need additional information to diagnose the problem. If this is still an issue for you, could you answer the following:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;You mentioned that you haven&apos;t been able to reproduce this in a production environment, has that situation changed?&lt;/li&gt;
	&lt;li&gt;You mentioned that this is occurring on all versions of &lt;tt&gt;mongod&lt;/tt&gt; v5, however I did want to get confirmation that you have confirmed this behavior is occurring specifically on version &lt;tt&gt;5.0.22&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;Is this a test that you have written? I&apos;ve been unable to locate this within either the &lt;tt&gt;mongoose&lt;/tt&gt;, &lt;tt&gt;mongodb-memory-server&lt;/tt&gt; nor our own javascript tests. If this &lt;b&gt;is&lt;/b&gt; a test that you have written, would you be willing to provide a full reproduction script for our testing? That would go a long way towards assisting us with triage.&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="5875648" author="JIRAUSER1274755" created="Mon, 13 Nov 2023 15:24:56 +0000"  >&lt;p&gt;Hello Fabian,&lt;/p&gt;

&lt;p&gt;Thank you for providing the logfiles and diagnostics as requested. Unfortunately, the FTDC that was collected doesn&apos;t contain enough data to be actionable in and of itself (likely due to the time period in which the mongod instance was running, as it is running during tests specifically). That said, I do have a few questions:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;You mentioned that you haven&apos;t been able to reproduce this in a production environment, has that situation changed?&lt;/li&gt;
	&lt;li&gt;You mentioned that this is occurring on all versions of &lt;tt&gt;mongod&lt;/tt&gt; v5, however I did want to get confirmation that you have confirmed this behavior is occurring specifically on version &lt;tt&gt;5.0.22&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;Is this a test that you have written? I&apos;ve been unable to locate this within either the &lt;tt&gt;mongoose&lt;/tt&gt;, &lt;tt&gt;mongodb-memory-server&lt;/tt&gt; nor our own javascript tests. If this &lt;b&gt;is&lt;/b&gt; a test that you have written, would you be willing to provide a full reproduction script for our testing? That would go a long way towards assisting us with triage.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Thank you,&lt;br/&gt;
Rhea&lt;/p&gt;</comment>
                            <comment id="5801372" author="JIRAUSER1275111" created="Tue, 24 Oct 2023 11:13:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rhea.thorne%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;rhea.thorne@mongodb.com&quot;&gt;rhea.thorne@mongodb.com&lt;/a&gt; I managed to get the log files from the mongo instances and uploaded everything you requested as &quot;mongod-logs-full.zip&quot;. Let me know if you need a higher log level. It should be easier for me now to achieve it.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=hasezoey%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;hasezoey@gmail.com&quot;&gt;hasezoey@gmail.com&lt;/a&gt; Thank you for putting me on the right path. That&apos;s exactly what I did and with a few hacky patches to MMS I got the logfiles &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="5784956" author="JIRAUSER1260658" created="Tue, 17 Oct 2023 15:01:47 +0000"  >&lt;p&gt;&amp;gt;&#160; When adding --logpath &amp;lt;path&amp;gt; to the node cli options they wouldn&apos;t start and be terminated after 20s.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;using `&#8211;logpath` changes the log output instead of duplicating the log to the logpath (log output to stdout gets disabled), from my quick investigation `systemLog`(in the config file) does the same thing.&lt;/p&gt;

&lt;p&gt;if this option was added as a argument to creating a instance with mongodb-memory-server (via `replSet.args`), then this is to be expected because MMS relies on the stdout log to be able to parse the mongod server state (though the default launch timeout is 10 seconds).&lt;/p&gt;

&lt;p&gt;if this was not the case, what actually do you mean with &quot;node cli options&quot;? (MMS does not provide a runnable binary and i dont think there is a binary in the mongodb node driver)&lt;/p&gt;</comment>
                            <comment id="5784529" author="JIRAUSER1274755" created="Tue, 17 Oct 2023 13:41:29 +0000"  >&lt;p&gt;Hello Fabian. Thank you for uploading the diagnostic data, in regards to your question: yes the --logpath command line switch is the correct one to use. However, you may also use the configuration file to accomplish this. Heres a link to our doc on this:&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/configuration-options/#core-options&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;systemLog Options&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5769989" author="JIRAUSER1275111" created="Wed, 11 Oct 2023 11:17:54 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rhea.thorne%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;rhea.thorne@mongodb.com&quot;&gt;rhea.thorne@mongodb.com&lt;/a&gt; I uploaded the diagnostic.data for each node as well as the log output from MongoDBMemoryServer again.&lt;br/&gt;
I wasn&apos;t able to collect the mongod logs. When adding --logpath &amp;lt;path&amp;gt; to the node cli options they wouldn&apos;t start and be terminated after 20s.&lt;br/&gt;
Is that the correct way to collect those logs or is there another possibility?&lt;/p&gt;</comment>
                            <comment id="5758667" author="JIRAUSER1274755" created="Fri, 6 Oct 2023 12:38:44 +0000"  >&lt;p&gt;Thank you for your report!&lt;/p&gt;

&lt;p&gt;I&apos;ve created a secure &lt;a href=&quot;https://amphora.corp.mongodb.com/public/upload/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmb2xkZXJfaWQiOiIyMjk1MjQ3NDU0OTYiLCJleHAiOjE2OTkxODc4NDF9.qTGaKWlbA_TzGb7Mth8_rhQ4ki2_bpOwgmsOaStrQ2s&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;upload portal&lt;/a&gt; for you. Files uploaded to this portal are hosted on Box, are visible only to MongoDB employees, and are routinely deleted after some time.&lt;/p&gt;

&lt;p&gt;For each node in the replica set spanning a time period that includes the incident, would you please archive (tar or zip) and upload to that link:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;the mongod logs&lt;/li&gt;
	&lt;li&gt;the &lt;tt&gt;$dbpath/diagnostic.data&lt;/tt&gt; directory (the contents are described &lt;a href=&quot;https://docs.mongodb.com/manual/administration/analyzing-mongodb-performance/#full-time-diagnostic-data-capture&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="475475" name="Error-output.txt" size="58770" author="eisingerfa@mediamarktsaturn.com" created="Wed, 13 Sep 2023 08:49:45 +0000"/>
                            <attachment id="475474" name="startup_debug.txt" size="121627" author="eisingerfa@mediamarktsaturn.com" created="Wed, 13 Sep 2023 08:49:49 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 6 Oct 2023 12:38:44 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>rhea.thorne@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>rhea.thorne@mongodb.com</customfieldvalue>
            <customfieldvalue>eisingerfa@mediamarktsaturn.com</customfieldvalue>
            <customfieldvalue>hasezoey@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2qadj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i289eg:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;I&apos;m unable to reproduce this error in a mvp&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                    <customfieldvalue><![CDATA[rhea.thorne@mongodb.com]]></customfieldvalue>
    

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2pwiv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>