|
From: Luca T. <no...@gi...> - 2026-10-11 10:08:03
|
Branch: refs/heads/master Home: https://github.com/LinuxCNC/linuxcnc Commit: 83b536826b12a571e203444c3cb1d9581391fad6 https://github.com/LinuxCNC/linuxcnc/commit/83b536826b12a571e203444c3cb1d9581391fad6 Author: Luca Toniolo <107...@us...> Date: 2026-10-10 (Sat, 10 Oct 2026) Changed paths: M src/emc/tooldata/tooldata_mmap.cc M src/emc/usr_intf/axis/extensions/emcmodule.cc M tests/ui-smoke/_lib/drive.py Log Message: ----------- emcmodule: retry the tool mmap attach in stat.poll() The first stat.poll() in a process tried tool_mmap_user() once. If task had not created ~/.tool.mmap yet, a static flag latched and every later poll() returned NULL without setting an exception, so Python raised SystemError forever and a new linuxcnc.stat() did not help. A stale ~/.tool.mmap from an earlier run hid it; isolated test runs and a fresh HOME failed every time. Retry the attach on each poll until it succeeds and leave initialized at 0 meanwhile, so tool_table and toolinfo report no data instead of touching a NULL mapping. poll() warns once, and says when the mmap became available, so the warning does not read as a failure (hdiethelm asked for that after hunting the cause in CI logs). tool_mmap_user() warns once and names the file and the step that failed: open or fstat with the errno, or a file still shorter than the mapping. The creator truncates before extending, and mapping the file in that window would SIGBUS on first access, so a short file counts as absent. BsAtHome asked for the reason and the size_t comparison. Drop the drive.py comment that described the SystemError as normal startup noise. Fixes #4656 Commit: a7e0a636fe20af5c7648e29098dc0caf1c1cd388 https://github.com/LinuxCNC/linuxcnc/commit/a7e0a636fe20af5c7648e29098dc0caf1c1cd388 Author: Luca Toniolo <107...@us...> Date: 2026-10-11 (Sun, 11 Oct 2026) Changed paths: M src/emc/tooldata/tooldata_mmap.cc M src/emc/usr_intf/axis/extensions/emcmodule.cc M tests/ui-smoke/_lib/drive.py Log Message: ----------- Merge pull request #4658 from grandixximo/tool-mmap-poll-retry emcmodule: retry the tool mmap attach in stat.poll() Compare: https://github.com/LinuxCNC/linuxcnc/compare/6c300638fdb2...a7e0a636fe20 To unsubscribe from these emails, change your notification settings at https://github.com/LinuxCNC/linuxcnc/settings/notifications |