Skip to content
Snippets Groups Projects
  1. Apr 27, 2024
  2. Apr 26, 2024
  3. Apr 24, 2024
  4. Apr 22, 2024
  5. Apr 20, 2024
  6. Apr 19, 2024
  7. Apr 11, 2024
  8. Apr 09, 2024
    • Arek Hiler's avatar
    • Esme Povirk's avatar
    • Arek Hiler's avatar
      Mark threads for suspend and continue exiting soon after. · 05dbc5cc
      Arek Hiler authored
      New threads cannot be created due to the `shutting_down` barrier and any
      existing thread will get suspended as soon as they try to continue their
      managed execution. We have to wait for them to reach suspended state as
      otherwise they will race against cleanup done by
      mono_runtime_quit_internal() and may reference already tore down data
      structure.
      
      Sadly, if one of the threads is in a native call it won't be able to
      enter suspend at all.
      
      This may happen e.g. for services using WinSW wrapper which end up
      StartServiceCtrlDispatcherW() via a call to
      System.ServiceProcess.ServiceBase.Run(). The wrapper may tray to call
      System.Environment.Exit() if the wrapped process exits with a non-zero
      exit code.
      
      We should wait some sensible amount of time before giving up and trying
      continuing the shutdown anyway.
      
      A lot of the old code was there from an older implementation that was
      calling `wait_for_tids()`. It's been reworked multiple times but  was
      never fully cleaned up. Turns there's no need to open the handles and
      have to care about the MONO_W32HANDLE_MAXIMUM_WAIT_OBJECTS limit any
      more.
      05dbc5cc
  9. Apr 08, 2024
  10. Apr 06, 2024
  11. Apr 05, 2024
  12. Apr 02, 2024
  13. Apr 01, 2024
  14. Mar 28, 2024
  15. Mar 27, 2024
  16. Mar 25, 2024
  17. Mar 22, 2024
  18. Mar 19, 2024
  19. Mar 18, 2024
  20. Mar 16, 2024
  21. Mar 15, 2024
Loading