|
oh it gets better. So one part of my solution has a project with 15 subprojects. If I build each subproject separately, no errors. Build the project as a whole? Nope, issues out the kazoo.
I feel I'm getting closer though.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
We have a server at work running a big Java application and the Java runtime process is hogging all the CPU time. It doesn't do this on a different server.
I've only ever heard bad things about Java, but I wonder if anyone here has seen such behavior from other Java processes?
There is also suspicious network activity, with about 20 Mbps constant going in and out of the box.
The administrator of the box thinks that's normal server network activity, but I'm worried it might be a bot node. Maybe even part of the network that attacked CP!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Time to dig out the network analysis tools. Where's the connections going to/coming from? Is the IP port one that would be expected (e.g. HTTPS), or is it something unexpected (e.g random port number at both ends). If you can capture the packets and they're not encrypted, does the data look like what you'd expect?
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown
|
|
|
|
|
Richard Andrew x64 wrote: The administrator of the box thinks that's normal server network activity Were they break out in a sweat when they said that?
A network analyzer would be the thing to use here, the capture need not be very long at 20Mbps.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Assuming it's not a rogue bot/application on the server...
Richard Andrew x64 wrote: It doesn't do this on a different server. I'm not a fan of Java, but if this is the case then my first line of attack would be to assume it's not the JRE or application then (necessarily). It may be a bug that only surfaces with a certain configuration / environment, but it's safe to assume the application is "working" (ish).
So, I would start looking at environmental and configuration differences to see what the deal is. Are these machines in different subnets? Are you certain they are configured exactly the same? Was this a manual server provision (and open to mistakes) or automated? Is it the same exact OS with the same exact kernel version? Is the room's ambient temp the same for both servers? Do you know for certain it's the same exact application version and runtimes on both machines? Is one server in a faraday cage (kidding, well maybe not)? And so on...
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: I'm not a fan of Java, but if this is the case then my first line of attack would be to assume it's not the JRE or application then (necessarily). I agree here. It uses Java 8, which I have been reading is very well tested and patched. But also, I'm sure there are still vulnerabilities.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
The Windows Event Logs might show you something. It shows (bot) login attempts (Security log) and errors (Application log).
In my experience, "all" public servers get "probed" 24/7.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I have 10 years at least each in Java, C# and C++.
There is nothing wrong with Java. Nor with the other two.
What you are describing is what I would generally diagnose as an environment problem.
But could be a data caused problem in that a message(s)/request(s) that should have run to completion did not and now it is just spinning. Restarting it would likely demonstrate that. That however would also indicate a likely programming bug.
Sufficient execution flow logging, in any type of server application, would allow you to diagnose execution flows running out of control.
|
|
|
|
|
New job.
Obviously the first time I'm on watch for the release pipeline, the bloody installer failed.
I'm cursed.
Every time I think about anything related to installers, something will break.
I HATE THIS!
Also, it works on my machine, but not on my colleague machine.
sigh, just shoot me out of my misery. (don't)
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
I bet something wasn't configured correctly on your machine that the rest of them all know about but it has been so long since anyone had to configure a system they have forgotten.
Ask them, was there anything weird about when you configured your system? It might help.
Then again, if they are using VMs for that I am talking out of my hat.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
I’m begging you for the benefit of everyone, don’t be STUPID.
|
|
|
|
|
Maximilien wrote: Every time I think about anything related to installers, something will break. Installers shouldn't be any less robust than your application code. This is a hard lesson we learned after using several different installer tools: InstallShield, Wise, and more than one MSI package. We now use Inno Setup exclusively. While it is somewhat less capable than the other tools, it is predictable.Maximilien wrote: it works on my machine, but not on my colleague machine Our product runs on an industrial PC for which we create the system image. A common test for us is to re-image a machine and then install the product application to ensure all dependencies are installed properly. In a more general-purpose environment it's harder to manage dependencies. You have to contend with variable end-user environments plus a wider variety of Windows versions. The user may have newer versions of something installed that you depend on. It takes a lot of tedious testing to make sure all of the use-cases are covered.Maximilien wrote: I HATE THIS! Part of my role as the DSJB (Departmental Sh!t-Job Boy) is to do our installers. Before I took them over they were sloppy and unreliable. No one person took care of them. They exhibited the problems you cited and more. Routinely they came with instructions that had to be performed manually to get the application to work. Many bug reports for the products were due to installation failures.
You're not going to like this, but treating the installer like a first-level part of the product fixes a lot of issues.
Software Zen: delete this;
|
|
|
|
|
Quote: We now use Inno Setup exclusively. I second Inno setup, it's robust and I prefer software that works like a tank over all the clever brittle software.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Quote: Part of my role as the DSJB (Departmental Sh!t-Job Boy) is to do our installers. Before I took them over they were sloppy and unreliable. No one person took care of them. They exhibited the problems you cited and more. Routinely they came with instructions that had to be performed manually to get the application to work. Many bug reports for the products were due to installation failures.
You're not going to like this, but treating the installer like a first-level part of the product fixes a lot of issues.
AMEN! I do software repack and deployment. I have to deal with at least one bad installer a week, and it doesn't matter what it was built with. I can't tell you how many times I've called up vendors and asked them "what the hell are you doing mate?" Time and time again, there's only one person building the installers and, like you said, it's always up to the "DSJB".
I've even had installers that work fine on install, but on uninstall, they treat the customer machine like a $2 whore. "WMI Providers? Nuke 'em. What do you mean we just killed your SCCM deployment system on your machine?"
|
|
|
|
|
> they treat the customer like a $2 whore
Oh man, I have got to use that line in a meeting some time.
Software Zen: delete this;
|
|
|
|
|
It never worked in the first place. They just said it did ... waiting for the "new guy" to fix it ...
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I learnt there is one thing I should never do: upgrade the firmware of my hardware.
Everyobne does it and it works flawlessly. I do it, something critical breaks.
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
The shortest horror story: On Error Resume Next
|
|
|
|
|
|
OK. I asked before so this is a repost... (so sue me...)
Is there a plain (text) editor which can remove empty lines ?
It would be nice to add as "plug in" into my "development tool"...
Thanks
|
|
|
|
|
|
Nice.
I copied about 4000 lines of code and copied it back to my .cpp file.
I will try to see how my current messy " under construction " file looks now ,,,
I would probably do "CodeBeautifier" when my code gets too messy...
about hourly... just kidding
Thanks
|
|
|
|
|
If you're looking to reformat your code, you might want to take a look at ClangFormat — Clang 18.0.0git documentation Depending on which IDE you're using, you may find that others have already created plug-ins for it. A quick google around suggests that Visual Studio and QtCreator both have instructions on how to integerate.
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown
|
|
|
|
|
Looks like there are a couple extensions for VS Code that will do that.
|
|
|
|
|
For JavaScript and Typescript, use eslint to do that. You should be linting your projects anyway.
no-multiple-empty-lines | ESLint Stylistic
If you install the eslint plugin for VS Code, it'll do that every time you save a file. But, you don't need VS Code to use it.
Jeremy Falcon
|
|
|
|
|
notepad++
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Specifically, for most files replace '\r\n' with nothing, and select 'Extended' in the options
|
|
|
|