1

Topic: Linux Mod compilation

Hi,
I cant speak Eng very well so i write a short TExt.
My Problem:

If i compile my Mod on Linux i got this Error.




*** glibc detected *** ./DDRace-Server: munmap_chunk(): invalid pointer: 0x0a0d0458 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7cec935]
/lib/libc.so.6[0xb7ceda39]
./DDRace-Server[0x805a503]
./DDRace-Server[0x805a612]
./DDRace-Server[0x804b6bd]
./DDRace-Server[0x806e0c0]
./DDRace-Server[0x806e852]
/lib/libc.so.6(__libc_start_main+0xe5)[0xb7c98455]
./DDRace-Server(pthread_cancel+0x49)[0x804aba1]
======= Memory map: ========
08048000-080bc000 r-xp 00000000 08:03 133597214                          /home/Meiner/DDRace-Server
080bc000-080bf000 rw-p 00073000 08:03 133597214                          /home/Meiner/DDRace-Server
080bf000-0810e000 rw-p 080bf000 00:00 0
0a0ac000-0a120000 rw-p 0a0ac000 00:00 0                                  [heap]
b6f4a000-b6f4c000 r-xp 00000000 08:03 60920269                           /lib/libnss_mdns4.so.2
b6f4c000-b6f4d000 rw-p 00001000 08:03 60920269                           /lib/libnss_mdns4.so.2
b6f4d000-b6f5c000 r-xp 00000000 08:03 60918596                           /lib/libresolv-2.7.so
b6f5c000-b6f5e000 rw-p 0000e000 08:03 60918596                           /lib/libresolv-2.7.so
b6f5e000-b6f60000 rw-p b6f5e000 00:00 0
b6f60000-b6f64000 r-xp 00000000 08:03 60920231                           /lib/libnss_dns-2.7.so
b6f64000-b6f66000 rw-p 00003000 08:03 60920231                           /lib/libnss_dns-2.7.so
b6f66000-b6f6f000 r-xp 00000000 08:03 60918582                           /lib/libnss_files-2.7.so
b6f6f000-b6f71000 rw-p 00008000 08:03 60918582                           /lib/libnss_files-2.7.so
b6f77000-b6f78000 ---p b6f77000 00:00 0
b6f78000-b7c82000 rw-p b6f78000 00:00 0
b7c82000-b7dba000 r-xp 00000000 08:03 60920221                           /lib/libc-2.7.so
b7dba000-b7dbb000 r--p 00138000 08:03 60920221                           /lib/libc-2.7.so
b7dbb000-b7dbd000 rw-p 00139000 08:03 60920221                           /lib/libc-2.7.so
b7dbd000-b7dc0000 rw-p b7dbd000 00:00 0
b7dc0000-b7dcc000 r-xp 00000000 08:03 60919995                           /lib/libgcc_s.so.1
b7dcc000-b7dcd000 rw-p 0000b000 08:03 60919995                           /lib/libgcc_s.so.1
b7dcd000-b7dce000 rw-p b7dcd000 00:00 0
b7dce000-b7df2000 r-xp 00000000 08:03 60918587                           /lib/libm-2.7.so
b7df2000-b7df4000 rw-p 00023000 08:03 60918587                           /lib/libm-2.7.so
b7df4000-b7ed7000 r-xp 00000000 08:03 82150029                           /usr/lib/libstdc++.so.6.0.10
b7ed7000-b7eda000 r--p 000e2000 08:03 82150029                           /usr/lib/libstdc++.so.6.0.10
b7eda000-b7edc000 rw-p 000e5000 08:03 82150029                           /usr/lib/libstdc++.so.6.0.10
b7edc000-b7ee2000 rw-p b7edc000 00:00 0
b7ee2000-b7ef6000 r-xp 00000000 08:03 60920230                           /lib/libpthread-2.7.so
b7ef6000-b7ef8000 rw-p 00013000 08:03 60920230                           /lib/libpthread-2.7.so
b7ef8000-b7efa000 rw-p b7ef8000 00:00 0
b7efb000-b7efd000 r-xp 00000000 08:03 60920270                           /lib/libnss_mdns4_minimal.so.2
b7efd000-b7efe000 rw-p 00001000 08:03 60920270                           /lib/libnss_mdns4_minimal.so.2
b7efe000-b7f02000 rw-p b7efe000 00:00 0
b7f02000-b7f1c000 r-xp 00000000 08:03 60918614                           /lib/ld-2.7.so
b7f1c000-b7f1e000 rw-p 0001a000 08:03 60918614                           /lib/ld-2.7.so
bfcbf000-bfcd4000 rw-p 7ffffffe9000 00:00 0                              [stack]
Aborted





Whats the Problem?
I search about 3h but i found only 1 thread with the same Problem. But the thread is old an no answer!

Cargo2

2 (edited by BotoX 2011-09-03 00:33:03)

Re: Linux Mod compilation

This looks like you'r running the server and it crashes. (*removed*)

Because this isn't a compiler error, that's a trace wink
Try to compile it with bam server_debug and start it with: gdb teeworlds_srv_d (*removed*)

