Open MPI logo

Hardware Locality Users' Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Users mailing list

Subject: Re: [hwloc-users] Patch to disable GCC __builtin_ operations
From: Josh Hursey (jjhursey_at_[hidden])
Date: 2011-06-09 11:02:47


Below is some disassembly generated from gdb from the core file that
was generated. The signal is an illegal instruction, not a segv as I
mentioned previously (sorry about that). I also included some
information about the lstopo file and configure parameters below.

Thanks,
Josh

-------------------------------------
shell$ file lstopo
lstopo: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for
GNU/Linux 2.6.4, statically linked, for GNU/Linux 2.6.4, not stripped

hwloc configured with:
shell$ ./configure --prefix=/myprefix/hwloc --disable-xml
--enable-static --disable-shared

shell$ gdb lstopo ./core
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-suse-linux"...
Using host libthread_db library "/lib64/libthread_db.so.1".
Failed to read a valid object file image from memory.
Core was generated by `/tmp/work/jjhursey/bin/hwloc/bin/lstopo'.
Program terminated with signal 4, Illegal instruction.
#0 0x000000000041d8d9 in hwloc_weight_long ()
(gdb) bt
#0 0x000000000041d8d9 in hwloc_weight_long ()
#1 0x000000000041ffdf in hwloc_bitmap_weight ()
#2 0x0000000000424cce in look_sysfscpu ()
#3 0x0000000000426623 in hwloc_look_linux ()
#4 0x00000000004155b4 in hwloc_discover ()
#5 0x0000000000416792 in hwloc_topology_load ()
#6 0x000000000040201f in main ()
(gdb) disassemble
Dump of assembler code for function hwloc_weight_long:
0x000000000041d8d1 <hwloc_weight_long+0>: push %rbp
0x000000000041d8d2 <hwloc_weight_long+1>: mov %rsp,%rbp
0x000000000041d8d5 <hwloc_weight_long+4>: mov %rdi,0xfffffffffffffff8(%rbp)
0x000000000041d8d9 <hwloc_weight_long+8>: popcnt 0xfffffffffffffff8(%rbp),%rax
0x000000000041d8df <hwloc_weight_long+14>: leaveq
0x000000000041d8e0 <hwloc_weight_long+15>: retq
End of assembler dump.
-------------------------------------

On Thu, Jun 9, 2011 at 9:05 AM, Samuel Thibault
<samuel.thibault_at_[hidden]> wrote:
> Josh Hursey, le Thu 09 Jun 2011 14:52:39 +0200, a écrit :
>> The odd thing about this environment is that the head node seems to
>> have a slightly different setup than the compute nodes (not sure why
>> exactly, but that's what it is). So hwloc is configured and runs
>> correctly on the head node, but when it is asked to run on the compute
>> nodes it segvs at the call site of the __builtin_ functions.
>
> Could you post a disassembly of the site?
>
>> I suspect that the ABI compatibility of the libc interface is what is
>> enabling the remainder of the code to work in both environments, and
>> that the __builtin_ functions bypass that ABI to put in system
>> specific code that (for whatever reason) does not match on the compute
>> nodes.
>
> But the odd thing is that there shouldn't be any ABI things here, it's
> meant to be inlined.
>
> Samuel
> _______________________________________________
> hwloc-users mailing list
> hwloc-users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users
>
>

-- 
Joshua Hursey
Postdoctoral Research Associate
Oak Ridge National Laboratory
http://users.nccs.gov/~jjhursey