Some of the older Jenkins jobs on a build server cannot be updated via the web GUI. I can rollback to older configs using things like the job config history plugin, but normal updates cause it to say something in the bottom of the browser like, Uploading (79%), progress up to 9x% and eventually it errors out in Chrome with ERR_CONNECTION_RESET.
It doesn't do it for other old jobs, only a small handful. I ran diffs of their config.xml and nothing stood out.
I also already uninstalled the MultiSCM plugin which apparently has caused a similar issue in the past.
I'm not getting any sort of warning or error in the Jenkins log itself when these updates fail.
I've also updated Jenkins to latest LTS as well as all the plugins.
Any idea what's going on or how to fix it?
In JavaMelody, it sees the POST failing, but doesn't give any indication why:

This was so annoying to debug due to not knowing the origin of the error. None of the jenkins logs were helpful between
FINESTandSEVERE. After working with our lead of devops for a couple days we couldn't find anything on the system or server settings that changed the behavior.I ran across someone who had a similar issue on GitHub saying that for one of their plugins, it would break if there was an extra
EOLsymbol. That got me thinking, could this be a parsing error for plugin input?First I disabled everything that wasn't a build step. This fixed nothing. Then I started removing one plugin type at a time in the Build Step section and eventually narrowed it down to
Windows Batch Commandbuild steps. Through trial and error I determined it was 1 of 3 batches and debugged it down to finally a single line. This was the part of the batch where it was hidden:Putting on my parse-error thinking cap, I refactored this,
if not "!errorlevel!"=="0" echo Preliminary x86 build failed. Exiting early... & exit /b 1into this,
And it started working again. So it's probably a parsing bug on the Jenkins-consuming side, but the actual bug origin is probably the
Windows Batch Commandmodule when its input is being formatted for escaping special characters.FYI! :)