相关疑难解决方法(0)

当我的shell脚本退出时,如何终止后台进程/作业?

当我的顶级脚本退出时,我正在寻找一种清理混乱的方法.

特别是如果我想使用set -e,我希望后台进程会在脚本退出时死掉.

shell

173
推荐指数
7
解决办法
9万
查看次数

詹金斯(Jenkins)构建在“退出0”状态后陷入困境,并且需要很长时间才能退出

我有编译使用.NET应用程序的几个詹金斯建设工作npm,msbuild以及单元测试用例的执行步骤。

它显示build success并在之后挂起exit 0 status,因为下游作业延迟并且在长时间等待后失败。

在此处输入图片说明

是某些进程阻塞还是某些插件问题?

PS:我不想使用build-timeout插件,因为该版本已经显示出成功,但是需要很长时间才能完成。

jenkins

5
推荐指数
1
解决办法
525
查看次数

Jenkins在构建和构建后之间徘徊

在将Jenkins更新到2.156版(从1.6版开始)之后,我们的一些构建作业在完成后以及移至构建后动作之前会卡住。作业本身在5分钟内完成(与之前相同),然后挂起5-10分钟,然后继续前进。

我设法将其缩小为:

"Executor #10 for master : executing 03_masa #4390" Id=34464 Group=main TIMED_WAITING
    at java.lang.Thread.sleep(Native Method)
    at hudson.util.ProcessTree$WindowsOSProcess.killSoftly(ProcessTree.java:560)
    at hudson.util.ProcessTree$WindowsOSProcess.killRecursively(ProcessTree.java:520)
    at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:666)
    at hudson.Launcher$LocalLauncher.kill(Launcher.java:955)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:510)
    at hudson.model.Run.execute(Run.java:1810)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
Run Code Online (Sandbox Code Playgroud)

可以在此处找到引用的代码(自2.141版本开始提供)。

threadDump#1,threadDump#2

我们可以做些什么吗?

java hang jenkins thread-sleep

5
推荐指数
1
解决办法
714
查看次数

标签 统计

jenkins ×2

hang ×1

java ×1

shell ×1

thread-sleep ×1