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

Question about the memory mapping of virt-manager #520

Closed
masatake opened this issue May 6, 2023 · 2 comments
Closed

Question about the memory mapping of virt-manager #520

masatake opened this issue May 6, 2023 · 2 comments

Comments

@masatake
Copy link
Contributor

masatake commented May 6, 2023

For years, I have gotten random segfaults.
Today, I found the reason with gdb.

image

The reason is realloc returns NULL with errno = ENOMEM.

The virt-manager process made too many memory mappings:

$ ps -aef | grep virt-ma   
yamato   2515711       1  8 May05 ?        03:02:44 /usr/bin/python3 /usr/bin/virt-manager
yamato   2727748 2727442  0 02:03 pts/16   00:00:00 grep --color=auto virt-ma
$ pmap 2515711 | wc -l  
65534
$ cat /proc/sys/vm/max_map_count 
65530
$ pmap 2515711 | grep ffi | wc -l
64356
$ pmap 2515711 | grep ffi | head 
00007fc46af9e000      4K rw-s- memfd:libffi (deleted)
00007fc46af9f000      4K r-xs- memfd:libffi (deleted)
00007fc46afa0000      4K rw-s- memfd:libffi (deleted)
00007fc46afa1000      4K r-xs- memfd:libffi (deleted)
00007fc46afa2000      4K rw-s- memfd:libffi (deleted)
00007fc46afa3000      4K r-xs- memfd:libffi (deleted)
00007fc46afa4000      4K rw-s- memfd:libffi (deleted)
00007fc46afa5000      4K r-xs- memfd:libffi (deleted)
00007fc46afa6000      4K rw-s- memfd:libffi (deleted)
00007fc46afa7000      4K r-xs- memfd:libffi (deleted)

Do you expect virt-manager maps so many memfds via libffi?

Distro: Fedora 37

I'm still in the stage of understanding my issue. So I have not open an issue on distro's bug tracker.

@masatake
Copy link
Contributor Author

It seems that libvirt makes too many memory mappings.
I opened https://gitlab.com/libvirt/libvirt/-/merge_requests/275 as the first step for solving my issue.

@masatake
Copy link
Contributor Author

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