当前位置:网站首页>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来监控线程使用情况
边栏推荐
- What you must know about data engineering in mlops
- DVWA practice - brute force cracking
- Detailed explanation of nat/napt address translation (internal and external network communication) technology [Huawei ENSP]
- It is predicted that 2021 will accelerate the achievement of super automation beyond RPA
- Brush questions - Luogu -p1151 sub number integer
- 【目录爆破工具】信息收集阶段:robots.txt、御剑、dirsearch、Dirb、Gobuster
- Brush questions - Luogu -p1047 trees outside the school gate
- Data analysis business core
- Goldfish rhca memoirs: cl210 managing storage -- managing shared file systems
- Common problems of wireless relay acquisition instrument
猜你喜欢

Brush questions - Luogu -p1151 sub number integer

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

Brush questions - Luogu -p1152 happy jump

Experiment the Arduino code of NTP network timing alarm clock with esp32+tm1638

【目录爆破工具】信息收集阶段:robots.txt、御剑、dirsearch、Dirb、Gobuster

Brush questions - Luogu -p1035 series summation

~5 new solution of CCF 2021-12-2 sequence query

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)

maya建模练习

Working principle of Lora to 4G and gateway repeater
随机推荐
Problems and extensions of the monocular depth estimation model featdepth in practice
CDA level Ⅰ 2021 new version simulation question 1 (with answers)
What are the ranking strategies for mobile websites, independent apps and websites?
DNS resolution error during windows unbutu20 lts apt, WGet installation
einsum(): operands do not broadcast with remapped shapes [original->remapped]: [1, 144, 20, 17]->[1,
知名手写笔记软件 招 CTO·坐标深圳
基于redis的keys、scan删除ttl为-1的key
Introducing mlops interpretation (I)
Four methods of importing CSV text files into Excel
[force deduction] 1030. Arrange matrix cells in distance order
idea正则表达式替换(idea正则搜索)
Business analysis report and data visualization report of CDA level1 knowledge point summary
Engineering monitoring multi-channel vibrating wire sensor wireless acquisition instrument external digital sensor process
Tensorflow2 installation quick pit avoidance summary
CDA level1 double disk summary
Okaleido ecological core equity Oka, all in fusion mining mode
Numpy basic package for data analysis
Wangeditor rich text editor
Xintang nuc980 set DHCP or static IP
在线问题反馈模块实战(十三):实现多参数分页查询列表