Bug 11605 - Samba 4.3.1 : ppc64 runtime relocation issue in glibc
Summary: Samba 4.3.1 : ppc64 runtime relocation issue in glibc
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.3.1
Hardware: PPC Other
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-16 13:09 UTC by Miguel Sanders
Modified: 2016-03-02 15:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Sanders 2015-11-16 13:09:02 UTC
Hi guys

I've compiled Samba 4.3.1 on our Linux ppc64 infrastructure (currently running version 4.2.3) and I'm observing a runtime relocation issue with glibc (issue not present when building 4.2.5, just verified) in which I'm getting SIGSEGV in _dl_relocate_object.

# uname -a
Linux genappsmb52 3.0.101-65-ppc64 #1 SMP Mon Sep 7 19:21:52 UTC 2015 (bef9feb) ppc64 ppc64 ppc64 GNU/Linux

glibc-2.11.3-17.90.4

# /usr/samba/bin/wbinfo
Memory fault

# gdb /usr/samba/bin/wbinfo
...
(gdb) run
Starting program: /usr/samba/bin/wbinfo 

Program received signal SIGSEGV, Segmentation fault.
0x00000fffb7b77220 in ?? ()
(gdb) bt
#0  0x00000fffb7b77220 in ?? ()
#1  0x00000fffb7fd2aac in resolve_ifunc (sym_map=<optimized out>, map=<optimized out>, value=<optimized out>)
    at ../sysdeps/powerpc/powerpc64/dl-machine.h:551
#2  elf_machine_rela (reloc_addr_arg=<optimized out>, version=<optimized out>, sym=0xfffb7aad948, reloc=<optimized out>, map=<optimized out>)
    at ../sysdeps/powerpc/powerpc64/dl-machine.h:587
#3  elf_dynamic_do_rela (lazy=<optimized out>, relsize=<optimized out>, reladdr=<optimized out>, map=<optimized out>) at do-rel.h:120
#4  _dl_relocate_object (scope=0xfffb7e43c58, reloc_mode=0, consider_profiling=-1214247576) at dl-reloc.c:268
#5  0x00000fffb7fc9c4c in dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>) at rtld.c:2303
#6  0x00000fffb7fdee74 in _dl_sysdep_start (start_argptr=<optimized out>, dl_main=@0xfffb7ffa1e8: 0xfffb7fc8590 <dl_main>) at ../elf/dl-sysdep.c:243
#7  0x00000fffb7fc6d90 in _dl_start_final (arg=0xffffffff340, info=<optimized out>) at rtld.c:336
#8  0x00000fffb7fc7298 in _dl_start (arg=0xffffffff340) at rtld.c:564
#9  0x00000fffb7fc64f0 in ._start () from /lib64/ld64.so.1
(gdb) 

# valgrind /usr/samba/bin/wbinfo
==32967== Memcheck, a memory error detector
==32967== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==32967== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==32967== Command: ./bin/wbinfo
==32967== 
Inconsistency detected by ld.so: rtld.c: 1266: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed!
==32967== 
==32967== HEAP SUMMARY:
==32967==     in use at exit: 0 bytes in 0 blocks
==32967==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==32967== 
==32967== All heap blocks were freed -- no leaks are possible
==32967== 
==32967== For counts of detected and suppressed errors, rerun with: -v
==32967== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Any idea?

Thanks

Miguel
Comment 1 Miguel Sanders 2016-03-02 15:30:56 UTC
RELRO support seems to be broken on ppc64 (at least on my SLES 11 environment).
Disabling it, fixed the problem.