Segfault triggered during cleanup on cython 3.2.4

4 views
Skip to first unread message

Vizonex

unread,
Apr 3, 2026, 1:34:13 PM (11 days ago) Apr 3
to cython-users
Decided to place this here instead on github as this may be fixable however I don't know.

While attempting to make my own library for making a callable-like object
That could run a little faster than pluggy and I'm making an asynchronous library for writing plugin with event-styled wrappers which is a little bit different from pluggy, this library was meant to be it's building block but I also seperated it incase users wanted to try using it for different purposes.

Onto the Meat of the problem: I bumped into a bug where when the module cleans up under random circumstances it segfaults. I originally got rid of @cython.freelist but originally I left it at 250 assuming users would make around that many of these at any given time. I got rid of this when I saw that it was segfaulting thinking that it would cure the problem but it did not.

Github repo to source. https://github.com/Vizonex/reductable-params
Source code: https://github.com/Vizonex/reductable-params/blob/e182a5595879e1783f932ee6d1b3c3388e7c0997/src/reductable_params/_reduce_c.pyx#L1

Note that the C Parts I've made are not at fault but rather it segfaults during module cleanup, I mainly added the C part in to be an extra optimization which I've discovered that the packing portion is not at fault. In my workflows only 3.14 triggers the segfault but I've seen it happen on other versions elsewhere.

Reply all
Reply to author
Forward
0 new messages