如何使用诸如Process Command Line之类的标准有选择地使用整页堆验证 [英] How to use full page heap verification selectively using a criteria such as the Process Command Line

查看:102
本文介绍了如何使用诸如Process Command Line之类的标准有选择地使用整页堆验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的公司开发了一个内存密集型应用程序,它可以生成多个本机(C ++)和.NET(C#)进程。  

My company develops a memory intensive application that spawns multiple native (C++) and .NET (C#) processes.  

例如,在任何时候,我们都会发现自己在系统上同时运行以下进程列表:

For example, at any point in time, we may find ourselves with the following list of processes running on the system all at once:


  1. MainApplication.exe(pid:1000) - C ++核心应用程序。
  2. ApplicationBox.exe(pid:1001) - C#容器。
  3. ApplicationBox.exe (pid:1002)
  4. ApplicationBox.exe(pid:1003) 
  5. ApplicationBox.exe(pid:1004)
  6. ApplicationBox.exe(pid: 1005)

这个设计决策是为了克服32位系统的进程内存限制(Google Chrome完全相同 - 该应用程序产生多个"chrome"。 exe"按要求处理"。  

This design decision was taken to overcome the process memory limitations of 32-bits systems (Google Chrome does the exact same thing - the app spawns multiple "chrome.exe" processes as required).  

所有这些进程都通过命名管道相互通信,并且作为一个整体,它们构建了一个逻辑层次结构。  例如,流程#1可以是流程#2的子流程,依此类推。  这些进程中的每一个都可以充当我们应用程序的特定窗口或组件
的容器。

All of these processes communicate with one another via named pipes, and as a whole, they build a logical hierarchy.  For example, Process #1 could be a sub-process of process #2, and so on.  Each of theses processes may act as a container for a particular window or component of our app.

"ApplicationBox.exe"的命令行。确实如此。

The command line of an "ApplicationBox.exe" really determine what it does.

例如,在Chrome中,我们可以同时运行以下进程/命令行:

For example, in Chrome, we could have the following processes / command lines running simultaneously:


  1. chrome.exe --no-startup-window
  2. chrome.exe --type = gpu-process --channel =" 5748.0.762639811\411641344" --supports-dual-gpus = false --gpu-driver-bug-workarounds = 1,17,38 --disable-accelerated-video-decode --gpu-vendor-id = 0x1002 --gpu-device-id = 0x6778 --gpu-driver-vendor =" Advanced
    Micro Devices,Inc。" --gpu-driver-version = 8.922.0.0 --ignored =" --type = renderer" /prefetch:822062411
  3. chrome.exe --type = renderer --enable-deferred-image-decoding --lang = en-US --force-fieldtrials =" AutoReloadExperiment / Enabled / AutoReloadVisibleOnlyExperiment / Enabled / BrowserBlacklist / Enabled / DomRel-Enable / control / EmbeddedSearch / Group7 pct:10g stable:pp2
    prefetch_results:1 reuse_instant_search_base_page:1 / ExtensionContentVerification / ControlBootstrap / ExtensionInstallVerification / Enforce / GoogleNow / Enable / NewProfileManagement / OldAvatarMenu / OmniboxBundledExperimentV1 / StableBookmarksIndexURLs / PasswordGeneration /禁用/预渲染/ PrerenderEnabled / PrerenderLocalPredictorSpec / LocalPredictor =禁止/ QUIC /禁用/ RapporRollout /启用/ RememberCertificateErrorDecisions /默认/ SDCH / EnabledAll / SafeBrowsingIncidentReportingService /默认/ ShowAppLauncherPromo / ShowPromoUntilDismissed / Test0PercentDefault / group_01 / UMA-动态二进制均匀-Trial /默认/ UMA-动态一致性,试用/ 6组/ UMA-新安装的均匀性,试验/实验/ UMA - 人口 - 限制/ NOR MAL / UMA-会话随机均匀审-5-百分比/ group_02 / UMA-均匀审-1-百分比/ group_45 / UMA-均匀审-10-百分比/ group_05 / UMA-均匀-试制100-百分比/ group_01 / UMA-均匀-试制的20%/ group_03 / UMA-均匀审-5-百分之/ group_18 / UMA-均匀审-50%/ group_01 / VoiceTrigger /安装/"
    --extension-process --enable-webrtc-hw-h264-encoding --enable-offline-auto-reload --enable-offline-auto-reload-visible-only --device-scale-factor = 1 --enable-delegated-renderer --enable-impl-side-painting --num-raster-threads = 1 --disable-accelerated-video-decode
    --channel =" 5748.2.1176250980 \ 30661796" /prefetch:673131151
  4. (...等等......)

那说,我们有时会发现自己不得不处理非常棘手的内存损坏崩溃(例如"ApplicationBox.exe"进程随机引发访问冲突异常)。

That said, we sometimes find ourselves having to deal with very tricky memory corruption crashes (e.g. an "ApplicationBox.exe" process raises an access violation exception at random).

要调试这个,我们有试图激活"ApplicationBox.exe"上的整页堆标志。使用gflags或应用程序验证程序。  问题是:Windows将检测由每个进程执行的所有堆内存分配
命名为"ApplicationBox.exe""当前正在系统上运行的所有进程(因为所有这些进程都具有相同的名称!)。 

To debug this, we have attempted to activate the full page heap flag on "ApplicationBox.exe" using gflags or application verifier.  The problem is this: Windows will instrument ALL heap memory allocations performed by every single processes named as "ApplicationBox.exe" that are currently running on the system (since all of these processes have the same name!). 

因此,我们的机器运行时间不会太长物理内存(整页堆是内存耗尽),使得完全无法按预期使用整页堆验证。  

As a result, it doesn't take long for our machine to run out of physical memory (full page heap is a memory hog), making it completely impossible to use full page heap verification as intended.  

问题:

1。是否有可能(通过脚本或其他方式)在单个"ApplicationBox.exe"上激活整页堆标记。根据特定条件(例如,进程或pid使用的命令行参数)处理(不是全部)。

1. Is it possible (via scripting or else) to activate the full page heap flag on a single "ApplicationBox.exe" process (not all of them) based on a specific criteria (for example, the command line arguments used by the process or the pid).

2。是否还有其他措施可以检测可能影响特定"ApplicationBox.exe"的内存损坏问题。将要推出的流程?

2. Is there anything else that could be done to detect memory corruption issues that may be affecting a specific "ApplicationBox.exe" process that will be launched?

注意:我们也尝试过正常的页面堆,但它没有我们希望的那样有效。

Note: We've also tried normal page heap but it's not as effective as we had hoped.

推荐答案

对于更低技术的解决方案,你能复制吗?使用新名称为同一目录创建可执行文件,为该新名称设置gflags,然后使用新命名的可执行文件启动进程?
For a more low tech solution, could you copy the executable to the same directory with a new name, set gflags for that new name, then launch the process with the newly named executable?


这篇关于如何使用诸如Process Command Line之类的标准有选择地使用整页堆验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