作者laechan (小太保)
看板mud_sanc
标题[圣殿] debug.log 肥大处理
时间Tue Jun 17 19:28:59 2014
debug.log 不正常增生的情况已经很久了,大约一个月前就开始,
理论上有 error 时玩家会看到相关 msg,但因为一直没有玩家回
报他们看到了什麽,而 error msg 也没有显示究竟是哪一个玩家
触发了 bug,所以为了避免 debug.log 异常肥大造成硬碟频繁地
不正常读写,公布以下措施
1.从今日 shutdown 後开始频繁观察 debug.log
2.只要有 log 到异常 error 而无法查明来源,就看该 error 是
发生在哪个区域或使用哪个技能,就暂时关闭该区域或技能。
若明确知道是哪一位玩家,但无法得知到底他是如何让 bug 产
生的时,也会暂时 banish 该玩家登入。
3.预计到星期五晚上时 debug.log 的档案大小能控制在 999K 内
,才能算是暂时扼止 debug.log 异常增生。
有关闭什麽区域或技能,会以推文的方式告知玩家或线上 chat。
Laechan
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 61.224.75.116
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/mud_sanc/M.1403004542.A.649.html
1F:→ laechan :目前推测有可能是weather_d.c定时清物件没清乾净 06/17 20:02
2F:→ laechan :测试方法是当有bug增生时手动清,然後看增生是否停止 06/17 20:03
3F:推 Fnd :log里没有catch到的exception?跟c不太熟XD 06/17 20:08
一般如果是玩家引起的 error 会有 object: /std/user#编号 这
样的讯息,但是 mudos 写死的某些 error msg 不会带是由哪个物
件於什麽时间引起的,这种的只能靠玩家回报。
然後我推测是 weather_d.c 没有将物件清乾净的原因,是因为从
刚刚 shutdown 後到现在快一小时了,debug.log 讯息如下..
:::::::::::::: /log/debug.log ::::::::::::::
----------------------------------------------------------------------------
sanctuary (FluffOS v2.24) starting up on Linux - Tue Jun 17 19:23:19 2014
Loading preloaded files ...
Initializations complete.
Accepting connections on port 4002.
一整个就是很乾净(我已经把蛮多 bug 都修掉了),sanc 大周期的
clean up 是设定为两小时半左右,所以我估晚上十点左右就会log
到讯息。
※ 编辑: laechan (61.224.75.116), 06/17/2014 20:17:18
2014/06/17 20:31pm updated
instance 指令有问题,暂时关闭。
Error in error handler: *Bad argument 1 to call_other()
Expected: string or array or object Got: 0.
program: /adm/obj/master.c, object: /adm/obj/master, file: /adm/obj/master.c:625
--- trace ---
Object: /std/new_ob/instance/instance_rooms, Program: /std/new_ob/instance/insta
nce_rooms.c
in heart_beat() at /std/new_ob/instance/instance_rooms.c:181
arguments were ()
locals were: 1000,1000,/std/new_ob/instance_room#9452
Object: /std/new_ob/instance/instance_rooms, Program: /std/new_ob/instance/insta
nce_rooms.c
in clean_empty_irooms() at /std/new_ob/instance/instance_rooms.c:125
arguments were ()
locals were: ({ }),({ /* sizeof() == 501 */
"/d/blood/room/69",
"
#ezreal-kill-mob5",
"/d/blood/room/68",
"/d/blood/room/67",
"/d/blood/room/66",
"/d/blood/room/65",
.
. (中略数百行)
.
}),({ /* sizeof() == 2 */
"ezreal",
"zoroo"
}),"
#ezreal-kill-mob5","ezreal",0,0
' error_handler' in '/ adm/obj/master.c' ('/ adm/obj/master') /adm/obj/
master.c:625
arguments were (([ /* sizeof() == 6 */
"line" : 125,
"file" : "/std/new_ob/instance/instance_rooms.c",
"program" : "/std/new_ob/instance/instance_rooms.c",
"trace" : ({ /* sizeof() == 2 */
([ /* sizeof() == 7 */
"line" : 181,
"file" : "/std/new_ob/instance/instance_rooms.c",
"program" : "/std/new_ob/instance/instance_rooms.c",
"locals" : ({ /* sizeof() == 3 */
1000,
1000,
/std/new_ob/instance_room#9452
}),
"function" : "heart_beat",
"arguments" : ({ }),
"object" : /std/new_ob/instance/instance_rooms,
]),
([ /* sizeof() == 7 */
"line" : 125,
"file" : "/std/new_ob/instance/instance_rooms.c",
"program" : "/std/new_ob/instance/instance_rooms.c",
"locals" : ({ /* sizeof() == 7 */
({ }),
({ /* sizeof() == 501 */
.
. (中略数百行)
.
}),
"function" : "clean_empty_irooms",
"arguments" : ({ }),
"object" : /std/new_ob/instance/instance_rooms,
])
}),
"error" : "*Bad argument 1 to all_inventory()
Expected: object Got: 1.
",
"object" : /std/new_ob/instance/instance_rooms,
]),0)
locals were: "执行时段错误: *Bad argument 1 to all_inventory()
Expected: object Got: 1.
程式: /std/new_ob/instance/instance_rooms.c:125
物件: /std/new_ob/instance/instance_rooms
/std/new_ob/instance/instance_rooms "heart_beat" /std/new_ob/instance/instance_r
ooms.c:181
/std/new_ob/instance/instance_rooms "clean_empty_irooms" /std/new_ob/instance/in
stance_rooms.c:125
从上面看不出是哪个玩家造成的,但变数资料里面刚好有储存
({ /* sizeof() == 2 */
"ezreal",
"zoroo"
}),
刚好是副本的 bug、而且副本有 log 哪些玩家进入副本,才能
找到是哪个玩家引起的。
※ 编辑: laechan (61.224.75.116), 06/17/2014 20:27:17
4F:→ laechan :稍微修了一下 instance_rooms.c,instance 指令再开放 06/17 22:05
5F:→ laechan :678 debug.log 06/17 22:16
6F:→ laechan :681 debug.log 06/18 06:17
老 bug,原因一样不明
执行时段错误: *Illegal to move or destruct an object (/d/dfire/caresa/room/m-15) defining actions from a verb function which returns zero.
程式: 0:0
物件: 0
(这就是为什麽无法知道是哪个程式或哪个物件造成的原因)
根据上次经验就算把 caresa 关闭,也会在其它地方出现相同的 bug。
ㄟ...我突然发现有可能是因为 sneak 的关系,sneak 不能这样写:
if(!obs)
{
write(HIC"你偷偷地往 "+str+" 的方向潜行而去 . . .\n"NOR);
if(suc>random(100))
{
me->move_player(exit_file,"SNEAK");
me->force_me("look");
if(!me->query_attackers())
return notify_fail(HIR"你成功\地潜入了这里。\n"NOR);
return notify_fail("");
}
这是不行的。稍微改了一下 sneak 并加上 1 秒的延迟。
另外,新手村所有怪物全面取消(空飘中)的设定。
※ 编辑: laechan (61.224.75.116), 06/18/2014 06:27:17
7F:→ laechan :681 debug.log 06/18 06:27
※ 编辑: laechan (61.224.75.116), 06/18/2014 06:29:08
8F:→ laechan :685 debug.log 06/18 12:59
9F:→ laechan :686 debug.log 06/18 15:21
执行时段错误: *Bad argument 3 to message()
Expected: string or array or object Got: 0.
程式: /adm/simul_efun/tell_room.c(/adm/obj/simul_efun.c):4
物件: /adm/obj/simul_efun
/std/user#18737 "heart_beat" /std/user.c:617
/std/user#18737 "continue_attack" /std/user.c:253
/adm/daemons/user_d "continue_attack" /adm/daemons/user_d.c:886
/adm/daemons/user_d "execute_attack" /adm/daemons/user_d.c:1014
/adm/daemons/user_d "normal_attack" /adm/daemons/user_d.c:1186
/adm/obj/simul_efun "new_defance" /adm/simul_efun/new_defance.c
(/adm/obj/simul_efun.c):328
/u/l/laechan/special/mob/fingerwind1#29606 "shield"
/u/l/laechan/special/mob/fingerwind1.c:27
/d/ppl/quest/evil/mob/devil#29147 "shield"
/d/ppl/quest/evil/mob/devil.c:110
/adm/obj/simul_efun "tell_room" /adm/simul_efun/tell_room.c
(/adm/obj/simul_efun.c):4
tell_room(environment(this_player()),NAME+YEL"施展"HIB"内力吸纳法"NOR+
YEL",吸收了部份的伤害转换为"HIW"生命力\n"NOR);
取消此怪物的 special_fun 及 shield 函数。
※ 编辑: laechan (210.61.157.53), 06/18/2014 15:27:08
10F:→ laechan :686 debug.log 06/18 15:27
11F:→ laechan :688 debug.log 06/19 00:07