Isaac Lab 3.0 is GA. One missing close() locked log files on Windows
说明与用途
Isaac Lab 3.0 在 Windows 上的两个单元测试因日志文件未关闭而失败。添加一行代码关闭已移除的处理器后,所有测试均通过。
问题
Two unit tests in Isaac Lab 3.0 failed on Windows because log files remained open after reconfiguration, causing PermissionError: [WinError 32].
结果
All logger tests now pass on Windows; the fix aligns Isaac Lab’s logging with Python’s logging.basicConfig behavior and prevents file lock regressions on any OS.
工作流
- 1. Identify failing tests with PermissionError: [WinError 32].
- 2. Inspect configure_logging to see it removes but does not close old FileHandlers.
- 3. Add a loop to close each removed handler: for handler in root_logger.handlers[:]: root_logger.removeHandler(handler); handler.close()
- 4. Update tests to reconfigure logging before cleanup and assert handler stream is closed.
- 5. Submit PR #8809, pass CI, merge within 28 hours.
证据
When Isaac Lab reconfigured its logging, it unhooked the old handlers from the logger but never closed them, so the old log file stayed open in the background.
Close what you remove. The loop that unhooks each old handler now also closes it: for handler in root_logger.handlers[:]: root_logger.removeHandler(handler) handler.close()
Both now reconfigure logging before cleanup, which releases the file, and one of them asserts that the replaced handler's stream is gone.
- 记录日期: 2026-11-01T03:29:02.778Z