Bug 224271

Summary: disable dtrace usdt on armv6, armv7 and aarch64
Product: Ports & Packages Reporter: Mikael Urankar <mikael>
Component: Individual Port(s)Assignee: Mark Linimon <linimon>
Status: Closed FIXED    
Severity: Affects Many People CC: ale, bhughes, dtrace, freebsd, gecko, kwm, linimon, m.tsatsenko, olgeni, pgsql, swills, tz
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226027
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219909
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214556
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226302
Bug Depends on:    
Bug Blocks: 225279    
Attachments:
Description Flags
patch
jbeich: maintainer-approval+
net-mgmt/lldpd: Disable DTrace on various ARM architectures
none
patch none

Description Mikael Urankar freebsd_committer freebsd_triage 2017-12-12 12:02:48 UTC
Created attachment 188748 [details]
patch

DTrace User-Defined Static Tracing is broken on armv6, armv7 and aarch64:

on aarch64 ld(1) fails to link probes: Relocations in generic ELF (EM: 0)
on armv6/7 we have this error: dt_modtext:/usr/src/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c(820): arm not implemented

the following ports are affected:
net-mgmt/lldpd          

lang/php56              
lang/php70              
lang/php71              
lang/php72              

lang/spidermonkey170    
lang/spidermonkey38     
lang/spidermonkey24     

lang/erlang             
lang/erlang-runtime15   
lang/erlang-runtime16   
lang/erlang-runtime17   
lang/erlang-runtime18   
lang/erlang-runtime19   
lang/erlang-runtime20   

databases/libmemcached  
databases/memcached     

databases/postgresql92-server   

www/node                
www/node6               
www/node8               

www/palemoon (www/firefox/Makefile.options)
www/firefox-esr (www/firefox/Makefile.options)
www/firefox
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-12-15 03:18:30 UTC
How to detect usdt is supported? From ports/ POV a file that can be checked via exists() and/or from autoconf POV via #error for !defined(_KERNEL_) in <sys/sdt.h> would be nice. ports/ should not have to maintain blacklists/whitelists that are bound to grow out of date and too hacky to upstream.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2017-12-15 03:20:33 UTC
Comment on attachment 188748 [details]
patch

gecko@ bits look OK.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-02-08 14:30:34 UTC
A commit references this bug:

Author: bhughes
Date: Thu Feb  8 14:29:37 UTC 2018
New revision: 461241
URL: https://svnweb.freebsd.org/changeset/ports/461241

Log:
  www/node,www/node8,www/node6: disable dtrace usdt on armv[67]

  Disable the DTRACE option by default on armv[67] since Node.js fails to
  build on armv[67] with the following error:

  dt_modtext:/usr/src/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c(820): arm not implemented

  PR:		224271
  Submitted by:	mikael.urankar@gmail.com

Changes:
  head/www/node/Makefile
  head/www/node6/Makefile
  head/www/node8/Makefile
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2018-02-19 02:19:10 UTC
I have created PR arm/226027 to address the source issues.

I will be committing patches from this PR with my tier-2 blanket to allow many more armvX packages to be built.  I will need to check if aarch64 is still affected, but I am certain that armvX is.
Comment 5 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2018-02-22 10:41:01 UTC
I'm sorry for the long time you needed to wait for me. Patches are fine for the PHP ports. Please feel free to commit! :)
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-03-11 06:37:42 UTC
A commit references this bug:

Author: linimon
Date: Sun Mar 11 06:37:15 UTC 2018
New revision: 464146
URL: https://svnweb.freebsd.org/changeset/ports/464146

Log:
  Disable dtrace usdt on armv6, armv7 and aarch64, for lang/php* ports.

  Tested for no regression on amd64.

  PR:		224271
  Approved by:	tz (maintainer)

Changes:
  head/lang/php70/Makefile
  head/lang/php71/Makefile
  head/lang/php72/Makefile
Comment 7 Mathieu Simon 2018-03-11 15:33:25 UTC
Created attachment 191418 [details]
net-mgmt/lldpd: Disable DTrace on various ARM architectures

Hi

I don't have ARM-based systems at hand but since net-mgmt/lldpd was recently bumped, I've attached an up-to-date patch for the port I take care for.

If no FreeBSD port committers see "added issues", please go ahead an commit this little diff. It doesn't break on other platforms so far since poudriere testport hasn't reported any issues.

-- Mathieu
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-03-23 11:54:13 UTC
A commit references this bug:

Author: linimon
Date: Fri Mar 23 11:53:11 UTC 2018
New revision: 465349
URL: https://svnweb.freebsd.org/changeset/ports/465349

Log:
  Disable dtrace on arm for now; fails to link.

  PR:		224271
  Submitted by:	mikael.urankar
  Approved by:	maintainer

Changes:
  head/net-mgmt/lldpd/Makefile
Comment 9 Mark Linimon freebsd_committer freebsd_triage 2018-03-23 11:56:59 UTC
On checking the status of this PR, I now believe the patch to databases/postgresql92-server/Makefile to be OBE.  The port has been deleted, and its successors build on arm.

I am currently running some build-tests for the others.
Comment 10 commit-hook freebsd_committer freebsd_triage 2018-03-25 14:37:19 UTC
A commit references this bug:

Author: linimon
Date: Sun Mar 25 14:36:29 UTC 2018
New revision: 465519
URL: https://svnweb.freebsd.org/changeset/ports/465519

Log:
  Disable dtrace usdt on armvX.  It causes link failures.

  Regression-tested on amd64.

  PR:		224271
  Submitted by:	mikael.urankar
  Approved by:	kwm (maintainer timeout)

Changes:
  head/lang/spidermonkey170/Makefile
  head/lang/spidermonkey24/Makefile
  head/lang/spidermonkey38/Makefile
Comment 11 commit-hook freebsd_committer freebsd_triage 2018-03-31 11:23:23 UTC
A commit references this bug:

Author: linimon
Date: Sat Mar 31 11:22:25 UTC 2018
New revision: 466038
URL: https://svnweb.freebsd.org/changeset/ports/466038

Log:
  Disable dtrace usdt on armvX to fix builds on those platforms (as was already
  done for aarch64).  Change is harmless on amd64.

  While here, sort OPTIONS.

  PR:		224271
  Submitted by:	mikael.urankar
  Approved by:	portmgr (tier-2 blanket)

Changes:
  head/lang/erlang/Makefile
  head/lang/erlang-runtime19/Makefile
  head/lang/erlang-runtime20/Makefile
Comment 12 Mark Linimon freebsd_committer freebsd_triage 2018-06-11 04:21:10 UTC
Now appears to be either fixed or OBE.
Comment 13 Mikael Urankar freebsd_committer freebsd_triage 2018-06-17 15:42:41 UTC
Created attachment 194336 [details]
patch

That's still an issue for:
databases/libmemcached
lang/erlang-runtime15
lang/erlang-runtime16
lang/php56
www/firefox

www/node6 (only aarch64 is missing)
Comment 14 commit-hook freebsd_committer freebsd_triage 2018-09-29 18:58:37 UTC
A commit references this bug:

Author: jbeich
Date: Sat Sep 29 18:58:12 UTC 2018
New revision: 480912
URL: https://svnweb.freebsd.org/changeset/ports/480912

Log:
  gecko: whitelist where DTRACE is enabled by default

  Userland probes are only supported on Tier1 architectures. Even though
  powerpc* should support dtrace -G may crash on C++ files built by GCC.
  DTRACE option is still exposed as long as dtrace(1) binary is present
  for easier debugging of libdtrace.

  PR:		221641 224271

Changes:
  head/www/firefox/Makefile.options
Comment 15 commit-hook freebsd_committer freebsd_triage 2018-09-29 18:59:44 UTC
A commit references this bug:

Author: jbeich
Date: Sat Sep 29 18:59:25 UTC 2018
New revision: 480913
URL: https://svnweb.freebsd.org/changeset/ports/480913

Log:
  MFH: r480912

  gecko: whitelist where DTRACE is enabled by default

  Userland probes are only supported on Tier1 architectures. Even though
  powerpc* should support dtrace -G may crash on C++ files built by GCC.
  DTRACE option is still exposed as long as dtrace(1) binary is present
  for easier debugging of libdtrace.

  PR:		221641 224271
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q3/
  branches/2018Q3/www/firefox/Makefile.options