如何强制apache崩溃?
我想在 apache 崩溃时测试一些东西。我想要测试的事情是 Windows 询问我是否要发送错误报告。有什么方法可以让 Apache 崩溃并要求我发送错误报告吗?
I want to test something when apache crashes. The thing I want to test involves Windows asking me if it wants to send an error report. Any way to make Apache crash and ask me to send an error report on it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
只需杀死正在运行的 apache 实例即可。
在 Windows 中: 转到任务管理器>终止进程
在 Linux 中: pkill processname
Just kill the apache instance running.
In windows: go to taskmanager>kill the process
In linux: pkill processname
看一下高级进程终止,特别是它的< code>crash 选项,这些选项可能会执行您想要的操作(显示发送错误报告消息框),尽管我还没有测试过它。不过还是值得一试。
Take a look at Advanced Process Termination, especially its
crash
options, those might do what you want (display the send error report message box), although I haven't tested it. It's worth a shot though.我同意之前的想法,即你应该使用 Windows 来崩溃它。
apache 的基本原理是,对于每个连接请求,它都会“fork”一个新进程。由于 Windows 没有内置的“fork”功能,因此它必须为每个请求创建一个新进程。因此,它可能会出现问题,特别是当有多个进程正在运行时。
对我来说,每次我在 Windows 上“重新启动”apache 同时保持连接时,我都会从 Apache 进程中收到“非法操作”。不确定是否可以 100% 重现,但当我重新启动时,它确实会时不时地出现在我身上。
I agree with the earlier idea that you should crash it using windows.
The basic of the apache is that for each connection request, it "fork" a new process. Since Windows don't have a built in "fork" functionality, it has to create a new process each request. As such, it can be glitchy especially if there are multiple processes running.
For me, everytime I "restart" apache on Windows while maintaining a connection, I get an "Illegal Operation" from Apache's process. Not sure that can be reproduced 100% of the time, but it does occur to me from time to time when I restart.
Alex 提供了一个可能的在这里回答:
Microsoft Application Verifier [...] 可以进行故障注入(低资源模拟),使各种 API 调用以可配置的速率失败。 [...]
Alex provides a possible answer here:
Microsoft Application Verifier [...] can do fault injection (Low Resource Simulation) that makes various API calls fail, at configurable rates. [...]