[JIRA] (JENKINS-54502) Jenkins crashed when a running build was aborted.

2 views
Skip to first unread message

sjiang@407etr.com (JIRA)

unread,
Jan 4, 2019, 2:24:03 PM1/4/19
to jenkinsc...@googlegroups.com
Scott Jiang updated an issue
 
Jenkins / Bug JENKINS-54502
Jenkins crashed when a running build was aborted.
Change By: Scott Jiang
Summary: Jenkins crashed when a running build was aborted due to timeout .
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

vipulmadaan@hotmail.com (JIRA)

unread,
Jan 8, 2019, 11:46:02 PM1/8/19
to jenkinsc...@googlegroups.com
Vipul Madaan commented on Bug JENKINS-54502
 
Re: Jenkins crashed when a running build was aborted.

ng the exact same issue. Any update on it?

sjiang@407etr.com (JIRA)

unread,
Jan 9, 2019, 9:00:03 AM1/9/19
to jenkinsc...@googlegroups.com

funeeldy@yahoo.com (JIRA)

unread,
Jan 10, 2019, 3:20:03 PM1/10/19
to jenkinsc...@googlegroups.com

happening to me too. please fix this.

vipulmadaan@hotmail.com (JIRA)

unread,
Jan 11, 2019, 9:39:02 AM1/11/19
to jenkinsc...@googlegroups.com
Vipul Madaan edited a comment on Bug JENKINS-54502
ng I am having the exact same issue on version 2 . 150 . Any update on it?

y_zutshi@yahoo.com (JIRA)

unread,
Feb 28, 2019, 11:55:02 AM2/28/19
to jenkinsc...@googlegroups.com

I am facing the exact same issue as well (ver:2.150). Any one found a workaround yet? 

jacastelbon@goalsystems.com (JIRA)

unread,
Jun 20, 2019, 9:52:07 AM6/20/19
to jenkinsc...@googlegroups.com

The same thing happened to me since I updated jenkins from version 2.138.3 to 2.182. When launching a compilation using the windows command step and aborting the task jenkins crashes. I've fixed it by commenting the calls to the "killSoftly" method in "ProcessTree.java".

 
diff --git "a/core/src/main/java/hudson/util/ProcessTree.java" "b/core/src/main/java/hudson/util/ProcessTree.java"
index 4e2a4b3c14..98a8cf04ea 100644
— "a/core/src/main/java/hudson/util/ProcessTree.java"
+++ "b/core/src/main/java/hudson/util/ProcessTree.java"
@@ -26,7 +26,6 @@ package hudson.util;
import com.sun.jna.Memory;
import com.sun.jna.Native;
import com.sun.jna.NativeLong;
-import com.sun.jna.Pointer;
import com.sun.jna.LastErrorException;
import com.sun.jna.ptr.IntByReference;
import hudson.EnvVars;
@@ -520,7 +519,7 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,

LOGGER.log(FINER, "Killing recursively {0}", getPid());
// Firstly try to kill the root process gracefully, then do a forcekill if it does not help (algorithm is described in JENKINS-17116)

  • killSoftly();
    + // killSoftly();
    p.killRecursively();
    killByKiller();
    }
    @@ -533,7 +532,7 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,

