Closed Bug 908610 Opened 13 years ago Closed 13 years ago

[Helix] /system/b2g/b2g memory leaks in monkey test

Categories

(Firefox OS Graveyard :: General, defect, P1)

defect

Tracking

(blocking-b2g:-)

RESOLVED WORKSFORME
blocking-b2g -

People

(Reporter: lecky.wanglei, Unassigned)

References

Details

(Whiteboard: [POVB])

Attachments

(7 files)

1.42 MB, application/octet-stream
Details
25.42 KB, application/octet-stream
Details
4.14 MB, application/x-zip-compressed
Details
5.64 MB, application/x-zip-compressed
Details
5.43 MB, application/x-zip-compressed
Details
283.46 KB, application/x-zip-compressed
Details
42.93 KB, application/x-zip-compressed
Details
Attached file logcat_kmsg.zip —
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; aff-kingsoft-ciba; .NET4.0C; .NET4.0E; Tablet PC 2.0) Steps to reproduce: [Device] Helix [Probability] High (5/20) [Repro Steps] USB connected, and run Monkey test. Actual results: During monkey test, B2G reboot and the device stay at the second logo, can not enter OS. The device works well after reboot again. Expected results: During monkey test, there is no abnormal reboot. After Monkey test, the device still can work well.
Attached file tombstones.zip —
Severity: normal → blocker
blocking-b2g: --- → hd?
Priority: -- → P1
alan you're probably best to help on this this week?
Flags: needinfo?(ahuang)
Depends on: 910847
Depends on: 889747
Partner provide log (via mail) which show there's memory leak in /system/b2g/b2g. Dear reporter, Please confirm this can also be found from gecko/gaia on https://git.mozilla.org/, without local patch. Please also give us commit numbers, thanks!
Flags: needinfo?(ahuang) → needinfo?(lecky.wanglei)
gaia: 134356dc21d0627455f8bc536b140a18f39e20e9 gecko: 2e2b4393b0581ef72a1cb70fc5f002cd82a9302a gonk-misc: ca9192d7ef6037016d4723647d86b72f7a410633
Flags: needinfo?(lecky.wanglei)
Flags: needinfo?(ahuang)
I got the testing tool from lecky. I am working on changing lecky's windows batch to shell script to run monkey test. I will update once I got result, either positive or negative.
Flags: needinfo?(ahuang)
Lecky, I cannot debug on user build with locked bootloader.
Flags: needinfo?(lecky.wanglei)
I got ways from lecky to unlock. But we still needs eng build.
Depends on: 915653
(In reply to Alan Huang [:ahuang] from comment #7) > I got ways from lecky to unlock. But we still needs eng build. Not all helix device can unlock via commands we have now. So some of us cannot check bug 915653, which is a blocker of this.
(In reply to Alan Huang [:ahuang] from comment #8) > (In reply to Alan Huang [:ahuang] from comment #7) > I got ways from lecky > to unlock. But we still needs eng build. Not all helix device can unlock > via commands we have now. So some of us cannot check bug 915653, which is a > blocker of this. Is there any question about device unlock? and any progress about the issue?
Flags: needinfo?(lecky.wanglei)
Flags: needinfo?(ahuang)
(In reply to lecky from comment #10) > (In reply to Alan Huang [:ahuang] from comment #8) > > (In reply to Alan Huang [:ahuang] from comment #7) > > I got ways from lecky > > to unlock. But we still needs eng build. > > Not all helix device can unlock > > via commands we have now. So some of us cannot check bug 915653, which is a > > blocker of this. > > Is there any question about device unlock? and any progress about the issue? 1. We need all devices unlocked, otherwise we cannot do hacky things and not all of us can support this project. Please release ROM with unlocked bootloader to Mozilla for development from now on. Thanks. 2. I resolved bug 915653 locally on my device. So I can do monkey test now. I cannot reproduce this on my device with helix-released 20130723 factory image which unlocked bootloader so I can flash PVT ROM, and mozilla's 20130916 PVT build (v1.1hd).
Flags: needinfo?(ahuang)
Alan, If you're unable to reproduce this, please follow up with Lecky and guide them to provide valid information to resolve this.
Flags: needinfo?(ahuang)
Hi Alan, 1.I encounter some problems when I execute the script get_about_memory.py, and the DMD files also can not be decompressed. Can you give us a usable script? 2.please tell me your detail plan to solve the issue, and what valid information you want. so we can get the valid information on our side. thanks
hi Alan This issue can be easily reproduced when using 10 devices for all onenight(about 14hours) at the same time . If you have any trouble, you can contact us without any doubt .
Hi alan : Do you have reproduced it? If you have any trouble, you can contact us without any doubt . Wayne has our telephone, you can contact us without any doubt.
Flags: needinfo?(wchang)
Flags: needinfo?(brg)
hi beatriz Could you help us to push this issue be solved on V1.1HD? Because this issue would lead to a damic of device.
Removing depends on PVT memory leak bug - this can be locally resolved by dev. Alan, please utilize partner resource to reproduce this as ourselves do not have enough testing resource to hit this. Lecky, we need you to make sure all of our devices are debuggable, many of the devices we have on hand are unable to be used efficiently due to various permission problems. Please urgently unblock these for us.
No longer depends on: 915653
Flags: needinfo?(wchang) → needinfo?(lecky.wanglei)
Hi Lecky, Here's what I did on this bug: 1. Modified helix's Microsoft Windows monkey batch into linux runnable shell script. 2. Flash helix's 20130723's factory build, since we can only unlock our device from this ROM. 3. Flash Mozilla's PVT 20130915 build, helix v1.1.0hd with MOZ_RIL. This only flash system.img and userdata.img. I did this because I want to disable QC_RIL and 0723's build is too old. I have to make sure all other helix's libraries are up-to-date. 4. Since step 3 ensures we don't use QC_RIL, I built/flashed my own gecko but gaia. (We cannot flash gaia via "make reset-gaia", because "rm -r" on helix makes userdata remounted as read-only) The gecko I built has two additional flags to detect memory leak: export B2G_NOOPT=1 export MOZ_DMD=1 5. Do below commands from https://bugzilla.mozilla.org/attachment.cgi?id=810981&action=edit to make sure I get rid of bug Bug 915653 adb remount adb push libreference-ril.so /system/lib adb push libril-qc-1.so /system/lib adb push libreference-ril.so /system/lib adb push libril-qcril-hook-oem.so /system/lib adb push libril.so /system/lib adb reboot 6. Run script from step 1, collect DMD files every one hour. I collect DMD files from below command: $ cd ${B2G_ROOT}/tools $ ./get_about_memory.py --product helix --gecko-objdir ../objdir-gecko-helix-noopt-dmd --no-auto-open --no-gc-cc-log --remove-cache --toolchain-prefix arm-linux-androideabi- --toolchain-dir ../prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/ But I didn't find things like what lecky found, an about 300MB memory leak in b2g. Please note: 1. We cannot flash partner's weekly build first and then flash Mozilla's PVT build. Our device is locked after flash their build. 2. We cannot "make reset-gaia" because command "rm -r" makes data partition read-only 3. You have to update everything under ${B2G_ROOT}/tools to latest version, because of two already fixed bug, bug 889747 and bug 910847.
Flags: needinfo?(ahuang)
Mozilla is helping here a lot. Please Lecky, answer their questions.
Flags: needinfo?(brg)
Hi Alan, 1. Modified helix's Microsoft Windows monkey batch into linux runnable shell script. //Please tell me the details how to modify.
Flags: needinfo?(lecky.wanglei)
(In reply to lecky from comment #20) > Hi Alan, > > 1. Modified helix's Microsoft Windows monkey batch into linux runnable shell > script. > //Please tell me the details how to modify. Actually I removed all unnecessary commands to me. I just do below to start monkey: python ./orng/generate-orangutan-script.py> orng/script.txt adb shell "mount -o remount,rw /dev/block/mmcblk0p1 /system" adb push orng/orng /system/xbin/orng adb push orng/script.txt /data/script.txt adb shell chmod 777 /system/xbin/orng adb shell "orng /dev/input/event0 /data/script.txt>/data/orng.log &"
Also, I just got unlocked helix eng build image from lecky. I now use below steps to check this bug again: 1. Modified helix's Microsoft Windows monkey batch into linux runnable shell script Actually I'm just doing this: > python ./orng/generate-orangutan-script.py> orng/script.txt > adb shell "mount -o remount,rw /dev/block/mmcblk0p1 /system" > adb push orng/orng /system/xbin/orng > adb push orng/script.txt /data/script.txt > adb shell chmod 777 /system/xbin/orng > adb shell "orng /dev/input/event0 /data/script.txt>/data/orng.log &" 2. Flash helix's 20130924's eng build with unlocked bootloader. 3. Flash Mozilla's PVT 20130930 build, helix v1.1.0hd with MOZ_RIL. This only flash system.img and userdata.img. 4. Since step 3 ensures we don't use QC_RIL, I built/flashed my own gecko. The gecko I built has two additional flags to detect memory leak: export B2G_NOOPT=1 export MOZ_DMD=1 5. Do below commands from https://bugzilla.mozilla.org/attachment.cgi?id=810981&action=edit to make sure I get rid of bug Bug 915653 adb remount adb push libreference-ril.so /system/lib adb push libril-qc-1.so /system/lib adb push libreference-ril.so /system/lib adb push libril-qcril-hook-oem.so /system/lib adb push libril.so /system/lib adb reboot 6. Run commands from step 1, collect DMD files every one hour. I collect DMD files from below command: $ cd ${B2G_ROOT}/tools $ ./get_about_memory.py --product helix --gecko-objdir ../objdir-gecko-helix-noopt-dmd --no-auto-open --no-gc-cc-log --remove-cache --toolchain-prefix arm-linux-androideabi- --toolchain-dir ../prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/ I'm now testing on it. Please note: You have to update everything under ${B2G_ROOT}/tools to latest version, because of two already fixed bug, bug 889747 and bug 910847.
(In reply to Alan Huang [:ahuang] from comment #22) > I'm now testing on it. After ~18 hours test on one device, the PSS of b2g still looks good. $ adb shell b2g-info | megabytes | NAME PID NICE USS PSS RSS VSIZE OOM_ADJ USER b2g 162 0 62.4 65.8 85.6 258.2 0 root I will keep running this test but stop this before I go to summit, if everything still looks good till then.
Hi Alan, Lecky, Can you update the status of this bug here? I understand you have been working on this offline together.
Flags: needinfo?(lecky.wanglei)
Flags: needinfo?(ahuang)
Hi Wayne, I'm testing on it, Once it has the result, I will update. But get_about_memory.py has executed failed. Thanks.
Flags: needinfo?(lecky.wanglei)
Lecky now can run get_about_memory on their host to get dmd files from dmd build. (Today)
Flags: needinfo?(ahuang)
I have reproduced this issue again, please look at DMD log in the attachment.
Flags: needinfo?(lecky.wanglei)
Attached file about-memory-6 —
Flags: needinfo?(lecky.wanglei)
Attached file about-memory-7 —
Attached file about-memory-8 —
Attached file about-memory-9 —
Hi, I have uploaded the DMD log, please see memory-report in the attachment. Thanks.
Hi Alan, is there any further status for the issue?
Flags: needinfo?(ahuang)
No, Lecky don't have any useful DMD for me to help them. Also, I don't reproduce this in Mozilla's build, neither does Lecky. I would rather say it should be POVB under this circumstance.
Flags: needinfo?(ahuang)
Marking POVB, also removing blocking status as we dont block on monkey test results. Lecky, please update your run results on the Mozilla builds and needinfo me if there is anything additional we can help.
blocking-b2g: hd? → -
Whiteboard: [POVB]
Hi Alan, Wayne, I have modified LMK parameters as follows: oom_adj min_free 0 8192 KB 1 10240 KB 2 12288 KB 3 14336 KB 4 20480 KB 6 40960 KB then I tested it for 400 hours on different devices, but no any device hang or screen frozen. It still happened the b2g crashed and rebooted, and staied the movistar logo, don't enter homescreen. So I think we need to find out the reason of the b2g exception, please give us some advice. Thanks.
Hi Alan, Please see these logs as follows, these happened after the b2g rebooted, kernel is normal, but the system load excetion. This is why the device stay at the movistar logo. 04-09 21:07:10.809: E/(24438): waitBeforeAdding (media.audio_flinger) timed out 04-09 21:07:10.819: E/AudioHardwareMSM76XXA(24438): init_fir_filter: board MSM8X25_U8833 04-09 21:07:10.819: E/AudioHardwareMSM76XXA(24438): get_audpp_filter path = /system/etc/AudioFilter_MSM8X25_U8833.csv 04-09 21:07:10.839: E/AudioHardwareMSM76XXA(24438): AudioHardware::AudioHardware() init mttymode 0 04-09 21:07:10.839: E/AudioHardwareMSM76XXA(24438): get_audio_property_value: audio property value is 0x00011211 04-09 21:07:10.839: E/AudioHardwareMSM76XXA(24438): AudioHardware:FIR_ENABLED 04-09 21:07:10.849: E/AudioHardwareMSM76XXA(24438): Could not open MSM SND driver. 04-09 21:07:10.859: E/ServiceManager(148): add_service('media.audio_flinger',0x8) uid=1013 - ALREADY REGISTERED, OVERRIDE 04-09 21:07:15.860: E/(24438): waitBeforeAdding (media.player) timed out 04-09 21:07:15.860: E/ServiceManager(148): add_service('media.player',0x2) uid=1013 - ALREADY REGISTERED, OVERRIDE 04-09 21:07:20.869: E/(24438): waitBeforeAdding (media.camera) timed out 04-09 21:07:20.949: E/QualcommCamera(24438): Qint android::get_number_of_cameras(): E 04-09 21:07:20.949: I/QCameraHAL(24438): Handle base =0x0x41085294 04-09 21:07:20.949: I/QCameraHAL(24438): getCameraInfo: numOfCameras = 2 04-09 21:07:20.949: I/QCameraHAL(24438): Handle [0]=0x0x41085294 04-09 21:07:20.949: I/QCameraHAL(24438): Camera sensor 0 info: 04-09 21:07:20.949: I/QCameraHAL(24438): camera_id: 0 04-09 21:07:20.949: I/QCameraHAL(24438): modes_supported: 1 04-09 21:07:20.949: I/QCameraHAL(24438): position: 0 04-09 21:07:20.949: I/QCameraHAL(24438): sensor_mount_angle: 90 04-09 21:07:20.949: I/QCameraHAL(24438): Handle [1]=0x0x410852d8 04-09 21:07:20.949: I/QCameraHAL(24438): Camera sensor 1 info: 04-09 21:07:20.949: I/QCameraHAL(24438): camera_id: 1 04-09 21:07:20.949: I/QCameraHAL(24438): modes_supported: 1 04-09 21:07:20.949: I/QCameraHAL(24438): position: 1 04-09 21:07:20.949: I/QCameraHAL(24438): sensor_mount_angle: 270 04-09 21:07:20.949: E/ServiceManager(148): add_service('media.camera',0x3) uid=1013 - ALREADY REGISTERED, OVERRIDE 04-09 21:07:25.959: E/(24438): waitBeforeAdding (media.audio_policy) timed out 04-09 21:07:25.969: E/huawei_fir_adapter(24438): read_coef_from_file: fopen /system/etc/fir_filter/fir_coef_headset_MSM8X25_U8833.txt error!! 04-09 21:07:25.969: E/huawei_fir_adapter(24438): load_preset_fir_filter_coef:failed load s_preset_coef :/system/etc/fir_filter/fir_coef_headset_MSM8X25_U8833.txt 04-09 21:07:25.969: E/huawei_fir_adapter(24438): load_preset_fir_filter_coef:finish load s_preset_coef :/system/etc/fir_filter/fir_coef_speaker_MSM8X25_U8833.txt 04-09 21:07:25.979: E/huawei_fir_adapter(24438): load_preset_fir_filter_coef:finish load s_preset_coef :/system/etc/fir_filter/fir_coef_ringtone_MSM8X25_U8833.txt 04-09 21:07:25.979: E/huawei_fir_adapter(24438): read_coef_from_file: fopen /system/etc/fir_filter/fir_coef_capture_MSM8X25_U8833.txt error!! 04-09 21:07:25.979: E/huawei_fir_adapter(24438): load_preset_fir_filter_coef: failed load s_preset_coef :/system/etc/fir_filter/fir_coef_capture_MSM8X25_U8833.txt 04-09 21:07:25.979: W/AudioFlinger(24438): Thread AudioOut_1 cannot connect to the power manager service 04-09 21:07:25.979: E/AudioHardwareMSM76XXA(24438): doRouting Enter: outputDevices=0x2 input=0x0x0 04-09 21:07:25.979: E/huawei_fir_adapter(24438): fir_set_mode: mode = 12 04-09 21:07:25.979: E/huawei_fir_adapter(24438): fir_set_mode: ret = 0 04-09 21:07:25.979: E/AudioHardwareMSM76XXA(24438): FIR in speaker mode 04-09 21:07:25.979: E/AudioHardwareMSM76XXA(24438): fir_set_mode: FIR_COEFFICIENT_SPEAKER 04-09 21:07:25.979: E/AudioHardwareMSM76XXA(24438): setVoiceVolume(1.200000) 04-09 21:07:25.979: E/AudioHardwareMSM76XXA(24438): Setting in-call volume to 6 (available range is 1 to 6) 04-09 21:07:25.989: E/ServiceManager(148): add_service('media.audio_policy',0x4) uid=1013 - ALREADY REGISTERED, OVERRIDE 04-09 21:07:25.989: E/(24438): Error Loading libmpqstobinder 04-09 21:07:25.989: E/(24438): Error: Cannot load library: load_library[1093]: Library 'libmpqstobinder.so' not found 04-09 21:07:30.999: E/(24438): waitBeforeAdding (media.gestures) timed out 04-09 21:07:30.999: E/GestureDeviceService(24438): Could not load gesture HAL module 04-09 21:07:30.999: E/ServiceManager(148): add_service('media.gestures',0x5) uid=1013 - ALREADY REGISTERED, OVERRIDE 04-09 21:10:10.419: E/(154): coming in huawei_oem_rapi_streaming_function! event=65. you can see these logs in the attachment. Thanks.
(In reply to lecky from comment #36) > I have modified LMK parameters as follows: I think I've stated clearly enough on phone: LMK parameter set has nothing to do with "memory leakage" here. It is not a killer, it is not a victim and it is not even related.
(In reply to lecky from comment #37) > Hi Alan, > > Please see these logs as follows, these happened after the b2g rebooted, > kernel is normal, but the system load excetion. This is why the device stay > at the movistar logo. Did you test this on Mozilla software or your own software build?
Hi Alan, I'm sorry, I reply failed. (In reply to Alan Huang [:ahuang] from comment #39) > I think I've stated clearly enough on phone: LMK parameter set has > nothing to do with "memory leakage" here. It is not a killer, it is not a > victim and it is not even related. I agree with you. This is only to improve the stability of the system, we hope that this is good for us. (In reply to Alan Huang [:ahuang] from comment #40) > Did you test this on Mozilla software or your own software build? It's tested on our formal version. Thanks.
(In reply to lecky from comment #41) > > Did you test this on Mozilla software or your own software build? > It's tested on our formal version. Lecky, we cannot help you until we are on the same page. I'm not going to follow this bug and keep myself in the cc list, until someone inform me the same memory leakage symptom during monkey can also be found in Mozilla software instead of partner build only. I am going to change this bug title, and change status to WFM.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Summary: [B2G][Helix][Monkey test] B2G reboot and stay at the second logo after Monkey test → [Helix] /system/b2g/b2g memory leaks in monkey test
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: