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

Packager fails to copy tmp files into place once its done when using a container volume + sshfs mount #1383

Open
doughsay opened this issue Mar 29, 2024 · 8 comments
Labels
type: bug Something isn't working correctly
Milestone

Comments

@doughsay
Copy link

doughsay commented Mar 29, 2024

System info

Operating System: Alpine 3.19.1 container running through Podman 3.4.4 on Ubuntu 22.04.4 host
Shaka Packager Version: v3.0.4-ceeb378-release

Issue and steps to reproduce the problem

Packager Command:

shaka-packager in=e583a4d3-6ec2-48f8-b478-cfb20bc0f7ed.mp4,stream=audio,out=e583a4d3-6ec2-48f8-b478-cfb20bc0f7ed.mp4,playlist_name=e583a4d3-6ec2-48f8-b478-cfb20bc0f7ed_0.m3u8 --base_urls /uploads/media/ --hls_base_url /uploads/media/ --mpd_output e583a4d3-6ec2-48f8-b478-cfb20bc0f7ed.mpd --hls_master_playlist_output e583a4d3-6ec2-48f8-b478-cfb20bc0f7ed.m3u8 -quiet

Extra steps to reproduce the problem?

  1. The container mounts a volume from the host system and uses that volume for the operations
  2. The host system's mount is actually an sshfs mount from a remote NAS
    • fstab line: sshfs#user@x.x.x.x:/sshfs /mnt/nas fuse delay_connect,_netdev,idmap=user,allow_other,IdentityFile=/home/user/.ssh/id_rsa,reconnect 0 0

What is the expected result?

It works fine without the complicated container + volumes + sshfs setup

What happens instead?

Instead it seems to work, but fails to move the tmp files created during packaging to the current directory:

E0329 16:49:43.597311      79 file.cc:91] Failed to replace file 'e583a4d3-6ec2-48f8-b478-cfb20bc0f7ed.mpd' with '/tmp/packager-tempfile-4e-f69285b87c746f39-2', error: generic:18
E0329 16:49:43.597347      79 mpd_notifier_util.cc:28] Failed to write mpd to: e583a4d3-6ec2-48f8-b478-cfb20bc0f7ed.mpd
E0329 16:49:43.733331      78 file.cc:91] Failed to replace file 'e583a4d3-6ec2-48f8-b478-cfb20bc0f7ed_0.m3u8' with '/tmp/packager-tempfile-4e-98a771ca66729809-1', error: generic:18
E0329 16:49:43.733364      78 media_playlist.cc:505] Failed to write playlist to: e583a4d3-6ec2-48f8-b478-cfb20bc0f7ed_0.m3u8
E0329 16:49:43.733371      78 simple_hls_notifier.cc:255] Failed to write playlist e583a4d3-6ec2-48f8-b478-cfb20bc0f7ed_0.m3u8
E0329 16:49:43.733378      78 packager_main.cc:625] Packaging Error: 3 (INVALID_ARGUMENT): Failed to flush Hls.

without knowing what error: generic:18 means, I'm kinda stuck...

NOTE: It works with shaka-packager 2.6.1, for my use-case this appears to be a regression in 3.x

@Brainiarc7
Copy link
Contributor

Please paste the full Docker command(s) used to execute shaka-packager.

@doughsay
Copy link
Author

doughsay commented Apr 2, 2024

Please paste the full Docker command(s) used to execute shaka-packager.

I'm not using Docker to execute shaka-packager, I'm using podman to run a custom app where the image happens to contain the shaka-packager binary inside it. I gave the command I'm executing above (from within the running container). I could maybe try and reproduce with the official shaka-packager docker images, but I have not done so yet...

@joeyparrish
Copy link
Member

@doughsay, please try with official images. We don't control whatever other image you're using and can't fix it if the problem is something inside that environment. If the issue exists with our official images, we will do what we can. But you'll need to provide detailed instructions for repro. Thanks!

@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Apr 15, 2024
@Brainiarc7
Copy link
Contributor

Brainiarc7 commented Apr 15, 2024 via email

@github-actions github-actions bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Apr 15, 2024
@doughsay
Copy link
Author

@Brainiarc7 can you provide any details on how you were able to reproduce? I haven't had the time yet to try, but I can look into it soon unless you have something that'll make it easier/clearer

@mkcdot
Copy link

mkcdot commented Apr 25, 2024

@doughsay I faced same issue today. I tried all past versions till 3.0.0. It has same issue. For versions before 3.0.0, this issue doesn't come.
The workaround to solve this issue is to give complete path of mpd file in the command as new code expects mpd file name has filepath mentioned along with file name.
Maybe this can be marked as bug as this change was not intentional.
As I see, you have also not mentioned filepath. Check if this works for you.

@Brainiarc7
Copy link
Contributor

Brainiarc7 commented Apr 25, 2024 via email

@cosmin cosmin added the type: bug Something isn't working correctly label Apr 26, 2024
@github-actions github-actions bot added this to the v3.1 milestone Apr 26, 2024
@doughsay
Copy link
Author

doughsay commented May 3, 2024

Thanks @mkcdot, I've confirmed that using the full path for mpd file instead of a relative path doesn't cause the issue to occur.

@cosmin cosmin modified the milestones: v3.1, v3.2 May 4, 2024
@cosmin cosmin modified the milestones: v3.2, Backlog May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

5 participants