Compiling and run-time problems

We got some near reproduceable problem,
which consist of compiling more than 7 classes
and running it on a target Elan104NC without hard disk.

Basically, it goes as follow:

Part 1:

  • We write a sample test program consisting of 6 dummy classes,
    with inheritance/aggregation.

  • We compile it on a QNXRTP, Pentium III platform.

  • The exectuable is stored on a SuSe Linux server mounted
    in the /home/ directory. Which is also accessible from the Elan104NC
    target
    as /home/ directory also.

  • We run this program on a target Elan104NC,
    which has only stdlibc++.2.10.so installed,
    the compiler gcc is not installed on it (no space).

  • The program runs fine.

Part 2:

  • If we include another class in the hierarchy.

  • We compile the program on the P3, it runs fine.

  • We run it on the Elan104NC, we get “Memory fault” or similar.

  • If we compile it on a Elan104 with a Hard Drive, it runs fine.

How come ?!!??

Fred.

Hmmm, sounds like a nfs problem, if the difference
between working and not working is only where
it’s loaded from.

Fred <fprog@nowhere.users.sourceforge.net> wrote:

We got some near reproduceable problem,
which consist of compiling more than 7 classes
and running it on a target Elan104NC without hard disk.

Basically, it goes as follow:

Part 1:

  • We write a sample test program consisting of 6 dummy classes,
    with inheritance/aggregation.

  • We compile it on a QNXRTP, Pentium III platform.

  • The exectuable is stored on a SuSe Linux server mounted
    in the /home/ directory. Which is also accessible from the Elan104NC
    target
    as /home/ directory also.

  • We run this program on a target Elan104NC,
    which has only stdlibc++.2.10.so installed,
    the compiler gcc is not installed on it (no space).

  • The program runs fine.

Part 2:

  • If we include another class in the hierarchy.

  • We compile the program on the P3, it runs fine.

  • We run it on the Elan104NC, we get “Memory fault” or similar.

  • If we compile it on a Elan104 with a Hard Drive, it runs fine.

How come ?!!??

Fred.


cburgess@qnx.com

More test have shown,

that simply relinking the object files to executable, make it work.

But why shall we need to relink on the target ?

Doesn’t the executable shall work directly ?!?


Colin Burgess wrote in message <98t995$q7p$1@nntp.qnx.com>…

Hmmm, sounds like a nfs problem, if the difference
between working and not working is only where
it’s loaded from.

Fred <fprog@nowhere.users.sourceforge.net> wrote:

We got some near reproduceable problem,
which consist of compiling more than 7 classes
and running it on a target Elan104NC without hard disk.

Basically, it goes as follow:

Part 1:

  • We write a sample test program consisting of 6 dummy classes,
    with inheritance/aggregation.

  • We compile it on a QNXRTP, Pentium III platform.

  • The exectuable is stored on a SuSe Linux server mounted
    in the /home/ directory. Which is also accessible from the Elan104NC
    target
    as /home/ directory also.

  • We run this program on a target Elan104NC,
    which has only stdlibc++.2.10.so installed,
    the compiler gcc is not installed on it (no space).

  • The program runs fine.

Part 2:

  • If we include another class in the hierarchy.

  • We compile the program on the P3, it runs fine.

  • We run it on the Elan104NC, we get “Memory fault” or similar.

  • If we compile it on a Elan104 with a Hard Drive, it runs fine.

How come ?!!??

Fred.


\

cburgess@qnx.com

Fred <fprog@nowhere.users.sourceforge.net> wrote:

More test have shown,

that simply relinking the object files to executable, make it work.

But why shall we need to relink on the target ?

Doesn’t the executable shall work directly ?!?

It could be that there is a particular transfer problem
with the image that doesn’t show up with differently
sized objects.

Can you try copying the executable into /dev/shmem and
running it from there? (ie the one that was linked on the
host)

Colin Burgess wrote in message <98t995$q7p$> 1@nntp.qnx.com> >…
Hmmm, sounds like a nfs problem, if the difference
between working and not working is only where
it’s loaded from.

Fred <fprog@nowhere.users.sourceforge.net> wrote:

We got some near reproduceable problem,
which consist of compiling more than 7 classes
and running it on a target Elan104NC without hard disk.

Basically, it goes as follow:

Part 1:

  • We write a sample test program consisting of 6 dummy classes,
    with inheritance/aggregation.

  • We compile it on a QNXRTP, Pentium III platform.

  • The exectuable is stored on a SuSe Linux server mounted
    in the /home/ directory. Which is also accessible from the Elan104NC
    target
    as /home/ directory also.

  • We run this program on a target Elan104NC,
    which has only stdlibc++.2.10.so installed,
    the compiler gcc is not installed on it (no space).

  • The program runs fine.

Part 2:

  • If we include another class in the hierarchy.

  • We compile the program on the P3, it runs fine.

  • We run it on the Elan104NC, we get “Memory fault” or similar.

  • If we compile it on a Elan104 with a Hard Drive, it runs fine.

How come ?!!??

Fred.


\

cburgess@qnx.com


cburgess@qnx.com

Colin Burgess wrote:

Fred <fprog@nowhere.users.sourceforge.net> wrote:
More test have shown,



Can you try copying the executable into /dev/shmem and
running it from there? (ie the one that was linked on the
host)

Just out of curiosity, what does that accomplish? (We tried it, didn’t
help) It seems rather mysterious. :slight_smile:

D.


Dana Echtner \ Real-Time Systems Administrator
dana@ece.concordia.ca / ECE, Concordia University, Montreal, Canada

rw-rw-rw-: The file protection of the beast