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

GLib-ERROR **: Creating pipes for GWakeup: Too many open files Trace/breakpoint trap #62

Open
eduardomozart opened this issue Sep 6, 2021 · 1 comment

Comments

@eduardomozart
Copy link

eduardomozart commented Sep 6, 2021

I'm using the latest build from Mupen64plus-qt (1.14-git:cb46228) into Deepin 20.2.3 (based on Debian 10 "Buster" amd64). I started scanning my ROMs (946 ROMs) with the "Download Game Information (thegamesdb.net)" option checked and into the 586 ROM the program crashes with the following error message:

$ ./mupen64plus-qt
(process:1526): GLib-ERROR **: 12:39:37.842: Creating pipes for GWakeup: Too many open files
Trace/breakpoint trap

The final result is that there's 586 games into the Mupen64plus-qt instead of 946 ROMs.

It happens only when the option "Download Game Information (thegamesdb.net)" option is checked - it scan all the 946 ROMs files when this option is unchecked. I'm not sure, but I believe it's happening because Mupen64plus-qt process is opening too much files at once - maybe it's not closing the file handlers from the last scanned ROMs and cover arts? I didn't dig into the source code, so I'm not sure if these are the issue.

If I can run some command or tests to troubleshoot this issue, please let me know. Maybe these commands output may help:

$ cat /proc/sys/fs/file-max
9223372036854775807
$ ulimit -Hn
1048576
$ ulimit -Sn
1024
$ sysctl fs.inotify
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 62812

The following command (file descriptor that contains an entry for each file the process has open) is always increasing it's value:

$ ls -la  /proc/$(pidof mupen64plus-qt)/fd | wc -l
1008
$ ls -la  /proc/$(pidof mupen64plus-qt)/fd | wc -l
1009

It hangs about when this number is near to ''1024'' files descriptors opened. I believe it hangs when it reaches the "soft" limit (''ulimit -Sn'').

This error do not happens when I scan my ROM library for the second time after it hangs. I believe that it happens because there already is information into the cache_v2 folder (/home/leo/.local/share/mupen64plus-qt/cache_v2) so a file handler isn't opened for already downloaded information ROMs, so all 946 ROMs are showed into the program and it's information is all downloaded from TheGameDB.

@eduardomozart eduardomozart changed the title (process:1526): GLib-ERROR **: 12:39:37.842: Creating pipes for GWakeup: Too many open files Trace/breakpoint trap GLib-ERROR **: 12:39:37.842: Creating pipes for GWakeup: Too many open files Trace/breakpoint trap Sep 6, 2021
@eduardomozart eduardomozart changed the title GLib-ERROR **: 12:39:37.842: Creating pipes for GWakeup: Too many open files Trace/breakpoint trap GLib-ERROR **: Creating pipes for GWakeup: Too many open files Trace/breakpoint trap Sep 6, 2021
@dh4
Copy link
Owner

dh4 commented Sep 9, 2021

Just a cursory look through the source code and I didn't find any file objects it's leaving open. I'll have to take a deeper look into this to find out why it's occurring when I get a chance. Thanks for reporting this.

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

2 participants