Socket disconnects at midnight - linux

I have a very strange problem with one of my systems. There are two components:
uClinux running on NIOS board.
Power PC running old CentOS.
There is an open socket between the two boards with constant text commands passing back and forth. I have several systems with this setup.
However, one of them have this strange error: the socket disconnects around midnight throwing broken pipe error. Does anyone knows what particular setting configures this behaviour? I doubt it is my software because it works just fine on several other systems.

So to summarize the results: I couldn't find what was causing the broken pipe error right at midnight. But I was able to mitigate its effects by ... ignoring the SIGPIPE signal as suggested by this post.

Related

TrueNAS shell gives ~~ at an interval and eventually causes a crash

After an update of my TrueNAS I started getting some strange double beeps.
I thought it might be thermal warning, so I cleaned my NAS PC, put a monitor and keyboard on and booted it up.
I started to see some strange token series popping up, seemingly random: ^[[6~^ ^[[6~^.
I thought nothing of it.
Then more beeps, system froze. I checked the monitor. It was flooded with ^[[6~^ ^[[6~^.
I then rebooted my TrueNAS and went into the shell by pressing 9.
Now I see: ~~ and the same beeps occur when the characters appear. Roughly around every 8 seconds.
What is causing these? I tried unplugging all USB devices, I even tried to google.
I found things like kbdcontrol, jons, crontab. But with my very limited Linux knowledge I could not make anything work.
Hoping someone can help me with this.
Something went wrong with the patching process (I guess)
How I fixed it:
In the GUI I went to System -> Boot
I reverted to the previous patch.
Rebooted the system.
Issue still occurred.
Then I went to Dashboard -> check for updates.
It then went on and installed the update (as before).
Now the issue is resolved.

Not visible/refreshed objects or part of screen

Do You know the situation when on screen in application you have not fully refreshed view? You need to hover the mouse on the object to make it visible/refreshed? Or You need to open close page/screen to refresh all objects?
I have PC-box with Win10. PC has only one DVI port, so extended the screens with USB to DVI adapter (3x VGA2725) and desktop is extended to 4 monitors. Each monitor is used to show the same software (SCADA) 4 different 'windows'. On the screens with adapters there is problem with view/screen refresh, like a 'artefacts' or part of screen not updated. In that situation the page needs to be closed/opened again. The CPU and disk is not overloaded.
Could You help me if above is more software issue or more hardware issue? Shell I look for bad drivers? What shall I check?
EDIT: sorry, missed the fact that the adaptor is multiplying the signal to all monitors.
Nevertheless, check with only one monitor at a time and different combinations to isolate is my suggestion.
PLEASE DISCARD THE FIRST ANSWER BELLOW..
Has the adaptor been tested on one of the other monitors?
If it has been tested on all monitors and the error is only on one
of them, checking that monitor's specs, and the adaptor's specs; to
see if there are any incompatibilities, is probably the best approach.
If no testing on a different monitor has been done, I would definitely
try to isolate the issue by connecting the adaptor to all external
monitors.
If you encounter the same error on a different monitor, we know it is
most likely the adaptor, or it's drivers.

Prevent Linux from switching to another task during execution of a certain function

I made an implementation of 1-wire protocol for the Raspberry Pi adapted from this book. It uses bit banging to implement the communication protocol. The function bcm2835_delayMicroseconds() from the BCM2835 library is used to produced required delays.
It works quite well, but not completely reliable: sometimes i get no response from the sensor. I used an oscilloscope to trace the problem.
Here the oscilloscope screenshot with signal interpretation in green.
The red marks the fault: the bit starting low pulse got prolonged thus inserting a rogue '0'. This caused the sensor not to recognize the command and not to respond to it (subsequent '1's).
I beleive this happend because the OS preempted (switched to another task/thread/process) during transmission of this bit. So
is it possible to tell the Linux not to preempt during the execution of a certain function (for writing and reading of a single bit in this case)? Or perhaps there is another solution to this problem?

Matlab Parpool fl::except On linux - not enough inodes

Edit 2/5/17: After some work with our system deparment, it seems that this happens when Linux is low on inodes. My question is, therefore, why are the two related, and how could I have known it from the error message?
Problem Details:
I run Matlab R2016b on Linux (CentOS 6.3), and for the past couple of days I keep getting a non-familiar error when I try to do open parallel threads. Specifically, writing
parpool(3);
yields as always
>>starting parallel pool (parpool) using the local profile ....
But then, after a short while, I get
>> Caught unexpected fl::except::IInternalException
and it crashes. (The double 'I' in Internal is intentional).
Thanks.

Recover from OpenCL freeze in Linux

I am writing my first OpenCL kernels on an Ubuntu machine with an NVIDIA card. Once in a while, the application totally freezes the whole computer. The mouse does not move, and the only way to reboot is by force-pressing the power button.
I've realized that the reason for the freezes is that I accidentally read past the last index of a global, read-only float array. While this is something I don't intend to do often, it might still happen in the future.
My question is - is there any way to prevent the computer from completely shutting down if this happens again? I know that, for example, Windows can shut down bad GLSL kernels and recover with a graphics driver restart. Is something similar possible here?
You may not be able to completely recover but you can recover better using SysRq (sometimes called System Request or Magic SysRq). By executing a specific key combination you can have Linux reboot in some what of a sane way (killing processes and unmounting filesystems). This key sequence is described in detail at http://en.wikipedia.org/wiki/Magic_SysRq_key so I won't repeat it here.
In some cases you might be able to still SSH to the device. If this is your case you might be in more luck. If you can SSH there are a number of other options you can try such as: unloading/reloading the crashed module, restarting the xserver, or at least rebooting the normal way.
Although I'm not an expert on "HURD" I believe it was designed to handle this type of condition better. The only other solution I can think of is using two graphics cards one for X and one for OpenCL. Dependidng on what you are doing you might have to passthrough the NVIDIA to a VM in order to completely isolate it off your host.

Resources