简体   繁体   English

我支持的程序是使用SIGSEGV崩溃但是我无法从.dmp文件中崩溃

[英]A program I support is crashing with SIGSEGV but I can't from the .dmp file

As per the title, I can't locate any dump files when this program I support is crashing. 根据标题,当我支持的程序崩溃时,我无法找到任何转储文件。

The application's logs clearly mention its a SIGSEGV exception, but I have searched my entire hard drive, and there are no .dmp files anywhere to be found. 应用程序的日志清楚地提到了它的SIGSEGV异常,但我搜索了我的整个硬盘驱动器,并且没有任何地方可以找到.dmp文件。

The developers of the program have seen similar issues elsewhere but have so far been unable to explain why this is happening - and we're kind of a bit stuck at the moment. 该程序的开发人员在其他地方已经看到类似的问题,但到目前为止还无法解释为什么会发生这种情况 - 而且我们现在有点陷入困境。

The last section in the application logs reads as : 应用程序日志的最后一部分读作:

Received signal SIGSEGV, segmentation violation.
OurApplication::sigHandler 11.
Removing signal handlers.
OurApplication::signalCatched.
OurApplication::sigHandler: exiting application.
Removing signal handlers.

My limited understanding of this is that our application's signal handler might be 'neutralising' the SIGSEGV exception that got thrown. 我对此的有限理解是我们的应用程序的信号处理程序可能正在“中和”抛出的SIGSEGV异常。 And therefore no core dump is getting generated... I did raise this idea with the developers but they never really seemed have investigated if this might be the reason. 因此,没有核心转储产生...我确实向开发人员提出了这个想法,但他们似乎从未真正调查过这可能是原因。 The theory they raised in counter was that they think the reason the dmp isn't getting generated is because the program may be crashing twice very close together. 他们在柜台中提出的理论是他们认为dmp没有产生的原因是因为程序可能会非常接近地崩溃两次。

So the questions I have at this point are: 所以我现在的问题是:

  • Are there any Windows7 parameters that control the creation of a .dmp file? 是否有任何Windows7参数可以控制.dmp文件的创建?
  • Are there any requirements/flags that need to be compiled into a program in order for it (or windows) to create a core dump file if it crashes? 是否需要将任何需求/标志编译到程序中,以便它(或Windows)在崩溃时创建核心转储文件?
  • I'm 99% sure it must be windows that is responsible for creating the core file, since the program itself would be dead/terminated when it crashed, correct? 我99%肯定它必须是负责创建核心文件的Windows,因为程序本身在崩溃时会死/终止,对吗?
  • Are there any other things I should be aware of, or check for, or 'evidence' I can collect and then show our developers? 还有其他我应该注意的事项,或检查,或“证据”我可以收集,然后向我们的开发人员展示?

Many thanks in advance 提前谢谢了

Consider creating your own minidump file programatically. 考虑以编程方式创建自己的minidump文件。 Should be plenty of code around showing how to do it. 应该有大量的代码来展示如何做到这一点。 You can try here: 你可以试试这里:

https://stackoverflow.com/search?q=minidump https://stackoverflow.com/search?q=minidump

This way, you're not relying on Dr. Watson or any other settings to create a dump file. 这样,您不依赖Dr. Watson或任何其他设置来创建转储文件。 Instead you will be calling the functions in DBGHELP.DLL to create the dump file. 相反,您将调用DBGHELP.DLL中的函数来创建转储文件。

Are there any Windows7 parameters that control the creation of a .dmp file? 是否有任何Windows7参数可以控制.dmp文件的创建?

There are parameters which control the creation of a crash dump: see MSDN on Collecting user-mode dumps . 有一些控制崩溃转储创建的参数:请参阅MSDN收集用户模式转储

Are there any requirements/flags that need to be compiled into a program in order for it (or windows) to create a core dump file if it crashes? 是否需要将任何需求/标志编译到程序中,以便它(或Windows)在崩溃时创建核心转储文件?

You don't need to compile anything in for the previous answer to work. 您不需要编译任何内容以使上一个答案起作用。 However, the program needs to terminate due to an unhandled exception, which means you need to let the exception bubble up and not being handled by the unhandled exception handler. 但是,程序需要因未处理的异常而终止,这意味着您需要让异常冒泡并且不被未处理的异常处理程序处理。

I'm 99% sure it must be Windows that is responsible for creating the core file, since the program itself would be dead/terminated when it crashed, correct? 我99%肯定它必须是负责创建核心文件的Windows,因为程序本身在崩溃时会死/终止,对吗?

As stated above, Windows can handle that and it's a good idea to have Windows handle the crash. 如上所述,Windows可以处理这个问题,让Windows处理崩溃是个好主意。 Imagine that your program is broken due to a memory leak. 想象一下,由于内存泄漏,您的程序已损坏。 Some memory has been overwritten. 一些内存已被覆盖。 In that case, your unhandled exception handler can be destroyed. 在这种情况下,可以销毁未处理的异常处理程序 Windows, however, still has full control over the process, can suspend it and create a dump from outside (rather from inside). 但是,Windows仍然可以完全控制进程,可以暂停它并从外部(而不是从内部)创建转储。

Are there any other things I should be aware of, or check for, or 'evidence' I can collect and then show our developers? 还有其他我应该注意的事项,或检查,或“证据”我可以收集,然后向我们的开发人员展示?

Well, suggest letting the dump be created by Windows due to above reasons. 好吧,建议由于上述原因让Windows创建转储。 Then they also don't need to implement a configuration setting (you don't want the crash dump file to be always created, do you?). 然后他们也不需要实现配置设置(您不希望始终创建故障转储文件,是吗?)。 You don't need to implement a limiting number for the files. 您不需要为文件实现限制编号。 You don't need to implement a check for disk space, etc. 您不需要检查磁盘空间等。

And you can suggest to read the Windows Internals 6 books. 您可以建议阅读Windows Internals 6书籍。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在运行时从Windbg扩展名的DMP文件中获取类型信息? - How can I get type information at runtime from a DMP file in a Windbg extension? 我的程序崩溃了,我找不到原因 - My program is crashing, I can't find why 我可以禁止某些功能崩溃程序吗? - Can I prohibit certain functions from crashing a program? 如何解决程序崩溃的问题? - How can I fix my program from crashing in C++? 为什么在程序中无法使用“ file_ptr >>变量”从文件读取? - Why I can't read from file using “file_ptr>>variable” in my program? 我无法让程序正确读取输入文件中的值(2D数组) - I can't get my program to read the values from my input file correctly (2D array) 定制的 C++ Windows 应用程序崩溃并生成一个空的 dmp 文件 - Bespoke C++ Windows app crashing and producing an empty dmp file 我无法让我的程序在函数中读取我的文件 - I can't get my program to read my file in a function 如果键不存在,我可以从std :: map获取一个值而不会崩溃吗? - Can I get a value from std::map without crashing if the key doesn't exist? 当调用它必须使用的库是导致它崩溃的原因时,如何防止我的 C++ 程序崩溃? - How can I prevent my C++ program from crashing when a call to a library it must use is what causes it to crash?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM