Bug 169669

Summary: Something seems broken in sparc64 TLS or lang/lua
Product: Base System Reporter: Nathaniel Filardo <nwf>
Component: sparc64Assignee: freebsd-sparc64 (Nobody) <sparc64>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: markj
Priority: Normal    
Version: 9.0-STABLE   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=185453

Description Nathaniel Filardo 2012-07-05 21:30:07 UTC
Ports linked against lua die almost immediately at startup.  For example, dns/dnsmasq with LUA set yields:

hydra% dnsmasq
zsh: bus error (core dumped)  dnsmasq
hydra% gdb `which dnsmasq` dnsmasq.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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 "sparc64-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `dnsmasq'.
Program terminated with signal 10, Bus error.
Reading symbols from /usr/local/lib/liblua-5.1.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/liblua-5.1.so.1
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libidn.so.17...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libidn.so.17
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/libintl.so.9...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libintl.so.9
Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000040237fac in __tls_get_addr () from /libexec/ld-elf.so.1
(gdb) bt
#0  0x0000000040237fac in __tls_get_addr () from /libexec/ld-elf.so.1
#1  0x0000000040237d50 in __tls_get_addr () from /libexec/ld-elf.so.1
Previous frame identical to this frame (corrupt stack?)

security/nmap's nmap executable, which also uses lua, also dies immediately in the same way, erroring in __tls_get_addr.

How-To-Repeat: Build dns/dnsmasq or security/nmap on sparc64
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-07-16 04:04:35 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-sparc64

reclassify
Comment 2 marius 2012-07-16 21:39:54 UTC
Is this a regression in FreeBSD or lang/lua?
Could you please build and install rtld-elf/ld-elf.so.1 with debugging
symbols and determine which instruction actually is causing the bus
error?
Could you please also check whether lang/lua, especially its configure
script, has some special handling for TLS which is only enabled on
certain architectures, assumes SUNTLS instead of GNUTLS on SPARC or
something like that?

Marius
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:48:54 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 4 Mark Johnston freebsd_committer freebsd_triage 2020-07-11 18:54:13 UTC
There was no follow-up to comment 2, and sparc64 platform support has been removed.