LOGGER.log(FINER, "Killing {0}", getPid());
// Firstly try to kill it gracefully, then do a forcekill if it does not help (algorithm is described in JENKINS-17116)

  • killSoftly();
    + // killSoftly();
    p.kill();
    killByKiller();
    }
    @@ -1442,7 +1441,7 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
  • Read the remainder of psinfo_t differently depending on whether the
  • Java process is 32-bit or 64-bit.
    */
  • if (Pointer.SIZE == 8) {
    + if (Native.POINTER_SIZE == 8) {
    psinfo.seek(236); // offset of pr_argc
    argc = adjust(psinfo.readInt());
    argp = adjustL(psinfo.readLong());

dbeck@cloudbees.com (JIRA)

unread,
Aug 13, 2019, 4:26:03 AM8/13/19
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
 
Change By: Daniel Beck
Labels: Aborting Crash jenkins regression

owen@nerdnetworks.org (JIRA)

unread,
Aug 13, 2019, 11:35:02 AM8/13/19
to jenkinsc...@googlegroups.com
Owen Mehegan commented on Bug JENKINS-54502
 
Re: Jenkins crashed when a running build was aborted.

If Jose Antonio Castelbón is correct about the fix, the change was introduced at https://github.com/jenkinsci/jenkins/pull/3414. Vipul Madaan brought this issue to my attention yesterday. I asked him to reproduce it and capture a support bundle from Jenkins to attach to this issue. Interestingly, he said that if he installs a recent version of Jenkins from scratch, he can't reproduce this issue. He only sees it after upgrading. Not sure why that would make a difference in the abort functionality. He is running his builds on the master, which I suspect is relevant here; perhaps aborting the job is somehow killing the master java process. That would explain why nothing is logged when people see this.

stephan.reiter@gmail.com (JIRA)

unread,
Aug 14, 2019, 5:12:02 AM8/14/19
to jenkinsc...@googlegroups.com

Owen Mehegan, could it be that the WinP library isn't properly upgraded? If a fresh install works alright but an upgrade doesn't, it may be a problem with updates of libraries.

Oleg Nenashev ..?

owen@nerdnetworks.org (JIRA)

unread,
Aug 18, 2019, 9:39:03 PM8/18/19
to jenkinsc...@googlegroups.com

Stephan Reiter that's a good question. I actually have no personal experience running Jenkins on Windows, I just wanted to add some context to this Jira after meeting Vipul Madaan at Jenkins World last week.

Vipul, am I remembering correctly that you have been upgrading Jenkins by just downloading the newer jar file and putting it in place? Did you originally use a Windows installer package to install Jenkins? Maybe this is related.

vipulmadaan@hotmail.com (JIRA)

unread,
Aug 18, 2019, 9:46:21 PM8/18/19
to jenkinsc...@googlegroups.com

Thank you Stephan Reiter and Owen Mehegan

I have tried placing a new jar file and also tried to upgrade using Jenkins GUI under manage jenkins. Had same issue both times.

I am not sure how it was originally installed. Is there a way to check it?

 

Also I will be trying again this week and will update the crash logs here.

 

owen@nerdnetworks.org (JIRA)

unread,
Aug 18, 2019, 9:54:02 PM8/18/19
to jenkinsc...@googlegroups.com

Vipul Madaan manually downloading the jar and using the upgrade button in the Jenkins UI are effectively the same thing.

This page shows a few ways that you can list installed MSI packages on Windows: https://www.makeuseof.com/tag/list-installed-programs-windows/ I would try this and see if Jenkins is in this list. If so, that would indicate that the Windows package was used to install Jenkins. If that is the case, I would recommend that you use the Windows package to upgrade it. You can get it from here: https://jenkins.io/download/

vipulmadaan@hotmail.com (JIRA)

unread,
Aug 18, 2019, 10:08:02 PM8/18/19
to jenkinsc...@googlegroups.com

Yes I can see jenkins in list of installed package.

So now if I use jenkins.msi to upgrade, do i need to follow any special instructions or just installing it in same location will upgrade it.

 

Thanks

Vipul

owen@nerdnetworks.org (JIRA)

unread,
Aug 18, 2019, 10:23:02 PM8/18/19
to jenkinsc...@googlegroups.com

Vipul Madaan I can't say for certain, having never run Jenkins on Windows. I see no reason why just running the installer wouldn't work. I expect the difference between the installer and the bare jar file is that the installer sets up the Windows service, puts the jar in the right place, and includes other Windows-specific things like the WinP library.

keithdavis@solidtechservice.com (JIRA)

unread,
Aug 20, 2019, 9:11:01 AM8/20/19
to jenkinsc...@googlegroups.com

I'm on 2.189 and believe I have the same issue. Does not happen 100% of the time (I don't think, but have not confirmed that part). 

keithdavis@solidtechservice.com (JIRA)

unread,
Aug 20, 2019, 9:12:03 AM8/20/19
to jenkinsc...@googlegroups.com
Keith Davis edited a comment on Bug JENKINS-54502
I'm on 2.189 and believe I have the same issue - aborting running jobs causes the service to crash . Does not happen 100% of the time (I don't think, but have not confirmed that part). 

 

