1 (edited by DiPa 2009-12-05 16:18:07)

Topic: [HELP] Problem with own mod - After a round server crashes

Hi,

actually I'm developing a mod. It's base is the iFreeze-MOD by Tom.

Bam didn't give me any compiler errors so I thought everything is fine but it isn't! sad

The main problem is the generating of a new round. After the first round is finished
I see the scoreboard and which team won the round as usual.
But then I see a part of the map, the timelimit and no initialized tee.
Now the round should be initialized but I get the message "Connection Problems...".

In my telnet client it says:

 *** glibc detected *** ./teeworlds_srv: corrupted double-linked list: 0x08ad0158 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7d794b6]
/lib/libc.so.6[0xb7d7ae4a]
/lib/libc.so.6(cfree+0x89)[0xb7d7b179]
./teeworlds_srv[0x80598cc]
./teeworlds_srv[0x8050e3d]
./teeworlds_srv[0x8054549]
./teeworlds_srv[0x80545f3]
./teeworlds_srv[0x805d781]
./teeworlds_srv[0x805da9a]
./teeworlds_srv[0x805e51b]
/lib/libc.so.6(__libc_start_main+0xe0)[0xb7d28fe0]
./teeworlds_srv[0x8049811]
======= Memory map: ========
08048000-0807e000 r-xp 00000000 00:27 6734197    /root/tee_HB/teeworlds_srv
0807e000-0807f000 r-xp 00035000 00:27 6734197    /root/tee_HB/teeworlds_srv
0807f000-08083000 rwxp 00036000 00:27 6734197    /root/tee_HB/teeworlds_srv
08083000-08358000 rwxp 08083000 00:00 0
08acb000-08aec000 rwxp 08acb000 00:00 0          [heap]
b7100000-b7121000 rwxp b7100000 00:00 0
b7121000-b7200000 --xp b7121000 00:00 0
b7294000-b72a3000 r-xp 00000000 00:27 2330032    /lib/libresolv-2.6.1.so
b72a3000-b72a5000 rwxp 0000e000 00:27 2330032    /lib/libresolv-2.6.1.so
b72a5000-b72a7000 rwxp b72a5000 00:00 0
b72a7000-b72ab000 r-xp 00000000 00:27 2330009    /lib/libnss_dns-2.6.1.so
b72ab000-b72ad000 rwxp 00003000 00:27 2330009    /lib/libnss_dns-2.6.1.so
b72ad000-b72b5000 r-xp 00000000 00:27 2330011    /lib/libnss_files-2.6.1.so
b72b5000-b72b7000 rwxp 00007000 00:27 2330011    /lib/libnss_files-2.6.1.so
b72be000-b7310000 rwxp b72be000 00:00 0
b7310000-b7311000 --xp b7310000 00:00 0
b7311000-b7d13000 rwxp b7311000 00:00 0
b7d13000-b7e40000 r-xp 00000000 00:27 2329964    /lib/libc-2.6.1.so
b7e40000-b7e41000 r-xp 0012c000 00:27 2329964    /lib/libc-2.6.1.so
b7e41000-b7e43000 rwxp 0012d000 00:27 2329964    /lib/libc-2.6.1.so
b7e43000-b7e46000 rwxp b7e43000 00:00 0
b7e46000-b7e50000 r-xp 00000000 00:27 2329987    /lib/libgcc_s.so.1
b7e50000-b7e52000 rwxp 00009000 00:27 2329987    /lib/libgcc_s.so.1
b7e52000-b7e75000 r-xp 00000000 00:27 2329996    /lib/libm-2.6.1.so
b7e75000-b7e77000 rwxp 00022000 00:27 2329996    /lib/libm-2.6.1.so
b7e77000-b7f5a000 r-xp 00000000 00:27 5392233    /usr/lib/libstdc++.so.6.0.9
b7f5a000-b7f5d000 r-xp 000e2000 00:27 5392233    /usr/lib/libstdc++.so.6.0.9
b7f5d000-b7f5f000 rwxp 000e5000 00:27 5392233    /usr/lib/libstdc++.so.6.0.9
b7f5f000-b7f65000 rwxp b7f5f000 00:00 0
b7f65000-b7f76000 r-xp 00000000 00:27 2330053    /lib/libz.so.1.2.3
b7f76000-b7f78000 rwxp 00010000 00:27 2330053    /lib/libz.so.1.2.3
b7f78000-b7f8b000 r-xp 00000000 00:27 2330028    /lib/libpthread-2.6.1.so
b7f8b000-b7f8d000 rwxp 00013000 00:27 2330028    /lib/libpthread-2.6.1.so
b7f8d000-b7f90000 rwxp b7f8d000 00:00 0
b7f94000-b7f97000 rwxp b7f94000 00:00 0
b7f97000-b7f98000 r-xp b7f97000 00:00 0          [vdso]
b7f98000-b7fb2000 r-xp 00000000 00:27 2329945    /lib/ld-2.6.1.so
b7fb2000-b7fb4000 rwxp 0001a000 00:27 2329945    /lib/ld-2.6.1.so
bfd99000-bfdec000 rw-p bffab000 00:00 0          [stack]

What's wrong? I didn't change anything which is involved by round changing. yikes

Paul smile

2

Re: [HELP] Problem with own mod - After a round server crashes

DiPa wrote:

I didn't change anything which is involved by round changing. yikes

Because of the fact it fails when the server change rounds, you have changed something over there. This forum does not support mod-making. If you can make a mod, you can also solve your problems. smile

3

Re: [HELP] Problem with own mod - After a round server crashes

Kottizen wrote:
DiPa wrote:

I didn't change anything which is involved by round changing. yikes

Because of the fact it fails when the server change rounds, you have changed something over there. This forum does not support mod-making. If you can make a mod, you can also solve your problems. smile

Yes, I've turned on the round changing. Mhm - You're funny I can't do anything with the text the telnet client says to me. Maybe I'll throw it away and start programming a new one. sad

4

Re: [HELP] Problem with own mod - After a round server crashes

debug your server wink

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

5

Re: [HELP] Problem with own mod - After a round server crashes

Hi!

This is a known problem on linux systems!
Since iFreeze 3 all linux servers crash during a mapchange.
This bug is still present (Check out my last post in the teeworlds+ thread. Same problem - same stacktrace)

Tom knows about it, but he said to me that he won't fix this bug.

I'm running my iFreeze servers in endless mode (2/1 rounds) to prevent them from crashing

If you can fix it, could you release a patch in these forums?

6 (edited by DiPa 2009-12-06 14:43:59)

Re: [HELP] Problem with own mod - After a round server crashes

Wow, mccae,

thanks for this information! I got crazy and searched for errors yesterday but I din't find anything.

I'll try to fix the problem with debugging. Hopefully I'll find the error wink

DiPa smile

Edit #1:
The debug mode doesn't give any information about the error. The same error appears as I posted first.
I'm going to search especially in the map restarting part a problem.

7

Re: [HELP] Problem with own mod - After a round server crashes

DiPa wrote:

Edit #1:
The debug mode doesn't give any information about the error. The same error appears as I posted first.
I'm going to search especially in the map restarting part a problem.

You can make a debug build of the tool with bam.
The stacktrace should contain the exact line numbers then.

8

Re: [HELP] Problem with own mod - After a round server crashes

yes use "server_debug" instead of "server_release"... than use gdb to debug it smile

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

9

Re: [HELP] Problem with own mod - After a round server crashes

Have I mentioned that there is no crash on windows machines?!
This is very odd,...

It seems that there is a problem with the C lib installed on linux...

I would like to know the origin of this bug, so please don't forget to inform us if you find out something new.

10 (edited by matricks 2009-12-07 10:58:24)

Re: [HELP] Problem with own mod - After a round server crashes

That it doesn't crash under windows is either pure luck or the allocation strategy under windows prevents it for some reason. The problem however is that the memory is getting trashed, writing to an invalid pointer or outside a buffer. Running valgrind on the server and making it switch rounds should give you a pretty good picture on what's going on.

EDIT: That the compiler doesn't give you any errors is FAR from all the errors you can do when you code. There are loads of different mistakes you can do with memory, math, logic and such.