.Net Core on a PLCnext Control with FW2019 LTS

Hello, Since I’ve installed a new firmware update 2019 LTS on the controller, I can not start .Net Core programs. It worked before with the firmware version 1.20. I use Dotnet Runtime .Net Core 2.1.1 for ARM 32bit. If I execute program dll, nothing happens and I can not write anything in consule anymore. However the command “–info” works. See printscreen. I expect, that “Hello World” appears in console. As I said, with older version of firmware, it worked. Thanks for your help. Best regards.

Hello, we have received a similar report from another user. In that case, this was the solution:

Workaround: This is somehow related with the running lttng-sessiond on the controller. After stopping the running lttng session with /etc/inti.d/lttng-daemonized stop the dotnet program was able to execute. There are some issues in the dotnetclr github repo that are discussing problems with yocto and dotnet, lttng. Mybe they are related to this issue.

                                               * > [Dotnet 'myApp.dll' hang in lttng running on arm32](<https://github.com/dotnet/coreclr/issues/15693>)

                                               * > [Dotnet 'myApp.dll' hang running on arm32](<https://github.com/dotnet/core-setup/issues/3561>)

Does this work for you? - Martin.

Thank you Martin for the your reply. It works for me, but not every time. I tried to reboot the controller a couple of times and then to stop lttng-daemonized again. Nevertheless there were two lttng-daemonized sessions running. Do I need lttng-daemonized? Can turn it off from boot? Best regards.

Hi Serhii, I don’t think that it is necessary to run lttng. You could try removing lttng-daemonized from the /etc/init.d directory, which should prevent it from running at startup. - Martin

Hi Martin, today I tried to start my .Net Core program on the Controller again . I removed lttng from the /etc/init.d directory and my program still gets hang. The program can be started in a some time after reboot. But that happens with different time. If it works, it will work until the next reboot. Also the program can only be started only as an admin. If I start it as root then it will hang. From the issues you sent me, I read that you should compile .Net Core RunTime yourself, and after that it maybe work. I just do not understand why it worked before the update, and now not. -Serhii

Serhii, I was able to run Hello World on the 2019.0LTS firmware without any init.d configuration with the latest preview version; try using the 3.0.0-preview3 runtime and SDK. https://dotnet.microsoft.com/download/dotnet-core/3.0 -Hank

Thank you Hank for the your reply. I tried ASP.NET Runtime 3.0.0-preview3. The program does not hang, but closes immediately after execution. -Serhii

Hello Serhii, please make sure that the SDK you use to build the project is V 3.0.0 as well…

I did not have to make any changes. ConfigurationDotNet3.0
ow@debOW:~/Desktop/dotnet/MyFirstTestProgram/bin/Debug/netcoreapp3.0$ nano MyFirstTestProgram.runtimeconfig.json ------ {
“runtimeOptions”: {
“tfm”: “netcoreapp3.0”,
“framework”: {
“name”: “Microsoft.NETCore.App”,
“version”: “3.0.0-preview3-27503-5”
},
“configProperties”: {
“System.Globalization.Invariant”: true
}
}
} --------- [admin@axcf2152:/opt/plcnext/netcoreapp3.0$](mailto:admin@axcf2152:/opt/plcnext/netcoreapp3.0$) dotnet MyFirstTestProgram.dll
Hello World!
[admin@axcf2152:/opt/plcnext/netcoreapp3.0$](mailto:admin@axcf2152:/opt/plcnext/netcoreapp3.0$)

admin@axcf2152:/opt/plcnext/netcoreapp3.0$ dotnet --info
It was not possible to find any installed dotnet SDKs
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
<https://aka.ms/dotnet-download> Host (useful for support):
Version: 3.0.0-preview3-27503-5
Commit: 3844df9537 .NET Core SDKs installed:
No SDKs were found. .NET Core runtimes installed:
Microsoft.NETCore.App 3.0.0-preview3-27503-5 [/opt/plcnext/dotnetRT/shared/Microsoft.NETCore.App] To install additional .NET Core runtimes or SDKs:
<https://aka.ms/dotnet-download>

Hi Sherii, maybe it helps if you set the environment variableCOMPlus_LTTng to 0. See this Makers Blog article for more information. - Björn

Hi Martin, Thank you for your support, it works for me.


Hi Serhii, I don’t think that it is necessary to run lttng. You could try removing lttng-daemonized from the /etc/init.d directory, which should prevent it from running at startup. - Martin

MSG_ONL0165.docx