public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug corefiles/16911] New: 'info proc mappings' fails on coredump with more a lot of mappings
@ 2014-05-06  9:46 kirill at shutemov dot name
  2014-05-06  9:51 ` [Bug corefiles/16911] " kirill at shutemov dot name
  2014-05-06  9:54 ` kirill at shutemov dot name
  0 siblings, 2 replies; 3+ messages in thread
From: kirill at shutemov dot name @ 2014-05-06  9:46 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16911

            Bug ID: 16911
           Summary: 'info proc mappings' fails on coredump with more a lot
                    of mappings
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: normal
          Priority: P2
         Component: corefiles
          Assignee: unassigned at sourceware dot org
          Reporter: kirill at shutemov dot name

info proc mappings' fails on coredump with more then 64k mappings.

$ gdb -ex 'info proc mappings' -ex 'quit' ./many-vma core
GNU gdb (GDB) 7.6.2 (Debian 7.6.2-1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /host/home/space/kas/var/many-vma...(no debugging symbols
found)...done.
[New LWP 96]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `/host/home/kas/var/many-vma'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f98c7bd4697 in kill () at ../sysdeps/unix/syscall-template.S:81
81    ../sysdeps/unix/syscall-template.S: No such file or directory.
warning: unable to find mappings in core file

objdump and readelf report correct number of segments in ELF:

$ objdump -h core | grep -c load
100018
$ readelf -h core | grep 'Number of program headers'
  Number of program headers:         65535 (100017)

I would guess the bug connected with wrong or missing PN_XNUM handling.

Test case to generate 100k of mappings and sigfault:

#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/mman.h> 
#include <sys/types.h>

#define N 100000

int main(int argc, char **argv)
{
    int i;
    void *p;

    for (i = 0; i < N; i++) {
        p = mmap(NULL, 4096, PROT_NONE, MAP_SHARED | MAP_ANONYMOUS,
                       -1, 0);
        if (p == MAP_FAILED)
            break;
    }
    printf("map: %d\n", i);
    kill(getpid(), SIGSEGV);
    return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug corefiles/16911] 'info proc mappings' fails on coredump with more a lot of mappings
  2014-05-06  9:46 [Bug corefiles/16911] New: 'info proc mappings' fails on coredump with more a lot of mappings kirill at shutemov dot name
@ 2014-05-06  9:51 ` kirill at shutemov dot name
  2014-05-06  9:54 ` kirill at shutemov dot name
  1 sibling, 0 replies; 3+ messages in thread
From: kirill at shutemov dot name @ 2014-05-06  9:51 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16911

Kirill A. Shutemov <kirill at shutemov dot name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andi at firstfloor dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug corefiles/16911] 'info proc mappings' fails on coredump with more a lot of mappings
  2014-05-06  9:46 [Bug corefiles/16911] New: 'info proc mappings' fails on coredump with more a lot of mappings kirill at shutemov dot name
  2014-05-06  9:51 ` [Bug corefiles/16911] " kirill at shutemov dot name
@ 2014-05-06  9:54 ` kirill at shutemov dot name
  1 sibling, 0 replies; 3+ messages in thread
From: kirill at shutemov dot name @ 2014-05-06  9:54 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=16911

Kirill A. Shutemov <kirill at shutemov dot name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus.t.metzger at intel dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-06  9:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-06  9:46 [Bug corefiles/16911] New: 'info proc mappings' fails on coredump with more a lot of mappings kirill at shutemov dot name
2014-05-06  9:51 ` [Bug corefiles/16911] " kirill at shutemov dot name
2014-05-06  9:54 ` kirill at shutemov dot name

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).