← Back to team overview

kicad-developers team mailing list archive

Re: libcurl github race condition

 

On 1/10/2016 7:49 PM, Mark Roszko wrote:
> 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.

This is easy enough to do by disabling the worker threads in
common/footprint_info.cpp.

> 
> 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.

Single threading would make this much more doable.

> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References