TwinCAT: Running on isolated cores failed - plc

I was trying to activate my configuration on my local PC, but it failed. I tried:
Isolate 1 or 2 cores on my pc (Under SYSTEM > Real-Time and reboot the PC) and run the PLC tasks on those cores. When I do this I get the following error:
'TwinCAT System' (10000): Sending ams command >> Init4\RTime: Start Interrupt: Ticker started >> AdsWarning: 4118 (0x1016, RTIME: startup of isolated CPU fails!) << failed!
I then tried to run it on the normal windows dedicated CPUs (so none of the CPU’s were isolated). When I activated the configuration (and enabled Virtualization in the BIOS) I got the following error message:
Setting TwinCAT in Run Mode with KB4056894 is not possible
Uninstall KB4056894
or
Activate a solution using only isolated cores
I could not find KB4056894 installed on my PC. Any other solution?
I'm using TwinCAT 3 Build 4022.14 under Windows 10.

From Beckhoff support:
According to the error note, the Microsoft patch for spectre/meltdown
is installed on your PC. Normally, the TC3 should work with this patch
when using isolated cores…
However, since version TC3 Build 4022.16, this problem is solved.
I installed 4022.22 and everything worked.

I just want to share my experience with this error and how I solved it. Just in real-time menu set the cpu cores as 1 shared and 3 isolated cores. since my cpu has 4 core. Then set this value on target and then it will ask for reboot. after reboot it worked without this error and I was able to run the my code.

Related

InvalidSignatureException when calling EKS cluster

I am using ubuntu app on windows. Using this ubuntu app, I was connecting to EKS cluster till yesterday.
Suddenly, it stopped working due to below error. I searched lot and found many answers related to ntpd and system clock but not sure why this has happened now.
This is the error:
An error occurred (InvalidSignatureException) when calling the DescribeCluster operation: Signature expired: 20230219T082231Z is now earlier than 20230219T084848Z (20230219T085348Z - 5 min.)
how to fix this?
I see that system clock is correct on my windows machine but is is not getting synced correctly with ubuntu app. what commands I should run to make this successful?

Failed to load the provider SiloedPackageProvider.dll and metaDeployProvider.dll

Trying to simulate Raspberry Pi in windows 10 laptop with windows 10 IOT Core.
http://annabooks.com/Articles/Articles_IoT10Core/Windows-10-IoT-Core-VM-Version-1.2.pdf
I found this article very useful but has used pre-built image “For MinnowBoard Turbot/MAX”.
I get these errors and other errors too.
Failed to load the provider SiloedPackageProvider.dll and metaDeployProvider.dll
CFfuMiscHelpersT ValidateNotOnTheSameDisk#904 failed with 0x80070001.
while executing this command from winpe.
Dism.exe /Apply-Image /ImageFile:"d:\Flash.ffu" /ApplyDrive:.\PhysicalDrive0 /SkipPlatformCheck
Failed to load the provider SiloedPackageProvider.dll and metaDeployProvider.dll
Also please tell me a way to copy logs from the VM running though HyperV.
Thanks
This issue occurs when you try to back up a specific library or when you accept the default settings in Windows Backup and Restore.You may try to follow up this document to fix the issue.
There are various ways exist to copy data between a Hyper-V host and its guest machines. You can search the ways from internet, or open a new issue for help.

matlab parallel computing toolbox--failed to start matlabpool using 'local' profile

My desktop runs in Ubuntu 12.04 LTS and the matlab is R2013a. I'm doing local parallel computing(use multicores of my desktop).
Before using the following command to start matlabpool, I've already validated the local configuration of parallel computing toolbox. To verify this point, I've attached the figure 1.
figure 1
matlabpool local 4
But it takes like forever to start the matlabpool. After running 10 minutes, the command line is still like:
Starting matlabpool using the 'local' profile ...
So I use ctrl+c to stop it. It always give me:
Operation terminated by user during
parallel.internal.pool.InteractiveClient>iGetSingleConnection (line
737)
Based on the above information, it seems that it get stuck at iGetSingleConnection.
Thanks,
I don't know about Ubuntu, but in Windows when you install a new version of MATLAB, the old firewall rules do not apply to the new executables. So, you need to open the firewall to allow access to the smpd.exe, mpiexec.exe and MATLAB.exe processes. For example, in Windows, I get one of these:
Then I need to go into Windows firewall settings and make the rules. Here is how to create an inbound program rule in Windows 7/8. Maybe there is something similar in Ubuntu.

Attempt to access remote folder mounted with CIFS hangs when disconnected

