Knights 017 Released

A new version of Knights has been released. This release fixes a couple of problems which have been causing the server to crash recently. In particular, there were issues with players observing/spectating games, and with time-limited quests. These should now be fixed and the server should hopefully provide a crash free experience 🙂

Note: The changes are server-side only, so if you already have version 016, there is no need to upgrade (unless you want to run your own server of course).

11 thoughts on “Knights 017 Released”

  1. Good day!
    I’m trying to run it on Linux (Mint 11, Ubuntu 11.04 derivative), but it crashes due to memory corruption. Few other people also reported problems with running, so I bet there’s something wrong with memory management in game, please check it out.
    Crash log (sometimes it just gives me “segmentation fault” without any other information):

    $ knights
    *** glibc detected *** knights: corrupted double-linked list: 0x09b61240 ***
    ======= Backtrace: =========
    /lib/i386-linux-gnu/libc.so.6(+0x6b961)[0x1aa961]
    /lib/i386-linux-gnu/libc.so.6(+0x6bd95)[0x1aad95]
    /lib/i386-linux-gnu/libc.so.6(+0x6d925)[0x1ac925]
    /lib/i386-linux-gnu/libc.so.6(__libc_calloc+0xb2)[0x1aff22]
    /usr/lib/libcurl-gnutls.so.4(Curl_open+0x36)[0x63e146]
    /usr/lib/libcurl-gnutls.so.4(curl_easy_init+0x43)[0x64bb33]
    knights[0x8170e01]
    knights[0x81718bb]
    knights[0x8190d12]
    knights[0x81944c2]
    knights[0x81bdc46]
    /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x155e37]
    knights[0x80521c1]
    ======= Memory map: ========
    00110000-0013d000 r-xp 00000000 08:01 139783 /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4
    0013d000-0013e000 r–p 0002c000 08:01 139783 /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4
    0013e000-0013f000 rw-p 0002d000 08:01 139783 /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4
    0013f000-00299000 r-xp 00000000 08:01 851 /lib/i386-linux-gnu/libc-2.13.so
    00299000-0029a000 —p 0015a000 08:01 851 /lib/i386-linux-gnu/libc-2.13.so
    0029a000-0029c000 r–p 0015a000 08:01 851 /lib/i386-linux-gnu/libc-2.13.so
    0029c000-0029d000 rw-p 0015c000 08:01 851 /lib/i386-linux-gnu/libc-2.13.so
    0029d000-002a0000 rw-p 00000000 00:00 0
    002a0000-002a2000 r-xp 00000000 08:01 861 /lib/i386-linux-gnu/libdl-2.13.so
    002a2000-002a3000 r–p 00001000 08:01 861 /lib/i386-linux-gnu/libdl-2.13.so
    002a3000-002a4000 rw-p 00002000 08:01 861 /lib/i386-linux-gnu/libdl-2.13.so
    002a4000-00335000 r-xp 00000000 08:01 139800 /usr/lib/i386-linux-gnu/libgnutls.so.26.14.12
    00335000-00339000 r–p 00090000 08:01 139800 /usr/lib/i386-linux-gnu/libgnutls.so.26.14.12
    00339000-0033a000 rw-p 00094000 08:01 139800 /usr/lib/i386-linux-gnu/libgnutls.so.26.14.12
    0033a000-003ab000 r-xp 00000000 08:01 881 /lib/i386-linux-gnu/libgcrypt.so.11.6.0
    003ab000-003ac000 r–p 00070000 08:01 881 /lib/i386-linux-gnu/libgcrypt.so.11.6.0
    003ac000-003ae000 rw-p 00071000 08:01 881 /lib/i386-linux-gnu/libgcrypt.so.11.6.0
    003ae000-003d4000 r-xp 00000000 08:01 874 /lib/i386-linux-gnu/libexpat.so.1.5.2
    003d4000-003d5000 —p 00026000 08:01 874 /lib/i386-linux-gnu/libexpat.so.1.5.2
    003d5000-003d7000 r–p 00026000 08:01 874 /lib/i386-linux-gnu/libexpat.so.1.5.2
    003d7000-003d8000 rw-p 00028000 08:01 874 /lib/i386-linux-gnu/libexpat.so.1.5.2
    003d8000-003d9000 r-xp 00000000 08:01 139717 /usr/lib/i386-linux-gnu/libX11-xcb.so.1.0.0
    003d9000-003da000 r–p 00000000 08:01 139717 /usr/lib/i386-linux-gnu/libX11-xcb.so.1.0.0
    003da000-003db000 rw-p 00001000 08:01 139717 /usr/lib/i386-linux-gnu/libX11-xcb.so.1.0.0
    003db000-003e1000 r-xp 00000000 08:01 139715 /usr/lib/i386-linux-gnu/libSM.so.6.0.1
    003e1000-003e2000 r–p 00005000 08:01 139715 /usr/lib/i386-linux-gnu/libSM.so.6.0.1
    003e2000-003e3000 rw-p 00006000 08:01 139715 /usr/lib/i386-linux-gnu/libSM.so.6.0.1
    003e3000-003e7000 r-xp 00000000 08:01 135453 /usr/lib/libXtst.so.6.1.0
    003e7000-003e8000 r–p 00003000 08:01 135453 /usr/lib/libXtst.so.6.1.0
    003e8000-003e9000 rw-p 00004000 08:01 135453 /usr/lib/libXtst.so.6.1.0
    003e9000-003eb000 r-xp 00000000 08:01 856 /lib/i386-linux-gnu/libcom_err.so.2.1
    003eb000-003ec000 r–p 00001000 08:01 856 /lib/i386-linux-gnu/libcom_err.so.2.1
    003ec000-003ed000 rw-p 00002000 08:01 856 /lib/i386-linux-gnu/libcom_err.so.2.1
    003ef000-0040b000 r-xp 00000000 08:01 838 /lib/i386-linux-gnu/ld-2.13.so
    0040b000-0040c000 r–p 0001b000 08:01 838 /lib/i386-linux-gnu/ld-2.13.so
    0040c000-0040d000 rw-p 0001c000 08:01 838 /lib/i386-linux-gnu/ld-2.13.so
    0040d000-0040f000 r-xp 00000000 08:01 887 /lib/i386-linux-gnu/libkeyutils.so.1.3
    0040f000-00410000 r–p 00001000 08:01 887 /lib/i386-linux-gnu/libkeyutils.so.1.3
    00410000-00411000 rw-p 00002000 08:01 887 /lib/i386-linux-gnu/libkeyutils.so.1.3
    00412000-0042c000 r-xp 00000000 08:01 879 /lib/i386-linux-gnu/libgcc_s.so.1
    0042c000-0042d000 r–p 00019000 08:01 879 /lib/i386-linux-gnu/libgcc_s.so.1
    0042d000-0042e000 rw-p 0001a000 08:01 879 /lib/i386-linux-gnu/libgcc_s.so.1
    0042e000-00475000 r-xp 00000000 08:01 138803 /usr/lib/libpulsecommon-0.9.22.so
    00475000-00476000 r–p 00046000 08:01 138803 /usr/lib/libpulsecommon-0.9.22.so
    00476000-00477000 rw-p 00047000 08:01 138803 /usr/lib/libpulsecommon-0.9.22.so
    00477000-0047d000 r-xp 00000000 08:01 139821 /usr/lib/i386-linux-gnu/libkrb5support.so.0.1
    0047d000-0047e000 r–p 00005000 08:01 139821 /usr/lib/i386-linux-gnu/libkrb5support.so.0.1
    0047e000-0047f000 rw-p 00006000 08:01 139821 /usr/lib/i386-linux-gnu/libkrb5support.so.0.1
    0047f000-00482000 r-xp 00000000 08:01 885 /lib/i386-linux-gnu/libgpg-error.so.0.8.0
    00482000-00483000 r–p 00002000 08:01 885 /lib/i386-linux-gnu/libgpg-error.so.0.8.0
    00483000-00484000 rw-p 00003000 08:01 885 /lib/i386-linux-gnu/libgpg-error.so.0.8.0
    00484000-00487000 r-xp 00000000 08:01 932 /lib/i386-linux-gnu/libuuid.so.1.3.0
    00487000-00488000 r–p 00002000 08:01 932 /lib/i386-linux-gnu/libuuid.so.1.3.0
    00488000-00489000 rw-p 00003000 08:01 932 /lib/i386-linux-gnu/libuuid.so.1.3.0
    00489000-00494000 r-xp 00000000 08:01 136089 /usr/lib/liblber-2.4.so.2.5.6
    00494000-00495000 r–p 0000a000 08:01 136089 /usr/lib/liblber-2.4.so.2.5.6
    00495000-00496000 rw-p 0000b000 08:01 136089 /usr/lib/liblber-2.4.so.2.5.6
    00496000-004aa000 r-xp 00000000 08:01 139713 /usr/lib/i386-linux-gnu/libICE.so.6.3.0
    004aa000-004ab000 r–p 00013000 08:01 139713 /usr/lib/i386-linux-gnu/libICE.so.6.3.0
    004ab000-004ac000 rw-p 00014000 08:01 139713 /usr/lib/i386-linux-gnu/libICE.so.6.3.0
    004ac000-004ae000 rw-p 00000000 00:00 0
    004b0000-004f2000 r-xp 00000000 08:01 136094 /usr/lib/libldap_r-2.4.so.2.5.6
    004f2000-004f3000 r–p 00041000 08:01 136094 /usr/lib/libldap_r-2.4.so.2.5.6
    004f3000-004f4000 rw-p 00042000 08:01 136094 /usr/lib/libldap_r-2.4.so.2.5.6
    004f4000-004f5000 rw-p 00000000 00:00 0
    004f5000-0050c000 r-xp 00000000 08:01 139881 /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
    0050c000-0050d000 r–p 00016000 08:01 139881 /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
    0050d000-0050e000 rw-p 00017000 08:01 139881 /usr/lib/i386-linux-gnu/libxcb.so.1.1.0Aborted

  2. Hmm… it works fine on my 64-bit Debian machine. Valgrind is not showing any errors.

    I will try setting up a Linux Mint virtual machine and see if I can reproduce your error that way.

  3. By the way, if this problem gets fixed, or if you need additional info/help with testing/anything else, please mail me. I’m admin at LGDB (see website & mail specified) and I’m tracking hundreds of games, blogs and links – it means I can just forget about Knighs very soon (but using email you’ll surely be able to reach me). We want to add Knights to our database, but this bug prevents us from doing it.

  4. I set up a 32-bit Mint virtual machine but I still don’t see the crash.

    The only clue is that the crash seems to be happening inside libcurl, but I can’t really see what would be causing that.

    I will probably need your help to track this down. Let me have a think about what to do, and then I’ll get back to you by email.

  5. Okay, I’m not skilled at debugging, but I’ll try to help as much as I can. I’ve compiled it with -O3 -ffast-math removed and -g specified instead. I’ve also removed $(STRIP) $@.
    So, here’s the backtrace after crash:
    $ gdb knights

    [crash log]

    (gdb) bt
    #0 0x0012e416 in __kernel_vsyscall ()
    #1 0x0043ee71 in raise () from /lib/i386-linux-gnu/libc.so.6
    #2 0x0044234e in abort () from /lib/i386-linux-gnu/libc.so.6
    #3 0x00475577 in ?? () from /lib/i386-linux-gnu/libc.so.6
    #4 0x0047f961 in ?? () from /lib/i386-linux-gnu/libc.so.6
    #5 0x0047fdb4 in ?? () from /lib/i386-linux-gnu/libc.so.6
    #6 0x00481925 in ?? () from /lib/i386-linux-gnu/libc.so.6
    #7 0x00484f22 in calloc () from /lib/i386-linux-gnu/libc.so.6
    #8 0x00270146 in Curl_open () from /usr/lib/libcurl-gnutls.so.4
    #9 0x0027db33 in curl_easy_init () from /usr/lib/libcurl-gnutls.so.4
    #10 0x081a6d85 in (anonymous namespace)::MetaserverThread::MetaserverThread (
    this=0x83fd068) at src/main/find_server_screen.cpp:167
    #11 0x081a78a8 in (anonymous namespace)::ServerList::ServerList (
    this=0x83fe098, net_drv=…, sock=…, tmr=…, inet=true, emsg=…)
    at src/main/find_server_screen.cpp:373
    #12 0x081a9629 in FindServerScreenImpl::FindServerScreenImpl (this=0x83f0d60,
    ka=…, win=…, g=…, title=…, inet=true)
    at src/main/find_server_screen.cpp:708
    #13 0x081ab613 in FindServerScreen::start (this=0x83fc9e0, ka=…, win=…,
    gui=…) at src/main/find_server_screen.cpp:903
    #14 0x081d2f92 in KnightsApp::executeScreenChange (this=0xbffff7a8)
    —Type to continue, or q to quit—
    at src/main/knights_app.cpp:477
    #15 0x081d46be in KnightsApp::runKnights (this=0xbffff7a8)
    at src/main/knights_app.cpp:857
    #16 0x0820153b in main (argc=1, argv=0xbffff964) at src/main/main.cpp:142

  6. A bit more verbose version (with “set print frame-arguments all”):

    (gdb) bt
    #0 0x0012e416 in __kernel_vsyscall ()
    #1 0x0043ee71 in raise () from /lib/i386-linux-gnu/libc.so.6
    #2 0x0044234e in abort () from /lib/i386-linux-gnu/libc.so.6
    #3 0x00475577 in ?? () from /lib/i386-linux-gnu/libc.so.6
    #4 0x0047f961 in ?? () from /lib/i386-linux-gnu/libc.so.6
    #5 0x0047fdb4 in ?? () from /lib/i386-linux-gnu/libc.so.6
    #6 0x00481925 in ?? () from /lib/i386-linux-gnu/libc.so.6
    #7 0x00484f22 in calloc () from /lib/i386-linux-gnu/libc.so.6
    #8 0x00270146 in Curl_open () from /usr/lib/libcurl-gnutls.so.4
    #9 0x0027db33 in curl_easy_init () from /usr/lib/libcurl-gnutls.so.4
    #10 0x081a6d85 in (anonymous namespace)::MetaserverThread::MetaserverThread (
    this=0x83fd068) at src/main/find_server_screen.cpp:167
    #11 0x081a78a8 in (anonymous namespace)::ServerList::ServerList (
    this=0x83fe098, net_drv=@0x83e6ab8, sock=
    {px = 0xbffff594, pn = {pi_ = 0x83e5c68}}, tmr=@0x83e5c68, inet=true,
    emsg=@0xbffff5d8) at src/main/find_server_screen.cpp:373
    #12 0x081a9629 in FindServerScreenImpl::FindServerScreenImpl (this=0x83f0d60,
    ka=@0xbffff7a8, win={px = 0xbffff648, pn = {pi_ = 0x8413738}},
    g=@0x8413738, title=@0x83fc9ec, inet=true)
    at src/main/find_server_screen.cpp:708
    #13 0x081ab613 in FindServerScreen::start (this=0x83fc9e0, ka=@0xbffff7a8, win=
    {px = 0x83ebdd0, pn = {pi_ = 0x83ebfe8}}, gui=@0x8413738)
    at src/main/find_server_screen.cpp:903
    #14 0x081d2f92 in KnightsApp::executeScreenChange (this=0xbffff7a8)
    at src/main/knights_app.cpp:477
    #15 0x081d46be in KnightsApp::runKnights (this=0xbffff7a8)
    at src/main/knights_app.cpp:857
    #16 0x0820153b in main (argc=1, argv=0xbffff964) at src/main/main.cpp:142

  7. Thanks, unfortunately that doesn’t give me much information though. It seems that it is crashing inside libcurl although I have no idea why.

    Would you be able to run it through valgrind? (valgrind is a debugging tool that checks for memory errors.)

    First you need to install valgrind (sudo aptitude install valgrind) then run the following command (using your debug build of knights):

    valgrind –leak-check=yes –log-file=valgrind.txt knights

    You should now have a file valgrind.txt, please email this to me (it will probably be too long to post here). My address is stephen (at) solarflare.org.uk

    Thanks!

  8. Just to report back (in case anyone finds this blog post later on) — we solved the problem.

    The issue was that Curly Brace was compiling Knights against the headers from Boost 1.48 but linking to the shared libraries from Boost 1.42. (This happened because the symlinks in /usr/lib were incorrect.) The two Boost versions were incompatible, so Knights crashed at runtime.

    If anyone else is having similar problems then you might want to check your Boost installation.

Leave a Reply

Your email address will not be published. Required fields are marked *