Skip to content
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

Jellyfin stops responding if I scan or stream #3558

Closed
aussetg opened this issue Jul 14, 2020 · 47 comments · Fixed by #3831
Closed

Jellyfin stops responding if I scan or stream #3558

aussetg opened this issue Jul 14, 2020 · 47 comments · Fixed by #3831
Labels
bug Something isn't working

Comments

@aussetg
Copy link

aussetg commented Jul 14, 2020

My symptoms are EXACTLY those: linuxserver/docker-jellyfin#28

Describe the bug
If I scan libraries or transcode something Jellyfin stops responding. It's not crashed but the Web UI does't respond anymore and nothing is being written to the logs

System (please complete the following information):

  • OS: Debian
  • Virtualization: LXC
  • Clients: tested on Firefox, Safari iOS and iOS
  • Browser:Firefox 78
  • Jellyfin Version: 10.5.5
  • Playback: Transcode
  • Installed Plugins:
  • Reverse Proxy: Caddy 2 but same if accessed directly
  • Base URL: none
  • Networking: Bridge
  • Storage: local mount
  • Harware: Ryzen 1700 and Nvidia 1650 Super

To Reproduce
Go to a file, force refresh metadata. Immediately hangs

or

Go to a file, force streaming (starts very slowly somehow), skips around, will freeze eventually

Expected behavior
Scan to preceed

Logs

