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

Stack overflow gathering libs #287

Closed
Simran-B opened this issue May 13, 2024 · 9 comments
Closed

Stack overflow gathering libs #287

Simran-B opened this issue May 13, 2024 · 9 comments

Comments

@Simran-B
Copy link

appimagetool version 185

I tried to create an AppImage from a Qt 5 application built under Arch (latest Docker image) but it failed after running for almost an hour:

LD_LIBRARY_PATH=/root/oiio/dist/lib /root/appimagetool-831-x86_64.AppImage deploy appdir/usr/
share/applications/org.olivevideoeditor.Olive.desktop --appimage-extract-and-run
2024/05/13 09:12:31 Running inside Docker. Please make sure that the environment variables from Travis CI
2024/05/13 09:12:31 available inside Docker if you are running on Travis CI.
2024/05/13 09:12:31 This can be achieved by using something along the lines of 'docker run --env-file <(env)'.
2024/05/13 09:12:31 Please see https://github.com/docker/cli/issues/2210.
AppDir path: appdir
Exec= key contains: olive-editor
Icon= key contains: org.olivevideoeditor.Olive
2024/05/13 09:12:31 Gathering all required libraries for the AppDir...
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc04f28e388 stack=[0xc04f28e000, 0xc06f28e000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x313589?, 0xc0f9a0?})
        runtime/panic.go:992 +0x71
runtime.newstack()
        runtime/stack.go:1101 +0x5cc
runtime.morestack()
        runtime/asm_amd64.s:547 +0x8b

goroutine 1 [running]:
reflect.Value.SetUint({0x2464e0?, 0xc028c272c0?, 0x188?}, 0x7f)
        reflect/value.go:2260 +0x109 fp=0xc04f28e398 sp=0xc04f28e390 pc=0x79c789
encoding/binary.(*decoder).value(0xc04f28e928, {0x2464e0?, 0xc028c272c0?, 0x0?})
        encoding/binary/binary.go:583 +0x61a fp=0xc04f28e508 sp=0xc04f28e398 pc=0x7a871a
encoding/binary.(*decoder).value(0xc04f28e928, {0x2478e0?, 0xc028c272c0?, 0x6f9db4?})
        encoding/binary/binary.go:545 +0xa0b fp=0xc04f28e678 sp=0xc04f28e508 pc=0x7a8b0b
encoding/binary.(*decoder).value(0xc04f28e928, {0x2ebe00?, 0xc028c272c0?, 0x40?})
        encoding/binary/binary.go:558 +0x965 fp=0xc04f28e7e8 sp=0xc04f28e678 pc=0x7a8a65
encoding/binary.Read({0x3f1e80, 0xc028c17bf0}, {0x3f7bb0, 0xc81318}, {0x22f500?, 0xc028c272c0})
        encoding/binary/binary.go:259 +0xc7d fp=0xc04f28e968 sp=0xc04f28e7e8 pc=0x7a5bfd
debug/elf.NewFile({0x3f22a0?, 0xc028b06820})
        debug/elf/file.go:310 +0x2a5 fp=0xc04f28ebe0 sp=0xc04f28e968 pc=0x81d1c5
debug/elf.Open({0xc07175b080?, 0x8?})
        debug/elf/file.go:209 +0x45 fp=0xc04f28ec28 sp=0xc04f28ebe0 pc=0x81ce65
main.getDeps({0xc07175b080, 0x1f})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:987 +0x79 fp=0xc04f28ecc8 sp=0xc04f28ec28 pc=0xbe0339
main.getDeps({0xc09572ce58, 0x14})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28ed68 sp=0xc04f28ecc8 pc=0xbe048c
main.getDeps({0xc09572cb10, 0x14})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28ee08 sp=0xc04f28ed68 pc=0xbe048c
main.getDeps({0xc07175ad00, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28eea8 sp=0xc04f28ee08 pc=0xbe048c
main.getDeps({0xc07175a620, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28ef48 sp=0xc04f28eea8 pc=0xbe048c
main.getDeps({0xc093bcbf40, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28efe8 sp=0xc04f28ef48 pc=0xbe048c
main.getDeps({0xc093bcb860, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f088 sp=0xc04f28efe8 pc=0xbe048c
main.getDeps({0xc093bcb180, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f128 sp=0xc04f28f088 pc=0xbe048c
main.getDeps({0xc093bcaaa0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f1c8 sp=0xc04f28f128 pc=0xbe048c
main.getDeps({0xc093bca3c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f268 sp=0xc04f28f1c8 pc=0xbe048c
main.getDeps({0xc07f55bce0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f308 sp=0xc04f28f268 pc=0xbe048c
main.getDeps({0xc07f55b600, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f3a8 sp=0xc04f28f308 pc=0xbe048c
main.getDeps({0xc07f55af20, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f448 sp=0xc04f28f3a8 pc=0xbe048c
main.getDeps({0xc07f55a840, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f4e8 sp=0xc04f28f448 pc=0xbe048c
main.getDeps({0xc07f55a160, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f588 sp=0xc04f28f4e8 pc=0xbe048c
main.getDeps({0xc0411d7a80, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f628 sp=0xc04f28f588 pc=0xbe048c
main.getDeps({0xc0411d73a0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f6c8 sp=0xc04f28f628 pc=0xbe048c
main.getDeps({0xc0411d6cc0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f768 sp=0xc04f28f6c8 pc=0xbe048c
main.getDeps({0xc0411d65e0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f808 sp=0xc04f28f768 pc=0xbe048c
main.getDeps({0xc07251ff00, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f8a8 sp=0xc04f28f808 pc=0xbe048c
main.getDeps({0xc07251f820, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f948 sp=0xc04f28f8a8 pc=0xbe048c
main.getDeps({0xc07251f140, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28f9e8 sp=0xc04f28f948 pc=0xbe048c
main.getDeps({0xc07251ea60, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28fa88 sp=0xc04f28f9e8 pc=0xbe048c
main.getDeps({0xc07251e380, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28fb28 sp=0xc04f28fa88 pc=0xbe048c
main.getDeps({0xc098221ca0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28fbc8 sp=0xc04f28fb28 pc=0xbe048c
main.getDeps({0xc0982215c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28fc68 sp=0xc04f28fbc8 pc=0xbe048c
main.getDeps({0xc098220ee0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28fd08 sp=0xc04f28fc68 pc=0xbe048c
main.getDeps({0xc098220800, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28fda8 sp=0xc04f28fd08 pc=0xbe048c
main.getDeps({0xc098220120, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28fe48 sp=0xc04f28fda8 pc=0xbe048c
main.getDeps({0xc07b965a40, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28fee8 sp=0xc04f28fe48 pc=0xbe048c
main.getDeps({0xc07b965360, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f28ff88 sp=0xc04f28fee8 pc=0xbe048c
main.getDeps({0xc07b964c60, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290028 sp=0xc04f28ff88 pc=0xbe048c
main.getDeps({0xc07b9645a0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2900c8 sp=0xc04f290028 pc=0xbe048c
main.getDeps({0xc071a05e80, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290168 sp=0xc04f2900c8 pc=0xbe048c
main.getDeps({0xc071a057c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290208 sp=0xc04f290168 pc=0xbe048c
main.getDeps({0xc071a050c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2902a8 sp=0xc04f290208 pc=0xbe048c
main.getDeps({0xc071a04a00, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290348 sp=0xc04f2902a8 pc=0xbe048c
main.getDeps({0xc071a04300, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2903e8 sp=0xc04f290348 pc=0xbe048c
main.getDeps({0xc076dfdc40, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290488 sp=0xc04f2903e8 pc=0xbe048c
main.getDeps({0xc076dfd540, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290528 sp=0xc04f290488 pc=0xbe048c
main.getDeps({0xc076dfce80, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2905c8 sp=0xc04f290528 pc=0xbe048c
main.getDeps({0xc076dfc780, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290668 sp=0xc04f2905c8 pc=0xbe048c
main.getDeps({0xc076dfc0c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290708 sp=0xc04f290668 pc=0xbe048c
main.getDeps({0xc094e199c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2907a8 sp=0xc04f290708 pc=0xbe048c
main.getDeps({0xc094e19300, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290848 sp=0xc04f2907a8 pc=0xbe048c
main.getDeps({0xc094e18c00, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2908e8 sp=0xc04f290848 pc=0xbe048c
main.getDeps({0xc094e18540, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290988 sp=0xc04f2908e8 pc=0xbe048c
main.getDeps({0xc094d39e40, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290a28 sp=0xc04f290988 pc=0xbe048c
main.getDeps({0xc094d39780, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290ac8 sp=0xc04f290a28 pc=0xbe048c
main.getDeps({0xc094d39080, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290b68 sp=0xc04f290ac8 pc=0xbe048c
main.getDeps({0xc094d389c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290c08 sp=0xc04f290b68 pc=0xbe048c
main.getDeps({0xc094d382c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290ca8 sp=0xc04f290c08 pc=0xbe048c
main.getDeps({0xc080ab7c00, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290d48 sp=0xc04f290ca8 pc=0xbe048c
main.getDeps({0xc080ab7500, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290de8 sp=0xc04f290d48 pc=0xbe048c
main.getDeps({0xc080ab6e40, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290e88 sp=0xc04f290de8 pc=0xbe048c
main.getDeps({0xc080ab6740, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290f28 sp=0xc04f290e88 pc=0xbe048c
main.getDeps({0xc080ab6080, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f290fc8 sp=0xc04f290f28 pc=0xbe048c
main.getDeps({0xc0759b5980, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291068 sp=0xc04f290fc8 pc=0xbe048c
main.getDeps({0xc0759b52c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291108 sp=0xc04f291068 pc=0xbe048c
main.getDeps({0xc0759b4bc0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2911a8 sp=0xc04f291108 pc=0xbe048c
main.getDeps({0xc0759b4500, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291248 sp=0xc04f2911a8 pc=0xbe048c
main.getDeps({0xc094999e00, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2912e8 sp=0xc04f291248 pc=0xbe048c
main.getDeps({0xc094999740, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291388 sp=0xc04f2912e8 pc=0xbe048c
main.getDeps({0xc094999040, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291428 sp=0xc04f291388 pc=0xbe048c
main.getDeps({0xc094998980, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2914c8 sp=0xc04f291428 pc=0xbe048c
main.getDeps({0xc094998280, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291568 sp=0xc04f2914c8 pc=0xbe048c
main.getDeps({0xc094897bc0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291608 sp=0xc04f291568 pc=0xbe048c
main.getDeps({0xc0948974c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2916a8 sp=0xc04f291608 pc=0xbe048c
main.getDeps({0xc094896e00, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291748 sp=0xc04f2916a8 pc=0xbe048c
main.getDeps({0xc094896700, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2917e8 sp=0xc04f291748 pc=0xbe048c
main.getDeps({0xc094896040, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291888 sp=0xc04f2917e8 pc=0xbe048c
main.getDeps({0xc08db63940, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291928 sp=0xc04f291888 pc=0xbe048c
main.getDeps({0xc08db63280, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2919c8 sp=0xc04f291928 pc=0xbe048c
main.getDeps({0xc08db62b80, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291a68 sp=0xc04f2919c8 pc=0xbe048c
main.getDeps({0xc08db624c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291b08 sp=0xc04f291a68 pc=0xbe048c
main.getDeps({0xc0945d5dc0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291ba8 sp=0xc04f291b08 pc=0xbe048c
main.getDeps({0xc0945d5700, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291c48 sp=0xc04f291ba8 pc=0xbe048c
main.getDeps({0xc0945d5000, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291ce8 sp=0xc04f291c48 pc=0xbe048c
main.getDeps({0xc0945d4940, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291d88 sp=0xc04f291ce8 pc=0xbe048c
main.getDeps({0xc0945d4240, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291e28 sp=0xc04f291d88 pc=0xbe048c
main.getDeps({0xc0944bfb80, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291ec8 sp=0xc04f291e28 pc=0xbe048c
main.getDeps({0xc0944bf480, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f291f68 sp=0xc04f291ec8 pc=0xbe048c
main.getDeps({0xc0944bedc0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f292008 sp=0xc04f291f68 pc=0xbe048c
main.getDeps({0xc0944be6c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2920a8 sp=0xc04f292008 pc=0xbe048c
main.getDeps({0xc0944be000, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f292148 sp=0xc04f2920a8 pc=0xbe048c
main.getDeps({0xc094381900, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2921e8 sp=0xc04f292148 pc=0xbe048c
main.getDeps({0xc094381240, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f292288 sp=0xc04f2921e8 pc=0xbe048c
main.getDeps({0xc094380b40, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f292328 sp=0xc04f292288 pc=0xbe048c
main.getDeps({0xc094380480, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2923c8 sp=0xc04f292328 pc=0xbe048c
main.getDeps({0xc09402dd80, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f292468 sp=0xc04f2923c8 pc=0xbe048c
main.getDeps({0xc09402d6c0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f292508 sp=0xc04f292468 pc=0xbe048c
main.getDeps({0xc09402cfc0, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f2925a8 sp=0xc04f292508 pc=0xbe048c
main.getDeps({0xc09402c900, 0x1b})
        github.com/probonopd/go-appimage/src/appimagetool/appdirtool.go:1008 +0x1cc fp=0xc04f292648 sp=0xc04f2925a8 pc=0xbe048c
...additional frames elided...

I normally use linuxdeployqt but it requires -unsupported-allow-new-glibc and terminates without creating an AppImage but also not logging any errors.

@probonopd
Copy link
Owner

Thanks for reporting. Never encountered this so far. Does it succeed on, e.g., Debian or Ubuntu?

@Simran-B
Copy link
Author

I don't know as I haven't tried other OSes and I'm afraid I don't have the time to try it as it involves figuring out the names of dozens of packages and building various dependencies manually. I can upload the container where it failed though, if it helps?

@chipolux
Copy link
Contributor

chipolux commented Jun 1, 2024

Same behavior on arch, I'm unfamiliar with the codebase but I was able to make a minor change to fix my case.

There appear to be two bugs, one is that e.Close() is not called before the loop that recurses back into getDeps(), which can exhaust file descriptors if there are very deeply nested dependency trees. This is what actually happened on my system rather than a stack overflow.

The second bug, which seems like there might be handling for that I didn't grok, is the simple circular recursion loop of getDeps() getting called within itself, for itself, forever. My quick and dirty patch kinda mirrors stuff that already exists with allELFs, etc.

If it helps, I added log.Println(">> getDeps()", binaryOrLib) to the top of getDeps() and got this loop until it exhausted file descriptors, then I added the e.Close() and it in this same loop for much longer, over 30 minutes, so I killed it but I imagine it would eventually crash. Finally with the addition of collecting and checking seenDeps it finished in maybe 1 second. And the built AppImage is working fine so far.

2024/05/31 17:57:45 >> getDeps() /usr/lib64/ld-linux-x86-64.so.2
2024/05/31 17:57:45 >> getDeps() /usr/lib64/libfreetype.so.6
2024/05/31 17:57:45 >> getDeps() /usr/lib64/libz.so.1
2024/05/31 17:57:45 >> getDeps() /usr/lib64/libc.so.6
2024/05/31 17:57:45 >> getDeps() /usr/lib64/ld-linux-x86-64.so.2
2024/05/31 17:57:45 >> getDeps() /usr/lib64/libharfbuzz.so.0
2024/05/31 17:57:45 >> getDeps() /usr/lib64/libm.so.6
2024/05/31 17:57:45 >> getDeps() /usr/lib64/libc.so.6
2024/05/31 17:57:45 >> getDeps() /usr/lib64/ld-linux-x86-64.so.2
diff --git a/src/appimagetool/appdirtool.go b/src/appimagetool/appdirtool.go
index 77bb58e..bc666e6 100644
--- a/src/appimagetool/appdirtool.go
+++ b/src/appimagetool/appdirtool.go
@@ -34,6 +34,7 @@ type QMLImport struct {

 var allELFs []string
 var libraryLocations []string // All directories in the host system that may contain libraries
+var seenDeps []string

 var quirksModePatchQtPrfxPath = false

@@ -974,6 +975,10 @@ func findAllExecutablesAndLibraries(path string) ([]string, error) {
 }

 func getDeps(binaryOrLib string) error {
+       if containsString(seenDeps, binaryOrLib) == true {
+               log.Println("skipping already seen dep, circular ref", binaryOrLib)
+               return nil
+       }
        var libs []string

        if helpers.IsDirectory(binaryOrLib) == true {
@@ -994,6 +999,10 @@ func getDeps(binaryOrLib string) error {
        libs, err = e.ImportedLibraries()
        helpers.PrintError("e.ImportedLibraries", err)

+       err = e.Close()
+       helpers.PrintError("e.Close", err)
+
+       seenDeps = helpers.AppendIfMissing(seenDeps, binaryOrLib)
        for _, lib := range libs {
                s, err := findLibrary(lib)
                if err != nil {

@probonopd
Copy link
Owner

Thanks @chipolux. Could you send a pull request please?

@chipolux
Copy link
Contributor

Oops, sorry for the delay, got busy, but sure thing!

@Simran-B
Copy link
Author

With the patch, appimagetool finishes pretty quickly for me, printing "skipping already seen dep, circular ref" 517 times. Thanks!

Unfortunately, turning the AppDir into an AppImage still fails - appstreamcli segfaults with exit code 139 when it validates the appdata.xml but I see nothing wrong in there 😞

@probonopd
Copy link
Owner

Just delete the appdata.xml to see if it continues then...

@Simran-B
Copy link
Author

appstreamcli seems to crash for all kinds of reasons, if mandatory elements are missing or if it doesn't know certain constructs it seems. The segfaults seem to be fixed in newer versions (I checked with 1.0.3) and the error reporting is pretty good. The version that comes with appimagetool (?) seems to be from 2019 (v0.12.9).

I managed to fix the appdata.xml file, at least when using the extracted appstreamcli executable from a temp folder (/tmp/appimage_extracted_e56b...930d/usr/bin/appstreamcli). For some reason, using appimagetool, appstreamcli still segfaults unless I delete the appdata.xml 🤷

@probonopd
Copy link
Owner

Closing here, since "Stack overflow gathering libs" appears to be fixed. Thanks @chipolux. For other issues, please open new tickets (in case they don't exist yet).

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

3 participants