0.4 on OpenBSD

For all the help you need with Armagetron!
Post Reply
Monkey
Match Winner
Posts: 744
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

0.4 on OpenBSD

Post by Monkey »

So, I thought I'd start a new, more general thread, for support issues for 0.4 on OpenBSD.

The client crashes sometimes when trying to access the in-game server browser. The more people online, the more this happens. I've built it using Clang. If you need any more information just say so. Here is a backtrace:

Code: Select all

Reading symbols from armagetronad...(no debugging symbols found)...done.
[New process 536130]
[New process 259022]
[New process 285218]
Core was generated by `armagetronad'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00000b24c45f93ca in _libc_rcmd_af (ahost=0x0, porta=-2094570848, locuser=0xb242601ad90 "", remuser=0x0, cmd=0xb2483276240 "", fd2p=0xb24b804ab80, af=-437512976) at /usr/src/lib/libc/net/rcmd.c:78
78      /usr/src/lib/libc/net/rcmd.c: No such file or directory.
[Current thread is 1 (process 536130)]
(gdb) bt full
#0  0x00000b24c45f93ca in _libc_rcmd_af (ahost=0x0, porta=-2094570848, locuser=0xb242601ad90 "", remuser=0x0, cmd=0xb2483276240 "", fd2p=0xb24b804ab80, af=-437512976) at /usr/src/lib/libc/net/rcmd.c:78
        hbuf = '\000' <repeats 255 times>
        pbuf = "@b'\203$\v\000\000\000\000\000\000\000\000\000\000\220\254\001&$\v\000\000\037c`\304$\v\000"
        rport = <optimized out>
        pid = <optimized out>
        hints = {ai_flags = -2094570944, ai_family = 2852, ai_socktype = -1000752430, ai_protocol = 2852, ai_addrlen = 3483261696, ai_addr = 0x0, ai_canonname = 0xb2483276240 "", ai_next = 0xb24c459bad2}
        res = 0xb24a1421b20
        error = <optimized out>
        p = <optimized out>
        r = <optimized out>
        refused = <optimized out>
        mask = <optimized out>
        oldmask = <optimized out>
        lport = <optimized out>
        s = <optimized out>
        timo = <optimized out>
        c = <optimized out>
        numread = <optimized out>
#1  0x00000b24c45f6c9c in p_b_term (p=<optimized out>, cs=<optimized out>) at /usr/src/lib/libc/regex/regcomp.c:723
        start = <optimized out>
        c = <optimized out>
        finish = <optimized out>
        i = <optimized out>
#2  p_bracket (p=0xb2483276240) at /usr/src/lib/libc/regex/regcomp.c:649
        invert = 2039198577
        cs = 0xb24c45e579e <__put_page+638>
#3  0x00000b21e5f18e1f in tBackgroundSync::~tBackgroundSync() ()
No symbol table info available.
#4  0x00000b21e5ec1334 in nDNSResolver::~nDNSResolver() ()
No symbol table info available.
#5  0x00000b21e5ebe4c7 in tJUST_CONTROLLED_PTR<nDNSResolver>::~tJUST_CONTROLLED_PTR() ()
No symbol table info available.
#6  0x00000b21e5ec1530 in void* boost::thread::run<tMemberFunctionRunnerTemplate<nDNSResolver> >(void*) ()
No symbol table info available.
#7  0x00000b23f96653d1 in _rthread_start (v=<optimized out>) at /usr/src/lib/librthread/rthread.c:96
        thread = <optimized out>
        retval = <optimized out>
#8  0x00000b24c45ed178 in _find_string (bp=<optimized out>, n2=0x0, c=4, tgt=<optimized out>, n1=<optimized out>) at /usr/src/lib/libc/time/strptime.c:646
        i = <error reading variable i (Cannot access memory at address 0x0)>
#9  _strptime (buf=<optimized out>, fmt=<optimized out>, tm=0x7f7ffffd12f0, initialize=<optimized out>) at /usr/src/lib/libc/time/strptime.c:488
        century = 0
        relyear = 0
        fields = 0
        neg = <optimized out>
        len = <optimized out>
        c = <optimized out>
        alt_format = <optimized out>
        bp = <optimized out>
        i = <optimized out>
        offs = <optimized out>
        ep = <optimized out>
#10 0x00000b21e5ec14ad in boost::thread::thread<tMemberFunctionRunnerTemplate<nDNSResolver> >(tMemberFunctionRunnerTemplate<nDNSResolver> const&) ()
No symbol table info available.
#11 0x00000b21e5ec13f8 in tMemberFunctionRunnerTemplate<nDNSResolver>::ScheduleBackground(nDNSResolver&, void (nDNSResolver::*)()) ()
No symbol table info available.
#12 0x00000b21e5eb9f84 in nAddress::SetHostname(char const*) ()
No symbol table info available.
#13 0x00000b21e5eb3f9d in nServerInfoBase::AccessAddress() const ()
No symbol table info available.
#14 0x00000b21e5eb291d in nServerInfo::StartQueryAll(nServerInfo::QueryType) ()
No symbol table info available.
#15 0x00000b21e5d92286 in gServerBrowser::BrowseServers() ()
No symbol table info available.
#16 0x00000b21e5d921a2 in gServerBrowser::BrowseSpecialMaster(nServerInfoBase*, char const*) ()
No symbol table info available.
#17 0x00000b21e5ecf2b6 in uMenu::HandleEvent(SDL_Event) ()
No symbol table info available.
#18 0x00000b21e5ecdc58 in uMenu::OnEnter() ()
No symbol table info available.
#19 0x00000b21e5d3f0d7 in net_game() ()
No symbol table info available.
#20 0x00000b21e5ecf2b6 in uMenu::HandleEvent(SDL_Event) ()
No symbol table info available.
#21 0x00000b21e5ecdc58 in uMenu::OnEnter() ()
No symbol table info available.
#22 0x00000b21e5ecf2b6 in uMenu::HandleEvent(SDL_Event) ()
No symbol table info available.
#23 0x00000b21e5ecdc58 in uMenu::OnEnter() ()
No symbol table info available.
#24 0x00000b21e5d41a30 in MainMenu(bool) ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#25 0x00000b21e5d00b30 in main ()
No symbol table info available.
As usual, any help is appreciated.
Playing since December 2006

User avatar
Z-Man
God & Project Admin
Posts: 11405
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: 0.4 on OpenBSD

Post by Z-Man »

Ah! Multithreading! My favorite kind of crashes. Got it reproduced in my VM. I'm thinking about redoing the whole stuff. We now have C++11 available, which allows for much kinder ways to handle background tasks. The existing code has to work with handcrafted objects and member functions; now we have lambdas and std::function to wrap them in.

Monkey
Match Winner
Posts: 744
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: 0.4 on OpenBSD

Post by Monkey »

That's great news, yeah, hopefully over time crashing will happen less and less. :)
Playing since December 2006

Monkey
Match Winner
Posts: 744
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: 0.4 on OpenBSD

Post by Monkey »

OpenBSD now does not build due to there being date -I and date -R in Configure and Configure.ac.
OpenBSD does not have -R or -I options for date.
Commenting out the lines containing those enables the build to proceed.
Playing since December 2006

User avatar
Z-Man
God & Project Admin
Posts: 11405
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: 0.4 on OpenBSD

Post by Z-Man »

Ah. It should be easy enough to replace them with explicit format strings.

Monkey
Match Winner
Posts: 744
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: 0.4 on OpenBSD

Post by Monkey »

Thanks.
Playing since December 2006

Post Reply