/proc/pid/maps crash when mmap ( in libc ) ( No [stack] line found in "/proc/pid/maps" )

433 views
Skip to first unread message

pangbobo

unread,
Nov 28, 2014, 6:20:45 AM11/28/14
to android-...@googlegroups.com
Hi all,

I am trying to bring up Lollipop and met this issue.

When the ART virtual machine first initializes, mmap will cause crash in /proc/pid/maps, when I cat this file, it says this (note there is an "Out of memory")

    12c00000-22c00000 rw-p 00000000 00:04 5779       /dev/ashmem/dalvik-main space (deleted)
    22c00000-32c00000 rw-p 00000000 00:04 5780       /dev/ashmem/dalvik-main space 1 (deleted)
    70000000-70aae000 rw-p 00000000 b3:02 530        /system/framework/arm/boot.art
    70aae000-739ec000 r--p 00000000 b3:02 518        /system/framework/arm/boot.oat
    739ec000-739ed000 rw-p 02f3e000 b3:02 518        /system/framework/arm/boot.oat
    739ed000-739ee000 rw-p 00000000 00:04 5778       /dev/ashmem/dalvik-non moving space (deleted)
    739ee000-779ed000 ---p 00001000 00:04 5778       /dev/ashmem/dalvik-non moving space (deleted)
    /system/bin/sh: cat: maps: Out of memory


thus leading to failure when libc reading this file. ( master and lollipop branches both have this issue ), then it will cause fatal error in libc, logcat says :

    01-01 08:09:34.016  1176  1176 F libc    : No [stack] line found in "/proc/self/task/1176/maps"!
    01-01 08:09:34.016  1176  1176 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 1176 (patchoat)

the boot process will die and restart endless.

I can use adb / gdb on it. And I find there cause the crash in /proc/pid/maps , the back trace is 

    #0  mmap64 (addr=<optimized out>, size=1048576, prot=<optimized out>, flags=2, fd=fd@entry=12, offset=offset@entry=0) at bionic/libc/bionic/mmap.cpp:51
    #1  0xb6b1d6f8 in mmap (addr=<optimized out>, size=<optimized out>, prot=<optimized out>, flags=<optimized out>, fd=12, offset=0) at bionic/libc/bionic/mmap.cpp:63
    #2  0xb6def62a in art::MemMap::MapAnonymous (name=0xb7aecb18 "allocspace zygote / non moving space live-bitmap 0", expected_ptr=expected_ptr@entry=0x0, byte_count=1048576, prot=prot@entry=3, low_4gb=low_4gb@entry=false, error_msg=error_msg@entry=0xbed05198) at art/runtime/mem_map.cc:373
    #3  0xb6d335d0 in art::gc::accounting::SpaceBitmap<8u>::Create (name=..., heap_begin=0x739ed000 "", heap_capacity=67108864) at art/runtime/gc/accounting/space_bitmap.cc:65
    #4  0xb6d61118 in art::gc::space::MallocSpace::MallocSpace (this=0xb7aeb920, name=..., mem_map=<optimized out>, begin=<optimized out>, end=0x739ee000 "", limit=0x779ed000 <Address 0x779ed000 out of bounds>, growth_limit=67108864, create_bitmaps=true, can_move_objects=false, starting_size=4096, initial_size=2097152) at art/runtime/gc/space/malloc_space.cc:53
    #5  0xb6d5a864 in DlMallocSpace (starting_size=<optimized out>, can_move_objects=false, growth_limit=67108864, limit=0x779ed000 <Address 0x779ed000 out of bounds>, end=0x739ee000 "", begin=0x739ed000 "", mspace=0x739ed008, name=..., initial_size=2097152, mem_map=<optimized out>, this=0xb7aeb920) at art/runtime/gc/space/dlmalloc_space.cc:41
    #6  art::gc::space::DlMallocSpace::CreateFromMemMap (mem_map=mem_map@entry=0xb7aebc58, name=..., starting_size=starting_size@entry=4096, initial_size=initial_size@entry=2097152, growth_limit=growth_limit@entry=67108864, capacity=capacity@entry=67108864, can_move_objects=can_move_objects@entry=false) at art/runtime/gc/space/dlmalloc_space.cc:70
    #7  0xb6d4e4e8 in art::gc::Heap::Heap (this=0xb7aeb608, initial_size=2097152, growth_limit=<optimized out>, min_free=<optimized out>, max_free=2097152, target_utilization=0.5, foreground_heap_growth_multiplier=2, capacity=268435456, non_moving_space_capacity=67108864, image_file_name=..., image_instruction_set=art::kArm, foreground_collector_type=art::gc::kCollectorTypeCMS, background_collector_type=art::gc
::kCollectorTypeHomogeneousSpaceCompact, large_object_space_type=art::gc::space::kLargeObjectSpaceTypeMap, large_object_threshold=12288, parallel_gc_threads=3, conc_gc_threads=0, low_memory_mode=false, long_pause_log_threshold=5000000, long_gc_log_threshold=100000000, ignore_max_footprint=false, use_tlab=false, verify_pre_gc_heap=false, verify_pre_sweeping_heap=false, verify_post_gc_heap=false, verify_pre_gc_rosalloc=false, verify_pre_sweeping_rosalloc=false, verify_post_gc_rosalloc=false, use_homogeneous_space_compaction_for_oom=true, min_interval_homogeneous_space_compaction_by_oom=100000000000) at art/runtime/gc/heap.cc:294
    #8  0xb6e2f08a in art::Runtime::Init (this=this@entry=0xb7ae8ca0, raw_options=..., ignore_unrecognized=ignore_unrecognized@entry=false) at art/runtime/runtime.cc:772
    #9  0xb6e30daa in art::Runtime::Create (options=..., ignore_unrecognized=ignore_unrecognized@entry=false) at art/runtime/runtime.cc:365
    #10 0xb6f53e5a in art::PatchOat::Patch (input_oat=input_oat@entry=0xb7ae8758, image_location=..., delta=delta@entry=12873728, output_oat=output_oat@entry=0xb7ae8958, output_image=output_image@entry=0xb7ae8908, isa=<optimized out>, isa@entry=art::kArm, timings=timings@entry=0xbed057fc, output_oat_opened_from_fd=false, new_oat_out=false) at art/patchoat/patchoat.cc:251
    #11 0xb6f556fc in art::patchoat (argc=<optimized out>, argv=<optimized out>) at art/patchoat/patchoat.cc:1297
    #12 0xb6b15896 in __libc_init (raw_args=0xbed05930, onexit=<optimized out>, slingshot=0xb6f4eb15 <main(int, char**)>, structors=<optimized out>) at bionic/libc/bionic/libc_init_dynamic.cpp:113
    #13 0xb6f4ebd8 in _start ()

This is what I have found so far, I tend to think it as some issue in kernel ( I use kernel 3.10 ).

Anyone has any ideas?

Many thanks,
pbb

sharada.pa...@gmail.com

unread,
Jul 23, 2015, 2:04:14 PM7/23/15
to Android Building, pangbo...@gmail.com
Hi Pbb,

I am facing the same issue . Were you able to resolve this issue ?

Thanks,
Sharada
Reply all
Reply to author
Forward
0 new messages