Bug 1413762
Summary: | Turn on --with-dtrace for nodejs | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Kinston Hughes <k2683901> |
Component: | nodejs | Assignee: | NodeJS Packaging SIG <nodejs-sig> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 25 | CC: | jamielinux, mrunge, nodejs-sig, piotr1212, sgallagh, tchollingsworth, thrcka, zsvetlik |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | nodejs-6.9.4-2.fc25 nodejs-6.9.4-2.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-01-21 19:22:25 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Kinston Hughes
2017-01-16 22:05:22 UTC
Postgres ships --with-dtrace on fedora, there seems to be a "BuildRequires: systemtap-sdt-devel" involved. In case it helps. Postgres's --with-dtrace option also carries compatibility for systemtap. Node.js doesn't... it specifically requires Dtrace (which isn't available on Fedora). (In reply to Stephen Gallagher from comment #2) > Postgres's --with-dtrace option also carries compatibility for systemtap. > Node.js doesn't... it specifically requires Dtrace (which isn't available on > Fedora). I guess that's is no longer the case. # ./configure --help | grep -i tap --systemtap-includes=SYSTEMTAP_INCLUDES directory containing systemtap header files So node does know about systemtap. Second, here's a blog post by Brendan Gregg showing nodejs provides USDT tracepoints which the kernel BPF can use: http://www.brendangregg.com/blog/2016-10-12/linux-bcc-nodejs-usdt.html Finally, I've just pulled and successfully compiled node once with --with-dtrace and once without. Turning that flag produces a binary which includes the USDTs missing from the currently shipped fedora package. # readelf -n ~/bin/node <...> Displaying notes found at file offset 0x01b809bc with length 0x000003c4: Owner Data size Description stapsdt 0x0000003c NT_STAPSDT (SystemTap probe descriptors) Provider: node Name: gc__start <...> Please turn on --with-dtrace for node. I noticed that Node now also has --with-lttng, but I don't know that offers anything beyond --with-dtrace beyond requiring different tools. FYI. From Node Changelog (https://github.com/nodejs/node/commit/38c0c47bbe280ddc42054418091571e532d82a1e) -2013.05.13, Version 0.11.2 (Unstable) +2013.06.26, Version 0.11.3 (Unstable) <...> +* dtrace: unify dtrace and systemtap interfaces (Timothy J Fontaine) first fedora package dates to 2012, but tracing support for systemtap on linux has been possible for 2+ years. Recently, with kernel 4.9, it's finally become possible to use the BPF kernel facilities instead of relying on systemtap to leverage that. Rebuilding the Node.js package in Fedora after adding `BuildRequires: systemtap-sdt-devel` and setting `--with-dtrace` in configure leads to a failure: https://koji.fedoraproject.org/koji/taskinfo?taskID=17321978 If someone would like to take a look at the spec, it's https://paste.fedoraproject.org/529733/14847493/ I don't have any additional time to spend on this today, but if someone wants to propose a correction to that spec, I'm listening. I hate build scripts. This is a bug in the systemtap provided `dtrace` shim, which fails to properly handle the CFLAGS envar when it contains new line. From spec: export CFLAGS='%{optflags} -g \ -D_LARGEFILE_SOURCE \ -D_FILE_OFFSET_BITS=64 \ -DZLIB_CONST \ -fno-delete-null-pointer-checks' export CXXFLAGS='%{optflags} -g \ -D_LARGEFILE_SOURCE \ -D_FILE_OFFSET_BITS=64 \ -DZLIB_CONST \ -fno-delete-null-pointer-checks' The package compiles if you add the following lines right after: # Explicit new lines in C(XX)FLAGS can break naive build scripts export CFLAGS="$(echo ${CFLAGS} | tr '\n\\' ' ')" export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')" I've opened an issue on the systemtap bugzilla, see: https://sourceware.org/bugzilla/show_bug.cgi?id=21063 I want those two hours of my life back, dammit. (In reply to Kinston Hughes from comment #7) > I hate build scripts. > > This is a bug in the systemtap provided `dtrace` shim, which fails to > properly handle the CFLAGS envar when it contains new line. That was some mighty fine detective work, Kinston! Thanks very much for tracking it down. I doubt I'd have put in enough effort to find that. I'm running a scratch build now; assuming it succeeds, I will push it to dist-git and do an official build for Rawhide, F25 and EPEL 7. p.s. I gave you credit in the Changelog. nodejs-6.9.4-2.fc25 libuv-1.10.2-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-922de2d990 nodejs-6.9.4-2.el7 libuv-1.10.2-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-834d4d8dc8 Thanks! Side note, I had the CFLAGS envars still set in a terminal after I finished investigating and a bunch of other unrelated projects I compiled exhibited mysterious deaths as well. I'm too frightened to go near the fedora packaging guidelines , but it just seems like doing multi-line envars in the SPEC file should be a no-no. libuv-1.10.2-1.el7, nodejs-6.9.4-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-834d4d8dc8 libuv-1.10.2-1.fc25, nodejs-6.9.4-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-922de2d990 libuv-1.10.2-1.fc25, nodejs-6.9.4-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report. libuv-1.10.2-1.el7, nodejs-6.9.4-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report. |