android system server进程打开太多文件导致系统重启
关键log:
Line 34745: 08-11 05:15:56.045 3047 3503 W android.os.Debug: Unable to open /proc/meminfo: Too many open files
Line 34746: 08-11 05:15:56.045 3047 3503 W Process : Unable to open /proc/meminfo
Line 34747: 08-11 05:15:56.045 3047 3503 W Process : Unable to open /proc/meminfo
Line 35262: 08-11 05:16:56.116 3047 3503 W android.os.Debug: Unable to open /proc/meminfo: Too many open files
Line 35263: 08-11 05:16:56.116 3047 3503 W Process : Unable to open /proc/meminfo
Line 35264: 08-11 05:16:56.117 3047 3503 W Process : Unable to open /proc/meminfo
进一步搜索打开文件的log,注意一下3407的进程号。这个代码是全志平台的代码,没写好,导致文件句柄没关。最终导致系统重启。
Line 5552: 08-10 21:01:44.570 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 5553: 08-10 21:01:44.570 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 5800: 08-10 21:02:18.523 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 5801: 08-10 21:02:18.523 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 6055: 08-10 21:02:55.237 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 6056: 08-10 21:02:55.237 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 6385: 08-10 21:03:31.957 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 6386: 08-10 21:03:31.957 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 6641: 08-10 21:04:08.692 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 6642: 08-10 21:04:08.692 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 6908: 08-10 21:04:45.424 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 6909: 08-10 21:04:45.424 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 8000: 08-10 21:05:22.143 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 8001: 08-10 21:05:22.143 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 8250: 08-10 21:05:58.865 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 8251: 08-10 21:05:58.865 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 8574: 08-10 21:06:35.633 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 8575: 08-10 21:06:35.634 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 8842: 08-10 21:07:12.372 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 8843: 08-10 21:07:12.372 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 9107: 08-10 21:07:49.091 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 9108: 08-10 21:07:49.091 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 9376: 08-10 21:08:25.782 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 9377: 08-10 21:08:25.782 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 9938: 08-10 21:09:02.499 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 9939: 08-10 21:09:02.500 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 10581: 08-10 21:09:39.245 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 10582: 08-10 21:09:39.245 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 10857: 08-10 21:10:15.989 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 10858: 08-10 21:10:15.989 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 11133: 08-10 21:10:52.715 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 11134: 08-10 21:10:52.715 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 11427: 08-10 21:11:29.443 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 11428: 08-10 21:11:29.443 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 11736: 08-10 21:12:06.195 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 11737: 08-10 21:12:06.196 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 12050: 08-10 21:12:42.969 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 12051: 08-10 21:12:42.969 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 12331: 08-10 21:13:19.669 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 12332: 08-10 21:13:19.669 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 12972: 08-10 21:13:56.402 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 12973: 08-10 21:13:56.402 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 13280: 08-10 21:14:33.142 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 13281: 08-10 21:14:33.142 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 13582: 08-10 21:15:09.871 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 13583: 08-10 21:15:09.871 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 13937: 08-10 21:15:46.565 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 13938: 08-10 21:15:46.565 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 14230: 08-10 21:16:23.290 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 14231: 08-10 21:16:23.290 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 14515: 08-10 21:16:59.998 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 14516: 08-10 21:16:59.999 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 15163: 08-10 21:17:36.711 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 15164: 08-10 21:17:36.711 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 15518: 08-10 21:18:13.394 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 15519: 08-10 21:18:13.394 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 15811: 08-10 21:18:50.126 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 15812: 08-10 21:18:50.126 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
Line 16181: 08-10 21:19:26.866 3047 4260 W athr_gps: ########### opening /dev/ttyS5**
Line 16182: 08-10 21:19:26.866 3047 4260 W athr_gps: ########### opening /dev/ttyS5**end
本文地址:https://blog.csdn.net/lookfuyao/article/details/107930380