Skip to content
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

leaked share_memory #9

Open
JXQI opened this issue Sep 10, 2023 · 0 comments
Open

leaked share_memory #9

JXQI opened this issue Sep 10, 2023 · 0 comments

Comments

@JXQI
Copy link

JXQI commented Sep 10, 2023

when I run this code:
`
lobe_labe_map = snp.from_array(lobe_labe_map)
lesion_mask = snp.from_array(lesion_mask)
pixel_array = snp.from_array(pixel_array)
spacing = snp.from_array(spacing)

with Pool(5) as p:
func = partial(map_function, lobe_labe_map, pixel_array, spacing, is_pnmonia_flag)
res = p.map_async(func,KEYS.values())

lobe_labe_map.close()
lesion_mask.close()
pixel_array.close()
spacing.close()
lobe_labe_map.unlink()
lesion_mask.unlink()
pixel_array.unlink()
spacing.unlink()
`
the func just use shared numpy, do not change anything.

that happen:

/usr/local/lib/python3.7/multiprocessing/resource_tracker.py:218: UserWarning: resource_tracker: There appear to be 3 leaked shared_memory objects to clean up at shutdown
(len(rtype_cache), rtype))
/usr/local/lib/python3.7/multiprocessing/resource_tracker.py:229: UserWarning: resource_tracker: '//psm_7dd83f76': [Errno 2] No such file or directory: '//psm_7dd83f76'
warnings.warn('resource_tracker: %r: %s' % (name, e))
/usr/local/lib/python3.7/multiprocessing/resource_tracker.py:229: UserWarning: resource_tracker: '//psm_31aba6be': [Errno 2] No such file or directory: '//psm_31aba6be'
warnings.warn('resource_tracker: %r: %s' % (name, e))
/usr/local/lib/python3.7/multiprocessing/resource_tracker.py:229: UserWarning: resource_tracker: '//psm_0cc2cdc6': [Errno 2] No such file or directory: '//psm_0cc2cdc6'
warnings.warn('resource_tracker: %r: %s' % (name, e))

this why?please

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

No branches or pull requests

1 participant