root@jellyfin:/# tail -f /var/log/jellyfin/jellyfin20200714.log
[2020-07-14 14:10:01.043 +00:00] [INF] GetPostedPlaybackInfo profile: DeviceProfile { Name: null, Id: null, Identification: null, FriendlyName: null, Manufacturer: null, ManufacturerUrl: null, ModelName: null, ModelDescription: null, ModelNumber: null, ModelUrl: null, SerialNumber: null, EnableAlbumArtInDidl: False, EnableSingleAlbumArtLimit: False, EnableSingleSubtitleLimit: False, SupportedMediaTypes: "Audio,Photo,Video", UserId: null, AlbumArtPn: null, MaxAlbumArtWidth: 0, MaxAlbumArtHeight: 0, MaxIconWidth: null, MaxIconHeight: null, MaxStreamingBitrate: 120000000, MaxStaticBitrate: 100000000, MusicStreamingTranscodingBitrate: 192000, MaxStaticMusicBitrate: null, SonyAggregationFlags: null, ProtocolInfo: null, TimelineOffsetSeconds: 0, RequiresPlainVideoItems: False, RequiresPlainFolders: False, EnableMSMediaReceiverRegistrar: False, IgnoreTranscodeByteRangeRequests: False, XmlRootAttributes: [], DirectPlayProfiles: [DirectPlayProfile { Container: "mp4,m4v", AudioCodec: "aac,opus,flac,vorbis", VideoCodec: "h264,vp8,vp9", Type: Video }, DirectPlayProfile { Container: "opus", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "mp3", AudioCodec: "mp3", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "aac", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "m4a,m4b", AudioCodec: "aac", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "flac", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webma,webm", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "wav", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "ogg", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webm", AudioCodec: "vorbis,opus", VideoCodec: "VP8", Type: Video }, DirectPlayProfile { Container: "webm", AudioCodec: "vorbis,opus", VideoCodec: "VP9", Type: Video }], TranscodingProfiles: [TranscodingProfile { Container: "ts", Type: Audio, VideoCodec: null, AudioCodec: "aac", Protocol: "hls", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 1, SegmentLength: 0, BreakOnNonKeyFrames: True }, TranscodingProfile { Container: "aac", Type: Audio, VideoCodec: null, AudioCodec: "aac", Protocol: "http", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False }, TranscodingProfile { Container: "mp3", Type: Audio, VideoCodec: null, AudioCodec: "mp3", Protocol: "http", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False }, TranscodingProfile { Container: "opus", Type: Audio, VideoCodec: null, AudioCodec: "opus", Protocol: "http", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False }, TranscodingProfile { Container: "wav", Type: Audio, VideoCodec: null, AudioCodec: "wav", Protocol: "http", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False }, TranscodingProfile { Container: "opus", Type: Audio, VideoCodec: null, AudioCodec: "opus", Protocol: "http", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Static, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False }, TranscodingProfile { Container: "mp3", Type: Audio, VideoCodec: null, AudioCodec: "mp3", Protocol: "http", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Static, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False }, TranscodingProfile { Container: "aac", Type: Audio, VideoCodec: null, AudioCodec: "aac", Protocol: "http", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Static, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False }, TranscodingProfile { Container: "wav", Type: Audio, VideoCodec: null, AudioCodec: "wav", Protocol: "http", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Static, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False }, TranscodingProfile { Container: "ts", Type: Video, VideoCodec: "h264", AudioCodec: "aac", Protocol: "hls", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 1, SegmentLength: 0, BreakOnNonKeyFrames: True }, TranscodingProfile { Container: "webm", Type: Video, VideoCodec: "vpx", AudioCodec: "vorbis", Protocol: "http", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: "2", MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False }, TranscodingProfile { Container: "mp4", Type: Video, VideoCodec: "h264", AudioCodec: "aac,opus,flac,vorbis", Protocol: "http", EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Static, EnableSubtitlesInManifest: False, MaxAudioChannels: null, MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False }], ContainerProfiles: [], CodecProfiles: [CodecProfile { Type: VideoAudio, Conditions: [ProfileCondition { Condition: Equals, Property: IsSecondaryAudio, Value: "false", IsRequired: False }], ApplyConditions: [], Codec: "aac", Container: null }, CodecProfile { Type: VideoAudio, Conditions: [ProfileCondition { Condition: Equals, Property: IsSecondaryAudio, Value: "false", IsRequired: False }], ApplyConditions: [], Codec: null, Container: null }, CodecProfile { Type: Video, Conditions: [ProfileCondition { Condition: NotEquals, Property: IsAnamorphic, Value: "true", IsRequired: False }, ProfileCondition { Condition: EqualsAny, Property: VideoProfile, Value: "high|main|baseline|constrained baseline", IsRequired: False }, ProfileCondition { Condition: LessThanEqual, Property: VideoLevel, Value: "51", IsRequired: False }], ApplyConditions: [], Codec: "h264", Container: null }], ResponseProfiles: [ResponseProfile { Container: "m4v", AudioCodec: null, VideoCodec: null, Type: Video, OrgPn: null, MimeType: "video/mp4", Conditions: [] }], SubtitleProfiles: [SubtitleProfile { Format: "vtt", Method: External, DidlMode: null, Language: null, Container: null }, SubtitleProfile { Format: "ass", Method: External, DidlMode: null, Language: null, Container: null }, SubtitleProfile { Format: "ssa", Method: External, DidlMode: null, Language: null, Container: null }] }
[2020-07-14 14:10:01.231 +00:00] [DBG] Running "FFProbeProvider" for "/mnt/media/movies/Lion (2016)/Lion 2016 Remux-1080p.mkv"
[2020-07-14 14:10:01.239 +00:00] [DBG] "/usr/lib/jellyfin-ffmpeg/ffprobe" "-i file:\"/mnt/media/movies/Lion (2016)/Lion 2016 Remux-1080p.mkv\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
[2020-07-14 14:10:01.239 +00:00] [DBG] Starting ffprobe with args "-i file:\"/mnt/media/movies/Lion (2016)/Lion 2016 Remux-1080p.mkv\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
[2020-07-14 14:10:03.842 +00:00] [DBG] Transmit file "/usr/lib/jellyfin/bin/jellyfin-web/7c314dbd6c99a624d91751dac741eb41.woff2"
[2020-07-14 14:10:15.293 +00:00] [DBG] Transmit file "/var/cache/jellyfin/remote-images/2/2213ca30-26f6-2ce6-e4f9-afdcc9bb4e75.jpeg"
[2020-07-14 14:10:22.030 +00:00] [INF] Setting provider id's to item 61abc015-488e-eea3-9134-cf249817487d-"Lion (2016)": "{\"Imdb\":\"tt3741834\"}"
[2020-07-14 14:10:22.033 +00:00] [DBG] Running "FFProbeProvider" for "/mnt/media/movies/Lion (2016)/Lion 2016 Remux-1080p.mkv"
[2020-07-14 14:10:22.033 +00:00] [DBG] "/usr/lib/jellyfin-ffmpeg/ffprobe" "-i file:\"/mnt/media/movies/Lion (2016)/Lion 2016 Remux-1080p.mkv\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
[2020-07-14 14:10:22.033 +00:00] [DBG] Starting ffprobe with args "-i file:\"/mnt/media/movies/Lion (2016)/Lion 2016 Remux-1080p.mkv\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
@aussetg aussetg added the bug Something isn't working label Jul 14, 2020
@Anti-ctrl
Copy link

Anti-ctrl commented Jul 17, 2020

I have the exact same Problem. I made an Account, extra to report my Problem, glad I´m not the only one.

I have a nearly Identical setup.

OS: Proxmox/Debian
Virtualization: LXC
Clients: tested on Chrome and PS4 Browser
Browser: Chrome 83.0.4103.116
Jellyfin Version: 10.5.5
Playback: Transcode
Installed Plugins: Kodi Sync, Playback Report
Reverse Proxy: Nginx but same if accessed directly
Base URL: none
Networking: Bridge
Storage: local, library is shared through SMB (read only)
Hardware: Dual x5675, 96GB of RAM. Container has 12 Cores and 8GB of RAM.

I think i didnt had that Problem in 10.5.4, but if i Downgrade with dpkg, the Problem persists. Downgrading to 10.4.x isnt working, as Jellyfin wont startup. If I scan the Library through "scheduled Tasks", it will proceed to around 92-94 Percent and then hang. Wont finish even after a Night. WebUI gets unresponsive.

EDIT: I setup a completly fresh Container with Ubuntu 20.04LTS. It hangs on the Library Scan. I think it has something todo with Special characters in the Name of the Files. For Example Ö and Ä, as Jellyfin only scans till then and then hangs on "validating Media library".

EDIT2: Yes i can confirm that thats the Problem. If I create a Folder with Movies that have Ä or Ö in them, Jellyfin wont scan anything. One file Shows up, but no Metadata what so ever. However, the WebUI is still responsive.

EDIT3: Its not the Problem. Removed all libraries, Renamed the Files, added the Test folder again and rescanned. It broke, WebUI is unresponsive after 5 Minutes and i need to restart the Container to get it to work again.

PS: I´m sorry for all the EDITs, i know this isnt a Blog or something, just tried to help, but i cant get it figured out, obviously.

@AshmodaiVirolac
Copy link

I have encountered same Problem. Nearly always on scanning Libraries the server hangup and Webinterface don't response anymore.
Setup
OS: Proxmox/Ubuntu 20.04
Virtualization: LXC
Clients: Firefox, Chrome and Android-App
Browser: Firefox 78.0.2
Jellyfin Version: 10.5.5
Playback: Direct
Installed Plugins: Kodi Sync, Playback Report
Reverse Proxy: none
Base URL: none
Networking: Bridge
Storage: library mounted via NFS

@aussetg
Copy link
Author

aussetg commented Jul 18, 2020

Still happens in 10.6 but much less rapidly.

@tijmenvn
Copy link

Same problem here, my jellyfin stopped responding few days ago. My settings are quite similar to the others mentioned above:

OS: Proxmox/Ubuntu 20.04
Virtualization: LXC
Clients: Chrome, Firefox, iOS/Android apps
Browser: Chrome 84.0.4147.89
Jellyfin Version: 10.5.5
Playback: Direct-play/Direct-stream/Transcode
Installed Plugins: -
Reverse Proxy: Nginx
Base URL: none
Networking: Bridge
Storage: ZFS dataset mounted through lxc config

@Anti-ctrl
Copy link

I did some "proper" testing today.

First i made a fresh LXC Container, only ran apt update && apt dist-upgrade && apt autoremove.
Container is based on Ubuntu 20.04. I installed fresh Jellyfin, did initial Setup and so on.
As seen above, it didnt work.

After that i thought, that the Problem may not be Jellyfin itself, but LXC instead. So i made a Full KVM with Ubuntu 20.04, did the same thing as for the container and ran a library scan. It didnt hang, stuttered, crashed or freezed in ANY way.
Only Problem i had, was that i had to rescan the library like 4 or 5 times to get all Media to show up, but hadnt any other Problems. Starting doesnt take 10+ Seconds anymore, Skipping is nearly instant, even if I have to transcode. Watched like 4 or 5 Episodes and only hickup i had was when i turned off Subs, the screen went black. I had to go back and restart the Episode, but not the Server or something else. It ran without problems. Client was a PS4 through the Integrated Browser.

IDK whats the Problem here, but maybe that helps someone who has more knowledge than me.

@TheoLeCalvar
Copy link

I did some "proper" testing today.

First i made a fresh LXC Container, only ran apt update && apt dist-upgrade && apt autoremove.
Container is based on Ubuntu 20.04. I installed fresh Jellyfin, did initial Setup and so on.
As seen above, it didnt work.

After that i thought, that the Problem may not be Jellyfin itself, but LXC instead. So i made a Full KVM with Ubuntu 20.04, did the same thing as for the container and ran a library scan. It didnt hang, stuttered, crashed or freezed in ANY way.
Only Problem i had, was that i had to rescan the library like 4 or 5 times to get all Media to show up, but hadnt any other Problems. Starting doesnt take 10+ Seconds anymore, Skipping is nearly instant, even if I have to transcode. Watched like 4 or 5 Episodes and only hickup i had was when i turned off Subs, the screen went black. I had to go back and restart the Episode, but not the Server or something else. It ran without problems. Client was a PS4 through the Integrated Browser.

IDK whats the Problem here, but maybe that helps someone who has more knowledge than me.

I confirm that switching from lxc to kvm solved my issues.
I used the same /var/lib/jellyfin folder between the two instances.
The kvm one did a full scan without issues where the lxc one couldn't.

@aussetg

This comment has been minimized.

@aussetg
Copy link
Author

aussetg commented Jul 19, 2020

The people in this reddit thread : https://www.reddit.com/r/jellyfin/comments/hoki23/jellyfin_dies_when_scanning_folder/

have the same symptoms.

I can confirm that using a Fedora based LXC container also works.

The problem is therefore just with LXC + Debian (Ubuntu).

@Anti-ctrl
Copy link

I confirm that switching from lxc to kvm solved my issues.
I used the same /var/lib/jellyfin folder between the two instances.
The kvm one did a full scan without issues where the lxc one couldn't.

I did the same thing, fixed Permissions and can confirm that it also works.
Thats great, because then i dont need to reconfigure too much stuff again.

I hope @aussetg can figure out whats wrong. I´m missing the knowledge todo something like that.
But atm the KVM will do just fine, even tho the full 8GB of RAM i provided are used, for whatever reason.

@immanuelfodor
Copy link

Exact same issue with Jellyfin 10.5.5 and then the latest 10.6 with Proxmox LXC Ubuntu 18.04. Files already in the library work fine, scanning for new files freeze Jellyfin to death with the same ffprobe log as last line. Tried replacing jellyfin-ffmpeg and probe with the original ffmpeg package, it has the same effect. I would like to keep the lightweight LXC container instead of migrating to KVM if possible.

@cvium
Copy link
Member

cvium commented Jul 20, 2020

I use LXC and have no such issues. Can you send me the offending file?

@tijmenvn
Copy link

tijmenvn commented Jul 20, 2020

Upgrading to 10.6 seems to have fixed it playback for me. It still doesn't want to scan my libraries.

EDIT: I correct myself. After the 3rd/4th play, the server/web has become unresponsive again

@nocin
Copy link

nocin commented Jul 20, 2020

Same issue here...

OS: Proxmox/Debian 10
Virtualization: LXC
Clients: Firefox, Chromium
Browser: Firefox 78.0.2
Jellyfin Version: 10.5.5 & 10.5.6
Playback: Direct-play/Direct-stream/Transcode
Installed Plugins: -
Reverse Proxy: -
Base URL: none
Networking: Bridge
Storage: ZFS dataset mounted through lxc config

Already tried a rollback of the container to the 01.07.2020, but still crashing.

@albakham
Copy link

Same problem, I'm using jellyfin on a debian lxc container (proxmox host). Like everyone else, scanning my library is not working, after a while everything is stuck and I have to restart jellyfin, indefinitely...

I can't just go for a kvm machine for I need GPU transcoding abilities, and I can't get them on kvm with my setup...

@Anti-ctrl
Copy link

I Updated Proxmox to 6.2.10 and Jellyfin still doesnt want to complete a Scan, or "quickly" starts a Episode, but at least it doesnt freeze itself to death anymore, as it seems. I only tested that one for a short time, but yeah.

Update to 10.6 will fail, because it cant remove some directories as it seems.

I can't just go for a kvm machine for I need GPU transcoding abilities, and I can't get them on kvm with my setup...

Why cant u just use KVM? GPU Passthrough isnt that hard and works on almost any Platform. For Proxmox itself you dont need a Graphics card, as it usally runs headless.

@immanuelfodor
Copy link

Update to 10.6 will fail, because it cant remove some directories as it seems.

apt --fix-broken install solved it for me with interactive editing acapabilities what to keep, overwrite, etc.

@immanuelfodor
Copy link

Can you send me the offending file?

It seems to be independent from what files are new in the media folder, it just hangs forever. Permissions are fine and were fine before it started. I'm not sure if a Proxmox update or a Jellyfin update or a Ubuntu update broke it, it just stopped working once after I updated the container and the host.

@DavidCWGA
Copy link

I'm a new user (well, I'm not now, but I was trying to be) and I'm experiencing this problem too, making it impossible to setup Jellyfin from scratch. My system:

OS: Debian 10
Virtualization: LXC (Proxmox 6.2-6)
Clients: Browser
Browser:macOS Safari 13.1.1
Jellyfin Version: 10.6.0
Playback: -
Installed Plugins: None
Reverse Proxy: None
Base URL: None
Networking: Bridge
Storage: NFS

@Anti-ctrl
Copy link

I'm a new user (well, I'm not now, but I was trying to be) and I'm experiencing this problem too, making it impossible to setup Jellyfin from scratch. My system:

OS: Debian 10
Virtualization: LXC (Proxmox 6.2-6)
Clients: Browser
Browser:macOS Safari 13.1.1
Jellyfin Version: 10.6.0
Playback: -
Installed Plugins: None
Reverse Proxy: None
Base URL: None
Networking: Bridge
Storage: NFS

For now i would just suggest to use KVM instead. You can easily migrate later to lxc if you still want. Just copy /etc/jellyfin and fix the Permissions and you good to go :)

@Anti-ctrl
Copy link

Update to 10.6 will fail, because it cant remove some directories as it seems.

apt --fix-broken install solved it for me with interactive editing acapabilities what to keep, overwrite, etc.

Doesnt seem to fix it for me. Maybe i do it wrong?
Updated with apt update && apt dist-upgrade, got the error and then run apt --fix-broken install.
It just says that anything is fine, but if i try to access jellyfin via the webgui it says "Error processing request"

@immanuelfodor
Copy link

It just says that anything is fine, but if i try to access jellyfin via the webgui it says "Error processing request"

Yes, the install is fixed but I don't get this error. The web UI loads fine but but not even the old media is playable anymore :(

@Anti-ctrl
Copy link

Yes, the install is fixed but I don't get this error. The web UI loads fine but but not even the old media is playable anymore :(

That sucks. Was really looking forward to "Syncplay" but for now it seems, that i´m forced to stay on 10.5.5 via kvm..

@immanuelfodor
Copy link

It's really anonoying that Jellyfin in LXC was working great and suddenly it doesn't, and even the debug log doesn't say anything what's wrong. Anyone from the Jellyfin team here? How could we debug this further?

@JonathanCrouse
Copy link

JonathanCrouse commented Jul 21, 2020

Same issue here. This started last Friday in 10.5.5 right after I renewed my Letsencrypt certificates. I don't believe that I updated the container or Proxmox before it occurred but I do know that it was working in the morning as I was tracking some newly added media. I updated to 10.6 once it was available and the UI does appear more stable but playing media or starting a scan might still cause issues with loading the UI even though the service status reports as active (running). Started a new scan this morning and it's been going for about 2 hours now (very very long). Part way through it stopped logging to /var/log/jellyfin (EDIT - this is incorrect, the jellyfin log just rotated, it was still logging correctly) but it is still logging to the syslog.

OS: Ubuntu 18.04
Virtualization: LXC (Proxmox 6.2-10)
Clients: Browser/Android/Android TV
Browser: Firefox 78.0.2
Jellyfin Version: 10.5.5 & 10.6.0
Playback: -
Installed Plugins: None
Reverse Proxy: Apache
Base URL: none
Networking: Bridge
Storage: LUKS encrypted EXT4 drive mounted through lxc config

@albakham
Copy link

albakham commented Jul 21, 2020

Why cant u just use KVM? GPU Passthrough isnt that hard and works on almost any Platform. For Proxmox itself you dont need a Graphics card, as it usally runs headless.

Proxmox doesn't need a graphic card, but I need to transcode movies because I have a slow upload connexion at home, so I need to be able to transcode my files to lower the bitrate to watch my collection when I'm not home. I have a unused gpu and can't allow too much cpu, so the gpu decoding is my solution.

I tried during days to get gpu passthrough to work, and it didn't. And yeah, I know how to do gpu passthrough, I already did some successful setups...


To get back to the issue, everyone seems to be using Proxmox, is anyone using Jellyfin on LXC on another platform? as Proxmox is basically debian, it would surprise me if it worked there.

@aussetg
Copy link
Author

aussetg commented Jul 22, 2020

To get back to the issue, everyone seems to be using Proxmox, is anyone using Jellyfin on LXC on another platform? as Proxmox is basically debian, it would surprise me if it worked there.

Everybody is also using a Debian ( or Ubuntu ) LXC guest. I tried using an LXC Fedora container on Proxmox and it works flawlessly. So there's something screwy in the interaction between LXC, Debian and Jellyfin.

@albakham
Copy link

albakham commented Jul 22, 2020

Everybody is also using a Debian ( or Ubuntu ) LXC guest. I tried using an LXC Fedora container on Proxmox and it works flawlessly. So there's something screwy in the interaction between LXC, Debian and Jellyfin.

So jellyfin works on fedora lxc containers? That's good to know, I'll try a fedora setup tomorrow, and archlinux too.

Everyone is describing what works and what doesn't, but we still have no information on what may be causing this :/

@ikus060
Copy link

ikus060 commented Jul 26, 2020

Everyone is describing what works and what doesn't, but we still have no information on what may be causing this :/
Would be happy to do more testing and check what is wrong on LXC. But at this point, I have ne clue which test I could do.

I tested the installation in Docker and KVM and I don't ran into issues.

@nocin
Copy link

nocin commented Jul 28, 2020

Everybody is also using a Debian ( or Ubuntu ) LXC guest. I tried using an LXC Fedora container on Proxmox and it works flawlessly. So there's something screwy in the interaction between LXC, Debian and Jellyfin.

So jellyfin works on fedora lxc containers? That's good to know, I'll try a fedora setup tomorrow, and archlinux too.

Everyone is describing what works and what doesn't, but we still have no information on what may be causing this :/

Did you get Jellyfin back up running within a Fedora LXC? Then I would try the same. A Debian KVM is way to much overheard for my small machine.

@albakham
Copy link

Did you get Jellyfin back up running within a Fedora LXC? Then I would try the same. A Debian KVM is way to much overheard for my small machine.

So, I tried with Fedora and Archlinux (and I stayed with archlinux because the jellyfin package compiles from source), and both worked.

From what I can see with my experience and others, the problem is only with debian/ubuntu, you should be good with fedora/archlinux...

@immanuelfodor
Copy link

I moved Jellyfin from a Ubuntu 18.04 LXC container to a CentOS 8 (KVM) based Kubernetes cluster under the same Proxmox, it works fine.

@Anti-ctrl
Copy link

Problem seems to Persist in 10.6.1-1, even tho i can now apt-get dist-upgrade to it.
Need some further testing, but i guess its still broken as my WebUI hangs again and my media stops playing after ~10 secs.

@nocin
Copy link

nocin commented Aug 3, 2020

Just updated my Proxmox Host and my Debian LXC with Jellyfin to version 10.6.2. Tested a few videos and they are playing fine now. Can anyone confirm this?

@tijmenvn
Copy link

tijmenvn commented Aug 3, 2020

Updated myself as well to 10.6.2, I can indeed now play videos without the whole thing crashing. Although scanning libraries still doesn't seem to work. It has found the first new item but can't seem to retrieve any data for it and hangs on the same percentage for an hour now.

@bugfixin
Copy link
Contributor

bugfixin commented Aug 6, 2020

Having the same issue here - I think I've narrowed it down to a "deadlock" in c#, or an issue with the multithreading.

I threw some additional logging functions into my build of jellyfin, and changed this

await Task.Delay(Convert.ToInt32(delayMs)).ConfigureAwait(false);
to this:

                _logger.LogDebug("Throttling Tmdb by {0} ms", delayMs);
                await Task.Delay(Convert.ToInt32(delayMs)).ConfigureAwait(false);
                _logger.LogDebug("Done with throttling Tmdb");

Repeatably, every time the task.delay is hit, the 2nd log message isn't posted, and the scan processing deadlocks. This is just the most repeatable place that I've been able to find a deadlock, it certainly happens in other places than that judging by how my jellyfin will go unresponsive at random.

This is using 10.6.2, debian, proxmox hosting lxc.

@Anti-ctrl
Copy link

Anti-ctrl commented Aug 6, 2020

await Task.Delay(Convert.ToInt32(delayMs)).ConfigureAwait(false);

If I understand that right, then the Problem seems to be the TMDB Plugin ?
The only Question is: Why doesnt it happen in KVM ?

@bugfixin
Copy link
Contributor

bugfixin commented Aug 6, 2020

No - I don't believe the problem is with any specific plugin, that's just one example of a repeatable place I could make at least one thread deadlock.

I've since tried compiling jellyfin with native dotnet core 3.1 rather than using the standard docker build scripts and it seems to be working. It's possible that this is a bug within dotnet itself or within the docker build process (or something else entirely). I'm going to keep investigating.

@bugfixin
Copy link
Contributor

bugfixin commented Aug 6, 2020

I have confirmed that the two builds behave completely differently - for me, building via the "native" method on debian yields a jellyfin which does not exhibit this behavior.

Looking at the difference between my native build environment and the docker environment, I see that the docker pulls dotnet core 3.1.1, while my native environment uses 3.1.302. One of the changes between those two is this: dotnet/corefx#42776 which I am hypothesizing is the differentiating factor.

If anyone else in this thread could try building jf 10.6.2 with dotnet 3.1.2x or above and testing for reproducibility, I think that'd be helpful to nail this down.

@dkanada
Copy link
Member

dkanada commented Aug 6, 2020

Looking at the difference between my native build environment and the docker environment, I see that the docker pulls dotnet core 3.1.1, while my native environment uses 3.1.302.

Have you tried updating the docker image with a newer version? That sounds like a likely solution at the moment.

@joshuaboniface
Copy link
Member

Should be easily fixable - we're explicitly pulling in that older .NET release in most of the builds, but can easily bump it to 3.1.302 or later.

e.g.

Dockerfile.debian.amd64:RUN wget https://download.visualstudio.microsoft.com/download/pr/d731f991-8e68-4c7c-8ea0-fad5605b077a/49497b5420eecbd905158d86d738af64/dotnet-sdk-3.1.100-linux-x64.tar.gz -O dotnet-sdk.tar.gz \

@cvium
Copy link
Member

cvium commented Aug 6, 2020

SQLClient is the client library for Microsoft SQL Server. We use SQLite 😉

@cvium
Copy link
Member

cvium commented Aug 6, 2020

We could just remove the rate limit 😄 https://developers.themoviedb.org/3/getting-started/request-rate-limiting

As of December 16, 2019, we have disabled the API rate limiting

@cvium
Copy link
Member

cvium commented Aug 6, 2020

I think this is the bug you're encountering dotnet/runtime#13475

@bugfixin
Copy link
Contributor

bugfixin commented Aug 6, 2020

We could just remove the rate limit 😄 https://developers.themoviedb.org/3/getting-started/request-rate-limiting

As of December 16, 2019, we have disabled the API rate limiting

That's definitely worth looking at removing the delay in the TMDB plugin, but as stated the delay is not specifically the problem; it just is one place I was able to repeatably identify as a deadlock.

As you mentioned, SQLClient isn't used in jellyfin, but there are myriad bugfixes between dotnet sdk 3.1.100 and 3.1.302 that could be resolving the strange deadlock issues here.

I'd like to lock it down to one specific commit, but the reproduction of the issue is tedious and slow so simply having a working resolution is enough for me.

@blablup
Copy link

blablup commented Aug 10, 2020

I Still have this issue.

What I see also is that there is an zombie ffprobe process:

jellyfin   124  0.0  9.7 3091624 153616 ?      Ssl  12:25   0:10 /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --restartpath=/usr/lib/jellyfin/restart.sh --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg
jellyfin   423  0.0  0.0      0     0 ?        Z    12:26   0:00  \_ [ffprobe] <defunct>

Dotnet version is 3.1.302:

root@media:~# dotnet --version
3.1.302
root@media:~# dotnet --list-sdks
3.1.302 [/usr/share/dotnet/sdk]

any workaround without using kvm?

@hasosoft
Copy link

Can confirm building from source solves this issue for me completely, it used to hang after launching ffprobe on every scan, and then just restart itself like you can see in the log, no errors just restarting.

[2020-08-10 15:05:41.065 +02:00] [DBG] [16] MediaBrowser.Providers.Manager.ProviderManager: OnRefreshProgress "f27caa37e5142225cceded48f6553502" 90.01301810564118
[2020-08-10 15:05:41.077 +02:00] [DBG] [16] MediaBrowser.Providers.TV.EpisodeMetadataService: Running "FFProbeProvider" for "/mnt/media/****************.mkv"
[2020-08-10 15:05:41.077 +02:00] [DBG] [16] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: "/usr/lib/jellyfin-ffmpeg/ffprobe" "-i file:\"/mnt/media/****************.mkv\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
[2020-08-10 15:05:41.077 +02:00] [DBG] [16] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting ffprobe with args "-i file:\"/mnt/media/****************.mkv\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
[2020-08-10 15:05:41.684 +02:00] [INF] [1] Main: Jellyfin version: "10.6.2"
[2020-08-10 15:05:41.701 +02:00] [INF] [1] Main: Environment Variables: ["[JELLYFIN_CONFIG_DIR, /mnt/data/config/etc/jellyfin]", "[JELLYFIN_ARGS, $JELLYFIN_RESTART_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLFIN_NOWEBAPP_OPT]", "[JELLYFIN_USER, media]", "[JELLYFIN_CACHE_DIR, /mnt/data/config/var/cache/jellyfin]", "[JELLYFIN_DATA_DIR, /mnt/data/config/var/lib/jellyfin]", "[JELLYFIN_WEB_OPT, --webdir=/usr/share/jellyfin/web]", "[JELLYFIN_LOG_DIR, /mnt/data/config/var/log/jellyfin]", "[JELLYFIN_RESTART_OPT, --restartpath=/usr/lib/jellyfin/restart.sh]", "[JELLYFIN_FFMPEG_OPT, --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg]"]
[2020-08-10 15:05:41.703 +02:00] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--webdir=/usr/share/jellyfin/web", "--restartpath=/usr/lib/jellyfin/restart.sh", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg", ""]

@blablup
If you don't want to bother with building a .deb or something like that you can simply compile with dotnet and overwrite the files in /usr/lib/jellyfin/bin

@blablup
Copy link

blablup commented Aug 11, 2020

Thanks, I will compile the source. I have no problems building packages, did it a lot of times at work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.