I added a german translation because he sux at english tongue

I removed a German translation because it's against the rules. /Kottizen

3 (edited by Cargo2 2011-09-03 01:00:38)

Re: Linux Mod compilation

This GDB was configured as "i486-linux-gnu"...
(gdb) r
Starting program: /home/Meiner/DDRace-Server_d
[Thread debugging using libthread_db enabled]
[11-09-03 00:54:11][engine]: running on unix-linux-ia32
[11-09-03 00:54:11][engine]: arch is little endian
[New Thread 0xb7c706c0 (LWP 9528)]
[New Thread 0xb7965b90 (LWP 9539)]
[11-09-03 00:54:11][storage]: added path '$USERDIR' ('/root/.teeworlds')
[11-09-03 00:54:11][storage]: added path '$DATADIR' ('data')
[11-09-03 00:54:11][storage]: added path '$CURRENTDIR' ('/home/Meiner')
[11-09-03 00:54:11][console]: executing 'autoexec.cfg'
[11-09-03 00:54:11][Console]: sv_warmup changed to 0
[11-09-03 00:54:11][Console]: sv_teamdamage changed to 0
[11-09-03 00:54:11][Console]: sv_rounds_per_map changed to 1
[11-09-03 00:54:11][Console]: sv_powerups changed to 0
[11-09-03 00:54:11][Console]: sv_checkpoint_save changed to 1
[11-09-03 00:54:11][Console]: sv_tournament_mode changed to 0
[11-09-03 00:54:11][Console]: sv_spectator_slots changed to 0
[11-09-03 00:54:11][Console]: sv_pauseable changed to 0
[11-09-03 00:54:11][Console]: sv_port changed to 8303
[11-09-03 00:54:11][Console]: sv_external_port changed to 0
[11-09-03 00:54:11][Console]: sv_rcon_score changed to 1
[11-09-03 00:54:11][Console]: No such command: .
[11-09-03 00:54:11][tuning]: player_hooking changed to 1.00
[11-09-03 00:54:11][tuning]: player_collision changed to 1.00
[11-09-03 00:54:11][Console]: No such command: sv_cheats.
[11-09-03 00:54:11][Console]: sv_test_cmds changed to 1
[11-09-03 00:54:11][Console]: sv_hide_score changed to 0
[11-09-03 00:54:11][Console]: No such command: cl_ddrace_scoreboard.
[11-09-03 00:54:11][Console]: sv_rescue_effect changed to 0
[11-09-03 00:54:11][server]: starting...
[11-09-03 00:54:11][datafile]: loading. filename='maps/xyz_ddrace.map'
[11-09-03 00:54:11][datafile]: allocsize=1084
[11-09-03 00:54:11][datafile]: readsize=964
[11-09-03 00:54:11][datafile]: swaplen=984
[11-09-03 00:54:11][datafile]: item_size=764
[11-09-03 00:54:11][datafile]: loading done. datafile='maps/xyz_ddrace.map'
[11-09-03 00:54:11][server]: maps/xyz_ddrace.map crc is 3137616a
[11-09-03 00:54:11][console]: executing 'banmasters.cfg'
[11-09-03 00:54:11][server/banmaster]: cleared banmaster list
[11-09-03 00:54:11][server/banmaster]: succesfully added banmaster
[11-09-03 00:54:11][server]: server name is 'TEST SERVER'
[11-09-03 00:54:11][datafile]: loading data index=5 size=1670 uncompressed=80000
[11-09-03 00:54:11][console]: failed to open 'data/maps/xyz_ddrace.cfg'
[11-09-03 00:54:11][console]: failed to open 'data/maps/xyz_ddrace.map.cfg'
[11-09-03 00:54:11][server]: version 0.6 626fce9a778df4d4
*** glibc detected *** /home/Meiner/DDRace-Server_d: munmap_chunk(): invalid pointer: 0x0940d458 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7cdb935]
/lib/libc.so.6[0xb7cdca39]
/home/Meiner/DDRace-Server_d[0x80699c3]
/home/Meiner/DDRace-Server_d[0x805a556]
/home/Meiner/DDRace-Server_d[0x805a66d]
/home/Meiner/DDRace-Server_d[0x805935f]
/home/Meiner/DDRace-Server_d[0x804b3d9]
/home/Meiner/DDRace-Server_d[0x80725a4]
/home/Meiner/DDRace-Server_d[0x807320b]
/lib/libc.so.6(__libc_start_main+0xe5)[0xb7c87455]
/home/Meiner/DDRace-Server_d(__gxx_personality_v0+0xc1)[0x804a561]
======= Memory map: ========
08048000-080d0000 r-xp 00000000 08:03 133597221                          /home/Meiner/DDRace-Server_d
080d0000-080d3000 rw-p 00088000 08:03 133597221                          /home/Meiner/DDRace-Server_d
080d3000-08122000 rw-p 080d3000 00:00 0
093e9000-0945d000 rw-p 093e9000 00:00 0                                  [heap]
b6f39000-b6f3b000 r-xp 00000000 08:03 60920269                           /lib/libnss_mdns4.so.2
b6f3b000-b6f3c000 rw-p 00001000 08:03 60920269                           /lib/libnss_mdns4.so.2
b6f3c000-b6f4b000 r-xp 00000000 08:03 60918596                           /lib/libresolv-2.7.so
b6f4b000-b6f4d000 rw-p 0000e000 08:03 60918596                           /lib/libresolv-2.7.so
b6f4d000-b6f4f000 rw-p b6f4d000 00:00 0
b6f4f000-b6f53000 r-xp 00000000 08:03 60920231                           /lib/libnss_dns-2.7.so
b6f53000-b6f55000 rw-p 00003000 08:03 60920231                           /lib/libnss_dns-2.7.so
b6f55000-b6f5e000 r-xp 00000000 08:03 60918582                           /lib/libnss_files-2.7.so
b6f5e000-b6f60000 rw-p 00008000 08:03 60918582                           /lib/libnss_files-2.7.so
b6f66000-b6f67000 ---p b6f66000 00:00 0
b6f67000-b7c71000 rw-p b6f67000 00:00 0
b7c71000-b7da9000 r-xp 00000000 08:03 60920221                           /lib/libc-2.7.so
b7da9000-b7daa000 r--p 00138000 08:03 60920221                           /lib/libc-2.7.so
b7daa000-b7dac000 rw-p 00139000 08:03 60920221                           /lib/libc-2.7.so
b7dac000-b7daf000 rw-p b7dac000 00:00 0
b7daf000-b7dbb000 r-xp 00000000 08:03 60919995                           /lib/libgcc_s.so.1
b7dbb000-b7dbc000 rw-p 0000b000 08:03 60919995                           /lib/libgcc_s.so.1
b7dbc000-b7dbd000 rw-p b7dbc000 00:00 0
b7dbd000-b7de1000 r-xp 00000000 08:03 60918587                           /lib/libm-2.7.so
b7de1000-b7de3000 rw-p 00023000 08:03 60918587                           /lib/libm-2.7.so
b7de3000-b7ec6000 r-xp 00000000 08:03 82150029                           /usr/lib/libstdc++.so.6.0.10
b7ec6000-b7ec9000 r--p 000e2000 08:03 82150029                           /usr/lib/libstdc++.so.6.0.10
b7ec9000-b7ecb000 rw-p 000e5000 08:03 82150029                           /usr/lib/libstdc++.so.6.0.10
b7ecb000-b7ed1000 rw-p b7ecb000 00:00 0
b7ed1000-b7ee5000 r-xp 00000000 08:03 60920230                           /lib/libpthread-2.7.so
b7ee5000-b7ee7000 rw-p 00013000 08:03 60920230                           /lib/libpthread-2.7.so
b7ee7000-b7ee9000 rw-p b7ee7000 00:00 0
b7eea000-b7eec000 r-xp 00000000 08:03 60920270                           /lib/libnss_mdns4_minimal.so.2
b7eec000-b7eed000 rw-p 00001000 08:03 60920270                           /lib/libnss_mdns4_minimal.so.2
b7eed000-b7ef1000 rw-p b7eed000 00:00 0
b7ef1000-b7f0b000 r-xp 00000000 08:03 60918614                           /lib/ld-2.7.so
b7f0b000-b7f0d000 rw-p 0001a000 08:03 60918614                           /lib/ld-2.7.so
bfe22000-bfe37000 rw-p 7ffffffe9000 00:00 0                              [stack]

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb7c706c0 (LWP 9528)]
0xb7c9b556 in raise () from /lib/libc.so.6
(gdb)


o.O --> Was that right ;D?

Removed German. /Kottizen ---->      -.-

Write in Eng Pls. I Understand it . Thx!

4

Re: Linux Mod compilation

Which os is your server running? Glibc seems to raise an error o_O
Can you try it with vanilla teeworlds server please and find out your glibc version somehow, just google how to do that xD

5

Re: Linux Mod compilation

I will do it. But not know.
Thx for you answer..!

6

Re: Linux Mod compilation

At least it looks like you run it as root coz the userdir is set to his home-directory. That's bad but I think it's not the reason for the failure.
I'm even not sure why all those libnss stuff is listed here. I would not expect that. It even looks like you are running some apple stuff (mdsn)

7

Re: Linux Mod compilation

It is needed for host resolving. But I never saw any host resolv in teeworlds o_O
Maybe for binding to a port? Or maybe for resolving sv_bindaddr to a ip when it's a domain xD

Which linux distribution are you running (Debian, Ubuntu, Archlinux, ..)?

8

Re: Linux Mod compilation

BotoX wrote:

It is needed for host resolving.

It's even needed for configuring security stuff (for example if you would auth via file or file and ldap, ...).
But host resolving even make sense. I know there is a host lookupthread in nodes... used for master servers. I'm pretty sure there would be something similar in 0.6 based mods (maybe somewhere in the register.cpp ...).

Greetings,
Mo(2)

9

Re: Linux Mod compilation

AHHH YES THATS IT! Resolving the master server ip's !