|
Bugzilla – Full Text Bug Listing |
| Summary: | python_plugin_unlink crashes with Python 3.12 | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Yaakov Selkowitz <yselkowi> |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | high | ||
| Priority: | low | ||
| Version: | 1.9.14 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
Yaakov Selkowitz
2023-07-18 15:36:51 MDT
This appears to be a Python bug, it is a NULL dereference in the garbage collector code. Adding a check for a NULL prev in _PyObject_GC_UNTRACK works around the problem but I've no idea if it is correct. I have committed a workaround for now until I am able to determine whether this is due to a reference counting issue in the sudo python plugin or a Python 3.12 bug. Thanks, that allows the tests to proceed further, but another error occurs: https://kojipkgs.fedoraproject.org//work/tasks/7227/103717227/build.log Expectation failed at ./regress/testhelpers.c:139: actual is <<SudoGroupPlugin.__init__ was called with arguments: () [('args', ('ModulePath=SRC_DIR/example_group_plugin.py', 'ClassName=SudoGroupPlugin')), ('version', '1.0')] SudoGroupPlugin.__init__ returned result: <example_group_plugin.SudoGroupPlugin object> SudoGroupPlugin.query was called with arguments: ('user', 'group', ('pw_name', 'pw_passwd', 1001, 101, 'pw_gecos', 'pw_dir', 'pw_shell')) SudoGroupPlugin.query returned result: <RC.REJECT: 0> >>: actual_content expected to be <<SudoGroupPlugin.__init__ was called with arguments: () [('args', ('ModulePath=SRC_DIR/example_group_plugin.py', 'ClassName=SudoGroupPlugin')), ('version', '1.0')] SudoGroupPlugin.__init__ returned result: <example_group_plugin.SudoGroupPlugin object> SudoGroupPlugin.query was called with arguments: ('user', 'group', ('pw_name', 'pw_passwd', 1001, 101, 'pw_gecos', 'pw_dir', 'pw_shell')) SudoGroupPlugin.query returned result: 0 >>: expected_output Expectation failed at ./regress/testhelpers.c:279: actual is <<0>>: verify_content(stored_str, reference_path) not expected to be <<0>>: 0 Expectation failed at ./regress/check_python_examples.c:512: actual is <<0>>: verify_log_lines(expected_path("check_example_group_plugin_is_able_to_debug.log")) not expected to be <<0>>: 0 FAILED: testcase check_example_group_plugin_is_able_to_debug() at ./regress/check_python_examples.c:1543 The output of the plugin: The error output of the plugin: check_python_examples: 58 tests run, 1 errors, 98% success rate There are other commits that fix that: https://www.sudo.ws/repos/sudo/rev/138957911238 https://www.sudo.ws/repos/sudo/rev/38f03683001d Thank you, with all the plugins/python patches post-1.9.14p2 applied, the tests now pass in Fedora rawhide with Python 3.12. Can we expect a 1.9.14p3 with these patches sometime soon? I found a better solution to the crash that doesn't involve leaking a reference and released sudo 1.9.14p3 with that change and the other Python 3.12 fixes. Thanks, I have proposed the update for Fedora rawhide and the CI scratch builds were successful. All set from my end now. |