public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] ld segfaults
@ 2003-08-18 16:29 Jay Foster
  2003-08-18 19:54 ` Mark Grosberg
  0 siblings, 1 reply; 5+ messages in thread
From: Jay Foster @ 2003-08-18 16:29 UTC (permalink / raw)
  To: 'Bart Veer', mark; +Cc: ecos-discuss

I too have had problems with segment faults with ld, but not when building
eCos code.  The problem that I had was with building native applications on
i686 RedHat 9 linux.  After googling for the error message, I found a
solution for the problem that I was having, which I don't think is related
to the problem that has been reported here.  In my case, it would always
segment fault on the final link, and the cause was related to the file
system being NFS mounted from another machine.  If the files were first
copied to the local file system, ld always works.  A simple tweak to my
Makefile to perform the copying solved the problem that I was seeing.

Jay

-----Original Message-----
From: Bart Veer [mailto:bartv@ecoscentric.com]
Sent: Sunday, August 17, 2003 12:12 PM
To: mark@nolab.conman.org
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] ld segfaults


>>>>> "Mark" == Mark Grosberg <mark@nolab.conman.org> writes:

    Mark> Hello all,

    Mark> I'm not quite sure how to report this bug. It seems to be a
    Mark> problem with GNU ld for i386-elf as distributed from
    Mark> eCosCentric (and installed via the ecos-install.sh script).

    Mark> So far we have tried it on a RedHat 7.3 SMP machine and a
    Mark> RedHat 8 laptop. In both cases, we can (sometimes) get ld to
    Mark> core dump. This seems easier to do -ffunction-sections and
    Mark> -fvtable-gc.

    <snip>

    Mark> Has anybody else experienced these problems? This is rather
    Mark> hard to reproduce. As our code changes slightly, the bug
    Mark> comes or goes. I'm rather reluctant to just go off and build
    Mark> the latest binutils without knowing what that may effect.

    Mark> Could this just be an issue with the versions of Linux we
    Mark> are using?

Those tools were built under RH7.3, so the version of Linux should not
be a problem. It does look like you are hitting some bug in ld which
only triggers under certain boundary conditions. I have not
encountered this bug myself, or had any similar reports.

A good first step would be to build the current release of binutils,
2.14, http://sources.redhat.com/binutils. The bug may well have been
fixed already. If that does not work then you may have to debug ld
itself. Unfortunately I suspect that you will not be able to provide a
small testcase for the binutils folks to look at, because any attempt
to simplify the problem will make it go away.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* RE: [ECOS] ld segfaults
  2003-08-18 16:29 [ECOS] ld segfaults Jay Foster
@ 2003-08-18 19:54 ` Mark Grosberg
  2003-08-18 20:10   ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Grosberg @ 2003-08-18 19:54 UTC (permalink / raw)
  To: Jay Foster; +Cc: 'Bart Veer', ecos-discuss



On Mon, 18 Aug 2003, Jay Foster wrote:

> I too have had problems with segment faults with ld, but not when building
> eCos code.  The problem that I had was with building native applications on
> i686 RedHat 9 linux.  After googling for the error message, I found a

Sorry, my e-mail wasn't clear... I actually was building application code
and then linking that with my eCos image. So, yes, its the same problem
you are seeing.

I can't get ld to segfault with just building eCos. My application wasn't
substantial (it is the Seminole webserver that was announced here last
week). But periodically, we would compile our code and during the link
with the eCos target libraries ld would SEGV.

> solution for the problem that I was having, which I don't think is related
> to the problem that has been reported here.  In my case, it would always
> segment fault on the final link, and the cause was related to the file
> system being NFS mounted from another machine.  If the files were first

No NFS here. Not sure if its the same problem then. Everything we were
doing was on local storage.

Thanks,
Mark G.
 - Been busy, hopefully I'll find time to debug this...



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* Re: [ECOS] ld segfaults
  2003-08-18 19:54 ` Mark Grosberg
@ 2003-08-18 20:10   ` Andrew Lunn
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2003-08-18 20:10 UTC (permalink / raw)
  To: Mark Grosberg; +Cc: Jay Foster, 'Bart Veer', ecos-discuss

> solution for the problem that I was having, which I don't think is related
> to the problem that has been reported here.  In my case, it would always
> segment fault on the final link, and the cause was related to the file
> system being NFS mounted from another machine.  If the files were first

I've had this problem a long time ago. Its Linux's NFSv2 client
causing a bug in Solaris NFS server to corrupt files. The simple fix
is to make your linux system use NFSv3.

      Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* Re: [ECOS] ld segfaults
  2003-08-12  5:39 ` [ECOS] ld segfaults Mark Grosberg
@ 2003-08-17 19:12   ` Bart Veer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Veer @ 2003-08-17 19:12 UTC (permalink / raw)
  To: mark; +Cc: ecos-discuss

>>>>> "Mark" == Mark Grosberg <mark@nolab.conman.org> writes:

    Mark> Hello all,

    Mark> I'm not quite sure how to report this bug. It seems to be a
    Mark> problem with GNU ld for i386-elf as distributed from
    Mark> eCosCentric (and installed via the ecos-install.sh script).

    Mark> So far we have tried it on a RedHat 7.3 SMP machine and a
    Mark> RedHat 8 laptop. In both cases, we can (sometimes) get ld to
    Mark> core dump. This seems easier to do -ffunction-sections and
    Mark> -fvtable-gc.

    <snip>

    Mark> Has anybody else experienced these problems? This is rather
    Mark> hard to reproduce. As our code changes slightly, the bug
    Mark> comes or goes. I'm rather reluctant to just go off and build
    Mark> the latest binutils without knowing what that may effect.

    Mark> Could this just be an issue with the versions of Linux we
    Mark> are using?

Those tools were built under RH7.3, so the version of Linux should not
be a problem. It does look like you are hitting some bug in ld which
only triggers under certain boundary conditions. I have not
encountered this bug myself, or had any similar reports.

A good first step would be to build the current release of binutils,
2.14, http://sources.redhat.com/binutils. The bug may well have been
fixed already. If that does not work then you may have to debug ld
itself. Unfortunately I suspect that you will not be able to provide a
small testcase for the binutils folks to look at, because any attempt
to simplify the problem will make it go away.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* [ECOS] ld segfaults
  2003-08-12  4:18 [ECOS] RedBoot + Configuration tool 2.11 question G.Muruganandam
@ 2003-08-12  5:39 ` Mark Grosberg
  2003-08-17 19:12   ` Bart Veer
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Grosberg @ 2003-08-12  5:39 UTC (permalink / raw)
  To: eCos Discussion


Hello all,

I'm not quite sure how to report this bug. It seems to be a problem with
GNU ld for i386-elf as distributed from eCosCentric (and installed via the
ecos-install.sh script).

So far we have tried it on a RedHat 7.3 SMP machine and a RedHat 8 laptop.
In both cases, we can (sometimes) get ld to core dump. This seems easier
to do -ffunction-sections and -fvtable-gc.

The hardware is known to be good (and it has survived memtest86-ing). We
then decided to set MALLOC_CHECK_=1 and we got the following warnings:

malloc: using debugging hooksmalloc: using debugging
hooksmalloc: using debugging hooksrealloc(): invalid pointer
0x84add08!realloc(): invalid pointer 0x8515df0!realloc(): invalid pointer
0x8515e08!realloc(): invalid pointer 0x8515e20!realloc(): invalid pointer
0x8515e38!realloc(): invalid pointer 0x8516e38!realloc(): invalid pointer
0x8516e50!realloc(): invalid pointer 0x8477920!

So there is obviously something wrong with that version of GNU ld:

  $ i386-elf-ld --version
  GNU ld version 2.13.1 (eCosCentric)
  Copyright 2002 Free Software Foundation, Inc.
  This program is free software; you may redistribute it under the terms
  of the GNU General Public License.  This program has absolutely no
  warranty.

  $ sum `which i386-elf-ld`
  27836   496

Has anybody else experienced these problems? This is rather hard to
reproduce. As our code changes slightly, the bug comes or goes. I'm rather
reluctant to just go off and build the latest binutils without knowing
what that may effect.

Could this just be an issue with the versions of Linux we are using?

Thanks,
Mark G.





-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

end of thread, other threads:[~2003-08-18 20:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-18 16:29 [ECOS] ld segfaults Jay Foster
2003-08-18 19:54 ` Mark Grosberg
2003-08-18 20:10   ` Andrew Lunn
  -- strict thread matches above, loose matches on Subject: below --
2003-08-12  4:18 [ECOS] RedBoot + Configuration tool 2.11 question G.Muruganandam
2003-08-12  5:39 ` [ECOS] ld segfaults Mark Grosberg
2003-08-17 19:12   ` Bart Veer

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).