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
process using the imgcreate module, or one of the libraries used by that process, leaked a reference to the filesystem. #258
Comments
I have the same issue and actively looking to what is happening. In a last %post step, I have added the call to lsof to see what are the files are left opened. Here is the list COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME |
Thanks, is there a workaround that you suggest? |
I have verified that these issues show up even with the kickstart files for the official Fedora spins too. So, for instance, with Live Workstation, Live LXDE, Live XFCE: all of them end up at the same error. So, there is a major issue. |
I believe the issue is present for all OS creation with livecd-tools version 30 or better. The exact code change that produces the error is 9095966. I have written a work around in a code change in fs.py that is the following in order to have no error report by use of lazy unmounting the /sys. I do not feel it is dangerous for /sys to allow to continue since all previous livecd-tools in earlier Fedora did it that way.
|
Thanks, interesting, i was able to spin my LiveCDs up until at least Fedora 34. (At least that is the latest spin whose copy I have: I don't recall if I made any more after that.) I did not run into this problem before then. Lets hope that the issue is fixed. It is unclear to me how the Live ISOs that Fedora ships are made. Not using these kickstart files? |
My guess would be that they may use headless systems. The files opened as I reported are related to gnome and login. |
Should we also open a bug report on bugzilla? There does not seem to be much going on here. The last time anything was closed here was over six months ago. |
Maybe. But it may be handled by the owner of this livecd-tools code. And when fixed, it may be requested to be pulled into Fedora update mechanism. For the moment, I am happy with my change to make my project progress and for sure it is valuable to have it officially fixed. |
Where do you patch this file. On the /usr/lib/python3.11/site-packages/imgcreate/fs.py of the local machine? I guess we can not do this using the kickstart file? |
Yes, the changed file is /usr/lib/python3.11/site-packages/imgcreate/fs.py. Be careful as if new new livecd-tools is released and update is going on you may loose this fix. |
Btw, I wanted to mention that this patch works for me too. I hope that it, or an appropriate modification, will be adopted. Thanks! |
I can confirm this patch worked for me too. I got the same "leaked a reference to the filesystem" error when trying to compile my own kickstart and also fedora-live-workstation.ks. For my own reference, here's my cheat sheet to get things working: Move to directory to apply patch Backup file Create patch - add content of patch above Apply patch. When asked for file name, enter: fs.py Then you should be able to compile your kickstart with something like: |
After some debugging it seems I've found the issue (the "leaking reference"). In In my case it was that when the script were to unmount the Basically,
|
I confirm this bug, a major issue rendering the tool unusable without the aforementioned workarounds. |
What happens if we remove the faulty test altogether for BindChrootMount()? diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index b144e4e..7c781f6 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -1050,7 +1050,7 @@ class BindChrootMount():
self.mounted = True
def remount(self, ops):
- if not self.mounted or not os.path.ismount(self.dest):
+ if not self.mounted:
self.mounted = False
return
@@ -1062,7 +1062,7 @@ class BindChrootMount():
(remount_ops, self.src, self.dest))
def unmount(self):
- if not self.mounted or not os.path.ismount(self.dest):
+ if not self.mounted:
self.mounted = False
return |
My livecd command gives the following error: here is the latter part of the error messages:
Not sure what the bug is, or how to fix it. Happy to provide more information as needed.
The text was updated successfully, but these errors were encountered: