Skip to content

Crash in new subprocess library #143

Closed

Description

@muttleyxd

I have a problem with getting linuxdeploy to work, even with a very simple application

I made a repository, which is a minimal example of what I'm trying to do, please take a look at try-deploy.sh
https://github.com/muttleyxd/linuxdeploy-plugin-qt-crash-minimal-example

I tested this on two different distributions:

  • Arch Linux - it crashes under a second
<truncated logs, >
Setting rpath in ELF file build/testingdeploy/usr/lib/libxcb-xkb.so.1 to $ORIGIN 
Setting rpath in ELF file build/testingdeploy/usr/lib/libxkbcommon-x11.so.0 to $ORIGIN 
Setting rpath in ELF file build/testingdeploy/usr/lib/libxkbcommon.so.0 to $ORIGIN 
Setting rpath in ELF file build/testingdeploy/usr/lib/libzstd.so.1 to $ORIGIN 

-- Running input plugin: qt -- 
Running process: /home/muttley/git/test/simple_qt_widgets_test/linuxdeploy-plugin-qt-x86_64.AppImage --appdir build/testingdeploy
[qt/stdout]   ld-linux-x86-64.so.2  libGL.so.1  libGLX.so.0  libGLdispatch.so.0  libICE.so.6  libQt5Core.so.5  libQt5DBus.so.5  libQt5Gui.so.5  libQt5Network.so.5  libQt5Pdf.so.5  libQt5Svg.so.5  libQt5Widgets.so.5  libQt5XcbQpa.so.5  libSM.so.6  libX11-xcb.so.1  libX11.so.6  libXau.so.6  libXdmcp.so.6  libbz2.so.1.0  libc.so.6  libcom_err.so.2  libcrypto.so.1.1  libdbus-1.so.3  libdl.so.2  libdouble-conversion.so.3  libexpat.so.1  libfontconfig.so.1  libfreetype.so.6  libgcc_s.so.1  libgcrypt.so.20  libglib-2.0.so.0  libgpg-error.so.0  libgraphite2.so.3  libgssapi_krb5.so.2  libharfbuzz.so.0  libicudata.so.67  libicui18n.so.67  libicuuc.so.67  libjpeg.so.8  libk5crypto.so.3  libkeyutils.so.1  libkrb5.so.3  libkrb5support.so.0  liblcms2.so.2  liblz4.so.1  liblzma.so.5  libm.so.6  libmd4c.so.0  libpcre.so.1  libpcre2-16.so.0  libpng16.so.16  libpthread.so.0  libresolv.so.2  librt.so.1  libssl.so.1.1  libstdc++.so.6  libsystemd.so.0  libuuid.so.1  libxcb-glx.so.0  libxcb-icccm.so.4  libxcb-image.so.0  libxcb-keysyms.so.1  libxcb-randr.so.0  libxcb-render-util.so.0  libxcb-render.so.0  libxcb-shape.so.0  libxcb-shm.so.0  libxcb-sync.so.1  libxcb-util.so.1  libxcb-xfixes.so.0  libxcb-xinerama.so.0  libxcb-xinput.so.0  libxcb-xkb.so.1  libxcb.so.1  libxkbcommon-x11.so.0  libxkbcommon.so.0  libz.so.1  libzstd.so.1
[qt/stdout] g module: dbus -- 
[qt/stdout] 
[qt/stdout] -- Deploying module: gui -- 
[qt/stdout] Deploying platform plugins 
[qt/stdout] eploying shared library /usr/lib/qt/plugins/platforms/libqxcb.so (destination: build/testingdeploy/usr/plugins/platforms/)
munmap_chunk(): invalid pointer
./try-deploy.sh: line 23: 185550 Aborted                 (core dumped) ./linuxdeploy-x86_64.AppImage --appdir build/testingdeploy --plugin qt --output appimage
  • Ubuntu 16.04
    it takes longer, running qt plugin doesn't fail, but after around a minute it also crashes
Setting rpath in ELF file build/testingdeploy/usr/lib/libpcre16.so.3 to $ORIGIN 
Setting rpath in ELF file build/testingdeploy/usr/lib/libpng12.so.0 to $ORIGIN 
Setting rpath in ELF file build/testingdeploy/usr/lib/libxcb-glx.so.0 to $ORIGIN 
Setting rpath in ELF file build/testingdeploy/usr/lib/libxcb-present.so.0 to $ORIGIN 
Setting rpath in ELF file build/testingdeploy/usr/lib/libxcb-sync.so.1 to $ORIGIN 
Setting rpath in ELF file build/testingdeploy/usr/lib/libxshmfence.so.1 to $ORIGIN 

