<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум Guardant &mdash; Утечка памяти и хэндлов]]></title>
		<link>https://forum.guardant.ru/topic/405/</link>
		<atom:link href="https://forum.guardant.ru/feed/rss/topic/405/" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Утечка памяти и хэндлов».]]></description>
		<lastBuildDate>Fri, 28 Mar 2014 09:01:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Утечка памяти и хэндлов]]></title>
			<link>https://forum.guardant.ru/post/1967/#p1967</link>
			<description><![CDATA[<div class="quotebox"><cite>ssdi пишет:</cite><blockquote><p>В присланной библиотеке (версия 6.3.0.7) ошибка, описанная выше, присутствует. В последних релизах версии библиотеки: 6.3.0.17 и в актуальном 6.3.0.39. Вы не ошиблись с присланной библиотекой? Отписался на почту. Жду ответа.</p></blockquote></div><p>Да, произошла ошибка, нужную библиотеку выслал.</p>]]></description>
			<author><![CDATA[null@example.com (Антон Тихиенко)]]></author>
			<pubDate>Fri, 28 Mar 2014 09:01:43 +0000</pubDate>
			<guid>https://forum.guardant.ru/post/1967/#p1967</guid>
		</item>
		<item>
			<title><![CDATA[Re: Утечка памяти и хэндлов]]></title>
			<link>https://forum.guardant.ru/post/1966/#p1966</link>
			<description><![CDATA[<div class="quotebox"><cite>Антон Тихиенко пишет:</cite><blockquote><p>Добрый день, ssdi.</p><p>Это действительно ошибка в нашей .Net-библиотеке. Исправленная библиотека была выслана на Вашу электронную почту (указанную при регистрации на форуме).</p></blockquote></div><p>В присланной библиотеке (версия 6.3.0.7) ошибка, описанная выше, присутствует. В последних релизах версии библиотеки: 6.3.0.17 и в актуальном 6.3.0.39. Вы не ошиблись с присланной библиотекой? Отписался на почту. Жду ответа.</p>]]></description>
			<author><![CDATA[null@example.com (ssdi)]]></author>
			<pubDate>Fri, 28 Mar 2014 07:53:59 +0000</pubDate>
			<guid>https://forum.guardant.ru/post/1966/#p1966</guid>
		</item>
		<item>
			<title><![CDATA[Re: Утечка памяти и хэндлов]]></title>
			<link>https://forum.guardant.ru/post/1965/#p1965</link>
			<description><![CDATA[<div class="quotebox"><cite>Антон Тихиенко пишет:</cite><blockquote><p>Добрый день, ssdi.</p><p>Это действительно ошибка в нашей .Net-библиотеке. Исправленная библиотека была выслана на Вашу электронную почту (указанную при регистрации на форуме).</p></blockquote></div><p>Спасибо. Но, тем не менее, есть существенные подозрения на утечку хэндлов. Т.к. использование другой функции полностью не решило проблемы увеличения количества хэндлов(Handles) в процессе, хотя скорость увеличения существенно уменьшилась.</p>]]></description>
			<author><![CDATA[null@example.com (ssdi)]]></author>
			<pubDate>Thu, 27 Mar 2014 12:45:05 +0000</pubDate>
			<guid>https://forum.guardant.ru/post/1965/#p1965</guid>
		</item>
		<item>
			<title><![CDATA[Re: Утечка памяти и хэндлов]]></title>
			<link>https://forum.guardant.ru/post/1964/#p1964</link>
			<description><![CDATA[<p>Добрый день, ssdi.</p><p>Это действительно ошибка в нашей .Net-библиотеке. Исправленная библиотека была выслана на Вашу электронную почту (указанную при регистрации на форуме).</p>]]></description>
			<author><![CDATA[null@example.com (Антон Тихиенко)]]></author>
			<pubDate>Thu, 27 Mar 2014 09:46:00 +0000</pubDate>
			<guid>https://forum.guardant.ru/post/1964/#p1964</guid>
		</item>
		<item>
			<title><![CDATA[Re: Утечка памяти и хэндлов]]></title>
			<link>https://forum.guardant.ru/post/1961/#p1961</link>
			<description><![CDATA[<p>Я, конечно, понимаю, что придется воспользоваться пока функцией GrdApi.GrdCryptEx(...). Только хочу обратить внимание, что на каждую используемую функцию GrdApi&nbsp; в обертке GuardantDotNetApi.dll создается и загружается динамическая библиотека/модуль в процесс, т.к. нет кеширования (это видно на дебаге и по загруженным модулям и их количестве в процессе). См. например <a href="http://msdn.microsoft.com/en-us/magazine/cc163491.aspx">http://msdn.microsoft.com/en-us/magazine/cc163491.aspx</a>.</p>]]></description>
			<author><![CDATA[null@example.com (ssdi)]]></author>
			<pubDate>Mon, 24 Mar 2014 18:00:50 +0000</pubDate>
			<guid>https://forum.guardant.ru/post/1961/#p1961</guid>
		</item>
		<item>
			<title><![CDATA[Re: Утечка памяти и хэндлов]]></title>
			<link>https://forum.guardant.ru/post/1960/#p1960</link>
			<description><![CDATA[<p>Нашел ошибку в библиотеке GuardantDotNetApi.dll :</p><div class="quotebox"><blockquote><p>public sealed class GrdApi {<br />....</p><br /><p>&nbsp; &nbsp; private static unsafe GrdE GrdCrypt(IntPtr hAddress, int algNum, byte[] data, int method, byte[] iv, byte[] key, byte[] context)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; if (GrdApi.GrdCryptExInvoker == null)<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; Type[] parameters = new Type[8]<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof (IntPtr),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof (int),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof (int),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof (IntPtr),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof (int),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof (IntPtr),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof (IntPtr),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeof (IntPtr)<br />&nbsp; &nbsp; &nbsp; &nbsp; };<br />&nbsp; &nbsp; &nbsp; &nbsp; GrdApi.GrdCryptInvoker = new PlatformInvoker(&quot;GrdCrypt&quot;, GrdApi.GrdDllName, typeof (GrdE), parameters, CallingConvention.Winapi, CharSet.Auto);<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; if (data == null)<br />&nbsp; &nbsp; &nbsp; &nbsp; data = new byte[0];<br />&nbsp; &nbsp; &nbsp; if (iv == null)<br />&nbsp; &nbsp; &nbsp; &nbsp; iv = new byte[0];<br />&nbsp; &nbsp; &nbsp; if (key == null)<br />&nbsp; &nbsp; &nbsp; &nbsp; key = new byte[0];<br />&nbsp; &nbsp; &nbsp; if (context == null)<br />&nbsp; &nbsp; &nbsp; &nbsp; context = new byte[0];<br />&nbsp; &nbsp; &nbsp; fixed (byte* numPtr1 = data)<br />&nbsp; &nbsp; &nbsp; &nbsp; fixed (byte* numPtr2 = iv)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fixed (byte* numPtr3 = key)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fixed (byte* numPtr4 = context)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return (GrdE) GrdApi.GrdCryptInvoker.Invoke((object) hAddress, (object) algNum, (object) data.Length, (object) new IntPtr((void*) numPtr1), (object) method, (object) new IntPtr((void*) numPtr2), (object) new IntPtr((void*) numPtr3), (object) new IntPtr((void*) numPtr4));<br />&nbsp; &nbsp; }</p><p>...<br />}</p></blockquote></div><p>Описка в </p><div class="quotebox"><blockquote><p>if (GrdApi.GrdCrypt<strong><span class="bbu">Ex</span></strong>Invoker == null)</p></blockquote></div><p>, а должно быть </p><div class="quotebox"><blockquote><p>if (GrdApi.GrdCryptInvoker == null)</p></blockquote></div><p>Когда ждать фикса?</p>]]></description>
			<author><![CDATA[null@example.com (ssdi)]]></author>
			<pubDate>Mon, 24 Mar 2014 17:19:28 +0000</pubDate>
			<guid>https://forum.guardant.ru/post/1960/#p1960</guid>
		</item>
		<item>
			<title><![CDATA[Re: Утечка памяти и хэндлов]]></title>
			<link>https://forum.guardant.ru/post/1959/#p1959</link>
			<description><![CDATA[<p>Также воспроизводится на актуальном &quot;Комплекте разработчика Guardant 6.31&quot; и драйверах Guardant версии 6.31.117 от 19.03.2014.</p><p>Может быть есть какой нибудь workaround?</p>]]></description>
			<author><![CDATA[null@example.com (ssdi)]]></author>
			<pubDate>Mon, 24 Mar 2014 16:40:41 +0000</pubDate>
			<guid>https://forum.guardant.ru/post/1959/#p1959</guid>
		</item>
		<item>
			<title><![CDATA[Утечка памяти и хэндлов]]></title>
			<link>https://forum.guardant.ru/post/1957/#p1957</link>
			<description><![CDATA[<p>Окружение: Win7x64, драйвера 6.3.0.112, GuardantDotNetApi.dll версии 6.3.0.17, GrdAPI32.DLL и<br />GrdAPI64.DLL версии 6.3.0.17. DotNet-приложение x86 защищаемое с использованием DotNetAPI.</p><p>Внешнее проявление - утечка памяти VirtualSize и WorkingSet, утечка хэндлов, перманентный рост количества динамических библиотек(Assemblies totaly, в частности DynamicAssembly и DynamicModule) процесса.</p><p>Отладкой под VS локализовал место генерации динамических библиотек (сборок). На каждый успешный вызов GrdApi.GrdCrypt(handle, algo, data, method, ref pIV) происходит создание новой и загрузка динамической библиотеки в процесс. VS output: &#039;Foo.exe&#039; (Managed): Loaded &#039;DynamicAssembly&#039;,<br />&#039;Foo.exe&#039; (Managed): Loaded &#039;DynamicModule&#039;. Вызов производится для одного актуально хэндла. Кроме утечек ошибка более никак не проявляется, т.е. ПО работает штатно до момента окончания памяти, затем появляются сообщения OutOfMemoryExceptions.</p><p>Даже при редком вызове функции (раз в минуту/две) за несколько суток виртуальная память процесса дорастает до 1,5 гигабайт, количество сборок дорастает до 1000 и более.</p><p>Вопросы:<br /> * Что делать?<br /> * Обновление до последней версии от 21 апреля 2014 года решит проблему?</p><p>Критичность проблемы высокая, т.к. касается распространяемого ПО.</p>]]></description>
			<author><![CDATA[null@example.com (ssdi)]]></author>
			<pubDate>Mon, 24 Mar 2014 14:37:24 +0000</pubDate>
			<guid>https://forum.guardant.ru/post/1957/#p1957</guid>
		</item>
	</channel>
</rss>
