Issue information

Issue ID
#6578
Status
New
Severity
None
Started
Hercules Elf Bot
Aug 29, 2012 7:01
Last Post
Hercules Elf Bot
Aug 31, 2012 23:27
Confirmation
N/A

Hercules Elf Bot - Aug 29, 2012 7:01

Originally posted by [b]tommym[/b]
Using rA 16705

[CODE]
Core was generated by `./map-server_sql'.
Program terminated with signal 11, Segmentation fault.
#0 0x0806d1ca in map_foreachinmovearea (func=0x809d9d0 <clif_insight>, center=0xaa55
962 if( bl->type&type &&
(gdb) bt full
#0 0x0806d1ca in map_foreachinmovearea (func=0x809d9d0 <clif_insight>, center=0xaa55
bx = 6
by = 23
m = <value optimized out>
returnCount = <value optimized out>
bl = 0xfdfdfdfd
blockcount = 0
i = <value optimized out>
x0 = <value optimized out>
x1 = <value optimized out>
y0 = 168
y1 = <value optimized out>
#1 0x081a12a4 in unit_walktoxy_timer (tid=5453, tick=1561940603, id=110092175, data=
i = <value optimized out>
x = <value optimized out>
y = <value optimized out>
dx = 1
dy = 1
bl = 0xaa552c1c
sd = 0x0
md = 0xaa552c1c
ud = 0xaa552c34
mrd = 0x0
#2 0x081b6149 in do_timer (tick=1561940612) at timer.c:370
tid = 5453
diff = -9
__FUNCTION__ = "do_timer"
#3 0x081b354d in main (argc=1, argv=0xbf8517e4) at core.c:300
next = <value optimized out>[/CODE]

Hercules Elf Bot - Aug 29, 2012 9:14

Originally posted by [b]GreenBox[/b]
Do you have some custom modification?

This post has been edited by GreenBox on Aug 29, 2012 9:15

Hercules Elf Bot - Aug 29, 2012 16:46

Originally posted by [b]tommym[/b]
The only main custom modifications I have are 1)Lilith's skill damage source mod([url="http://rathena.org/board/topic/62238-manage-skill-damage-11/"]http://rathena.org/board/topic/62238-manage-skill-damage-11/[/url]) and the 2)@go/@warp delay mod([url="http://rathena.org/board/topic/61836-warp-go-damage-delay/"]http://rathena.org/board/topic/61836-warp-go-damage-delay/[/url]). Both were applied through provided patch. The only other source mods I did was change 3) MAX_CHAR to 12, 4) MAX_LEVEL to 255, and 5) PACKETVER to 20110315(all 5 mods were done over a month ago and I only started to receive map server crashes recently after updating the SVN).

My server actually crashed two times again today and here are the respective core dump outputs:

Crash #2-

[CODE]
Core was generated by `./map-server_sql'.
Program terminated with signal 11, Segmentation fault.
#0 map_foreachinmap (func=0x80e9aa0 <mob_warpslave_sub>, m=609, type=2) at map.c:1270
1270 for( bl = map[m].block_mob[b] ; bl != NULL ; bl = bl->next )
(gdb) bt full
#0 map_foreachinmap (func=0x80e9aa0 <mob_warpslave_sub>, m=609, type=2) at map.c:1270
b = <value optimized out>
bsize = 900
returnCount = <value optimized out>
bl = 0xfdfdfdfd
blockcount = <value optimized out>
i = <value optimized out>
#1 0x080eab7a in mob_warpslave (bl=0xa8a31e94, range=2) at mob.c:2822
No locals.
#2 0x08142c39 in skill_castend_nodamage_id (src=0xa8a31e94, bl=0xa8a31e94, skillid=352, skilllv=1, tick=1573805156, flag=0) at skill.c:6570
sd = 0x0
dstsd = 0x0
md = 0xa8a31e94
dstmd = 0xa8a31e94
hd = 0x0
mer = 0x0
sstatus = 0xa8a32080
tstatus = 0xa8a32080
tsc = 0xa8a320dc
tsce = 0x0
i = <value optimized out>
type = SC_NONE
__FUNCTION__ = "skill_castend_nodamage_id"
scs = {SC_QUAGMIRE, SC_PROVOKE, SC_ROKISWEIL, SC_GRAVITATION, SC_SUITON, SC_STRIPWEAPON, SC_STRIPSHIELD, SC_STRIPARMOR, SC_STRIPHELM, SC_BLADESTOP}
spellarray = {14, 19, 20}
mask = {{0, -1}, {1, -1}, {1, 0}, {1, 1}, {0, 1}, {-1, 1}, {-1, 0}, {-1, -1}}
per = {{20, 50}, {50, 60}, {25, 75}, {60, 64}, {34, 67}}
sc = {SC_STUN, SC_SILENCE, SC_CONFUSION, SC_BLEEDING}
#3 0x08154810 in skill_castend_id (tid=-1, tick=1573805156, id=110083485, data=0) at skill.c:9136
target = 0xa8a31e94
src = 0xa8a31e94
sd = 0x0
md = 0xa8a31e94
ud = 0xa8a31eac
sc = <value optimized out>
inf = <value optimized out>
inf2 = <value optimized out>
flag = 0
#4 0x081a3e0b in unit_skilluse_id2 (src=0xa8a31e94, target_id=110083485, skill_num=352, skill_lv=1, casttime=0, castcancel=<value optimized out>) at unit.c:1339
ud = 0xa8a31eac
tstatus = 0xa8a32080
sc = 0x0
sd = 0x0
target = 0xa8a31e94
tick = 1573805156
temp = 0
__FUNCTION__ = "unit_skilluse_id2"
#5 0x080ea657 in mobskill_use (md=0xa8a31e94, tick=1573805135, event=-1) at mob.c:3249
c2 = <value optimized out>
flag = <value optimized out>
ms = 0xaedee544
---Type <return> to continue, or q <return> to quit---
fbl = 0x0
bl = 0xa8a31e94
fmd = 0x0
i = <value optimized out>
j = <value optimized out>
n = 5
__FUNCTION__ = "mobskill_use"
#6 0x081a4a11 in unit_attack_timer_sub (tid=5924, tick=1573805135, id=110083485, data=0) at unit.c:1803
No locals.
#7 unit_attack_timer (tid=5924, tick=1573805135, id=110083485, data=0) at unit.c:1843
bl = 0xa8a31e94
#8 0x081b6149 in do_timer (tick=1573805156) at timer.c:370
tid = 5924
diff = -21
__FUNCTION__ = "do_timer"
#9 0x081b354d in main (argc=1, argv=0xbfbda834) at core.c:300
next = <value optimized out>[/CODE]

Crash #3-

[CODE]
Core was generated by `./map-server_sql'.
Program terminated with signal 11, Segmentation fault.
#0 map_foreachinrange (func=0x81203a0 <skill_area_sub>, center=0xa9bbc3ac, range=5, type=<value optimized out>) at map.c:579
579 if( bl->x>=x0 && bl->x<=x1 && bl->y>=y0 && bl->y<=y1
(gdb) bt full
#0 map_foreachinrange (func=0x81203a0 <skill_area_sub>, center=0xa9bbc3ac, range=5, type=<value optimized out>) at map.c:579
bx = 17
by = 40
m = 646
returnCount = <value optimized out>
bl = 0xfdfdfdfd
blockcount = 7
i = <value optimized out>
x0 = 139
x1 = 149
y0 = 311
y1 = 321
#1 0x08143e35 in skill_castend_nodamage_id (src=0xa9bbc3ac, bl=0xa9bbc3ac, skillid=173, skilllv=1, tick=1593651998, flag=0) at skill.c:5599
sd = 0x0
dstsd = <value optimized out>
md = 0xa9bbc3ac
dstmd = 0xa9bbc3ac
hd = 0x0
mer = 0x0
sstatus = 0xa9bbc598
tstatus = 0xa9bbc598
tsc = 0xa9bbc5f4
tsce = 0x0
i = <value optimized out>
type = SC_NONE
__FUNCTION__ = "skill_castend_nodamage_id"
scs = {SC_QUAGMIRE, SC_PROVOKE, SC_ROKISWEIL, SC_GRAVITATION, SC_SUITON, SC_STRIPWEAPON, SC_STRIPSHIELD, SC_STRIPARMOR, SC_STRIPHELM, SC_BLADESTOP}
spellarray = {14, 19, 20}
mask = {{0, -1}, {1, -1}, {1, 0}, {1, 1}, {0, 1}, {-1, 1}, {-1, 0}, {-1, -1}}
per = {{20, 50}, {50, 60}, {25, 75}, {60, 64}, {34, 67}}
sc = {SC_STUN, SC_SILENCE, SC_CONFUSION, SC_BLEEDING}
#2 0x08154810 in skill_castend_id (tid=130, tick=1593651998, id=110017741, data=0) at skill.c:9136
target = 0xa9bbc3ac
src = 0xa9bbc3ac
sd = 0x0
md = 0xa9bbc3ac
ud = 0xa9bbc3c4
sc = <value optimized out>
inf = <value optimized out>
inf2 = <value optimized out>
flag = 0
#3 0x081b6149 in do_timer (tick=1593652001) at timer.c:370
tid = 130
diff = -3
__FUNCTION__ = "do_timer"
#4 0x081b354d in main (argc=1, argv=0xbf99ac34) at core.c:300
next = <value optimized out>[/CODE]

If you can take a look at this when you have the time, that would be much appreciated. Thanks!

This post has been edited by tommym on Aug 29, 2012 16:50

Hercules Elf Bot - Aug 29, 2012 23:36

Originally posted by [b]GreenBox[/b]
Seems like some block as freed but was not removed from the block_list, so the pointer points to bogus memory which is filled with 0xfd(freed) them map_foreachinrange try to use it as a valid pointer.

This post has been edited by GreenBox on Aug 29, 2012 23:37

Hercules Elf Bot - Aug 30, 2012 0:13

Originally posted by [b]tommym[/b]
Ah, thanks for the reply GreenBox.

Would you happen to know to remedy this problem? Would I need to update the rA SVN(even though the current server folder is only around 11 revisions behind)?

I don't know how to reproduce this map server crash as well. I assumed before that it was simply some malicious player exploiting some bug in the source.

Hercules Elf Bot - Aug 31, 2012 0:15

Originally posted by [b]tommym[/b]
I'm pretty sure this is a bug that should occur in all recent server revisions, causing crashes for servers who are updated to the latest rA SVN and have a lot of players. I just realized that recently, map_foreachinmap/buildin_areawarp_sub[color=#282828][font=helvetica, arial, sans-serif][size=3] was modified, according to this thread:[/size][/font][/color]

[url="http://rathena.org/board/tracker/issue-6526-mapwarp-commands-show-error/page__gopid__13601#entry13601"]http://rathena.org/board/tracker/issue-6526-mapwarp-commands-show-error/page__gopid__13601#entry13601[/url]

I'm suddenly getting map server crashes after I updated my rA SVN past [color=#282828][font=helvetica, arial, sans-serif][size=3]16669(currently at 16705), all involving '[/size][/font][/color]map_foreach...' with initially a population of 90 players playing(now lessened by the amt of crashes)

More specifically, I think it was because 'buildin_areawarp_sub' was modified.

This post has been edited by tommym on Aug 31, 2012 0:35

Hercules Elf Bot - Aug 31, 2012 19:30

Originally posted by [b]GreenBox[/b]
Those modifications doesn't contribute for any crash of this kind D:
Some sd/md/nd/whateverd was freed but wasn't removed from the linked list but I couldn't find where

Hercules Elf Bot - Aug 31, 2012 23:27

Originally posted by [b]tommym[/b]
Could these errors have anything to do with the bug in this thread:
[url="http://rathena.org/board/tracker/issue-6584-deluge-wall-of-fog-map-server-crash/"]http://rathena.org/board/tracker/issue-6584-deluge-wall-of-fog-map-server-crash/[/url]

^I noticed after I updated from rA 16705 to a revision post-[url="http://trac.rathena.org/changeset/16719"]r16719[/url] (16723), my server has stopped crashing it appears, though it may be too early to tell(uptime is currently a total of 16 hours).