Bug 200375 - dns/bind910: rcorder loop detected ldconfig -> named -> NETWORKING -> mountcritremote -> ldconfig
Summary: dns/bind910: rcorder loop detected ldconfig -> named -> NETWORKING -> mountcr...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mathieu Arnold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-21 21:22 UTC by c.kworr
Modified: 2015-06-01 11:18 UTC (History)
2 users (show)

See Also:
linimon: maintainer-feedback?


Attachments
This script generates dependency graph of all rc scripts with graphviz (ovals are orphans). (607 bytes, application/x-shellscript)
2015-05-21 21:22 UTC, c.kworr
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description c.kworr 2015-05-21 21:22:33 UTC
Created attachment 157017 [details]
This script generates dependency graph of all rc scripts with graphviz (ovals are orphans).

Hi all. Got riddle for ya.

(I'm running STABLE-10)

Technically during startup 'ldconfig' should be after 'mountcritremote' that requires 'NETWORKING' so that network mounted filesystems would work. With 'named' being part of network connectivity it should start before 'NETWORKING' but if it requires libxml or some other /usr/local library it should start after 'ldconfig'. Hence the loop.

Right now rcorder places 'named' before 'ldconfig' for me thus 'named' startup fails.

I'm directing this to the port maintainer to confirm the problem in case I'm wrong somewhere. I don't know how to fix it. From my point of view rcorder should be fixed instead to value REQUIRE statements higher then BEFORE statements.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2015-05-23 14:17:47 UTC
Assign to maintainer of bind910.  Keep portmgr in the Cc: for evaluation of the graphviz script (which sounds interesting to me).
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2015-05-24 09:49:09 UTC
Mmmmm, I think I know why it never failed for me, I build WITH_OPENSSL_PORTS, and it adds :

# readelf -d /usr/local/sbin/named|grep local
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
 0x000000000000001d (RUNPATH)            Library runpath: [/usr/local/lib]

so it always can find:

# ldd /usr/local/sbin/named|grep local
/usr/local/sbin/named:
        libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x800aa8000)
        libGeoIP.so.1 => /usr/local/lib/libGeoIP.so.1 (0x8010b2000)
        libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x8012e8000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x80185a000)

even before ldconfig runs at startup.

I wonder if:

# REQUIRE: NETWORKING ldconfig
# BEFORE: syslogd

would be ok ?
Comment 3 c.kworr 2015-05-25 15:50:39 UTC
Yep, everything starts correctly now. The rcorder part between ldconfig and named for me looks like:

/etc/rc.d/ldconfig
/etc/rc.d/devfs
/etc/rc.d/ipmon
/etc/rc.d/mdconfig2
/etc/rc.d/newsyslog
/etc/rc.d/kdc
/etc/rc.d/watchdogd
/etc/rc.d/savecore
/etc/rc.d/archdep
/etc/rc.d/abi
/etc/rc.d/SERVERS
/usr/local/etc/rc.d/tcsd
/usr/local/etc/rc.d/named

But this mostly due to 'tcsd' (security/trousers) want's to start before 'named' and after 'SERVERS'. I'll go howl at that hole now.

Thanks.
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-06-01 10:14:46 UTC
A commit references this bug:

Author: mat
Date: Mon Jun  1 10:14:00 UTC 2015
New revision: 388211
URL: https://svnweb.freebsd.org/changeset/ports/388211

Log:
  Make BIND start a bit later (and really *after* ldconfig.) [1]
  Add an option to have it start way later.

  PR:		200375 [1]
  Sponsored by:	Absolight

Changes:
  head/dns/bind910/Makefile
  head/dns/bind910/files/named.in
  head/dns/bind910/pkg-help
  head/dns/bind99/Makefile
  head/dns/bind99/files/named.in
  head/dns/bind99/pkg-help