Re: ancient portmap segfault

From: Mark Studebaker (mds_at_mds.gotdns.com)
Date: 03/15/05

  • Next message: Gordon Jin: "[PATCH 2.6] fix mmap() return value to conform POSIX"
    Date:	Mon, 14 Mar 2005 22:07:25 -0500
    To: Andi Kleen <ak@muc.de>
    
    

    Andi,
    thanks for the response.

    The code forks immediately and the new process segfaults immediately.
    From an inspection of 'strace -f' on a working version, the next call
    would have been setsid() . (The library call in the code is daemon(0,0)).
    The original Makefile has an LDFLAG of -N (OMAGIC: make text secion writable,
    don't page-align the data section.... No idea why).

    If I compile with ancient gcc/ld,
    it works after compiling without -N and segfaults when compiling with -N.
    If I compile with a recent gcc/ld, it works fine.

    here's an objump of the segfaulting portmap
    ------------------------------------------------
    > objdump -x /usr/sbin/portmap

    /usr/sbin/portmap: file format a.out-i386-linux
    /usr/sbin/portmap
    architecture: i386, flags 0x00000002:
    EXEC_P
    start address 0x00000000

    Sections:
    Idx Name Size VMA LMA File off Algn
      0 .text 00000f7c 00000000 00000000 00000020 2**2
                      CONTENTS, ALLOC, LOAD, CODE
      1 .data 00000110 00000f7c 00000f7c 00000f9c 2**2
                      CONTENTS, ALLOC, LOAD, DATA
      2 .bss 00000018 0000108c 0000108c 00000000 2**2
                      ALLOC
    SYMBOL TABLE:
    no symbols

    -------------------
    and here's the objdump of the test without -N

    > objdump -h a.out

    a.out: file format a.out-i386-linux

    Sections:
    Idx Name Size VMA LMA File off Algn
      0 .text 00001fe0 00001020 00001020 00000020 2**3
                      CONTENTS, ALLOC, LOAD, CODE
      1 .data 00001000 00003000 00003000 00002000 2**3
                      CONTENTS, ALLOC, LOAD, DATA
      2 .bss 00000000 00004000 00004000 00000000 2**3
                      ALLOC

    --------------------------------------------------
    so maybe the alignment difference is the problem?

    as I said before, I have things working, only reporting this on the possibility
    that it's a bug worth investigating.

    thanks
    mds

    Andi Kleen wrote:
    > Mark Studebaker <mds@mds.gotdns.com> writes:
    >
    >
    >>I upgraded from 2.6.5 to 2.6.11.2 and my ancient (libc4 a.out) /sbin/portmap from 1994 that's been running without complaint
    >>on kernels for 11 years now consistently segfaults.
    >>
    >>I upgraded to a version 4 RPM (circa 2002) and that fixed it.
    >>
    >>If some compatibility was broken on purpose, that's fine, although I couldn't find anything in the kernel docs.
    >>I know, I should upgrade everything, but that can break a lot of things too...
    >>Thought I'd mention it though in case it's a bug or somebody else has the same problem.
    >
    >
    > It's probably a bug, but your bug report doesn't have enough details
    > to track it down. Do you have a a.out strace and could send an strace log
    > with the segfault and the last tens of system calls before it?
    >
    > -Andi

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Gordon Jin: "[PATCH 2.6] fix mmap() return value to conform POSIX"

    Relevant Pages

    • Re: depmod segfaulting
      ... Lonni J Friedman wrote: ... Every time it runs, it segfaults. ... I ran it through strace, but this is what it shows before dying: ...
      (Fedora)
    • Re: gftp 2.0.17-3.x86_64 crashes
      ... Bob Chiodini wrote: ... > Segfaults for me too. ... Here is the last 100 lines from an strace. ... > segfault occurs after selecting the file to download. ...
      (Fedora)
    • Basic, but what the hell am I doing wrong here?
      ... run it, it segfaults. ... from strace: ... I've opened and read files hundreds of times in my life. ... To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org ...
      (Debian-User)
    • Re: another Tk segfault bug, anyone know what the backtrace means?
      ... I originally posted about gtk2 apps causing segfaults ... That bug was apprently fixed with a patch ... But now someone is claiming this code below causes segfaults, ... His sample code, creates a new mainwindow and event loop in a sub, ...
      (comp.lang.perl.tk)
    • Re: wheezy upgrade gets 671812: xserver-xorg-core: segfault at exit
      ... from X it segfaults and hangs the system. ... The bug is closed so ... But since IMO everyone who upgrades wheezy and has ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)