1{
2    "version": "1.0.0",
3    "segmentStatus":[
4        {"namespace":"segStatus", "matchKey":"tid=\\d+ (.*)", "desc":""},
5        {"namespace":"segWaitOther", "matchKey":"waiting to lock.*held by thread (\\d+)", "desc":" waiting on lock held by "},
6        {"namespace":"segWaitSelf", "matchKey":"- waiting on <(.*)>", "desc":" waiting on itself"},
7        {"namespace":"segIpcTrans", "matchKey":"os\\.(IpcProxy)\\.transact", "desc":" ipc transact:"},
8        {"namespace":"segIpcFull", "matchKey":"os\\.Ipc\\.(blockUntilThreadAvailable)", "desc":" ipc full:"}
9    ],
10    "Rule2":{
11        "DirOrFile":"/data/log/faultlog/faultlogger/",
12        "Subcatalog":"cppcrash-.*-\\d+-\\d+",
13        "featureId":"07_CPP_CRASH_00",
14        "rules":[
15            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
16            {"namespace":"MainCallTrace", "matchKey":"Thread name:@|@Tid:", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
17        ]
18    },
19    "Rule3":{
20        "DirOrFile":"/data/log/faultlog/faultlogger/",
21        "Subcatalog":"jscrash-.*-\\d+-\\d+",
22        "featureId":"07_JS_ERROR_00,07_JS_ERROR_01",
23        "rules":[
24            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
25            {"namespace":"BasicParam", "matchKey":"Error message:", "v_subreasion":"Error message:(.*)"},
26            {"namespace":"MainCallTrace", "matchKey":"at ",  "v_trace":"@T@at (.*)"},
27            {"namespace":"MainCallTrace", "matchKey":"#@&@pc",  "v_nativetrace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
28        ]
29    },
30    "Rule4":{
31        "DirOrFile":"/data/log/faultlog/faultlogger/",
32        "Subcatalog":"appfreeze-.*-\\d+-\\d+",
33        "featureId":"63_APP_FREEZE_00",
34        "rules":[
35            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
36            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
37            {"namespace":"BasicParam", "matchKey":"TID = ", "v_tid":"TID = (.*)"},
38            {"namespace":"BasicParam", "matchKey":"State:", "v_state":"^State:(.*)"},
39            {"namespace":"BasicParam", "matchKey":"TracerPid:", "v_tracer":"TracerPid:(.*)"},
40            {"namespace":"BasicParam", "matchKey":"hidumper: No such process", "v_exit":"hidumper: (.*):"},
41            {"namespace":"BasicParam", "matchKey":"timeout: ", "v_timeout":"timeout: (.*)"},
42            {"namespace":"BasicParam", "matchKey":"Result: pid", "v_dumpcatch_result":"Result: pid\\(\\d+\\) (process .*)\\."},
43            {"namespace":"MainCallTrace", "matchKey":"@R@(Tid:){1}@{BasicParam.v_tid}@", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)|at (.*)"}
44        ]
45    },
46    "Rule5":{
47        "DirOrFile":"/data/log/faultlog/faultlogger/",
48        "Subcatalog":"sysfreeze-.*-\\d+-\\d+",
49        "featureId":"63_SYS_FREEZE_01",
50        "rules":[
51            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
52            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)", "v_service_block":"Module name:SERVICE_BLOCK"},
53            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
54            {"namespace":"BasicParam", "matchKey":"TID = ", "v_tid":"TID = (.*)"},
55            {"namespace":"BasicParam", "matchKey":"FfrtCallback: task(SERIAL_TASK_TIMEOUT:", "v_queue_name":"FfrtCallback: task\\(SERIAL_TASK_TIMEOUT:.*queue name \\[(sq_\\w+)_\\d+\\]"},
56            {"namespace":"BasicParam", "matchKey":"timeout: ", "v_timeout":"timeout: (.*)"},
57            {"namespace":"MainCallTrace", "matchKey":"@R@(Tid:){1}@{BasicParam.v_tid}@", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
58        ]
59    },
60    "Rule6":{
61        "DirOrFile":"/data/hisi_logs/",
62        "Subcatalog":"\\d{14}-\\d{8}/ap_log/dmesg-ramoops-0",
63        "featureId":"04_PANIC_01",
64        "segmentType":"OneLayer",
65        "startSeg":["NocTrace.v_cpu"],
66        "segStack":["[0-9a-zA-Z_.]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)", "el1_irq+0"],
67        "rules":[
68            {"namespace":"BasicParam", "matchKey":"Unhandled fault:@|@Unable to handle kernel@|@kernel BUG at@|@BUG: failure at@|@Bad mode in@|@DPM device timeout@|@invoked oom-killer@|@Synchronous External Abort:@|@,init]potentially unexpected fatal signal@|@Internal error:@|@NoC Error Probe:@|@mali gpu: Unhandled Page@|@CFI failure@|@Kernel panic - not syncing:", "v_cause":"pid:\\d+,cpu\\d+,.*\\]([A-Za-z].*)", "v_pname":",cpu[0-9],(.*?)[,:\\]]", "v_noc":"(NoC Error)"},
69            {"namespace":"BasicParam", "depend":"BasicParam.v_pname", "matchKey":"PC is at ", "v_f1":"PC is at ([^\\+ ]+.*)"},
70            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"err_code=", "v_errcode":"\\[(err_code=\\d+)\\]"},
71            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"init_flow=", "v_master":"\\[init_flow=\\d+\\]: (.*)"},
72            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"target_flow=", "v_slave":"\\[target_flow=\\d+\\]: (.*)"},
73            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"adjusted ADDR", "v_address":"adjusted.* = (.*)"},
74            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"USER_SIGNAL =", "v_user_signal":"USER_SIGNAL = 0x[0-9a-z]+ (.*)", "v_cpu":"\\(MID: AP_CPU(\\d+)"},
75            {"namespace":"NocTrace", "depend":"BasicParam.v_noc", "matchKey":"sec_val =", "v_security":"(sec_val = 0x[0-9a-f]+)"},
76            {"namespace":"MainCallTrace", "matchKey":"KERNEL CALL STACK", "v_trace":"@T@[0-9a-zA-Z_.]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)"},
77            {"namespace":"MainCallTrace", "matchKey":"Stack backtrace:", "v_trace":"@T@[0-9a-zA-Z_.]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)"},
78            {"namespace":"MainCallTrace", "depend":"BasicParam", "matchKey":"Call trace:", "v_trace":"@T@[0-9a-zA-Z_.]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)"}
79        ],
80        "segmentRule":[
81            {"namespace":"LayerOneCmd", "matchKey":"]:CPU@&@: stopping", "num":1, "v_id":"\\]:CPU(\\d+): stopping", "v_name":"\\]:(CPU\\d+): stopping"}
82        ]
83    },
84    "Rule7":{
85        "DirOrFile":"/data/hisi_logs/",
86        "Subcatalog":"\\d{14}-\\d{8}/ap_log/last_kmsg",
87        "featureId":"04_HWWATCHDOG_00",
88        "rules":[
89            {"namespace":"BasicParam", "matchKey":"fiq triggered by: Watchdog", "v_fiq":"(.*)"},
90            {"namespace":"BasicParam", "depend":"BasicParam.v_fiq","matchKey":"Comm:", "v_pname":"Comm:(.*) Tainted"},
91            {"namespace":"MainCallTrace", "depend":"BasicParam.v_fiq", "matchKey":"Call trace:", "v_trace":"@T@[0-9a-zA-Z_]+\\+0x[0-9a-f]+/0x[0-9a-f]+(.*)"}
92        ]
93    },
94    "Rule8":{
95        "DirOrFile":"/data/log/faultlog/faultlogger/",
96        "Subcatalog":"rustpanic-.*-\\d+-\\d+",
97        "featureId":"04_RUST_PANIC_00",
98        "rules":[
99            {"namespace":"BasicParam", "matchKey":"Module name:", "v_pname":"Module name:(.*)"},
100            {"namespace":"MainCallTrace", "matchKey":"Thread name:", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
101        ]
102    },
103    "Rule9":{
104        "DirOrFile":"/data/log/bbox/",
105        "Subcatalog":"\\d{14}-\\d{8}/bootfail_info_0@|@\\d{14}-\\d{8}/bootfail_info_1@|@\\d{14}-\\d{8}/bootfail_info_2@|@\\d{14}-\\d{8}/bootfail_info_3@|@\\d{14}-\\d{8}/bootfail_info_4@|@\\d{14}-\\d{8}/bootfail_info_5@|@\\d{14}-\\d{8}/bootfail_info_6@|@\\d{14}-\\d{8}/bootfail_info_7@|@\\d{14}-\\d{8}/bootfail_info_8@|@\\d{14}-\\d{8}/bootfail_info_9",
106        "featureId":"04_BOOTFAIL_00",
107        "rules":[
108            {"namespace":"BasicParam", "matchKey":"Fault Reason: ", "v_bootfailReason":"Fault Reason: (.*)"},
109            {"namespace":"BasicParam", "matchKey":"Error Description: ", "v_bootfailDetail":"Error Description: (.*)"},
110            {"namespace":"BasicParam", "matchKey":"Error No: 0x", "v_bootfailErrno":"Error No: (0x[0-9a-f]+)"}
111        ]
112    },
113    "Rule10":{
114        "DirOrFile":"/data/log/faultlog/",
115        "Subcatalog":"CPP_CRASH\\d+",
116        "featureId":"07_CPP_CRASH_00",
117        "rules":[
118            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
119            {"namespace":"MainCallTrace", "matchKey":"Thread name:@|@Tid:", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
120        ]
121    },
122    "Rule11":{
123        "DirOrFile":"/data/log/faultlog/",
124        "Subcatalog":"JS_ERROR\\d+",
125        "featureId":"07_JS_ERROR_00,07_JS_ERROR_01",
126        "rules":[
127            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
128            {"namespace":"BasicParam", "matchKey":"Error message:", "v_subreasion":"Error message:(.*)"},
129            {"namespace":"MainCallTrace", "matchKey":"at ",  "v_trace":"@T@at (.*)"},
130            {"namespace":"MainCallTrace", "matchKey":"#@&@pc",  "v_nativetrace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
131        ]
132    },
133    "Rule12":{
134        "DirOrFile":"/data/log/faultlog/freeze/",
135        "Subcatalog":"*.appfreeze-.*.tmp",
136        "featureId":"63_APP_FREEZE_00",
137        "rules":[
138            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
139            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
140            {"namespace":"BasicParam", "matchKey":"TID = ", "v_tid":"TID = (.*)"},
141            {"namespace":"BasicParam", "matchKey":"State:", "v_state":"^State:(.*)"},
142            {"namespace":"BasicParam", "matchKey":"TracerPid:", "v_tracer":"TracerPid:(.*)"},
143            {"namespace":"BasicParam", "matchKey":"hidumper: No such process", "v_exit":"hidumper:(.*):"},
144            {"namespace":"BasicParam", "matchKey":"timeout: ", "v_timeout":"timeout: (.*)"},
145            {"namespace":"BasicParam", "matchKey":"Result: pid", "v_dumpcatch_result":"Result: pid\\(\\d+\\) (process .*)\\."},
146            {"namespace":"MainCallTrace", "matchKey":"@R@(Tid:){1}@{BasicParam.v_tid}@", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)|at (.*)"}
147        ]
148    },
149    "Rule13":{
150        "DirOrFile":"/data/log/sensorhub-log/",
151        "Subcatalog":"history.log",
152        "featureId":"03_SENSORHUBCRASH_00",
153        "rules":[
154            {"namespace":"BasicParam", "matchKey":"time", "v_last":"@L@time (.+)"}
155        ]
156    },
157    "Rule14":{
158        "DirOrFile":"/data/hisi_logs/",
159        "Subcatalog":"\\d{14}-\\d{8}/cp_log/reset.log",
160        "featureId":"03_MODEMCRASH_00,03_MODEM_REBOOTSYS_00",
161        "rules":[
162            {"namespace":"BasicParam", "matchKey":"brief:", "v_first":"brief:(.*)"},
163            {"namespace":"BasicParam", "matchKey":"task_name:", "v_second":"task_name:(.*)"},
164            {"namespace":"BasicParam", "matchKey":"modid:", "v_last":"modid:(.*)"}
165        ]
166    },
167    "Rule15":{
168        "DirOrFile":"/data/hisi_logs/",
169        "Subcatalog":"\\d{14}-\\d{8}/ap_log/dmesg-ramoops-0",
170        "featureId":"04_PANIC_00",
171        "rules":[
172            {"namespace":"BasicParam", "matchKey":"qtp_rsp", "v_cause":"dfx_qic\\]:(.*)", "v_last":"(qtp_rsp.*)"},
173            {"namespace":"BasicParam", "depend":"BasicParam.v_cause","matchKey":"MID(Master id)", "v_first":"(MID\\(Master id\\).*)"},
174            {"namespace":"BasicParam", "depend":"BasicParam.v_cause","matchKey":"qic_addr", "v_second":"(qic_addr.*)"}
175        ]
176    },
177    "Rule16":{
178        "DirOrFile":"/data/log/faultlog/faultlogger/",
179        "Subcatalog":"syswarning-.*-\\d+-\\d+",
180        "featureId":"63_SYS_WARNING_01",
181        "rules":[
182            {"namespace":"BasicParam", "matchKey":"Module name:", "v_process":"Module name:(.*)"},
183            {"namespace":"BasicParam", "matchKey":"PID = ", "v_pid":"PID = (.*)"},
184            {"namespace":"BasicParam", "matchKey":"TID = ", "v_tid":"TID = (.*)"},
185            {"namespace":"BasicParam", "matchKey":"timeout: ", "v_timeout":"timeout: (.*)"},
186            {"namespace":"MainCallTrace", "matchKey":"@R@(Tid:){1}@{BasicParam.v_tid}@", "v_trace":"@T@#\\d+ pc [0-9a-zA-Z]+ (.*)"}
187        ]
188    }
189}
190