Page 3 of 4
Re: docker cutils recent release not updating
Posted: Mon 14 Oct 2024 11:12 pm
by Nossie
Hi Hans,
I've done a little digging and asking around a few docker people and ...
Running the app in a container vs a vm/server isn't much difference. If you have the issue I'd bet it's happening if you used a vm as well.
It's something code wise that's causing an issue, it sounds more like a weird race condition that's happening
Main.cs line 343 may be line above it that's the issue
To be honest, race conditions are above me Hans but do you mind telling me what's above line 343?
Re: docker cutils recent release not updating
Posted: Tue 15 Oct 2024 6:49 am
by HansR
Nossie wrote: ↑Mon 14 Oct 2024 11:12 pm
Hi Hans,
I've done a little digging and asking around a few docker people and ...
Running the app in a container vs a vm/server isn't much difference. If you have the issue I'd bet it's happening if you used a vm as well.
Remember that there is nobody else who has this issue (others are running Windows or Linux). Not sure of anybody running this in vm.
Nossie wrote: ↑Mon 14 Oct 2024 11:12 pm
It's something code wise that's causing an issue, it sounds more like a weird race condition that's happening
A race condition... see
the wiki.
If true, could be related to the next point.
Nossie wrote: ↑Mon 14 Oct 2024 11:12 pm
Main.cs line 343 may be line above it that's the issue
See screenshot:
Schermafbeelding 2024-10-15 082259.png
Nossie wrote: ↑Mon 14 Oct 2024 11:12 pm
To be honest, race conditions are above me Hans but do you mind telling me what's above line 343?
What is happening in line 343 is that it creates the main thread to run the different modules as asynchronous tasks. A
relatively simple explanation of asynchronous programming is given here.
It could be some timing issue related to the usage of async but because it used to work on your system and the only thing which has been added is the SQLite libraries (which reside in the runtimes) the problem must be related to those. And that leads me to the remark that the diary module is NOT (currently) run async. It may in future.
Afaiac, these remarks are guesses and I do not see a reason why any of the remarks should be valid without additional proof.
I'll think about proving a timing point.
Anybody with a suggestion is invited to propose something!
Re: docker cutils recent release not updating
Posted: Tue 15 Oct 2024 11:21 am
by HansR
And btw I checked your original logfile in the firsst post of this thread. It says:
Code: Select all
2024-09-12 03:12:23.912 Information Diary constructor: starting
2024-09-12 03:12:23.937 Error Exception Unknown : The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
2024-09-12 03:12:23.939 Error Data (cont): Microsoft.Data.Sqlite
2024-09-12 03:12:23.975 Error Data: at Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString)
at CumulusUtils.Diary.GetDiaryDatabase() in C:\Users\hansr\Documents\GitHub\CutilsFramework\CUtilsNET8\Diary.cs:line 99
at CumulusUtils.Diary..ctor(CuSupport s) in C:\Users\hansr\Documents\GitHub\CutilsFramework\CUtilsNET8\Diary.cs:line 61
at CumulusUtils.CUtils.RealMainAsync(String[] args) in C:\Users\hansr\Documents\GitHub\CutilsFramework\CUtilsNET8\Main.cs:line 609
at CumulusUtils.CUtils.Main(String[] args) in C:\Users\hansr\Documents\GitHub\CutilsFramework\CUtilsNET8\Main.cs:line 343
2024-09-12 03:12:23.977 Error Exiting - check log file
So this is likely the reason your friend comes up with the question about line 343. But you need to remember this is just the stackdump of the exception occurring. It is not the line of the error. I read the error still that the library has a problem with the connectionString. The SQLite libraries apparently do load but they fail to initialise.
Re: docker cutils recent release not updating
Posted: Tue 15 Oct 2024 10:05 pm
by Nossie
Thanks Hans,
I've temporarily reverted back to the older version while I have a think, although I did upgrade cmx to 4.2.1 (build: 4040) and that works so that's something
I'm thinking of putting it on real hardware or atleast a VM - but I haven't tried to export it yet.
Some remarks of my own, it was very kind of you to add the option of specifying the DB location, however in my tests I think only once did it ever add [Diary] to the cumulusutils.ini, accordingg to notepad++ the file gets updated but that new section is not added and if I do add it directly it looks like it gets ignored. If you are saying that the error may be occurring before diary is executed and not part of the issue pointed out before - is it possible it's something to do with that config generation/append? I have checked write permissions etc and everything does appear to save.
- thanks.
Re: docker cutils recent release not updating
Posted: Wed 16 Oct 2024 6:57 am
by HansR
Nossie wrote: ↑Tue 15 Oct 2024 10:05 pm
Thanks Hans,
You're welcome, we'll have to find the solution together!
Nossie wrote: ↑Tue 15 Oct 2024 10:05 pm
I've temporarily reverted back to the older version while I have a think, although I did upgrade cmx to 4.2.1 (build: 4040) and that works so that's something
I think it will work fine with 4.2.1 but please check the CUtils log on errors
Nossie wrote: ↑Tue 15 Oct 2024 10:05 pm
I'm thinking of putting it on real hardware or atleast a VM - but I haven't tried to export it yet.
That would be a good test.
Nossie wrote: ↑Tue 15 Oct 2024 10:05 pm
Some remarks of my own, it was very kind of you to add the option of specifying the DB location, however in my tests I think only once did it ever add [Diary] to the cumulusutils.ini, accordingg to notepad++ the file gets updated but that new section is not added and if I do add it directly it looks like it gets ignored. If you are saying that the error may be occurring before diary is executed and not part of the issue pointed out before - is it possible it's something to do with that config generation/append? I have checked write permissions etc and everything does appear to save.
No, I don't think your issue has something to do with
that config generation/append because you also had the problem before I made that modification for you.
BTW: it is a modification which did not make it to a final version so if you would like to progress to a next beta and would like to continue with that experiment I will have to add it again!
Re: docker cutils recent release not updating
Posted: Sat 19 Oct 2024 8:06 pm
by HansR
Hi Ian,
Thinking this all over again I just realise the runtimes have a library for all supported possible environments. Is it likely docker does not select - or does not pass a parameter - to select the proper system? How does it handle that?
On the other hand, CMX is running under the same docker I presume. Please note that the runtimes of CUtils is missing the win and the unix directories but the contents of those is for libraries CUtils does not use.
Re: docker cutils recent release not updating
Posted: Mon 21 Oct 2024 1:20 pm
by Nossie
HansR wrote: ↑Sat 19 Oct 2024 8:06 pm
Hi Ian,
Thinking this all over again I just realise the runtimes have a library for all supported possible environments. Is it likely docker does not select - or does not pass a parameter - to select the proper system? How does it handle that?
That's originally why I asked what modules were needed - lsb-release appears to work with sysinfo and was required in the build previously - from what I understand the fact it's docker should make no difference, it's just a linux distro running within the environment - so whatever a metal install uses to identify the runtime should be used in the same way.
Re: docker cutils recent release not updating
Posted: Mon 21 Oct 2024 3:03 pm
by HansR
OK, fwiw... I can reproduce exactly your error:
Code: Select all
2024-10-21 16:18:26.421 Information Diary constructor: starting
2024-10-21 16:18:26.434 Error Exception Unknown : The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
2024-10-21 16:18:26.435 Error Data (cont): Microsoft.Data.Sqlite
2024-10-21 16:18:26.476 Error Data: at Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString)
at CumulusUtils.Diary.GetDiaryDatabase() in C:\Users\hansr\Documents\GitHub\CutilsFramework\CUtilsNET8\Diary.cs:line 104
at CumulusUtils.Diary..ctor(CuSupport s) in C:\Users\hansr\Documents\GitHub\CutilsFramework\CUtilsNET8\Diary.cs:line 60
at CumulusUtils.CUtils.RealMainAsync(String[] args) in C:\Users\hansr\Documents\GitHub\CutilsFramework\CUtilsNET8\Main.cs:line 609
at CumulusUtils.CUtils.Main(String[] args) in C:\Users\hansr\Documents\GitHub\CutilsFramework\CUtilsNET8\Main.cs:line 343
2024-10-21 16:18:26.476 Error Exiting - check log file
This happens after I delete the files:
Code: Select all
SQLitePCLRaw.batteries_v2.dll
SQLitePCLRaw.core.dll
SQLitePCLRaw.provider.e_sqlite3.dll
Are you sure those files are there, valid rights, can be found, have no typo's or whatever...?
I assume you already re-copied the runtimes from the distro after complete removal?
Re: docker cutils recent release not updating
Posted: Mon 21 Oct 2024 3:29 pm
by Nossie
I'm currently rebuilding the container with some modifications and see what happens with that but yes those files exist and have the correct permissions etc.
Re: docker cutils recent release not updating
Posted: Mon 21 Oct 2024 3:44 pm
by Nossie
hmmm it's still not updating
what program or part of cutils calls those files? are there any packages that should be installed for this to be done?
Re: docker cutils recent release not updating
Posted: Mon 21 Oct 2024 4:55 pm
by HansR
Nossie wrote: ↑Mon 21 Oct 2024 3:44 pm
hmmm it's still not updating
what program or part of cutils calls those files? are there any packages that should be installed for this to be done?
It's only the diary which calls SQLite. If there is data in the database the module is generated and displayed. Without data the process of the diary stops. But SQLite is always required to read the database.
Re: docker cutils recent release not updating
Posted: Mon 21 Oct 2024 5:02 pm
by HansR
@Anybody: do you have any idea what could be a cause of Ian's problem? Cutils is working everywhere but not in Ian's docker environment where CMX (which also has SQLite) is running fine.
Re: docker cutils recent release not updating
Posted: Mon 28 Oct 2024 8:22 am
by Nossie
Hans,
when you do
dotnet --list-runtimes
what is your output? thanks.
Re: docker cutils recent release not updating
Posted: Mon 28 Oct 2024 11:58 am
by HansR
Hi Ian,
Currently away walking in the Ardennes so this has to wait until next monday (earliest).
Re: docker cutils recent release not updating
Posted: Mon 28 Oct 2024 12:07 pm
by Nossie
thanks for getting back to me
do enjoy, I'm jealous!