This question is an extension for that question.
Yet again: I'm working under CentOS 6.0 and I have a remote win7 folder, mounted with:
mount -t cifs //PC128/mnt /media/net -o "username=WORKGROUP\user,password=pwd,rw,noexec,soft,uid=user,gid=user"
When remote folder is not available (e.g. network cable is pulled out) an attempt to access the remote folder locks an application I'm working on. At first I detected that QDir::exists() caused locking for 20-90 seconds (I still can't find out why such difference), further I detected that any call to stat() function leads to application lock.
I followed an advice provided in topic above, I moved QDir::exists() call (and later - call to the stat() function) to another thread and this didn't solve the problem. The application still hangs when connection is suddenly lost. Qt trace shows that lock is somewhere in the kernel:
0 __kernel_vsyscall
1 __xstat64#GLIBC_2.1 /lib/libc.so.6
2 QFSFileEnginePrivate::doStat stat.h
I did also tried to check if remote share is still mounted before trying to access folder itself, but it didn't help. Approaches such as:
mount | grep /media/net
show that shared folder is still mounted even is there is no active connection to the network.
Checking folder status differences such as:
stat -fc%t:%T /media/net/ != stat -fc%t:%T /media/net/..
also hangs for ~20 seconds.
So I have several questions:
Is there any way to change CIFS timeouts? I did try to find out but it seems that there is no appropriate parameters and no CIFS config.
How can I check if remote folder is still mounted and not get locked?
How can I check is folder exists and also not get locked?
Your problem: "An unreachable network filesystem" is a very well known example which trigger linux hung task which isn't the same of zombies process at all(killing the parent PID won't do anything)
An hung task, is task which triggered a system call that cause problem in the kernel, so that the system call never return.
The major particularity is that the task is declared in the "D" state by the scheduler which mean the program is in an uninterruptible state. This mean that you can do nothing to stop you program: You can trigger all signal to the task, it would not respond. Launching hundreds of SIGTERM/SIGKILL does nothing!
This the case whith my old kernel: when my nfs server crash, I need to reboot the client to kill the tasks using the filesystem. I compiled it a long time ago (I have still the build tree on my hdd) and during the configuration I saw this in lib/Kconfig.debug:
config DETECT_HUNG_TASK
bool "Detect Hung Tasks"
depends on DEBUG_KERNEL
default LOCKUP_DETECTOR
help
Say Y here to enable the kernel to detect "hung tasks",
which are bugs that cause the task to be stuck in
uninterruptible "D" state indefinitiley.
When a hung task is detected, the kernel will print the
current stack trace (which you should report), but the
task will stay in uninterruptible state. If lockdep is
enabled then all held locks will also be reported. This
feature has negligible overhead.
It was only proposing to detect such tash or panic on detection: I don't checked if recent kernel actually can solve the problem (It seems to be the case with your question), but I think it didn't worth enabling it.
There is second problem : normally, the detection occur after 120 seconds, but I saw also a Konfig option for this:
config DEFAULT_HUNG_TASK_TIMEOUT
int "Default timeout for hung task detection (in seconds)"
depends on DETECT_HUNG_TASK
default 120
help
This option controls the default timeout (in seconds) used
to determine when a task has become non-responsive and should
be considered hung.
It can be adjusted at runtime via the kernel.hung_task_timeout_secs
sysctl or by writing a value to
/proc/sys/kernel/hung_task_timeout_secs.
A timeout of 0 disables the check. The default is two minutes.
Keeping the default should be fine in most cases.
This also works with kernel threads: example: make a loop device to a file on a fuse filesystem. Then crash the userspace program controlling the fuse filesystem!
You should a get a Ktread which name is in the form loopX (X correspond normally to your loopback device number) HUNGing!
weblinks:
https://unix.stackexchange.com/questions/5642/what-if-kill-9-does-not-work (look at the answer written by ultrasawblade)
http://www.linuxquestions.org/questions/linux-general-1/kill-a-hung-task-when-kill-9-doesn't-help-697305/
http://forums-web2.gentoo.org/viewtopic-t-811557-start-0.html
http://comments.gmane.org/gmane.linux.kernel/1189978
http://comments.gmane.org/gmane.linux.kernel.cifs/7674 (This is a case similar to yours)
In your case of the three question: you have the answer: This probably due to what is probably a well known bug in the vfs linux kernel layer! (There is no CIFS timeouts)
After much trial & error I found a solution that persists.
# vim /etc/fstab
//192.168.1.122/myshare /mnt/share cifs username=user,password=password,_netdev 0 0
The _netdev option is important since we are mounting a network device. Clients may hang during the boot process if the system encounters any difficulties with the network.
https://www.redhat.com/sysadmin/samba-windows-linux

Start service in kernel mode (Vista)

I'd like to start service before user mode is loaded (in kernel mode).
The reason is I wanna run several system applications(asm code to write data to BIOS) that are not allowed in user mode (privileges problem).
That's why I got an idea: 1. Write windows service 2. Start and run it in kernel mode
Is it possible?
Are there any other ways to solve the problem?
I don't usually use Vista (use linux instead), that's why I'm asking.
Windows services are user-mode applications. To run in kernel-mode you should write a driver. (So-called "legacy" driver will be enough, see Driver Development Part 1: Introduction to Drivers).