Child process [2064 - c:\Jenkins\jre\bin\java -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "c:\Jenkins\jenkins.war" --httpPort=9999] finished with -1073741510

 

The jenkins service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 60000 milliseconds: Restart the service.

 

 

 

konrad.kuegler@hype.de (JIRA)

unread,
Nov 5, 2019, 5:18:02 AM11/5/19
to jenkinsc...@googlegroups.com

We are experiencing the same problem on a x64 system.

I noticed that winp.dll and sendctrlc.exe of the WinP library are extracted to the <jenkins>\war\WEB-INF\lib directory under some long name like winp.E336920A48E5EB5F70FF7D65DA840462.dll.
These however are not the x64 versions, but the 32 bit ones.

I extracted the winp-1.28.jar file, replaced winp.dll with the content of winp.x64.dll and did the same for the exe file. So after that there is no chance for WinP to use the wrong version, because both are 64 bit now. I re-packaged the jar and placed it in <jenkins>\war\WEB-INF\lib.

With this setup aborting jobs no longer kills Jenkins. However I also no longer see extracted versions of the dll and exe files in the lib directory.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

Abhishek.Sharma@amd.com (JIRA)

unread,
Nov 8, 2019, 1:55:03 AM11/8/19
to jenkinsc...@googlegroups.com

I'm seeing the same issue in the Linux environment (RHEL6). The crashes have become very frequent after upgrading. Is there a workaround/fix 

owen@nerdnetworks.org (JIRA)

unread,
Nov 8, 2019, 2:40:04 AM11/8/19
to jenkinsc...@googlegroups.com

Abhishek Sharma if you are having this issue on Linux, it is most likely a different bug. I would suggest creating a new issue, and attach a support bundle with logs if you can. Use the Support Core plugin to generate a bundle.

ingolfurd@sjova.is (JIRA)

unread,
Jan 10, 2020, 12:14:03 PM1/10/20
to jenkinsc...@googlegroups.com

Is this still an issue? I'm also seeing this behaviour on 2.204.1

vipulmadaan@hotmail.com (JIRA)

unread,
Jan 10, 2020, 12:26:03 PM1/10/20
to jenkinsc...@googlegroups.com

Hello

My issue got resolved . I downloaded the Executable of Jenkins and instead of running an upgrade from UI Or replacing a jar file Idid use newly downloaded executable to do a fresh install of newer version on top of my previous version . So now I have newer version and don’t have any crashes . I have tested it for a while and I am not able to reproduce the crash .

ingolfurd@sjova.is (JIRA)

unread,
Jan 11, 2020, 5:56:04 PM1/11/20
to jenkinsc...@googlegroups.com

That fixed it for me as well. Thanks for the help Vipul!

vipulmadaan@hotmail.com (JIRA)

unread,
Mar 17, 2020, 1:24:23 PM3/17/20
to jenkinsc...@googlegroups.com
Vipul Madaan started work on Bug JENKINS-54502
 
Change By: Vipul Madaan
Status: Open In Progress
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

vipulmadaan@hotmail.com (JIRA)

unread,
Mar 17, 2020, 1:24:27 PM3/17/20
to jenkinsc...@googlegroups.com

vipulmadaan@hotmail.com (JIRA)

unread,
Mar 17, 2020, 1:24:29 PM3/17/20
to jenkinsc...@googlegroups.com
Change By: Vipul Madaan
Status: In Review Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages