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

Failed to create CoreCLR, HRESULT: 0x80004005 #55

Closed
mord0d opened this issue Jul 29, 2023 · 4 comments
Closed

Failed to create CoreCLR, HRESULT: 0x80004005 #55

mord0d opened this issue Jul 29, 2023 · 4 comments

Comments

@mord0d
Copy link

mord0d commented Jul 29, 2023

Fresh install, jellyfin-10.8.10_2 (built from source with poudriere), allow.mlock and allow.raw_sockets enabled, no limits:

Failed to create CoreCLR, HRESULT: 0x80004005

I've seen #6 but have a different code.

jellyfin/jellyfin#2616 looks similar, but Unraid is a Linux distro, not FreeBSD.

@Thefrank
Copy link
Owner

Thefrank commented Jul 29, 2023

It might need a writable TMPDIR. You can set this (e.g., setenv, export, whateveryourshelluses)

edit: or you have 0 bytes of free space
edit 2: or even more obscure: W^X issue kern.elf64.allow_wx should be 1
@mord0d give those a try :)

@mord0d
Copy link
Author

mord0d commented Jul 29, 2023

It might need a writable TMPDIR.

# su -m jellyfin -c /bin/sh
$ mkdir /tmp/jf
$ TMPDIR=/tmp/jf /usr/local/jellyfin/jellyfin --datadir /var/db/jellyfin --cached
ir /var/cache/j/jellyfin --cachedir /var/cache/jellyfin
Failed to create CoreCLR, HRESULT: 0x80004005
$ TMPDIR=/tmp/jf
$ export TMPDIR
$ /usr/local/jellyfin/jellyfin --datadir /var/db/jellyfin --cachedir /var/cache/j/jellyfin --cachedir /var/cache/jellyfin
Failed to create CoreCLR, HRESULT: 0x80004005

No luck.

or you have 0 bytes of free space

# df -h
Filesystem                    Size    Used   Avail Capacity  Mounted on
serv/jails/media/root         1.2T    632M    1.2T     0%    /

Don't think that it requires tmpfs(5).

or even more obscure: W^X issue kern.elf64.allow_wx should be 1

Oh, that's it! Thank you!
// This isn't the first time I've messed with this.

@mord0d mord0d closed this as completed Jul 29, 2023
@Thefrank
Copy link
Owner

@mord0d That last one is not a great solution as it turns off W^X protections system-wide, which if it was originally 0 means either you or a hardening script put it that way.

elfctl reports:

File 'jellyfin' features:
noaslr          'Disable ASLR' is unset.
noprotmax       'Disable implicit PROT_MAX' is unset.
nostackgap      'Disable stack gap' is unset.
wxneeded        'Requires W+X mappings' is unset.
la48            'amd64: Limit user VA to 48bit' is unset.

If you want: revert the sysctl change. elfctl -e +wxneeded the jellyfin binary and see if it works.

If it DOES work then I need to find out why jellyfin does not work with W^X protection under FreeBSD

@mord0d
Copy link
Author

mord0d commented Jul 29, 2023

if it was originally 0

Nope, it's 1 by default.

If you want: revert the sysctl change. elfctl -e +wxneeded the jellyfin binary and see if it works.

It works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants