kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #22484
libcurl github race condition
Just a heads up as I fix this, there's a race condition with how
libcurl in KiCad is implemented on Windows involving openssl.
Turns out openssl being as trashy as it is has all kinds of thread
safety issues without linking against it directly and doing something
stupid (use its own locking functions) at thread level. I don't want
to know why they have issues even doing a sha512 hash separately in
threads, it's just ridiculous.
OSX which no longer uses openssl isn't affected. Linux distros with
openssl based libcurl are affected but theres many distros now using
ntls or gnutls in place of openssl. So only windows users may be
getting an ~occasional crash.~
My proposed solution:
1. Toss concurrent downloading out the window. It's a horrible idea.
No package manager does this (apt, yum, Steam, Windows Update, etc).
You risk tripping firewalls and just split your bandwidth over
multiple connections. You can even peg your CPU with the https
overhead attempting to do it simultaneously on 40 separate
connections. Actually on that note, they'll block each other if you
exist your system entropy on Linux momentarily.
2. Add a "update progress" UI, its completely stupid that when you
open CVPCB that it silently tries to update your 30+ libraries in the
background with no indication. This is really bad on users on bad
connections.
Follow ups