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

btfs: fuse_opt.c:55: fuse_opt_add_arg: Assertion `!args->argv || args->allocated' failed. #84

Open
pitsi opened this issue Feb 18, 2024 · 2 comments

Comments

@pitsi
Copy link

pitsi commented Feb 18, 2024

In mid 2022 (probably summer of 2022) I made a small bash script for btplay. Since btplay lacks a progress of the downloaded torrent, I just used the watch command on btfsstat. So the script a) plays something with btplay and b) monitors the download progress for the video file btplay plays. It looks something like this

btplay -p mpv (magnet link here)
watch "btfsstat /tmp/btplay-*/ | grep mp4"

Last time I remember using it was on December 2022 that I showcased it to some friend and it worked great.

Today, I decided to do some changes to it and I came accross this error.

$ btplay -p mpv "magnet:?xt=urn:btih:somethingsomethingsomething" 
btfs: fuse_opt.c:55: fuse_opt_add_arg: Assertion `!args->argv || args->allocated' failed.

Debian testing/unstable x64 and btfs 2.24. According to debian's changelogs, btfs got the upgrade to 2.24 on the 16th of February 2021 and, as you can see below, a binary update for libssl3 compatibility on the 16th of May 2022.

$ zcat /usr/share/doc/btfs/changelog.Debian.amd64.gz 
btfs (2.24-1+b2) sid; urgency=low, binary-only=yes

  * Binary-only non-maintainer upload for amd64; no source changes.
  * Rebuild against libssl3

 -- amd64 / i386 Build Daemon (x86-csail-01) <[email protected]>  Mon, 16 May 2022 00:07:55 +0000

So, since the package itself has not changed for almost 2 years now, and it is at the exact same version since I wrote my script, what may be the cause?

p.s. Minor question. Can I use btplay like so or it only accepts magnet links and .torrent files stored locally?
btplay http://example.com/something.torrent

---edit
As it seems, the error is from btfs itself, so I am changing the title.

$ btfs "magnet:?xt=urn:btih:somethingsomethingsomething" .
btfs: fuse_opt.c:55: fuse_opt_add_arg: Assertion `!args->argv || args->allocated' failed.
Aborted

I also tried btfs 2.24 on the debian 11 arm64 installation I have on my rpi3b+ and it works with no issues there, so it is definitely some binary update that broke it, but which one?

---re-edit
And this is the change for the first binary update of the package, which was made earlier in 2022.

btfs (2.24-1+b1) sid; urgency=low, binary-only=yes

  * Binary-only non-maintainer upload for amd64; no source changes.
  * Rebuild against libtorrent-rasterbar2.0

 -- amd64 / i386 Build Daemon (x86-ubc-01) <[email protected]>  Sun, 30 Jan 2022 22:23:01 +0000
@pitsi pitsi changed the title [btplay] Error: btfs: fuse_opt.c:55: fuse_opt_add_arg: Assertion `!args->argv || args->allocated' failed. btfs: fuse_opt.c:55: fuse_opt_add_arg: Assertion `!args->argv || args->allocated' failed. Feb 18, 2024
@pitsi
Copy link
Author

pitsi commented Mar 17, 2024

This weekend, I had the chance to do some testing with various distros on a vm and here is what I found.
Btfs did not work on kali 2024.1 and ubuntu 24.04 (daily build, because there are no betas yet), popping the same error as above. For anyone that does not know, they are all based on debian testing or unstable. I would add siduction to that, but its iso is like 9 months old and updating the installation would take me more hours than actually testing btfs

Btfs worked fine on debian 12.5, fedora 39, arch (endeavour), ubuntu 22.04 and alpine. But with one catch: I had to manually set the mountpoint to all of them, because, as you can see in the output below, fuse says that "the mountpoint is not empty".

alpine:~# ls -Ra btfs/
btfs/:
.   ..

alpine:~# btfs magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c btfs/
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option

alpine:~# mkdir /tmp/btfs

alpine:~# btfs magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c /tmp/btfs/

alpine:~# btfsstat btfs/btfs-gLiboD/
btfsstat: btfs/btfs-gLiboD/ is not a btfs mount: No data available

alpine:~# btfsstat /tmp/btfs/
btfs/
    Big Buck Bunny/
        Big Buck Bunny.en.srt (  0%)
        Big Buck Bunny.mp4 (  7%)
        poster.jpg (  0%)

alpine:~#

Forcing the mount like so
btfs magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c btfs/ -o nonempty
made the terminal freeze in ALL those distros! I had to ssh or switch to another tty and kill btfs to unfreeze it!

@pitsi
Copy link
Author

pitsi commented May 12, 2024

Now that the t64 transition is ending in debian, I gave btfs/btplay another try and this time it just worked!

However, the issue at the end with the noempty option is still there and I was not able to kill btfs even with killall -9! I had to reboot my system with reisub to make it stop and remove the btfs folder after reboot.

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

1 participant