当前位置:网站首页>Throwing OutOfMemoryError “Could not allocate JNI Env“
Throwing OutOfMemoryError “Could not allocate JNI Env“
2022-07-25 14:10:00 【天涯海风】
09-09 15:28:57.588 7460-7471/com.moreunion.zhenghao I/art: Background sticky concurrent mark sweep GC freed 74917(4MB) AllocSpace objects, 15(580KB) LOS objects, 7% free, 59MB/64MB, paused 6.228ms total 59.379ms
07-22 11:55:26.373 17580 17590 I art : Background sticky concurrent mark sweep GC freed 1047697(16MB) AllocSpace objects, 0(0B) LOS objects, 31% free, 29MB/43MB, paused 4.934ms total 159.085ms
1207-22 11:55:26.377 17580 17862 E art : ashmem_create_region failed for 'indirect ref table': Bad file descriptor
1307-22 11:55:26.377 17580 17862 W art : Throwing OutOfMemoryError "Could not allocate JNI Env"
1407-22 11:55:26.387 17580 17580 I MainView: updateTMSIList
1507-22 11:55:26.370 17862 17862 W pool-6-thread-1: type=1400 audit(0.0:133498): avc: denied {
read } for name="mem" dev="debugfs" ino=1015374 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0
1607-22 11:55:26.370 17862 17862 W pool-6-thread-1: type=1400 audit(0.0:133499): avc: denied {
read } for name="mem" dev="debugfs" ino=1015374 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0
Throwing OutOfMemoryError “Could not allocate JNI Env”
可以导致OOM的原因有以下几种:
文件描述符(fd)数目超限,即proc/pid/fd下文件数目突破/proc/pid/limits中的限制。可能的发生场景有:
短时间内大量请求导致socket的fd数激增,大量(重复)打开文件等
线程数超限,即proc/pid/status中记录的线程数(threads项)突破/proc/sys/kernel/threads-max中规定的最大线程数。可能的发生场景有:
app内多线程使用不合理,如多个不共享线程池的OKhttpclient等等
传统的java堆内存超限,即申请堆内存大小超过了 Runtime.getRuntime().maxMemory()
(低概率)32为系统进程逻辑空间被占满导致OOM.
其他
可以利用linux的inotify机制进行监控:
watch /proc/pid/fd来监控app打开文件的情况,
watch /proc/pid/task来监控线程使用情况
边栏推荐
- Wangeditor rich text editor
- bond0脚本
- From fish eye to look around to multi task King bombing -- a review of Valeo's classic articles on visual depth estimation (from fisheyedistancenet to omnidet) (Part 2)
- Depth estimation self-monitoring model monodepth2 paper summary and source code analysis [theoretical part]
- What problems should SEOER pay attention to when baidu searches and attacks pirated websites?
- 金鱼哥RHCA回忆录:CL210管理存储--管理共享文件系统
- Word set paste to retain only text
- Typora无法打开提示安装新版本解决办法
- 苹果手机端同步不成功,退出登录,结果再也登录不了了
- 数字孪生 - 认知篇
猜你喜欢

Typora cannot open the prompt to install a new version solution

Idea settings ignore file configuration when submitting SVN

Tm1637 four digit LED display module Arduino driver with second dot

Brush questions - luogu-p1089 Jinjin savings plan

OKA通证权益解析,参与Okaleido生态建设的不二之选

Leetcode202 --- Happy number

Brush questions - Luogu -p1035 series summation

Mongodb source code deployment and configuration

Mongodb源码部署以及配置

Multidimensional pivoting analysis of CDA level1 knowledge points summary
随机推荐
Problems and extensions of the monocular depth estimation model featdepth in practice
Brush questions - Luogu -p1146 coin flip
Typora无法打开提示安装新版本解决办法
Dr. Berkeley's "machine learning engineering" big truth; AI vice president '2022 ml job market' analysis; Large list of semiconductor start-ups; Large scale video face attribute data set; Cutting edge
Brush questions - Luogu -p1161 turn on the light
opencv视频跟踪「建议收藏」
Namespaces and libraries
Multidimensional pivoting analysis of CDA level1 knowledge points summary
Stay on Alibaba cloud mqtt IOT platform
Apple failed to synchronize on its mobile terminal, so it exited the login. As a result, it could not log in again
Pytorch uses tensorboard to realize visual summary
Internal error of LabVIEW
Oka pass rights and interests analysis is the best choice to participate in okaleido ecological construction
From fish eye to look around to multi task King bombing -- a review of Valeo's classic articles on visual depth estimation (from fisheyedistancenet to omnidet) (Part I)
Working principle of Lora to 4G and gateway repeater
What you must know about data engineering in mlops
idea正则表达式替换(idea正则搜索)
CDA level Ⅰ 2021 new version simulation question 2 (with answers)
苹果手机端同步不成功,退出登录,结果再也登录不了
Common problems of wireless relay acquisition instrument