you'll need to find whatever that 30s timeout is and increase it. On Mon, Jun 27, 2022 at 11:01 AM SHUBHAM SALUNKHE < [email protected]> wrote:
> Hi, > Thanks for solution. it worked but sometime its giving following timeout > exception after executing command > > adb shell dumpsys -t 120 meminfo --unreachable <app_process> > > Exception:- > Applications Memory Usage (in Kilobytes): > Uptime: 277719 Realtime: 277719 > ** MEMINFO in pid 5953 [<app_process>] ** > Got IoException! java.io.IOException: Timeout > > in above command, -t is 120 sec. still it is exiting with above exception > after 30 sec only. please help me in solving this exception. > > Thanks & Regards, > Shubham Salunkhe > > On Tuesday, March 1, 2022 at 10:53:04 PM UTC+5:30 [email protected] wrote: > >> the wrap.* properties are broken in AOSP right now... (they're broken in >> S too.) >> >> here's the workaround to make the wrap. properties work: >> >> adb shell setprop dalvik.vm.force-java-zygote-fork-loop true >> adb shell stop >> adb shell start >> >> the commands you're using don't look right ... try this instead: >> >> adb shell setprop wrap.<app_name> '"LIBC_DEBUG_MALLOC_OPTIONS=backtrace=4 >> logwrapper"' >> >> and then restart the app. >> >> On Tue, Feb 22, 2022 at 6:15 PM SHUBHAM SALUNKHE <[email protected]> >> wrote: >> >>> Hi, >>> Thanks for reply. >>> I have added debug statement as follows >>> in system/memory/libmemunreachable/MemUnreachable.cpp. i giving "No. of >>> Frames:0". that's why backtrace call is not happening. How it is possible >>> if adb shell is giving memory leak address but backtrace frames are not >>> available? >>> >>> *Debug tatement:-* >>> ssize_t num_backtrace_frames = >>> malloc_backtrace(reinterpret_cast<void*>(it.range.begin), >>> leak->backtrace.frames, leak->backtrace.max_frames); >>> MEM_ALOGI("No. of Frames: %zd",num_backtrace_frames); >>> if (num_backtrace_frames > 0) { >>> leak->backtrace.num_frames = num_backtrace_frames; >>> >>> *adb shell output:* >>> Unreachable memory >>> 704 bytes in 5 unreachable allocations >>> ABI: 'arm64' >>> >>> 288 bytes unreachable at 7862adf450 >>> first 20 bytes of contents: >>> 7862adf450: 88 13 e8 07 00 00 00 00 9e 9f 15 08 00 00 00 00 >>> ................ >>> 7862adf460: 2c bb 17 08 00 00 00 00 23 8a 89 08 00 00 00 00 >>> ,.......#....... >>> >>> Thanks & Regards, >>> Shubham Salunkhe >>> On Wednesday, February 16, 2022 at 2:52:17 AM UTC+5:30 [email protected] >>> wrote: >>> >>>> oh, and if you're on a recent AOSP build, you might want to try >>>> cherrypicking >>>> https://android-review.googlesource.com/c/platform/frameworks/base/+/1978990 >>>> --- the `wrap.` system properties are a bit broken atm. (the wrap.sh stuff >>>> for apps works fine though.) >>>> >>>> On Tue, Feb 15, 2022 at 12:40 PM enh <[email protected]> wrote: >>>> >>>>> you did replace `[process]` with your actual process name, right? >>>>> >>>>> On Tue, Feb 15, 2022 at 12:29 PM SHUBHAM SALUNKHE < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi All, >>>>>> I am trying to find memory leak using libmemunreachable >>>>>> library in AOSP. i have getting following output on adb shell, but not >>>>>> able >>>>>> to find line number of code where memory leak present or any backtrace >>>>>> logs >>>>>> in adb logs. following commands are executed as mentioned in link >>>>>> <https://android.googlesource.com/platform/system/memory/libmemunreachable/+/master/README.md#:~:text=libmemunreachable%20is%20a%20zero-overhead,differences%20to%20remove%20the%20overhead.> >>>>>> . >>>>>> >>>>>> *Commands:-* >>>>>> adb root >>>>>> adb shell setprop libc.debug.malloc.program app_process >>>>>> adb shell setprop wrap.[process] "\$\@" >>>>>> adb shell setprop libc.debug.malloc.options backtrace=4 >>>>>> dumpsys -t 600 meminfo --unreachable [process]. >>>>>> >>>>>> *adb shell output:-* >>>>>> Unreachable memory >>>>>> 704 bytes in 5 unreachable allocations >>>>>> ABI: 'arm64' >>>>>> >>>>>> 288 bytes unreachable at 7862adf450 >>>>>> first 20 bytes of contents: >>>>>> 7862adf450: 88 13 e8 07 00 00 00 00 9e 9f 15 08 00 00 00 00 >>>>>> ................ >>>>>> 7862adf460: 2c bb 17 08 00 00 00 00 23 8a 89 08 00 00 00 00 >>>>>> ,.......#....... >>>>>> >>>>>> No. of backtrace frames are 0 in debug logs. is there any >>>>>> way to enable backtrace in adb logs or to get line no. of source code >>>>>> from >>>>>> above adb shell output. >>>>>> >>>>>> Thanks & Regards, >>>>>> Shubham Salunkhe >>>>>> >>>>>> -- >>>>>> -- >>>>>> You received this message because you are subscribed to the "Android >>>>>> Building" mailing list. >>>>>> To post to this group, send email to [email protected] >>>>>> To unsubscribe from this group, send email to >>>>>> [email protected] >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/android-building?hl=en >>>>>> >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Android Building" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/android-building/3f5dac22-6aad-4e6a-b840-8afc564fce28n%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/android-building/3f5dac22-6aad-4e6a-b840-8afc564fce28n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>> -- >>> You received this message because you are subscribed to the "Android >>> Building" mailing list. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/android-building?hl=en >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Android Building" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/android-building/b585bb2c-3301-492e-81f0-5c341380146cn%40googlegroups.com >>> <https://groups.google.com/d/msgid/android-building/b585bb2c-3301-492e-81f0-5c341380146cn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > -- > You received this message because you are subscribed to the "Android > Building" mailing list. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-building?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "Android Building" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/android-building/1725c679-0570-4717-b1d9-0357746d50fcn%40googlegroups.com > <https://groups.google.com/d/msgid/android-building/1725c679-0570-4717-b1d9-0357746d50fcn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-building?hl=en --- You received this message because you are subscribed to the Google Groups "Android Building" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/CAJgzZoprXAJ87peLrrfbGrsy3U1ymUWvKvOiuMwmsnmTxZYqTg%40mail.gmail.com.
