mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
Trying to scan paths without permission causes a segfault #374
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lbeltrame on GitHub (Feb 2, 2019).
Describe the bug
I mistakenly forgot to fix the permissions of a few of my photos that were being scanned by Jellyfin. One evening I noticed that the kernel had detected loads and loads of segfaults in dotnet. A quick look at the systemd journal showed a path Jellyfin could not access, leading up to a crash.
To Reproduce
chmod u-r)Expected behavior
No crash.
Logs
System (please complete the following information):
@101100 commented on GitHub (May 13, 2019):
I had a similar issue with a cover art file running under docker:
System (please complete the following information):
@stale[bot] commented on GitHub (Jul 29, 2019):
Issues go stale after 60d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 7d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on Matrix or Social Media.
@101100 commented on GitHub (Aug 6, 2019):
This is still an issue:
System:
Ubuntu 18.04.1 LTS
Browser: not applicable
Jellyfin Version: 10.3.7 (via official docker image)
@stale[bot] commented on GitHub (Nov 4, 2019):
Issues go stale after 90d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 14d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on Matrix or Social Media.
@101100 commented on GitHub (Nov 4, 2019):
@anthonylavado If you'd like, I can test this again on the latest build, but I suspect it isn't fixed yet based on the release notes.
@GeoffreyFrogeye commented on GitHub (Dec 5, 2019):
Can confirm it is still a problem. For me it happens when creating a collage. I can run jellyfin as many times as I want, it will always crash aout 1 minute after launch when re scanning the library.
Adding reading rights fixes the segmentation fault. Inaccessible files seem to cause an issue, however inacessible directories only seem to prevent the directory watcher from working (which is another issue but minor).
I don't have a stack trace as others, so here's a log with file activity information.
Seems like it tries twice before giving up.
@DarkSkyGhost commented on GitHub (Jan 21, 2020):
I have the same problem:
[2020-01-21 16:51:54.156 +02:00] [ERR] Error in Directory watcher for: "/music" System.UnauthorizedAccessException: Access to the path '/music/Christoph de Babalon/[2018] Exquisite Angst' is denied. ---> System.IO.IOException: Permission denied --- End of inner exception stack trace --- [2020-01-21 16:51:54.161 +02:00] [INF] Stopping directory watching for path "/music"I can access the folder in question as docker user normally inside the container.
Only the scanner fails.
Happens to a lot of random folders.
No issues with other library types.
Docker user has all the required permissions.
@101100 commented on GitHub (Jan 21, 2020):
@DarkSkyGhost That would be a different issue if the permissions are actually set. This issue is for Jellyfin crashing instead of gracefully handling permission errors.
@stale[bot] commented on GitHub (May 20, 2020):
This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.
@101100 commented on GitHub (May 25, 2020):
I will see if I can reproduce this again.
@101100 commented on GitHub (May 25, 2020):
The exception is no longer in the log, but making a cover art image unreadable by Jellyfin causes the server to restart when that artist is viewed in the web UI. Tested with Jellyfin 10.5.5 using the official Docker image.
@dkanada This isn't stale and so it might deserve to get the "To do" label back.
@ferferga commented on GitHub (Mar 9, 2021):
@101100 @lbeltrame @GeoffreyFrogeye @DarkSkyGhost Can you gus please check in 10.7. I tried to reproduce and it seems that they're handled gracefully now.
@101100 commented on GitHub (Mar 9, 2021):
@ferferga I can confirm that removing permissions from a cover art just results in what looks like a very blurry cover art image and restoring permissions and reloading returns the correct cover art. Missing permissions on a song results in an error if you play, but doesn't crash the server and restoring the permission allows the song to play right away. Thanks!
@ferferga commented on GitHub (Mar 9, 2021):
@101100 Great, thank you very much for testing!
Closing this