Why is mlockall occasionally slow? [closed] - linux

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
Background: we've recently updated our Operating System from RHEL 6.7 MRG to RHEL 7.7 (with RealTime). Our RealTime Ada Radar Applications run mlockall (c binding) to lock into memory at startup (yes, I understand this is rarely necessary, and likely isn't for all of the applications, but is required for many).
The Problem:
Since the upgrade, mlockall occasionally takes over 2 minutes, where it usually takes < 1 second. What could be causing this behavior?
I was pointed at file cache/memory buffer, so we ran some tests after dropping caches, but it didn't seem to have a positive effect.

Related

Memory usage of a Linux Buildserver [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 days ago.
Improve this question
I'm using a Linux buildserver, to be honest this is the first time.
I access it through VScode, using the available extensions.
Every time I build the code the memory of my linux buildserver is consumed at a point it reaches its limits, then start presenting erros due to this.
Other thing I notice, If I use a linux screen, it uses a huge amount of memory too.
Which should be the ways to deal with this environments ?
I dont know if this should be normal behaviour, every time I build it consumes more memory.
Could VScode having some impact on this ?
Is this the normal behaviour of a buildserver ? I want to understand why.
Thank you very much !
I'm trying to use a linux buildserver, but every time I try to build my code It uses too much memory of the buildserver. I want to know if this is normal or If there is some setup I need to do.
In general, I kindly ask for some explanation about how the buildserver works regarding to memory management.

How can I use a stack buffer overflow to make an attack [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 2 years ago.
Improve this question
I am a IT Security student and I have to write a paper about a vulnerability in a real life case. I chose a small application that allows to create icons under Windows, which is vulnerable to a stack buffer overflow.
I've already had to do manipulations on exercise scripts (injecting shell code into a script that can be used in the Linux command line, etc.) but never on a real application.
Is it possible for you to help me to use the vulnerability to carry out some kind of "attack" or to execute a program function not supposed to be executed at that moment?
I didn't try to reverse the code yet, I will try to find where the program is storing the long string I use to make it crash, the size of the memory for this variable and the return address.
I found this app when trying to find a vulnerable app on Vulnerability Lab : https://www.vulnerability-lab.com/get_content.php?id=1609
You can also download the app from this link (the vulnerability is still present in the last version): http://www.aha-soft.com/iconlover/
PS : I've only been studying IT Security for a year and a half, so I am a beginner. Sorry if there are some mistakes in my text, I am french. This is one of my first post on this forum, I hope I did it well.
There are already ready made exploits to do what you are asking for iconlover. see here. The script forces the application to open up calculator.exe which indicates a very severe security issue.
You can modify the given shellcode for RCE or to execute malicious programs (assuming you already have some form of access to the target system.)

Forcing Linux (Server / Node) to Instantly Crash and Reboot [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Failure scenarios are complex and the potential responses of a multi layer complex application (or even a set of applications) requires hard thinking and complex understanding as well as complex implementations.
To ease the pain todays servers have power supplies being able to be programmatically switched off and on again to force an instant dead of the server and an instant reboot. This is referred to shooting a server in the head or putting a bullet in/through the head of the server.
Since todays server are usually virtual and sometimes the server is not equipt with power control or programmatically accessable kill switches, crashing the OS is the best option.
So how can one do this?
I need a solution in a very narrow timeframe (like 1000ns) and does not send kill signals or give any part of the OS time to even act and most importantly not to recover.
According to this blog you can do following:
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger
To enable it you probably need to put following in sysctl.conf:
kernel.sysrq = 1
This should more or less act in the same way as pressing reset button on the machine.
I don't get it, if you're looking for a reboot in general then the command to go for is:
sudo reboot

what is RT_PREEMPT? how is it different from preempt rt ?does these mean same real time patch to linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
The community reviewed whether to reopen this question 10 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I presently working on hardrealtime linux.
when i search regarding documentation of topic RT_PREEMPT .
different sites turn up with different names like preempt-rt,rt-preempt.
can someone say me the exact link or any resources which could help me look on RT_PREEMPT?
You are looking for the RT_Preempt patch, which is documented here. The patch makes the kernel fully preemptable, and also includes some RT schedulers. It includes a how-to for installing it. If you are familiar with building kernels it should be pretty easy.
I documented my installation on my Ubuntu machine here.
It is kinda difficult to find up-to-date information on the patch in part because much of it has become mainline in the last few years (having multiple names doesn't help either). For example, the 3.14 kernel has configuration options for a "low-latency" install.
Steven Rostedt gave a good overview talk in 2013 at the Embedded Linux Conference, available at linuxgizmos.com and youtube. Slides here (pdf). Around minute 17 he really starts to get into the differences:
Interrupts are handled with threads (thus scheduled)
Spin locks replaced with mutexes
Priority inheritance is extended to the kernel

What language are road LED signs programmed in? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
You know, these things. I assume they run on some old computer language/framework, anyone know what that might be?
The displays themselves are pretty basic, they (in most cases) just have a microcontroller with some firmware that allows them to convert commands they get serially into patterns and/or characters. The more recent ones also give feedback regarding broken LEDs for example. Typically these firmwares are written either in assembly or C.
The real intelligence of these systems is often located in a central control system that coordinates an entire city or even a state. These control systems can perform intelligent tasks on entire groups of signs like given the location of an accident, they add the correct distance to the accident to the warning message, automatically divert traffic, and so on.
I know of such systems written in C, C++, Java, G2, ... Depends on the moment they were designed. So no, they're not by definition outdated and antique! They do tend to have a longer lifespan than your average desktop app though which often leads to the oldest parts being swapped out for more recent developments and these newer modules will in many cases be based on more recent technologies.

Resources