Crashupload on Linux

Discussion in 'Mac and Linux' started by retrry, July 2, 2013.

  1. retrry

    retrry Member

    Messages:
    52
    Likes Received:
    5
    Hello,
    so I saw that you have crashupload script in your directory, which you try to use, when crash happens, but at this point there are few problems with it.

    1. Space is not escaped.
    You are trying to execute command:
    Code:
    /home/user/.local/share/Steam/SteamApps/common/Planetary Annihilation/crashupload -c /tmp/checkpoint.cpk -p "Platform=linux" -p "Program=client" -p "TitleId=4" -p "Version=50256" http://uberent.com/GameClient/SubmitCrashReportWithDump /tmp//6d4fbd55-e0b3-1131-62c543e5-58fb5b04.dmp
    which gives me:
    Code:
    sh: /home/user/.local/share/Steam/SteamApps/common/Planetary: No such file or directory
    You need to escape space between Planetary and Annihilation with backslash. It should be like this:
    Code:
    /home/user/.local/share/Steam/SteamApps/common/Planetary\ Annihilation/crashupload -c /tmp/checkpoint.cpk -p "Platform=linux" -p "Program=client" -p "TitleId=4" -p "Version=50256" http://uberent.com/GameClient/SubmitCrashReportWithDump /tmp//6d4fbd55-e0b3-1131-62c543e5-58fb5b04.dmp
    2. All hail lib incompatibilities :)
    After escaping that space I get:
    Code:
    version `CURL_OPENSSL_3' not found (required by /home/user/.local/share/Steam/SteamApps/common/Planetary Annihilation/crashupload
    I still think you should ship needed dependencies/libraries with you Steam/Launcher package and don't depend on distributions libs :)[1]

    OS: ArchLinux 64bit (I know it is unsupported officially:)

    [1] Relevant presentation's relevant slide
  2. eeyrjmr

    eeyrjmr Member

    Messages:
    137
    Likes Received:
    13
    the issue isn't so much that they didn't use \ to mark a space, its they didn't use quotations.
    What is being launched is a sh command and thus all variables MUST be quoted.

    http://mywiki.wooledge.org/Quotes

    I can't see where that sh command is being executed from, so I guess it is part of the binary doing a syscall...



    Its not to bad to expect to use the distributions libraries OTHERWISE what gets shipped will be huge. Their command works for me (once I quote it)

    What is required is a list of dependencies that PA requires from the system BUT we can easily generate that our end.

    REmember this is Uber's 1st outing into making linux binaries commericially. Its a slog but once they have the process nailed for them it will be a piece of piss.
  3. retrry

    retrry Member

    Messages:
    52
    Likes Received:
    5
    Yes, I didn't find a place where they call that command too :)

    The problem is not with dependency list. The problem is with unstable ABI :) That is why we have libudev problem and probably we will have a lot of those in coming time. It isn't a problem for distro packages, 'cause when ABI breaks maintainers just recompile the package. To deal with this problem Steam ships it own steam-runtime. Too bad that it doesn't ship steam-runtime for 64-bit operating systems.

    In this case the problem is with curl version (I have newer one), as I'm on bleeding-edge distro I feel that earlier than you. You should start seeing that problem with next version of Ubuntu/Mint :)

    And... Diskspace is cheap :)

    I do remember and don't get me wrong - I'm not bashing them or anything. I like what they are doing :)
  4. eeyrjmr

    eeyrjmr Member

    Messages:
    137
    Likes Received:
    13
    Actually I'm on Gentoo so just as bleeding. I a, not using the latest curl though since I'm having build issues and not had time to figure it out
  5. retrry

    retrry Member

    Messages:
    52
    Likes Received:
    5
    Oh, sorry, I made strange connections somewhere.... Respect for Gentoo usage, I tried, I really tried :)
  6. MCXplode

    MCXplode Active Member

    Messages:
    196
    Likes Received:
    28
    I fixed it via downgrading to curl 7.23 in ArchLinux but that version is a little over a year old in the ARM repository.
    would be nice to be updated to more current version of curl, curl 7.24 is when they removed the built in OPENSSL3 library and now it depends on OpenSSL,
    so is curl going to be used for the URL updating so that the PA launcher can update itself and the game
  7. retrry

    retrry Member

    Messages:
    52
    Likes Received:
    5
    I fixed it by extracting libcurl with OPENSSL3 support from vagrant and putting that into Planetary Annihilation directory :)

    Attached Files:

  8. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    That will only fix the issue with launching ./PA, but ./crashdump still won't work with that version as it will claim, that it is unable to find a version string at all.
  9. UberWilliam

    UberWilliam Uber Alumni

    Messages:
    28
    Likes Received:
    76
    Okay, I'm embarrassed. Forgetting to quote pathnames being passed to system() is such a noob mistake... A fix for that will show up within a build or two. Can't say exactly, because I don't know when we'll be pushing a new build. Garat might have a build on deck, in which case my fix for the crashupload pathname will have to wait for the build after that.

    But the libcurl issue is a bit more subtle, and frankly, I don't know what to do. Our build machine is Ubuntu 12.04--I though "LTS" would be a good idea for a server box--so I can understand how it might have older stuff than a bleeding edge Arch/gentoo install. But my Ubuntu 13.04 box has the exact same version of libcurl as the 12.04 box. So even if we updated our build machine to 13.04, it would still be producing executables linked against an older libcurl, right? And if we manually pull down a new libcurl and link against that, would that cause people running distros using the old libcurl to break? And if I say "okay, I'll just distribute the libcurl.so--or static link it" then doesn't it just push the .so incompatability out one layer, probably to openssl? So I could include that too. But where does it end?

    Anyway, you Linux guys/gals have been so awesome at figuring out what we've been doing wrong so far, I'm hoping you can help out a bit more and tell me what we should be doing here too. I really really really hope it isn't develop an entire self contained runtime a la Valve because, well, I want to be spending my time making a game, not making libraries.

    Or even better, can some experienced Linux programmer who wants to get into games send a resume to jobs@uberent.com?

    -William
    PA lead programmer/engine architect
  10. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I think you should use scripts for crash uploading, Python or Perl. It's fairly easy to make them compatible with every distro because every distro have Perl and 99% have Python. :)
  11. UberWilliam

    UberWilliam Uber Alumni

    Messages:
    28
    Likes Received:
    76
    We could do that--the crashupload program is pretty trivial, rewriting it in python would be simple. But we still need to use libcurl and openssl in the game itself in order to log into UberNet, so rewriting crashupload doesn't help the bigger picture.

    (And I'd much rather have two dependencies on libcurl instead of one dependency on libcurl and a second dependency on Python.)

    -William
  12. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    First I want to say, that I understand that you want to use same code (e.g crash reporting tool) on all platforms and it's probably right choice for cross platform support. Anyway I doubt that dependency on Perl (might be Python not installed in some very rare configurations) might be a considered as problem. E.g crash report tool should be able to report even when game faults, it's why I think that script it's good thing for that.

    Also I got an idea about dependencies. I understand that it's not under your control, but Coherent already have lot of dependencies. As long as I remember you have no source code, so you won't able to make your own builds. So I think you should stick to Coherent dependencies for PA release builds.

    As I see it's should be okay to statically link libcurl and libssl or distribute them with game as long as they use same libc with Coherent.

    PS: You probably have same situation with dependencies of FBX SDK used for tools.
    Last edited: August 17, 2013
  13. sechastain

    sechastain Member

    Messages:
    84
    Likes Received:
    22
    How serious are you about needing a guy with linux systems programming experience?

    I think you have a good handle on the trade-offs. Me, personally, would opt towards static linking. Sure, it adds bloat. I wouldn't think over 100 MB, though - and I'd think that high, honestly. If that gives you heartburn, just look at the payload provided by the art and design teams. That should ease your conscience ;)

    You might need to be mindful of any licensing issues static linking could incur though, e.g.: http://stackoverflow.com/questions/10130143/gpl-lgpl-and-static-linking

    I'm assuming y'all are keeping track of your dependencies and their libraries.

    If changing up your linking style isn't a problem (I wouldn't think so, but it's been a while since I've been in the gcc/icc tool chain) - I'd compare what a dynamically linked vs statically linked binary looks like by way of size. My guess is not that much.
  14. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I think bloated executables aren't a problem when you already have Chromium inside your game. :D

    On side of memory usage it's also not important because it's a game and not lightweight http server. Same for security risks because curl only used for connection to their servers and it's not exposed for modification (Uber actually only use curl in game to prevent expose of some sensitive data in UI).

    Both openssl and libcurl have very permissive licenses.
  15. sechastain

    sechastain Member

    Messages:
    84
    Likes Received:
    22
    lol - I didn't know they had embedded chromium.
  16. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Coherent UI is Chromium.
  17. sechastain

    sechastain Member

    Messages:
    84
    Likes Received:
    22
    @ssx - do you know where I can learn more about the game's architecture?
  18. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    If you mean exactly PA there are many technical details included in Uber answers on forums. But you also might use debugging tools, e.g using APITrace you can understand how exactly PA renderer works, it's fairly easy even if you only have basic knowledge about 3D graphics.

Share This Page