Debugging 32-bit code on opteron gives false segfault?

… title says it all.

hello.f:
print*, “Hello World!”
end


% pgf90 -g -tp k8-32 hello.f
% ./a.out

Hello World!

% pgdbg -text -tp k8-32 ./a.out
PGDBG 5.2-4 x86 (Workstation, 16 CPU)
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2004, STMicroelectronics, Inc. All Rights Reserved.
***Reading DWARFv2 Information.
Loaded: /home/fassler/test-fortran/a.out

pgdbg> run
Reloading: /home/fassler/test-fortran/a.out
argv[0]= /home/fassler/test-fortran/a.out

Signalled SIGSEGV at 0xf7ff54a0, function _dl_debug_state, file
f7ff54a0: 55 pushl %ebp

pgdbg>

\

Variations using a direct $PATH to the 32-bit compiler produce the same results…

gdb works fine (except that it doesn’t understand .f90, of course…)

This is on Fedora Core 2, x86_64, with all the latest patches (via up2date).

Any hints/suggestions?

-Mark

Hi Mark,

I’m unable to recreate the problem here with our Fedora Core 2 system. Granted, we need to keep ours in its original state so the problem might have been caused by one of the up2date updates. I know that pgdbg 5.2-4 doesn’t work well on Fedora Core 3 so perhaps your glibc was updated? What is the output when you run the following command?

/lib/libc.so.6

Thanks,
Mat

I know that pgdbg 5.2-4 doesn’t work well on Fedora Core 3 so perhaps your glibc was updated?

Hi,

We’re currently using Fedora Core 3, unfortunately, none of the debugging works for us in either C or Fortran … Would you have any plan for Core 3 in a near future ?

Sincerely

Fedora Core 3 will be supported in the upcoming 6.0 release.

  • Mat

Output from "/lib/libc.so.6’ on fc2 x86_64 with all the latest patches as of feb 20:

GNU C Library stable release version 2.3.3, by Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.3 20040412 (Red Hat Linux 3.3.3-7).
Compiled on a Linux 2.4.20 system on 2004-10-28.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        linuxthreads-0.10 by Xavier Leroy
        The C stubs add-on version 2.1.2.
        BIND-8.2.3-T5B
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        Glibc-2.0 compatibility add-on by Cristian Gafton 
        GNU Libidn by Simon Josefsson
        libthread_db work sponsored by Alpha Processor Inc
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

Hi Mark,

I must appolgize for my late reply. Our Fedora Core 2 system went down a few weeks ago and our IT just got it back up.

In comparing the output you sent with our FC2 system, the only difference I see is the build date for the linux kernel. The version is the same but the build date on ours is ‘2004-05-11’. This may or may not be significant, I’m not really sure.

What I’d like to do is wait a few weeks until the 6.0 release is out and then try again. If this doesn’t work then I’ll have our IT update our Fedora Core 2 to match yours and we’ll investigate further. However, the 6.0 version will most likely take care of the problem.

Thanks,
Mat

Hi,

I just started using pgdbg today, but I appear to be having exactly the same problem as above. However, I am using the newest version (I believe). Here’s the message I get when I start the debugger:

$ debugt num7.txt

PGDBG 6.1-3 x86 (Workstation, 4 CPU)
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.
***Reading DWARFv2 Information.
Loaded: /mach2_debug/m2trk/m2

pgdbg> r
Signalled SIGSEGV at 0x44b950, function _dl_debug_state
44b950: 55 pushl %ebp

The output from /lib/libc.so.6 is

GNU C Library stable release version 2.3.5, by Roland McGrath et al.
Copyright © 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.4.3 20050227 (Red Hat 3.4.3-22).
Compiled on a Linux 2.4.20 system on 2005-04-07.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
The C stubs add-on version 2.1.2.
BIND-8.2.3-T5B
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Glibc-2.0 compatibility add-on by Cristian Gafton
GNU Libidn by Simon Josefsson
libthread_db work sponsored by Alpha Processor Inc
Thread-local storage support included.
For bug reporting instructions, please see:
http://www.gnu.org/software/libc/bugs.html.

And uname -a gives

2.6.10-1.770_FC3smp #1 SMP Thu Feb 24 18:36:43 EST 2005 x86_64 x86_64 x86_64 GNU/Linux

Is there any fix for this problem?