Skip to content
Snippets Groups Projects
  • Nadav Har'El's avatar
    68f4d147
    DHCP: Fix crash · 68f4d147
    Nadav Har'El authored
    Rarely (about once every 20 runs) we had OSV crash during boot, in the
    DHCP code. It turns out that the code first sends out the DCHP requests,
    and then creates a thread to handle the replies. When a reply arrives,
    the code wake()s the thread, but on rare occasions the thread hasn't yet
    been set up (still a null pointer) so we have a crash.
    
    Fix this by reversing the order - first create the reply handling thread,
    and only then send the request.
    68f4d147
    History
    DHCP: Fix crash
    Nadav Har'El authored
    Rarely (about once every 20 runs) we had OSV crash during boot, in the
    DHCP code. It turns out that the code first sends out the DCHP requests,
    and then creates a thread to handle the replies. When a reply arrives,
    the code wake()s the thread, but on rare occasions the thread hasn't yet
    been set up (still a null pointer) so we have a crash.
    
    Fix this by reversing the order - first create the reply handling thread,
    and only then send the request.