vasi / squashfuse

FUSE filesystem to mount squashfs archives
Other
286 stars 66 forks source link

Arch Package squashfuse-0.3.0 breaks appimages.. #105

Closed Theslees closed 11 months ago

Theslees commented 11 months ago
[0] arch-desktop:Downloads joey$ ./linux−Miru−4.2.8.AppImage
QSocketNotifier: Can only be used with threads started with QThread
Segmentationfault(coredumped)
[139] arch-desktop:Downloads joey$ 

I upgraded squashfuse via a system package upgrade (with the arch system repository, dont know which one specific repository the package comes from though), then after that, all appimages failed to run,

It spits out the shell log posted above everytime I attempt to execute a appimage

So I reverted back to squashfuse v0.2.0 and appimages work again, I don't know much about squashfuse itself but it seems the latest update (0.3.0) caused a regression for appimages on my system; I'm on Arch Linux btw,

Please let me know if you can replicate the issue on your side aswell, Cheers.

DrDaveD commented 11 months ago

I'm not very familiar with Arch Linux so it would be a big help if you can dig deeper into finding out the cause of the failure and hopefully submit a pull request.

DianaNites commented 11 months ago

Check journalctl, is it constantly segfaulting like this ever since the upgrade? I downgraded as soon as I saw it so didnt actually try appimages, but i assume its related.

You can use pacman -U https://archive.archlinux.org/packages/s/squashfuse/squashfuse-0.2.0-1-x86_64.pkg.tar.zst to downgrade temporarily

