mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
[Issue]: Jellyfin server crashes on 2GB jetson nano with stack overflow #4935
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#4935
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @pwalsh0 on GitHub (Jun 30, 2023).
Please describe your bug
Jetson nano only has 2gb ram, but I have increased swap file to 4GB size.
Setup is jetson nano 2gb with mounted 4TB nfs media drive (/media/bigdrive). Running cleanly flashed nvidia jetpack 4.6 image.
Run command:
docker run -d -e DOTNET_USE_POLLING_FILE_WATCHER=1 -v /srv/jellyfin/config:/config -v /srv/jellyfin/cache:/cache -v /media:/media --net=host jellyfin/jellyfin:latest
With this command it starts up ok until it starts to scan for files, then crashes:
09:12:48] [INF] [1] Main: Startup complete 0:00:15.7856008
[09:12:48] [INF] [7] Emby.Server.Implementations.IO.LibraryMonitor: Watching directory /media/bigdrive/Movies
Stack overflow.
Repeat 174588 times:
at System.IO.FileSystemWatcher+RunningInstance+WatchedDirectory.Write(System.Text.StringBuilder, Boolean)
If I turn off the file watcher it runs for a lot longer, but usually seems to crash eventually overnight.
docker run -d -e DOTNET_USE_POLLING_FILE_WATCHER=0 -v /srv/jellyfin/config:/config -v /srv/jellyfin/cache:/cache -v /media:/media --net=host jellyfin/jellyfin:latest
[05:51:31] [INF] [23] Emby.Server.Implementations.IO.LibraryMonitor: Watching directory /media/bigdrive/Movies
Stack overflow.
Repeat 130944 times:
at System.IO.FileSystemWatcher+RunningInstance+WatchedDirectory.Write(System.Text.StringBuilder, Boolean)
Is there some memory leak here, or just too many nested function calls? Is it because I use ntfs for the drive? Ubuntu 18 has ntfs bugs? I would prefer to reformat it, but it needs ntfs so I can move it around and plug it into tvs and other devices.
Can I increase the default heap size or other? Also might try disabling realtime file monitoring?
Note that everything else works fine. I have disabled transcoding and am not using the jetsons gpu at all.
Jellyfin Version
10.8.z
if other:
No response
Environment
Jellyfin logs
FFmpeg logs
No response
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct
@JPVenson commented on GitHub (Jul 1, 2023):
Can it be that you build yourself a loop in your filesystem? like with symlinks?
@spectrachrome commented on GitHub (Jul 25, 2023):
This also happens on the 4GB version of the Jetson Nano, without any symlinks made in the file system where the media is stored.
@spectrachrome commented on GitHub (Sep 26, 2023):
Do you care at all, Jellyfin Team?
This is a very frustrating bug which crashes the media server at least once a week, sometimes for days, until it magically works again.
@JPVenson commented on GitHub (Sep 26, 2023):
https://jellyfin.org/docs/general/community-standards
Please be aware that we all do this in our free time and sometimes we just dont have the time to respond to all issues fast.
@spectrachrome commented on GitHub (Sep 26, 2023):
Okay, sorry. I was a bit disappointed to see this issue not being addressed all summer long and generally didn't have the feeling of this actually being considered.
Is it possible to configure Jellyfin in a way which prevents corruption of the configuration and data files? The error is always somewhere in the
configdirectory and occurs in a random fashion. Thanks in advance.@JPVenson commented on GitHub (Sep 26, 2023):
Well dont get me wrong, this 95% points to an issue with the underlying storage system. Thats why nobody touched it after my comment. It really does not sound like an issue with JF itself.
Config directory? The log you posted is related to the issue being in
/media/bigdrive/Movies@spectrachrome commented on GitHub (Sep 26, 2023):
The log is not by me, I just have the same issue and device, albeit with double the RAM.
The small eMMC space on the Jetson did cause issues for me once, but right now the Jellyfin config and cache reside in a dedicated folder on a 8TB HDD where the media is stored. The Docker data root is on an internally mounted 1TB SSD. It caught me quite off-guard when the Jellyfin server crashed again with this error two weeks after setting it up with enough space and clean Docker volumes.
You may be right, there is definitely an issue with storage, but I believe there could be a bug in how Jellyfin handles or saves data. The error causing the stack overflow is different each time. Before it magically fixed itself again a few minutes ago, the log presented me with this:
It seems there is some data corruption at play here within the
configdirectory.Please correct me if you think otherwise!
@JPVenson commented on GitHub (Sep 26, 2023):
Well that would be a whole different topic. Also that really looks like corrupted data, but what could JF do there? its not really JFs mission to ensure you dont provide stable Disk space, that one is on you^^. Backups are your only real safeguard against that.
Also please note we generally do advice against using single board pcs as they are known to have issues with all that:
gestures vaguely at all this messages
@spectrachrome commented on GitHub (Sep 26, 2023):
Could you elaborate on what you mean by "stable disk space"? I don't think the drives are at fault here.
Understood.
@JPVenson commented on GitHub (Sep 26, 2023):
Well there could be a plethora of issues at play here: Bad USB connection, Bad drive, Overloaded OS, unsafe shutdown, rogue backup programs overwriting stuff etc.
@spectrachrome commented on GitHub (Sep 26, 2023):
Some context: The connection is a USB3 bridge with soldered ports. Electricity is basically never turned off for this thing, so unsafe shutdown while writing data is very unlikely. I backup manually and all of my apps run in Docker (which I assume isolates things well enough).
A common PC is a bit too power-hungry for the job if everything is H.264 already. 😉
Unfortunately, since these random storage bugs also occurred on an Odroid N2+ board with a brand-new 256GB SD card and no other services running, I have my doubts that hardware or system processes cause the error, especially when running in Docker. My stack overflow happens when Jellyfin loads the
jellyfin-configvolume, which contains corrupted data to which only Jellyfin has write access - after it crashed out of the blue and failed to deliver the current stream. There is no 4K content and also no transcoding happening.Anyway, I'm sorry for misusing this thread for what could well be a very different problem to the one OP had, and if you consider my concerns valid I'm happy to open a separate issue. This thread felt like the correct location to talk about this given the system requirements.
@JPVenson commented on GitHub (Sep 26, 2023):
Well @spectrachrome i would say pay our forum or better our chat a visit with some full logs where we could evaluate the issue first. From what you said its either a system or a configuration issue i would very confidently say.
@jellyfin-bot commented on GitHub (Jan 25, 2024):
This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.
If you have any questions you can use one of several ways to contact us.
@jellyfin-bot commented on GitHub (Feb 17, 2024):
This issue was closed due to inactivity.