{"id":1793,"date":"2014-02-12T07:00:00","date_gmt":"2014-02-12T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2014\/02\/12\/what-is-this-extra-thread-in-my-process\/"},"modified":"2014-02-12T07:00:00","modified_gmt":"2014-02-12T07:00:00","slug":"what-is-this-extra-thread-in-my-process","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20140212-00\/?p=1793","title":{"rendered":"What is this extra thread in my process?"},"content":{"rendered":"<p>\nA customer liaison asked:\n<\/p>\n<blockquote CLASS=\"q\">\n<p>\nAfter applying Service Pack&nbsp;2 to Windows Server 2003,\nmy customer found that a simple MFC application (just using the template,\nno customization)\nhas two threads when it is supposed to have only one.\nAfter five minutes, one of the threads exits.\nThis doesn&#8217;t happen on Windows Server 2003 RTM or\nWindows Server 2003 Service Pack&nbsp;1.\n<\/p>\n<p>\nHere is a stack trace of the extra thread:\n<\/p>\n<pre>\n0:001&gt; kP\nntdll!KiFastSystemCallRet\nntdll!NtWaitForMultipleObjects+0xc\nntdll!EtwpWaitForMultipleObjectsEx+0xf7\nntdll!EtwpEventPump+0x27f\nkernel32!BaseThreadStart+0x34\n<\/pre>\n<p>\nThe parameters to\n<code>Etwp&shy;Wait&shy;For&shy;Multiple&shy;Objects&shy;Ex<\/code>\nseem to be consistent with\n<code>Wait&shy;For&shy;Multiple&shy;Objects&shy;Ex<\/code>.\nAssuming that&#8217;s the case, the parameters are\n<\/p>\n<table BORDER=\"0\">\n<tr>\n<td><code>nCount<\/code><\/td>\n<td><code>&nbsp;= 0<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>lpHandles<\/code><\/td>\n<td><code>&nbsp;= 00x004f4470<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>bWaitAll<\/code><\/td>\n<td><code>&nbsp;= 0<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>dwMilliseconds<\/code><\/td>\n<td><code>&nbsp;= 300000<\/code> = 5 minutes<\/td>\n<\/tr>\n<tr>\n<td><code>bAlertable<\/code><\/td>\n<td><code>&nbsp;= TRUE<\/code><\/td>\n<\/tr>\n<\/table>\n<p>\nCan you explain what the purpose of this thread is?\nDid this behavior change as a result of the update?\nIt is important for the customer to know the purpose of this thread.\n<\/p>\n<\/blockquote>\n<p>\nWe asked,\n&#8220;Why does the customer need to know the purpose of this thread?&#8221;\n<\/p>\n<p>\nWe never heard back from the customer liaison.\nI guess it wasn&#8217;t that important after all.\n<\/p>\n<p>\n<b>In case you cared<\/b>:\nFrom the names of the functions,\nit looks like this is the\n<a HREF=\"http:\/\/msdn.microsoft.com\/en-us\/magazine\/cc163437.aspx\">\nETW<\/a> event pump thread.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A customer liaison asked: After applying Service Pack&nbsp;2 to Windows Server 2003, my customer found that a simple MFC application (just using the template, no customization) has two threads when it is supposed to have only one. After five minutes, one of the threads exits. This doesn&#8217;t happen on Windows Server 2003 RTM or Windows [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-1793","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>A customer liaison asked: After applying Service Pack&nbsp;2 to Windows Server 2003, my customer found that a simple MFC application (just using the template, no customization) has two threads when it is supposed to have only one. After five minutes, one of the threads exits. This doesn&#8217;t happen on Windows Server 2003 RTM or Windows [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/1793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=1793"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/1793\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=1793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=1793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=1793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}