journalctl snippet ``` Jul 27 16:07:34 Hostname kernel: Thread (pooled)[6062]: segfault at 7f0038001 ip 00007f00520c8dbf sp 00007f0049dfa5d0 error 4 Jul 27 16:07:34 Hostname kernel: Thread (pooled)[6068]: segfault at 7f001c001 ip 00007f00520c8dbf sp 00007f00327fb5d0 error 4 Jul 27 16:07:34 Hostname kernel: Thread (pooled)[6061]: segfault at 7f0034001 ip 00007f00520c8dbf sp 00007f004a5fb5d0 error 4 Jul 27 16:07:34 Hostname kernel: in libsquashfuse.so.0.0.0[7f00520c6000+4000] Jul 27 16:07:34 Hostname kernel: in libsquashfuse.so.0.0.0[7f00520c6000+4000] Jul 27 16:07:34 Hostname kernel: in libsquashfuse.so.0.0.0[7f00520c6000+4000] Jul 27 16:07:34 Hostname kernel: likely on CPU 12 (core 6, socket 0) Jul 27 16:07:34 Hostname kernel: likely on CPU 1 (core 0, socket 0) Jul 27 16:07:34 Hostname kernel: Jul 27 16:07:34 Hostname kernel: likely on CPU 14 (core 7, socket 0) Jul 27 16:07:34 Hostname kernel: Jul 27 16:07:34 Hostname kernel: Code: b8 00 00 00 be 30 00 00 00 41 09 c5 ff 15 69 3e 00 00 48 8d bb c0 00 00 00 41 09 c5 ff 15 c9 40 00 00 41 09 c5 4d 85 e4 74 07 <41> 80 3c 24 00 75 4a 45 85 ed 0f 84 af fe ff ff 48 89 df 41 bd 01 Jul 27 16:07:34 Hostname kernel: Jul 27 16:07:34 Hostname kernel: Code: b8 00 00 00 be 30 00 00 00 41 09 c5 ff 15 69 3e 00 00 48 8d bb c0 00 00 00 41 09 c5 ff 15 c9 40 00 00 41 09 c5 4d 85 e4 74 07 <41> 80 3c 24 00 75 4a 45 85 ed 0f 84 af fe ff ff 48 89 df 41 bd 01 Jul 27 16:07:34 Hostname kernel: Code: b8 00 00 00 be 30 00 00 00 41 09 c5 ff 15 69 3e 00 00 48 8d bb c0 00 00 00 41 09 c5 ff 15 c9 40 00 00 41 09 c5 4d 85 e4 74 07 <41> 80 3c 24 00 75 4a 45 85 ed 0f 84 af fe ff ff 48 89 df 41 bd 01 Jul 27 16:07:44 Hostname kernel: Thread (pooled)[6456]: segfault at 7fbee0001 ip 00007fbef42c7dbf sp 00007fbeed5fd5d0 error 4 Jul 27 16:07:44 Hostname kernel: Thread (pooled)[6459]: segfault at 7fbed0001 ip 00007fbef42c7dbf sp 00007fbee77fd5d0 error 4 likely on CPU 5 (core 2, socket 0) Jul 27 16:07:44 Hostname kernel: likely on CPU 6 (core 3, socket 0) Jul 27 16:07:44 Hostname kernel: Jul 27 16:07:44 Hostname kernel: Jul 27 16:07:44 Hostname kernel: Code: b8 00 00 00 be 30 00 00 00 41 09 c5 ff 15 69 3e 00 00 48 8d bb c0 00 00 00 41 09 c5 ff 15 c9 40 00 00 41 09 c5 4d 85 e4 74 07 <41> 80 3c 24 00 75 4a 45 85 ed 0f 84 af fe ff ff 48 89 df 41 bd 01 Jul 27 16:07:44 Hostname kernel: Code: b8 00 00 00 be 30 00 00 00 41 09 c5 ff 15 69 3e 00 00 48 8d bb c0 00 00 00 41 09 c5 ff 15 c9 40 00 00 41 09 c5 4d 85 e4 74 07 <41> 80 3c 24 00 75 4a 45 85 ed 0f 84 af fe ff ff 48 89 df 41 bd 01 Jul 27 16:07:55 Hostname kernel: Thread (pooled)[6595]: segfault at 7fe168001 ip 00007fe17ceeadbf sp 00007fe1779fd5d0 error 4 Jul 27 16:07:55 Hostname kernel: Thread (pooled)[6603]: segfault at 7fe14c001 ip 00007fe17ceeadbf sp 00007fe16fffe5d0 error 4 Jul 27 16:07:55 Hostname kernel: Thread (pooled)[6598]: segfault at 7fe158001 ip 00007fe17ceeadbf sp 00007fe1769fb5d0 error 4 Jul 27 16:07:55 Hostname kernel: in libsquashfuse.so.0.0.0[7fe17cee8000+4000] Jul 27 16:07:55 Hostname kernel: in libsquashfuse.so.0.0.0[7fe17cee8000+4000] Jul 27 16:07:55 Hostname kernel: likely on CPU 10 (core 5, socket 0) Jul 27 16:07:55 Hostname kernel: in libsquashfuse.so.0.0.0[7fe17cee8000+4000] Jul 27 16:07:55 Hostname kernel: likely on CPU 2 (core 1, socket 0) Jul 27 16:07:55 Hostname kernel: Jul 27 16:07:55 Hostname kernel: likely on CPU 0 (core 0, socket 0) Jul 27 16:07:55 Hostname kernel: Code: b8 00 00 00 be 30 00 00 00 41 09 c5 ff 15 69 3e 00 00 48 8d bb c0 00 00 00 41 09 c5 ff 15 c9 40 00 00 41 09 c5 4d 85 e4 74 07 <41> 80 3c 24 00 75 4a 45 85 ed 0f 84 af fe ff ff 48 89 df 41 bd 01 Jul 27 16:07:55 Hostname kernel: Code: b8 00 00 00 be 30 00 00 00 41 09 c5 ff 15 69 3e 00 00 48 8d bb c0 00 00 00 41 09 c5 ff 15 c9 40 00 00 41 09 c5 4d 85 e4 74 07 <41> 80 3c 24 00 75 4a 45 85 ed 0f 84 af fe ff ff 48 89 df 41 bd 01 Jul 27 16:07:55 Hostname kernel: Jul 27 16:07:55 Hostname kernel: Thread (pooled)[6596]: segfault at 7fe160001 ip 00007fe17ceeadbf sp 00007fe16f1fc5d0 error 4 Jul 27 16:07:55 Hostname kernel: Code: b8 00 00 00 be 30 00 00 00 41 09 c5 ff 15 69 3e 00 00 48 8d bb c0 00 00 00 41 09 c5 ff 15 c9 40 00 00 41 09 c5 4d 85 e4 74 07 <41> 80 3c 24 00 75 4a 45 85 ed 0f 84 af fe ff ff 48 89 df 41 bd 01 Jul 27 16:07:55 Hostname kernel: in libsquashfuse.so.0.0.0[7fe17cee8000+4000] likely on CPU 4 (core 2, socket 0) Jul 27 16:07:55 Hostname kernel: Code: b8 00 00 00 be 30 00 00 00 41 09 c5 ff 15 69 3e 00 00 48 8d bb c0 00 00 00 41 09 c5 ff 15 c9 40 00 00 41 09 c5 4d 85 e4 74 07 <41> 80 3c 24 00 75 4a 45 85 ed 0f 84 af fe ff ff 48 89 df 41 bd 01 ```
maoxuner commented 11 months ago

Check journalctl, is it constantly segfaulting like this ever since the upgrade? I downgraded as soon as I saw it so didnt actually try appimages, but i assume its related.

