Opened 7 years ago

Closed 5 years ago

#4789 closed defect (fixed)

Crash on Slackware 14.2

Reported by: Itms Owned by: Imarok
Priority: Release Blocker Milestone: Alpha 24
Component: Core engine Keywords: slackware
Cc: Andy Alt Patch:

Description (last modified by Andy Alt)

From http://irclogs.wildfiregames.com/2017-09/2017-09-24-QuakeNet-%230ad.log, around 10:31.

Apparently the issue has been reproduced by the Slackware maintainer (whom we should add to the list of package maintainers to ping upon release, by the way). There is an actual trace provided but the funky things happen in the constructor so I'd say it would be easier to try to reproduce than to try to guess what happens.

Starting program: /shared/0/0ad-0.0.22-alpha/binaries/system/pyrogenesis_dbg

Program received signal SIGSEGV, Segmentation fault.

#0  0xb6672805 in std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) () from /usr/lib/libstdc++.so.6

#1  0x08155113 in Path::Path (this=0xbfffee84) at ../../../source/lib/path.h:77

#2  0x084b3b29 in CmdLineArgs::GetArg0 (this=0x8ce2850 <g_args>) at ../../../source/ps/GameSetup/CmdLineArgs.cpp:92

#3  0x084b1f0e in Paths::Paths (this=0xbffff014, args=...) at ../../../source/ps/GameSetup/Paths.cpp:35
        subdirectoryName = 0xbfffef84 "\260\205\071\266\324J\235\b"

#4  0x0851a6ad in VisualReplay::GetDirectoryName () at ../../../source/ps/VisualReplay.cpp:48
        
#5  0x0851e645 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at ../../../source/ps/VisualReplay.cpp:43

Note that there is a separate ticket for building on Slackware-current.

Attachments (1)

0ad_ldd_verbose_output_20180811.txt (24.6 KB ) - added by Andy Alt 6 years ago.
output of ldd --verbose pyrogenesis

Download all attachments as: .zip

Change History (17)

comment:1 by Andy Alt, 6 years ago

Cc: Andy Alt added

comment:2 by Andy Alt, 6 years ago

Description: modified (diff)

comment:3 by Andy Alt, 6 years ago

Keywords: slackware added
Milestone: BacklogWork In Progress
Owner: set to Andy Alt
Priority: Should HaveMust Have
Status: newassigned

I was able to reproduce this on Slackware 14.2. As reported on IRC, when pyrogenesis is run, there is no output except "segmentation fault".

The stack trace looks like the same output as cited above.

Also, the tests didn't finish building.

==== Building cxxtestroot (release) ====
Generating test root file
/mnt/debHome/andy/src/andy5995-mg/0ad/libraries/source/cxxtest-4.4/bin/cxxtestgen --root  --include=precompiled.h --include=lib/external_libraries/libsdl.h --runner=ErrorPrinter -o /mnt/debHome/andy/src/andy5995-mg/0ad/source/test_root.cpp
==== Building test (release) ====
stub_impl_hack.cpp
test_CColor.cpp
test_CLogger.cpp
test_CStr.cpp
test_ModIo.cpp
../../../source/ps/tests/stub_impl_hack.cpp:16:75: fatal error: /home/andy/src/andy5995-mg/0ad/source/ps/tests/stub_impl_hack.h: No such file or directory
compilation terminated.
test.make:1165: recipe for target 'obj/test_Release/stub_impl_hack.o' failed
make[1]: *** [obj/test_Release/stub_impl_hack.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:164: recipe for target 'test' failed
make: *** [test] Error 2

It looks like the Slackbuild maintainer (not the official Slackware maintainer) worked around that by using a file named disable-root-check.patch

As for the segfault, elexis suspects one reason may be libraries that are too old or too recent. I could list the versions that are being used to help troubleshoot?

comment:4 by Andy Alt, 6 years ago

version info for my libs...

boost-1.59.0-x86_64-1
cmake-3.5.1-x86_64-1
curl-7.48.0-x86_64-1
enet-1.3.12-x86_64-1_SBo
gcc-5.3.0-x86_64-3
gcc-g++-5.3.0-x86_64-3
glew-1.13.0-x86_64-1
glib-1.2.10-x86_64-3
glib2-2.46.2-x86_64-2
glibc-2.23-x86_64-1
gloox-1.0.13-x86_64-1_SBo
icu4c-56.1-x86_64-1
libogg-1.3.2-x86_64-1
liboggz-1.1.1-x86_64-1
libpng-1.6.20-x86_64-1
libsodium-1.0.16-x86_64-1_SBo
libvorbis-1.3.5-x86_64-1
libxml2-2.9.3-x86_64-1
libXcursor-1.1.14-x86_64-2
miniupnpc-2.0-x86_64-1_SBo
OpenAL-1.18.0-x86_64-1_SBo
SDL2-2.0.8-x86_64-1_SBo
wxGTK3-3.0.4-x86_64-1_SBo
wxX11-2.8.7-x86_64-1_SBo
zlib-1.2.8-x86_64-1

comment:5 by Andy Alt, 6 years ago

I was able to build and successfully run a21 using the Slackbuild script here, so I thought I'd use the same script to try to build and package a23.

I did, but the resulting binary segfaulted as before. But knowing that a21 runs successfully may help narrow down the problem. I'm out of ideas, atm, but I'm willing to work with the devs if they have any suggestions.

comment:6 by elexis, 6 years ago

stub_impl_hack.cpp

That happens when you relocate the directory, delete this file manually and compile again

ideas

try to locate it, check that all values have the value they should have. It looks like its trying to construct a path where some set of the path is uninitialized.

we should add to the list of package maintainers to ping upon release, by the way

comment:7 by elexis, 6 years ago

From https://slackbuilds.org/repository/14.2/games/0ad/

 To include the Atlas editor, which requires wxPython:
    ATLAS=enable ./0ad.SlackBuild

in reply to:  6 comment:8 by Andy Alt, 6 years ago

Replying to elexis:

stub_impl_hack.cpp

That happens when you relocate the directory, delete this file manually and compile again

Ah... my working directory was preceded by /mnt/debHome because I mounted my Debian home partition where the 0ad git repo was located. So that explains that.

Good to know about that. But that wasn't a problem later in my testing. To create the a23 package from the a21 Slackbuild script, I downloaded the a23 source and data archives from wildfiregames. I wanted to replicate exactly how a21 was packaged and built. I put everything in separate directories and only changed the version numbers and md5sums so the Slackbuild script would work.

As for enabling Atlas, I'll try that after I get it working with the defaults first. (the default SBo script doesn't enable atlas).

Next step, as I told elexis, I'm going to try building and running on Slackware-32. Up until now I've only tried on Slackware-64.

comment:9 by Andy Alt, 6 years ago

no luck on Slack 32 either.

I'm out of ideas again, so I'll need some help from the devs troubleshooting when there's time.

by Andy Alt, 6 years ago

output of ldd --verbose pyrogenesis

comment:10 by Andy Alt, 6 years ago

I've attached the output of ldd --verbose pyrogenesis

I was able to build with Atlas by installing wxGTK3 and wxPython3 from the Slackbuilds repo (The build had failed when using wxPython).

There are now Slackware build instructions to make it easier for others to work on this ticket in the future.

comment:11 by Andy Alt, 6 years ago

I started a forum thread on LQ asking for help with this ticket.

comment:12 by Andy Alt, 6 years ago

konmit recently started a 0ad forum thread for this issue

comment:13 by Andy Alt, 6 years ago

Description: modified (diff)
Summary: Crash on SlackwareCrash on Slackware 14.2

comment:14 by Andy Alt, 6 years ago

Milestone: Work In ProgressBacklog
Owner: Andy Alt removed
Status: assignednew

comment:15 by elexis, 5 years ago

Milestone: BacklogAlpha 24
Priority: Must HaveRelease Blocker

comment:16 by Imarok, 5 years ago

Owner: set to Imarok
Resolution: fixed
Status: newclosed

In 22284:

Fix possibly using uninitialized global in rP19674 and rename GetDirectoryName

Reviewed by: weberkai
Fixes: #4789
Differential Revision: https://code.wildfiregames.com/D1852

Note: See TracTickets for help on using tickets.