-- Running input plugin: qt -- 
Running process: /home/muttley/git/linuxdeploy-plugin-qt-crash-minimal-example/linuxdeploy-plugin-qt-x86_64.AppImage --appdir build/testingdeploy
[qt/stdout]   libGL.so.1  libQt5Core.so.5  libQt5Gui.so.5  libQt5Widgets.so.5  libX11-xcb.so.1  libX11.so.6  libXau.so.6  libXdamage.so.1  libXdmcp.so.6  libXext.so.6  libXfixes.so.3  libXxf86vm.so.1  libc.so.6  libdl.so.2  libdrm.so.2  libexpat.so.1  libffi.so.6  libfreetype.so.6  libgcc_s.so.1  libglapi.so.0  libglib-2.0.so.0  libgobject-2.0.so.0  libgraphite2.so.3  libharfbuzz.so.0  libicudata.so.55  libicui18n.so.55  libicuuc.so.55  libm.so.6  libpcre.so.3  libpcre16.so.3  libpng12.so.0  libpthread.so.0  librt.so.1  libstdc++.so.6  libxcb-dri2.so.0  libxcb-dri3.so.0  libxcb-glx.so.0  libxcb-present.so.0  libxcb-sync.so.1  libxcb.so.1  libxshmfence.so.1  libz.so.1

-- Copying files into AppDir -- 
munmap_chunk(): invalid pointer
./try-deploy.sh: line 23:  3100 Aborted                 (core dumped) ./linuxdeploy-x86_64.AppImage --appdir build/testingdeploy --plugin qt

Activity

  1. TheAssassin commented on Aug 8, 2020

    @TheAssassin
    Member

    Moved this issue into the right tracker. Please try to use the latest continuous build, which increases some buffer sizes. I've switched to a new library and it's a little unstable with its subprocess handling right now. Will be fixed ASAP, but not before Tuesday.

  2. CalcProgrammer1 commented on Aug 9, 2020

    @CalcProgrammer1

    I'm getting build failures too, has been happening for the past day or so (this is after the 32-bit build was fixed a few days back). Both 32- and 64-bit builds are failing on my CI.

    Example failure log:

    https://gitlab.com/CalcProgrammer1/OpenRGB/-/jobs/677358712

    6892020-08-09 03:19:04 (41.7 MB/s) - 'linuxdeploy-plugin-qt-x86_64.AppImage' saved [6737896/6737896]
    690+ chmod +x linuxdeploy-plugin-qt-x86_64.AppImage linuxdeploy-x86_64.AppImage
    691+ export QML_SOURCES_PATHS=/builds/CalcProgrammer1/OpenRGB/src
    692+ QML_SOURCES_PATHS=/builds/CalcProgrammer1/OpenRGB/src
    693+ ./linuxdeploy-x86_64.AppImage --appimage-extract-and-run --appdir AppDir -e OpenRGB -i /builds/CalcProgrammer1/OpenRGB/qt/OpenRGB.png -d /builds/CalcProgrammer1/OpenRGB/qt/OpenRGB.desktop
    694linuxdeploy version 1-alpha (git commit ID e91b459), Travis build 478 built on 2020-08-08 09:57:55 UTC
    695terminate called after throwing an instance of 'std::logic_error'
    696  what():  subprocess failed (exit code 1)
    697+ cleanup
    698+ '[' -d /tmp/appimage-build-0yuAe3 ']'
    699+ rm -rf /tmp/appimage-build-0yuAe3
    700ERROR: Job failed: exit code 1
    
  3. changed the title [-]crash for very simple example Qt5 application[/-] [+]Crash in new subprocessing[/+] on Aug 9, 2020
  4. TheAssassin commented on Aug 9, 2020

    @TheAssassin
    Member

    As recommended in #141 and #142, you can find older, working binaries in https://artifacts.assassinate-you.net/artifactory/list/linuxdeploy/travis-456/. Please use them until this issue has been resolved.

  5. changed the title [-]Crash in new subprocessing[/-] [+]Crash in new subprocess library[/+] on Aug 10, 2020
  6. qwertzui11 commented on Aug 11, 2020

    @qwertzui11

    may I suggest, that this project starts using releases and tags? In our company all CI stopped working due to using the continious tag. I guess this could result in better issue descriptions too, when the reporter can report, that he's using version 1.2.3 instead of version 1-alpha (git commit ID e91b459).

    This tool seems production ready to me, am I wrong?

    Anyway, thx for the great tool and your work! Till now, it just worked and did an awesome job! 😃

  7. TheAssassin commented on Aug 11, 2020

    @TheAssassin
    Member

    may I suggest, that this project starts using releases and tags?

    There's nearly no external contribution to this tool and most other AppImage tools, most people just use them. If there were, I might have more time for testing new features more thoroughly. However, that's not possible due to my lack of time. Therefore, some "public beta testing" in the form of providing continuous builds is the best I can offer. Releasing takes a lot of time and effort, I can tell from my other projects. However, to always have some working binaries, I started this "old builds retention" to be able to provide links to stable builds any time.
    Another problem with "versioning" is that no other component in the AppImage eco system is properly versioned, the few tools which do releases just all invent their own scheme. I'd rather stick with "continuous" therefore.
    The third rationale against making releases is that we've experienced people never really update those components once they have "one that works", which is also not in our best interest.
    I hope the future AppImage type 3 will fix a lot of the underlying issues (as it introduces some standards with proper versioning). Only then, I would consider making releases of linuxdeploy...

    I promised I will look into fixing the issue today. I just got home and will start rewriting the problematic bits now. Please track this issue, I'll keep it updated. Also, I invite everyone to help test the new binaries then and make sure the issues are gone.

  8. qwertzui11 commented on Aug 11, 2020

    @qwertzui11

    👍 understood, good points.

    Looking forward to test it. 😄

  9. pktiuk commented on Aug 15, 2020

    @pktiuk

    I have also this (or similar) problem, and I think, that such a critical part of AppImage infrastructure should have at least some version, which could be expected as stable (next to continuous one).

    The third rationale against making releases is that we've experienced people never really update those components once they have "one that works", which is also not in our best interest.

    I think, such a failure (connected with continuous building) could do the opposite in terms of keeping this tool up to date on user's machines, because some people may prefer having already downloaded "one that works" version of this tool instead of risking breaking their CI (I have started thinking about it, when this problem appeared, and it is not the first time when I couldn't deliver AppImage build).

  10. pktiuk commented on Aug 30, 2020

    @pktiuk
  11. ndarilek commented on Aug 30, 2020

    @ndarilek
  12. TheAssassin commented on Aug 31, 2020

    @TheAssassin
    Member

    Took me a few days longer than I wanted (real life stuff, you probably know that...), but I finished that new subprocess library, dumped the old relicts, switched everything over and so far, it's looking good! There's only a few minor output-related issues (which should not affect builds very much, mostly there's some characters missing here and there in log messages, nothing critical) remaining which need to be taken care of.

    Now, I need you to test the new (upcoming) builds in real life. I've run some lengthy tests (with e.g., the Qt plugin on some larger projects, where there's lots of logging) and had no crashes so far, but well, the last build passed similar tests, too, so I'm interested in your feedback. Let me know if there's any issues.

  13. TheLastProject commented on Aug 31, 2020

    @TheLastProject
  14. qwertzui11 commented on Aug 31, 2020

    @qwertzui11

    I can confirm this as well. Thx for the fix! 👍 🥳

  15. hizzlekizzle commented on Aug 31, 2020

    @hizzlekizzle

    It appears to have fixed it for me, too. Good work, TheAssassin :)

  16. pktiuk commented on Aug 31, 2020

    @pktiuk

    In my case build passes.

  17. jeanslack commented on Sep 3, 2020

    @jeanslack

    It works for me too. Thank you so much!

  18. TheAssassin commented on Sep 3, 2020

    @TheAssassin
    Member

    Thanks for your feedback. Increases confidence with regards to the new subprocess library.

    Looking into the remaining issues right now.

  19. TheAssassin commented on Sep 4, 2020

    @TheAssassin
    Member

    I managed to fix the remaining buffer-related issues, as far as I can see. We need some more in-depth testing, especially with third party plugins, but I'm very confident at this point. The code has become a bit complex, but it can always be refactored later on. For now, function is more important.

    Right now, I'm waiting for the AppImages to be built by Travis, and will then run the build scripts for a bunch of projects.

  20. muttleyxd commented on Sep 7, 2020

    @muttleyxd
    Author

    Sorry, I forgot about that issue a little. It doesn't crash now, thanks :)

  21. TheAssassin commented on Sep 7, 2020

    @TheAssassin
    Member

    Was just about to close it myself. Ran some more tests, everything looks alright.

  22. TheAssassin commented on Sep 7, 2020

    @TheAssassin
    Member

    Argh, now I reopened it even... sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions