kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #21523
Re: Occasional hang in Cvpcb when retrieving footprint libraries from github
Kristian Nielsen <knielsen@xxxxxxxxxxxxxxx> writes:
> Since I am able to reproduce, even in a single-threaded configuration, I
> will poke around a bit and see if I can figure out what is going on.
Hm, the problem is actually just that there is no timeout in the code for
the download of the individual footprint .zip files. So if the network
connection gets stuck, Cvpcb hangs forever with an unresponsive GUI.
Unfortunately, I did not spot an easy way to set a timeout for the avhttp
request. Maybe Mark Roszko's libcurl patch will make this easy to add. It
would be nice that the GUI would not get stuck, of course, but if most
people are unaffected, maybe not so critical just now. I wonder if this is
occasional Github overload, or just some problem with my network connection.
For anyone curious: the tcp connection gets stuck in an interesting way,
that is what confused me at first and made me disregard just a broken tcp
connection:
17:02:27.417749 IP codeload.github.com.https > urd.37817: Flags [.], seq 1:1425, ack 296, win 15, options [nop,nop,TS val 1504320372 ecr 7315069], length 1424
17:02:27.417786 IP urd.37817 > codeload.github.com.https: Flags [.], ack 1425, win 251, options [nop,nop,TS val 7315104 ecr 1504320372], length 0
17:04:27.416054 IP codeload.github.com.https > urd.37817: Flags [F.], seq 3029, ack 296, win 15, options [nop,nop,TS val 1504350372 ecr 7315104], length 0
17:04:27.416079 IP urd.37817 > codeload.github.com.https: Flags [.], ack 1425, win 251, options [nop,nop,TS val 7345103 ecr 1504320372,nop,nop,sack 1 {3029:3030}], length 0
The FIN packet from the github server has sequence number 3029, but the
client has only seen sequence number 1425, so some packets got lost. This
causes the FIN to be disregarded by the client, and the connection to get
stuck.
(Of course a tcp connection can get stuck for many reasons, in the general
case. This just happened to be the pattern I saw in multiple hangs on my
machine, for some odd reason).
Hope this helps,
- Kristian.
References