wking / rss2email

open-source tool for Windows, Mac OS and UNIX for getting news from RSS feeds in email
http://pypi.python.org/pypi/rss2email/
GNU General Public License v2.0
273 stars 48 forks source link

flock fails on nfs file system #114

Closed lschierer closed 4 years ago

lschierer commented 5 years ago

when I try to add a feed to a new install of r2e, I get the following: Traceback (most recent call last): File "/usr/bin/r2e", line 5, in rss2email.main.run() File "/usr/lib/python3/dist-packages/rss2email/main.py", line 168, in run feeds.load(lock=lock) File "/usr/lib/python3/dist-packages/rss2email/feeds.py", line 245, in load self._load_feeds(lock=lock, require=require) File "/usr/lib/python3/dist-packages/rss2email/feeds.py", line 268, in _load_feeds _fcntl.flock(self._datafile_lock.fileno(), locktype) OSError: [Errno 9] Bad file descriptor luke@schierer@opus001:~$ r2e --version rss2email 3.9 luke@schierer@opus001:~$ python3 --version Python 3.5.2 luke@schierer@opus001:~$

My home directory is an NFS mount, I'm guessing that file system has some trouble with the flock locking.

kaashif commented 5 years ago

I think we can just use fcntl locks instead of flock locks: https://github.com/rss2email/rss2email/pull/58. Of course, fcntl locks theoretically work on NFS, but whether they actually do depends on the NFS implementation. I've only tested with home on an NFS server running on Ubuntu, and it seems to work.

Ekleog commented 4 years ago

Hello,

This repository has been deprecated for a few years now, and has been replaced by https://github.com/rss2email/rss2email .

If this issue is still relevant to you, and not fixed with v3.12.2, could you please reopen the issue there?

Cheers, Leo

lschierer commented 4 years ago

This seems to be fixed in the 3.11 version that ships with Ubuntu Focal.