probonopd / go-appimage

Go implementation of AppImage tools
MIT License
818 stars 71 forks source link

appimaged fails to parse entire directory #261

Closed parkerlreed closed 1 year ago

parkerlreed commented 1 year ago

Locally compiled 3e86843d23c352ae16f14a15490fbe85ad220e5c

My appimage directory looks like this

(deck@steamdeck appimage)$ ls -lah
total 965M
drwxr-xr-x  2 deck deck 4.0K Jul 27 18:44 .
drwxr-xr-x 10 deck deck 4.0K Jul 13 15:23 ..
-rwxr-xr-x  1 deck deck  51M Nov 25  2022 86Box-Linux-x86_64-b4311.AppImage
-rw-r--r--  1 deck deck  11M Jul 27 18:21 alvr_client_android.apk
-rwxr-xr-x  1 deck deck  30M Jul 27 18:21 ALVR-x86_64.AppImage
-rwxr-xr-x  1 deck deck 5.0M Jul 27 18:44 appimaged-803-x86_64.appimage
-rwxr-xr-x  1 deck deck  55M Jul 27 18:22 Cemu-2.0-45-x86_64.AppImage
-rwxr-xr-x  1 deck deck  34M Jul 27 18:36 DuckStation-x64.AppImage
-rwxr-xr-x  1 deck deck 130M Jul 13 16:57 EmulationStation-DE-x64_SteamDeck.appimage
-rwxr-xr-x  1 deck deck 164M Oct 16  2022 GZDeck-1.5.0.AppImage
-rwxr-xr-x  1 deck deck  43M Jun 20 12:33 KDiskMark-3.1.4-fio-3.35-x86_64.AppImage
-rwxr-xr-x  1 deck deck  68M Jul 27 18:31 Linux-Yuzu-EA-3781.AppImage
-rwxr-xr-x  1 deck deck 156M Jun 26 15:28 MuseScore-4.0.2.230651545-x86_64.appimage
-rwxr-xr-x  1 deck deck  44M Jul 27 18:21 pcsx2-v1.7.4819-linux-appimage-x64-Qt.AppImage
-rwxr-xr-x  1 deck deck  29M Jun 20 12:33 QMPlay2-23.06.17-1-x86_64.AppImage
-rwxr-xr-x  1 deck deck  39M May  3 08:51 SonicVisualiser-4.5.2-x86_64.AppImage
-rwxr-xr-x  1 deck deck  78M Jul 27 18:22 web-os-dev-manager_1.11.17_amd64.AppImage
-rwxr-xr-x  1 deck deck  34M Jul 27 18:22 WiiUDownloader-Linux-x86_64.AppImage

appimaaged stops after SonicVisualiser and three subscribing to updates.

appimaged-2023-07-27_185556-x86_64.AppImage 2023-07-27_185556
2023/07/27 18:58:06 main: PATH: /tmp/.mount_appimaGcNgkK/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/deck/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin:/home/deck/.local/bin:/home/deck/.local/podman/bin:/app/lib/010editor
This process based on /proc/self/exe: /tmp/.mount_appimaGcNgkK/usr/bin/appimaged
Terminating other running processes with that name...
In the future, would send SIGTERM to 88656
2023/07/27 18:58:06 Deleted 11 desktop files from /home/deck/.local/share/applications/; use -v to see details
2023/07/27 18:58:06 Launched by systemd: LAUNCHED_BY_SYSTEMD is present
2023/07/27 18:58:06 MQTT client connected: true
2023/07/27 18:58:06 main: Running from /tmp/.mount_appimaGcNgkK/usr/bin
2023/07/27 18:58:06 main: xdg.DataHome = /home/deck/.local/share
2023/07/27 18:58:06 Overwrite: false
2023/07/27 18:58:06 Clean: false
map[inode64: mode:755 nr_inodes:1893782 rw: size:7575128k]
map[inode64: mode:755 rw:]
map[rw: space_cache:v2 ssd: subvol:/ subvolid:5]
map[rw:]
map[lowerdir:/new_root/etc rw: upperdir:/new_root/var/lib/overlays/etc/upper workdir:/new_root/var/lib/overlays/etc/work]
map[inode64: rw:]
map[gid:5 mode:620 ptmxmode:000 rw:]
map[rw:]
map[pagesize:2M rw:]
map[mode:700 rw:]
map[mode:700 rw:]
map[direct: fd:48 maxproto:5 minproto:5 pgrp:1 pipe_ino:19087 rw: timeout:60]
map[direct: fd:49 maxproto:5 minproto:5 pgrp:1 pipe_ino:19093 rw: timeout:60]
map[rw:]
map[rw:]
map[rw:]
map[rw:]
map[rw:]
map[rw:]
map[rw:]
map[rw:]
map[rw:]
map[rw:]
map[rw:]
map[mode:700 rw:]
map[mode:700 rw:]
map[errors:remount-ro rw:]
map[gid:1000 inode64: mode:700 nr_inodes:379261 rw: size:1517044k uid:1000]
map[group_id:1000 rw: user_id:1000]
map[group_id:1000 rw: user_id:1000]
map[compress:zlib:3 rw: space_cache:v2 ssd: subvol:/ subvolid:5]
map[compress:zlib:3 rw: space_cache:v2 ssd: subvol:/ subvolid:5]
map[index:off lowerdir:/usr metacopy:off rw: upperdir:/opt/rwfus/mount/upper/usr workdir:/opt/rwfus/mount/work/usr]
map[index:off lowerdir:/etc/pacman.d metacopy:off rw: upperdir:/opt/rwfus/mount/upper/etc-pacman.d workdir:/opt/rwfus/mount/work/etc-pacman.d xino:off]
map[index:off lowerdir:/var/lib/pacman metacopy:off rw: upperdir:/opt/rwfus/mount/upper/var-lib-pacman workdir:/opt/rwfus/mount/work/var-lib-pacman]
map[index:off lowerdir:/var/cache/pacman metacopy:off rw: upperdir:/opt/rwfus/mount/upper/var-cache-pacman workdir:/opt/rwfus/mount/work/var-cache-pacman]
map[index:off lowerdir:/var/cache/pacman metacopy:off rw: upperdir:/opt/rwfus/mount/upper/var-cache-pacman workdir:/opt/rwfus/mount/work/var-cache-pacman]
2023/07/27 18:58:07 integrating /home/deck/.local/bin/appimage/86Box-Linux-x86_64-b4311.AppImage
2023/07/27 18:58:08 integrating /home/deck/.local/bin/appimage/ALVR-x86_64.AppImage
2023/07/27 18:58:09 integrating /home/deck/.local/bin/appimage/Cemu-2.0-45-x86_64.AppImage
2023/07/27 18:58:10 integrating /home/deck/.local/bin/appimage/DuckStation-x64.AppImage
2023/07/27 18:58:11 integrating /home/deck/.local/bin/appimage/EmulationStation-DE-x64_SteamDeck.appimage
2023/07/27 18:58:12 integrating /home/deck/.local/bin/appimage/GZDeck-1.5.0.AppImage
2023/07/27 18:58:13 integrating /home/deck/.local/bin/appimage/KDiskMark-3.1.4-fio-3.35-x86_64.AppImage
2023/07/27 18:58:14 integrating /home/deck/.local/bin/appimage/Linux-Yuzu-EA-3781.AppImage
2023/07/27 18:58:15 integrating /home/deck/.local/bin/appimage/MuseScore-4.0.2.230651545-x86_64.appimage
2023/07/27 18:58:16 integrating /home/deck/.local/bin/appimage/QMPlay2-23.06.17-1-x86_64.AppImage
2023/07/27 18:58:17 integrating /home/deck/.local/bin/appimage/SonicVisualiser-4.5.2-x86_64.AppImage
2023/07/27 18:58:19 Subscribing to updates for gh-releases-zsync|alvr-org|ALVR-nightly|latest|ALVR-x86_64.AppImage.zsync
2023/07/27 18:58:24 Subscribing to updates for gh-releases-zsync|JonMagon|KDiskMark|latest|*.zsync
2023/07/27 18:58:26 Subscribing to updates for gh-releases-zsync|musescore|MuseScore|latest|MuseScore-*x86_64.AppImage.zsync
parkerlreed commented 1 year ago

Overall it's failing to scan three applications (appimaged was the repo latest that I just removed as I had compiled my own)

pcsx2-v1.7.4819-linux-appimage-x64-Qt.AppImage
web-os-dev-manager_1.11.17_amd64.AppImage
WiiUDownloader-Linux-x86_64.AppImage
parkerlreed commented 1 year ago

Verbose isn't saying much more

2023/07/27 19:11:48 main: MountPoint /tmp/.mount_appimaEkcAdl
2023/07/27 19:11:48 integrating /home/deck/.local/bin/appimage/86Box-Linux-x86_64-b4311.AppImage
2023/07/27 19:11:48 appimage: Set executable bit on /home/deck/.local/bin/appimage/86Box-Linux-x86_64-b4311.AppImage
2023/07/27 19:11:49 desktop: Saving to /home/deck/.local/share/applications/appimagekit_e2748889405f735a713e338488e7e0aa.desktop
2023/07/27 19:11:49 integrating /home/deck/.local/bin/appimage/ALVR-x86_64.AppImage
2023/07/27 19:11:49 appimage: Set executable bit on /home/deck/.local/bin/appimage/ALVR-x86_64.AppImage
2023/07/27 19:11:50 desktop: Saving to /home/deck/.local/share/applications/appimagekit_5c2d4680e8325b1bda85078798888e68.desktop
2023/07/27 19:11:50 integrating /home/deck/.local/bin/appimage/Cemu-2.0-45-x86_64.AppImage
2023/07/27 19:11:50 appimage: Set executable bit on /home/deck/.local/bin/appimage/Cemu-2.0-45-x86_64.AppImage
2023/07/27 19:11:51 desktop: Saving to /home/deck/.local/share/applications/appimagekit_6dd02d9743f1d1c7fe893c289aee70b0.desktop
2023/07/27 19:11:51 integrating /home/deck/.local/bin/appimage/DuckStation-x64.AppImage
2023/07/27 19:11:51 appimage: Set executable bit on /home/deck/.local/bin/appimage/DuckStation-x64.AppImage
2023/07/27 19:11:52 desktop: Saving to /home/deck/.local/share/applications/appimagekit_e9f986468853f09757a0b10b1e92f83e.desktop
2023/07/27 19:11:52 integrating /home/deck/.local/bin/appimage/EmulationStation-DE-x64_SteamDeck.appimage
2023/07/27 19:11:52 appimage: Set executable bit on /home/deck/.local/bin/appimage/EmulationStation-DE-x64_SteamDeck.appimage
2023/07/27 19:11:53 desktop: Saving to /home/deck/.local/share/applications/appimagekit_60028de5b530b49f2198b663ec751388.desktop
2023/07/27 19:11:53 integrating /home/deck/.local/bin/appimage/GZDeck-1.5.0.AppImage
2023/07/27 19:11:53 appimage: Set executable bit on /home/deck/.local/bin/appimage/GZDeck-1.5.0.AppImage
2023/07/27 19:11:54 desktop: Saving to /home/deck/.local/share/applications/appimagekit_4746166d283639026d62ae5640c44e6d.desktop
2023/07/27 19:11:54 integrating /home/deck/.local/bin/appimage/KDiskMark-3.1.4-fio-3.35-x86_64.AppImage
2023/07/27 19:11:54 appimage: Set executable bit on /home/deck/.local/bin/appimage/KDiskMark-3.1.4-fio-3.35-x86_64.AppImage
2023/07/27 19:11:55 desktop: Saving to /home/deck/.local/share/applications/appimagekit_ecb2c586b1f3702ec37d3659a136df60.desktop
2023/07/27 19:11:55 integrating /home/deck/.local/bin/appimage/Linux-Yuzu-EA-3781.AppImage
2023/07/27 19:11:55 appimage: Set executable bit on /home/deck/.local/bin/appimage/Linux-Yuzu-EA-3781.AppImage
2023/07/27 19:11:56 desktop: Saving to /home/deck/.local/share/applications/appimagekit_f15624f587b36b7cc95d2072440c47b9.desktop
2023/07/27 19:11:56 integrating /home/deck/.local/bin/appimage/MuseScore-4.0.2.230651545-x86_64.appimage
2023/07/27 19:11:56 appimage: Set executable bit on /home/deck/.local/bin/appimage/MuseScore-4.0.2.230651545-x86_64.appimage
2023/07/27 19:11:57 desktop: Saving to /home/deck/.local/share/applications/appimagekit_4915f2c71aeab3605efffc13845413ff.desktop
2023/07/27 19:11:57 integrating /home/deck/.local/bin/appimage/QMPlay2-23.06.17-1-x86_64.AppImage
2023/07/27 19:11:57 appimage: Set executable bit on /home/deck/.local/bin/appimage/QMPlay2-23.06.17-1-x86_64.AppImage
2023/07/27 19:11:58 desktop: Saving to /home/deck/.local/share/applications/appimagekit_1a924901bbc6e9300b865e806bd3ed32.desktop
2023/07/27 19:11:58 integrating /home/deck/.local/bin/appimage/SonicVisualiser-4.5.2-x86_64.AppImage
2023/07/27 19:11:58 appimage: Set executable bit on /home/deck/.local/bin/appimage/SonicVisualiser-4.5.2-x86_64.AppImage
2023/07/27 19:11:59 desktop: Saving to /home/deck/.local/share/applications/appimagekit_60b86a9f6e568215299bf725d45d0b91.desktop
2023/07/27 19:12:00 mqtt: Waiting for messages on topic p9q358t/gh-releases-zsync%7Calvr-org%7CALVR-nightly%7Clatest%7CALVR-x86_64.AppImage.zsync/version
2023/07/27 19:12:05 mqtt: Waiting for messages on topic p9q358t/gh-releases-zsync%7CJonMagon%7CKDiskMark%7Clatest%7C%2A.zsync/version
2023/07/27 19:12:07 mqtt: Waiting for messages on topic p9q358t/gh-releases-zsync%7Cmusescore%7CMuseScore%7Clatest%7CMuseScore-%2Ax86_64.AppImage.zsync/version
CalebQ42 commented 1 year ago

My initial thought is that the appimage's it's not integrating are not being recognized as proper AppImages, though I'll have to look into this further.

CalebQ42 commented 1 year ago

Just to make sure, do the AppImages that aren't detected run fine?

parkerlreed commented 1 year ago

Yep image

CalebQ42 commented 1 year ago

I was able to reproduce the problem. I'm looking into it, but it seems right now that SonicVisualiser is causing some issue that prevents appimaged from iterating over the files after it.

CalebQ42 commented 1 year ago

The problem is with the channel to update application menus since the loop to consume the data wasn't started until after the AppImage were checked, causing appimaged to infinitely hang after 10 AppImages were integrated. I should have a PR in a bit.

parkerlreed commented 1 year ago

Thanks! I'll be able to test in the morning.

It's funny that you removed the old home directory detection because that's a half of why I compiled my own version. It was removing that and the very next line of always making the applications directory in home because I have my own directory and there's no reason to create that.

parkerlreed commented 1 year ago

@CalebQ42 Thanks! Worked great