当前位置:网站首页>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来监控线程使用情况
边栏推荐
- DNS resolution error during windows unbutu20 lts apt, WGet installation
- [force buckle] 645. Wrong set
- What you must know about data engineering in mlops
- DVWA practice - brute force cracking
- Tensorflow2 installation quick pit avoidance summary
- 在线问题反馈模块实战(十三):实现多参数分页查询列表
- Brush questions - Luogu -p1085 unhappy Jinjin
- AI model risk assessment Part 1: motivation
- Depth estimation self-monitoring model monodepth2 paper summary and source code analysis [theoretical part]
- 2271. Maximum number of white bricks covered by blanket ●●
猜你喜欢

Deep understanding of pytorch distributed parallel processing tool DDP -- starting from bugs in engineering practice

What problems should SEOER pay attention to when baidu searches and attacks pirated websites?

Brush questions - Luogu -p1152 happy jump

sqli-labs Basic Challenges Less11-22

Working principle of Lora to 4G and gateway repeater

Brush questions - Luogu -p1161 turn on the light

Realize a family security and environmental monitoring system (II)

Advantages of wireless relay acquisition instrument and wireless network for engineering monitoring

redis集群的三种方式

Three ways of redis cluster
随机推荐
知名手写笔记软件 招 CTO·坐标深圳
Two Sum
伯克利博士『机器学习工程』大实话;AI副总裁『2022 ML就业市场』分析;半导体创业公司大列表;大规模视频人脸属性数据集;前沿论文 | ShowMeAI资讯日报
pt100测温电路图(ad590典型的测温电路)
科隆新能源IPO被终止:拟募资6亿 先进制造与战新基金是股东
飞沃科技IPO过会:年营收11.3亿 湖南文旅与沅澧投资是股东
Leetcode202 --- Happy number
[原创]九点标定工具之机械手头部相机标定
R语言如何将大型Excel文件转为dta格式详解
The practice of depth estimation self-monitoring model monodepth2 in its own data set -- single card / multi card training, reasoning, onnx transformation and quantitative index evaluation
Basic theory of monocular depth estimation and paper learning summary
Typora cannot open the prompt to install a new version solution
轻松入门自然语言处理系列 12 隐马尔可夫模型
Interpretation of featdepth self-monitoring model for monocular depth estimation (Part 2) -- use of openmmlab framework
Comprehensive sorting and summary of maskrcnn code structure process of target detection and segmentation
CDA level Ⅰ 2021 new version simulation question 1 (with answers)
Use of Bluetooth function of vs wireless vibrating wire acquisition instrument
实现一个家庭安防与环境监测系统(一)
Brush questions - Luogu -p1059 clear random number
MySQL table operation