yuki-iptv / snap

yuki-iptv snap
MIT License
0 stars 1 forks source link

Broken multiprocessing #2

Closed Liya-q closed 9 months ago

Liya-q commented 9 months ago

Steps to reproduce:

Got error:

19:14:53.525 yuki-iptv WARNING: [TV guide, part 1] Caught exception: [Errno 13] Permission denied
19:14:53.527 yuki-iptv WARNING: Traceback (most recent call last):
  File "/snap/yuki-iptv-unofficial/9/usr/lib/yuki-iptv/./yuki-iptv.py", line 8302, in thread_tvguide_update
    .Pool(1)
  File "/usr/lib/python3.10/multiprocessing/context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 191, in __init__
    self._setup_queues()
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 346, in _setup_queues
    self._inqueue = self._ctx.SimpleQueue()
  File "/usr/lib/python3.10/multiprocessing/context.py", line 113, in SimpleQueue
    return SimpleQueue(ctx=self.get_context())
  File "/usr/lib/python3.10/multiprocessing/queues.py", line 341, in __init__
    self._rlock = ctx.Lock()
  File "/usr/lib/python3.10/multiprocessing/context.py", line 68, in Lock
    return Lock(ctx=self.get_context())
  File "/usr/lib/python3.10/multiprocessing/synchronize.py", line 162, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
  File "/usr/lib/python3.10/multiprocessing/synchronize.py", line 57, in __init__
    sl = self._semlock = _multiprocessing.SemLock(
PermissionError: [Errno 13] Permission denied
faveoled commented 9 months ago

Upstream changes required

Liya-q commented 9 months ago

Fix:

diff --git a/snapcraft.yaml b/snapcraft.yaml
index 805b880..9cbcd3c 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -102,3 +102,5 @@ plugs:
     interface: content
     target: $SNAP/data-dir/sounds
     default-provider: gtk-common-themes
+  shared-memory:
+    private: true

(add

  shared-memory:
    private: true

to the end of snapcraft.yaml file)