From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2239 Path: news.gmane.org!.POSTED!not-for-mail From: Jan Bramkamp Newsgroups: gmane.os.freebsd.devel.hackers,gmane.comp.sysutils.supervision.general Subject: Re: Linuxisms in s6 Date: Thu, 25 Aug 2016 11:56:37 +0200 Message-ID: References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1472119014 24079 195.159.176.226 (25 Aug 2016 09:56:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 25 Aug 2016 09:56:54 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 To: Jonathan de Boyne Pollard , Adrian Chadd , Supervision , FreeBSD Hackers Original-X-From: owner-freebsd-hackers@FreeBSD.org Thu Aug 25 11:56:49 2016 Return-path: Envelope-to: freebsd-hackers@m.gmane.org Original-Received: from mx2.freebsd.org ([8.8.178.116]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcrOz-0005rk-7P for freebsd-hackers@m.gmane.org; Thu, 25 Aug 2016 11:56:49 +0200 Original-Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.freebsd.org (Postfix) with ESMTPS id 145BD780DE; Thu, 25 Aug 2016 09:56:47 +0000 (UTC) (envelope-from owner-freebsd-hackers@freebsd.org) Original-Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E6819128B; Thu, 25 Aug 2016 09:56:46 +0000 (UTC) (envelope-from owner-freebsd-hackers@freebsd.org) Original-Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 412FCBC5B92 for ; Thu, 25 Aug 2016 09:56:41 +0000 (UTC) (envelope-from crest@rlwinm.de) Original-Received: from smtp.rlwinm.de (smtp.rlwinm.de [IPv6:2a01:4f8:201:31ef::e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03EE41245; Thu, 25 Aug 2016 09:56:41 +0000 (UTC) (envelope-from crest@rlwinm.de) Original-Received: from vader9.bultmann.eu (unknown [87.253.189.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.rlwinm.de (Postfix) with ESMTPSA id 65D815E88; Thu, 25 Aug 2016 11:56:38 +0200 (CEST) In-Reply-To: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: owner-freebsd-hackers@freebsd.org Original-Sender: owner-freebsd-hackers@freebsd.org Xref: news.gmane.org gmane.os.freebsd.devel.hackers:57940 gmane.comp.sysutils.supervision.general:2239 Archived-At: On 25/08/16 06:53, Jonathan de Boyne Pollard wrote: > http://adrianchadd.blogspot.co.uk/2016/08/freebsd-on-tiny-system-whats-missing.html?showComment=1471236502051#c1305086913155850955 > , Adrian Chadd: > >> We're using s6 at work, and it works out mostly ok. Mostly once you >> get around the linuxisms, and the lack of sensible time code in it >> (its calculations for daemon run duration is based on system time, not >> wall clock, so if your box boots jan 1, 1970 then gets NTP, things >> are.. hilarious), and some of the arcane bits to get logging working >> right. >> > What are these Linuxisms in s6? s6-linux-utils and s6-linux-init have > Linuxisms, obviously. But what Linuxisms does s6 have? > The skalibs library used by s6 to calculate the deadlines should use clock_gettime(CLOCK_MONOTONIC) on FreeBSD and as such shouldn't be affected by changes to the wall clock. I'm currently working on a FreeBSD only potential init replacement as well just without the mandatory per service supervisor process. The new kqueue EVFILT_PROCDESC filter type in FreeBSD 11 combined with pdfork() should make it really easy to deal child processes in a single unified kevent loop. Forking services could still be handled by a supervisor using procctl(PROC_REAP_ACQUIRE). At the moment I'm fighting with some corner cases in the file descriptor passing code and redesigning the API to work without access to a writable file system. My last API required a writable file system because FreeBSD doesn't support listen()ing on unbound unix domain seqpacket sockets and I don't want to require something like the Linux /run tmpfs. Instead my new API uses socketpair() to create a connected pair of anonymous unix domain sockets for each supervised process. Next I have to find out if fexecve() works at least for fd 0, 1 and 2 without a mounted fdescfs. I want to implement the following features in a single process capable of running as PID 1: - Track service dependencies (want, require, bind, conflict) - Store, Retrieve and close file descriptors. - Spawn and supervise processes in a well defined environment. - Reliable event notification with coalescing. - Bootstrap the system with help from a default service. With those features it should be able to wrap existing rc.d scripts without resorting to polling. _______________________________________________ freebsd-hackers@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"