You can use pacman -U https://archive.archlinux.org/packages/s/squashfuse/squashfuse-0.2.0-1-x86_64.pkg.tar.zst to downgrade temporarily

journalctl snippet

downgrade to 0.2.0 works

lgdsgd2000 commented 11 months ago

Yes, there is indeed such segfaulting and downgrade to 0.2.0 works

palexdev commented 11 months ago

This is critical, we have work to do you know

DrDaveD commented 11 months ago

That's the danger of living on the bleeding edge.

Another workaround besides downgrading to 0.2.0 would be to use the --disable-multithreading configure option, but then of course you don't get the multithreading benefit.

tysontan commented 11 months ago

Check journalctl, is it constantly segfaulting like this ever since the upgrade? I downgraded as soon as I saw it so didnt actually try appimages, but i assume its related.

You can use pacman -U https://archive.archlinux.org/packages/s/squashfuse/squashfuse-0.2.0-1-x86_64.pkg.tar.zst to downgrade temporarily journalctl snippet

Thanks for the workaround!

purpasmart96 commented 11 months ago

Confirmed on my side also. Downgrading back to 2.0 fixed all the appimages.

max8rr8 commented 11 months ago

This problem appeared in 53e1b97002c7bc13392a6b0121680d28a94a9715 when signatures of functions such as sqfs_lookup_path and sqfs_open_image got changed (new function argument added). Libappimage(both upstream and in arch repository) is compiled with squashfuse v0.2 uses old signatures which leads to segfault.

The fact that there is no way to differentiate between old and new functions signatures with c preprocessor further complicates issue as libappimage(and other projects using squashfuse). I would suggest adding

#define SQUASHFUSE_SUBDIR

Or something similar(or even better an integer indicating current version) so projects using squashfuse would be able to use correct function signatures whether compiling against older or newer versions of squashfuse.

Another possible solution is to change 53e1b97002c7bc13392a6b0121680d28a94a9715 so instead of modifying existing functions it will create new ones (with suffix _with_subdir f.e.)

DrDaveD commented 11 months ago

Oh, so the problem was the subdir feature, not the multithreading.

Please submit a pull request with suggested fix.

max8rr8 commented 11 months ago

Please submit a pull request with suggested fix.

I am not sure which fix is better:

  1. Provide squash fs version with defines
    #define SQUASHFUSE_MAJOR_VERSION 0
    #define SQUASHFUSE_MINOR_VERSION 0
  2. Add define that shows that subdir signature should be used
    #define SQUASHFUSE_SUBDIR_SUPPORTED
  3. Restore old signatures and add subdir support in functions with new names
kevin-vigor commented 11 months ago

Fwiw I vote for option 3. It requires no changes to existing apps.

hsdredgun commented 11 months ago

I'm confused I removed the Aur package of Appimagelauncher then downgrade to 2.0 and now I can't install appimagelauncher again unfortunately:

[ 76%] Linking CXX shared library libbinfmt-bypass-preload.so /home/hsdredgun/.cache/yay/appimagelauncher-git/src/AppImageLauncher/src/binfmt-bypass/fix-preload-library.sh: line 26: patchelf: command not found make[2]: *** [src/binfmt-bypass/CMakeFiles/binfmt-bypass-preload.dir/build.make:114: src/binfmt-bypass/libbinfmt-bypass-preload.so] Error 127 make[2]: *** Deleting file 'src/binfmt-bypass/libbinfmt-bypass-preload.so' make[1]: *** [CMakeFiles/Makefile2:1850: src/binfmt-bypass/CMakeFiles/binfmt-bypass-preload.dir/all] Error 2 make: *** [Makefile:156: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... -> error making: appimagelauncher-git-exit status 4 -> Failed to install the following packages. Manual intervention is required: appimagelauncher-git - exit status 4

Sorry very new to this...

vasi commented 11 months ago

Yeah, I agree with @kevin-vigor

max8rr8 commented 11 months ago

Fixed by #106

Porpoise1954 commented 7 months ago

I'm having this issue on Linux Mint 21.2 Victoria (Cinnamon). squashfuse is v.0.1.103-3

When I downloaded "/home/***/Applications/appimagelauncher-lite-2.2.0-travis995-0f91801-x86_64.AppImage" it would not launch. However, DigiKam-8.1.0-x86-64.Appimage still works, as does kmymoney-5.1-607-linux-gcc-x86_64.Appimage and CinGG-20230630-x86_64_c99375297a357e6bc0cbd1239af8903d.AppImage but XnView_MP.glibc2.17-x86_64.Appimage** no longer works.

Can anyone shed some light please?

vasi commented 7 months ago

Could you provide logs, or a backtrace? Can't diagnose without more info.