Cannot set spice connection after rebooting
I am trying to add over-the-air (OTA) updates to the my spice client program, but sometimes the new spice connection cannot setup and I digged in the process and find the setting up process got stuck as below:
-->spice_channel_read() //src/spice-channel.c line:1135
--> g_coroutine_socket_wait(&c->coroutine, c->sock, cond); //line:1063
Then the program got stuck here, the condition happened after every 30~40 times.
I was wondering if this relate to previous spice connection, the rough process of rebooting are:
1）initial spice connection is setup, spice clint(pid:parent) <-> spice server,
2) then parent pid fork and execv new program
pid:parent -----> exit(0)
---->fork()--->pid:child---->spice connect---->spice server 3)The previous spice connection is disconnect after parent pid is exited. So we can setup new connection I have no idea how to debug this issue, any tips on this would be appreciate!