Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* profiling on redhat/alpha goes core on startup
@ 1998-03-28 11:55 Uncle George
  1998-03-28 13:35 ` Andreas Johansson
  1998-03-31 10:47 ` Stefan Schroepfer
  0 siblings, 2 replies; 7+ messages in thread
From: Uncle George @ 1998-03-28 11:55 UTC (permalink / raw)
  To: axp-list@redhat.com; +Cc: redhat-devel-list@redhat.com

does profiling on alpha work. when i include the -pg switch, the
resulting executable
will go core before it ever hits main()

isn't there a libc_p.so for profiling? the core dump seems to be comming
from somewhere
in libc.so

any one got suggestions on how to debug this boo bo.

gdb javah <<EOF
r
where
q
y
EOF
strace javah
ldd javah


+ gdb javah

(gdb) Starting program:
/usr/src/t/JavaSoft_1.1.5/build/genunix/java/javah/javah

Program received signal SIGSEGV, Segmentation fault.
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address 0x1555555b8bc

Otherwise, you told GDB there was a function where there isn't one, or
(more likely) you have encountered a bug in GDB.
0x1555555b8bc in ?? ()
(gdb) #0  0x1555555b8bc in ?? ()
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address 0x1555555b8a8
(gdb)

+ strace javah
execve("./javah", ["javah"], [/* 22 vars */]) = 0
brk(0)                                  = 0x120166d30
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=01, st_size=891085538, ...}) = 0
mmap(0, 4831834960, PROT_READ, 0 /* MAP_??? */, 0, 0) = 0x15555566000
close(3)                                = 0
open("/lib/libdl.so.2.1", O_RDONLY)     = 3
mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555568000
mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x1555556a000
munmap(0x15555568000, 8192)             = 0
mmap(0, 8192, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555666000
mprotect(0x1555566a000, 1041472, PROT_NONE) = 0
mmap(0x15555766000, 1041472, PROT_NONE, 0 /* MAP_??? */, 0, 0) =
0x15555766000
close(3)                                = 0
open("/lib/libc.so.6.1", O_RDONLY)      = 3
mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555568000
munmap(0x15555568000, 8192)             = 0
mmap(0, 8192, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x1555576a000
mprotect(0x15555836000, 1154864, PROT_NONE) = 0
mmap(0x1555592a000, 1154864, PROT_NONE, 0 /* MAP_??? */, 0, 0) =
0x1555592a000
mmap(0x15555946000, 1154864, PROT_NONE, 0 /* MAP_??? */, 0, 0) =
0x15555946000
close(3)                                = 0
mprotect(0x120000000, 393216, PROT_READ|PROT_WRITE) = 0
mprotect(0x120000000, 393216, PROT_READ|PROT_EXEC) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

+ ldd javah
 libdl.so.2.1 => /lib/libdl.so.2.1 (0x000001555555c000)
 libc.so.6.1 => /lib/libc.so.6.1 (0x0000015555660000)
 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0000000000000000)



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

* Re: profiling on redhat/alpha goes core on startup
  1998-03-28 11:55 profiling on redhat/alpha goes core on startup Uncle George
@ 1998-03-28 13:35 ` Andreas Johansson
  1998-03-28 14:07   ` Uncle George
  1998-03-31 10:47 ` Stefan Schroepfer
  1 sibling, 1 reply; 7+ messages in thread
From: Andreas Johansson @ 1998-03-28 13:35 UTC (permalink / raw)
  To: redhat-devel-list@redhat.com; +Cc: axp-list@redhat.com

On Sat, 28 Mar 1998, Uncle George wrote:

> does profiling on alpha work. when i include the -pg switch, the
> resulting executable
> will go core before it ever hits main()

Try to link your program statically. This seems to do the trick.
E.g. add -static to your link command.

/Andreas


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

* Re: profiling on redhat/alpha goes core on startup
  1998-03-28 13:35 ` Andreas Johansson
@ 1998-03-28 14:07   ` Uncle George
  0 siblings, 0 replies; 7+ messages in thread
From: Uncle George @ 1998-03-28 14:07 UTC (permalink / raw)
  To: Andreas Johansson; +Cc: redhat-devel-list@redhat.com, axp-list@redhat.com

i just tried -static   NO good. i need to use -ldl to call/load in other
shared libs. looks like
libc_p.a doesn't have a few of the dynamic linker calls!
gat

is there some reason why there isn't a libc_p.so ??
gat

Andreas Johansson wrote:

> On Sat, 28 Mar 1998, Uncle George wrote:
>
> > does profiling on alpha work. when i include the -pg switch, the
> > resulting executable
> > will go core before it ever hits main()
>
> Try to link your program statically. This seems to do the trick.
> E.g. add -static to your link command.
>
> /Andreas




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

* Re: profiling on redhat/alpha goes core on startup
  1998-03-28 11:55 profiling on redhat/alpha goes core on startup Uncle George
  1998-03-28 13:35 ` Andreas Johansson
@ 1998-03-31 10:47 ` Stefan Schroepfer
  1998-03-31 11:15   ` Uncle George
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Schroepfer @ 1998-03-31 10:47 UTC (permalink / raw)
  To: axp-list

Uncle George wrote:
> 
> does profiling on alpha work. when i include the -pg switch, the
> resulting executable
> will go core before it ever hits main()
> 
> isn't there a libc_p.so for profiling? the core dump seems to be comming
> from somewhere
> in libc.so

For RedHat 4.1 / 4.2 you need the following patches to binutils
(gprof) and libc_p.a, provided by David Mosberger-Tang:

http://archive.redhat.com/axp-list/1997-March/0463.html
http://archive.redhat.com/axp-list/1997-March/0464.html

These patches should be apllied to later versions (5.0 ...),
are they?

Maybe the following summary from Harvey Stein is useful (see
section IV. Profiling Repair):

http://archive.redhat.com/axp-list/1997-November/0734.html

scr@iis.fhg.de


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

* Re: profiling on redhat/alpha goes core on startup
  1998-03-31 10:47 ` Stefan Schroepfer
@ 1998-03-31 11:15   ` Uncle George
  1998-04-01 10:46     ` Stefan Schroepfer
  0 siblings, 1 reply; 7+ messages in thread
From: Uncle George @ 1998-03-31 11:15 UTC (permalink / raw)
  To: axp-list

well,
    It seems that i need a majic file like libc.so.  this is an ascii  magic
file that has some linker commands. the majic file that I need was/is
libc_p.so, with similar linker commands - except that libc.a should be
replaced by libc_p.a.


this gets my linker, and program to be quite content.

BUT how do u get profiling to "GO" !  i get a nearly empty gprof data file.
the profil(2) is rather cryptic, amd the undocumented mon...() calls dont seem
to help either.


Stefan Schroepfer wrote:

> Uncle George wrote:
> >
> > does profiling on alpha work. when i include the -pg switch, the
> > resulting executable
> > will go core before it ever hits main()
> >
> > isn't there a libc_p.so for profiling? the core dump seems to be comming
> > from somewhere
> > in libc.so
>
> For RedHat 4.1 / 4.2 you need the following patches to binutils
> (gprof) and libc_p.a, provided by David Mosberger-Tang:
>
> http://archive.redhat.com/axp-list/1997-March/0463.html
> http://archive.redhat.com/axp-list/1997-March/0464.html
>
> These patches should be apllied to later versions (5.0 ...),
> are they?
>
> Maybe the following summary from Harvey Stein is useful (see
> section IV. Profiling Repair):
>
> http://archive.redhat.com/axp-list/1997-November/0734.html
>
> scr@iis.fhg.de
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com




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

* Re: profiling on redhat/alpha goes core on startup
  1998-03-31 11:15   ` Uncle George
@ 1998-04-01 10:46     ` Stefan Schroepfer
  1998-04-02 12:36       ` Uncle George
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Schroepfer @ 1998-04-01 10:46 UTC (permalink / raw)
  To: axp-list

Uncle George wrote:
> 
> well,
>     It seems that i need a majic file like libc.so.  this is an ascii  magic
> file that has some linker commands. the majic file that I need was/is
> libc_p.so, with similar linker commands - except that libc.a should be
> replaced by libc_p.a.

Sorry, I probably missed why you insist on dynamic linkage.

> this gets my linker, and program to be quite content.
> 
> BUT how do u get profiling to "GO" !  i get a nearly empty gprof data file.
> the profil(2) is rather cryptic, amd the undocumented mon...() calls dont seem
> to help either.

With the patches of D. M.-T. profiling "GOES" on my RH 4.1 and 4.2
machines
(static linkage required).

> Stefan Schroepfer wrote:
> >
> > For RedHat 4.1 / 4.2 you need the following patches to binutils
> > (gprof) and libc_p.a, provided by David Mosberger-Tang:
> >
> > http://archive.redhat.com/axp-list/1997-March/0463.html
> > http://archive.redhat.com/axp-list/1997-March/0464.html
> >


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

* Re: profiling on redhat/alpha goes core on startup
  1998-04-01 10:46     ` Stefan Schroepfer
@ 1998-04-02 12:36       ` Uncle George
  0 siblings, 0 replies; 7+ messages in thread
From: Uncle George @ 1998-04-02 12:36 UTC (permalink / raw)
  To: axp-list

actually its not me, but rather the java JDK sources are set up to do only ".so"
compilations. In this way u can add/remove shared libs at will/whim.
gat

Stefan Schroepfer wrote:

> Uncle George wrote:
> >
> > well,
> >     It seems that i need a majic file like libc.so.  this is an ascii  magic
> > file that has some linker commands. the majic file that I need was/is
> > libc_p.so, with similar linker commands - except that libc.a should be
> > replaced by libc_p.a.
>
> Sorry, I probably missed why you insist on dynamic linkage.
>
> > this gets my linker, and program to be quite content.
> >
> > BUT how do u get profiling to "GO" !  i get a nearly empty gprof data file.
> > the profil(2) is rather cryptic, amd the undocumented mon...() calls dont seem
> > to help either.
>
> With the patches of D. M.-T. profiling "GOES" on my RH 4.1 and 4.2
> machines
> (static linkage required).
>
> > Stefan Schroepfer wrote:
> > >
> > > For RedHat 4.1 / 4.2 you need the following patches to binutils
> > > (gprof) and libc_p.a, provided by David Mosberger-Tang:
> > >
> > > http://archive.redhat.com/axp-list/1997-March/0463.html
> > > http://archive.redhat.com/axp-list/1997-March/0464.html
> > >
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com





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

end of thread, other threads:[~1998-04-02 12:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-28 11:55 profiling on redhat/alpha goes core on startup Uncle George
1998-03-28 13:35 ` Andreas Johansson
1998-03-28 14:07   ` Uncle George
1998-03-31 10:47 ` Stefan Schroepfer
1998-03-31 11:15   ` Uncle George
1998-04-01 10:46     ` Stefan Schroepfer
1998-04-02 12:36       ` Uncle George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox