Skip to content

tests: Ensure graceful resource cleaning #1618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EdwardSro
Copy link
Contributor

A SEGFAULT was observed recently on some environments with python 3.12.X.
To work around the issue and ensure that python garbage collector exiting gracefully, a new decorator was added that catches SkipTest unittest exceptions and closes the context and its underlying resources.

An a example of a segmentation fault occurrence that this test fixes: $ python3 tests/run_tests.py test_mlx5_dma_memcpy
sTraceback (most recent call last):
File "cq.pyx", line 359, in pyverbs.cq.CQEX.close
pyverbs.pyverbs_error.PyverbsRDMAError: Failed to destroy CQEX. Errno: 9, Bad file descriptor
Exception ignored in: 'pyverbs.cq.CQEX.dealloc' Traceback (most recent call last):
File "cq.pyx", line 359, in pyverbs.cq.CQEX.close
pyverbs.pyverbs_error.PyverbsRDMAError: Failed to destroy CQEX. Errno: 9, Bad file descriptor
Segmentation fault (core dumped)

A SEGFAULT was observed recently on some environments with
python 3.12.X.
To work around the issue and ensure that python garbage collector exiting
gracefully, a new decorator was added that catches SkipTest unittest
exceptions and closes the context and its underlying resources.

An a example of a segmentation fault occurrence that this test fixes:
$ python3 tests/run_tests.py test_mlx5_dma_memcpy
sTraceback (most recent call last):
  File "cq.pyx", line 359, in pyverbs.cq.CQEX.close
pyverbs.pyverbs_error.PyverbsRDMAError: Failed to destroy CQEX. Errno:
9, Bad file descriptor
Exception ignored in: 'pyverbs.cq.CQEX.__dealloc__'
Traceback (most recent call last):
  File "cq.pyx", line 359, in pyverbs.cq.CQEX.close
pyverbs.pyverbs_error.PyverbsRDMAError: Failed to destroy CQEX. Errno:
9, Bad file descriptor
Segmentation fault (core dumped)

Signed-off-by: Edward Srouji <[email protected]>
@jgunthorpe
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants