[聖殿] debug.log 肥大處理
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://www.ptt.cc/bbs/mud_sanc/M.1403004542.A.649.html
→
06/17 20:02, , 1F
06/17 20:02, 1F
→
06/17 20:03, , 2F
06/17 20:03, 2F
推
06/17 20:08, , 3F
06/17 20:08, 3F
一般如果是玩家引起的 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
→
06/17 22:05, , 4F
06/17 22:05, 4F
→
06/17 22:16, , 5F
06/17 22:16, 5F
→
06/18 06:17, , 6F
06/18 06:17, 6F
老 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
→
06/18 06:27, , 7F
06/18 06:27, 7F
※ 編輯: laechan (61.224.75.116), 06/18/2014 06:29:08
→
06/18 12:59, , 8F
06/18 12:59, 8F
→
06/18 15:21, , 9F
06/18 15:21, 9F
執行時段錯誤: *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
→
06/18 15:27, , 10F
06/18 15:27, 10F
→
06/19 00:07, , 11F
06/19 00:07, 11F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 3 篇):