From owner-freebsd-hackers@freebsd.org Sun Aug 21 11:05:46 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ECB6BB9CBD for ; Sun, 21 Aug 2016 11:05:46 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from know-smtprelay-omc-8.server.virginmedia.net (know-smtprelay-omc-8.server.virginmedia.net [80.0.253.72]) by mx1.freebsd.org (Postfix) with ESMTP id AFAE4114C for ; Sun, 21 Aug 2016 11:05:45 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from [192.168.1.100] ([86.10.211.13]) by know-smtprelay-8-imp with bizsmtp id Zn4a1t00p0HtmFq01n4aev; Sun, 21 Aug 2016 12:04:35 +0100 X-Originating-IP: [86.10.211.13] X-Spam: 0 X-Authority: v=2.1 cv=OPLapnuB c=1 sm=1 tr=0 a=SB7hr1IvJSWWr45F2gQiKw==:117 a=SB7hr1IvJSWWr45F2gQiKw==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=4PmmLp3IqHNpx93COlcA:9 a=ksvJ_5FU7BAJo8Ur:21 a=pU572Osgqim5glr_:21 a=QEXdDO2ut3YA:10 Subject: Re: nosh version 1.28 To: Julian Elischer , Debian users , Supervision , FreeBSD Hackers References: <54430B41.3010301@NTLWorld.com> <54B86FD5.3090203@NTLWorld.com> <554E53EF.4080600@NTLWorld.com> <554E93AF.3070709@NTLWorld.com> <556BA130.50708@NTLWorld.com> <55902328.8080602@NTLWorld.com> <55D5CFA2.5010402@NTLWorld.com> <55D8B9AC.6010209@NTLWorld.com> <56089268.6080007@NTLWorld.com> <56120D11.4080506@NTLWorld.com> <5636C75B.70000@NTLWorld.com> <5672BD8C.50303@NTLWorld.com> <569617F3.8000101@NTLWorld.com> <56AEAED5.4010606@NTLWorld.com> <572D266D.6080807@NTLWorld.com> <7fa206eb-9b34-de45-4474-11c04007326b@NTLWorld.com> From: Jonathan de Boyne Pollard Message-ID: <12f6f577-ecae-07cf-b066-c418071c7034@NTLWorld.com> Date: Sun, 21 Aug 2016 12:04:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Sun, 21 Aug 2016 11:05:46 -0000 I don't know why you asked about FreeBSD rc.d just on the Debian mailing list; but I'm going to deal in both of those and others besides, here, and things that apply across both, so I've re-included the FreeBSD mailing list. (-: 2016-08-14 15:10, Julian Elischer: > I don't know if I just missed it, or it isn't there but I have a > question.. > > You give examples of importing systemd service files. What about > importing rc.d files with all their ability to run arbitrary shell > commands. > > And once you have the services defined, what is the logical equivalent > of rc.conf, which can supply parameters for each service and turn them > on and off? can you import from rc.conf? > You did miss it. (-: What you missed has grown to be a significant subsystem. It was actually mentioned a couple of times in the 1.28 announcement. It's the external configuration import subsystem. You can read about it in the nosh Guide: xdg-open /usr/local/share/doc/nosh/external-formats.html As you can see, there's a whole section on importing from rc.conf into native service management mechanisms. ("rc.conf" covers several sources, note, including a FreeNAS configuration database and /etc/defaults/rc.conf .) The native service mangement mechanisms are the "enable" and "disable" subcommands to the system-control command, and using the envdir command in the normal daemontools-family style way. The enable/disable mechanism in "rc.conf" is treated as if it were a preset (in systemd nomenclature). You tell service management to "preset" a service, and it will look at /etc/rc.conf and /etc/rc.conf.local (as well as some other preset mechanisms) to determine what to set the native enable/disable state to. The user manual page for the preset subcommand (of system-control) explains what the preset mechanisms are in detail. You can set up environment directories how and where you like, but there's a convention that is shared by the "convert-systemd-units" tool, the "rcctl" shim, and the external configuration import subsystem as a whole. This convention is an environment directory named "env" that is in the service directory. The "rcctl" shim gets and sets variables there; and the import subsystem places converted "rc.conf", /etc/fstab, /etc/ttys, /etc/my.cnf, and other stuff there. One example of this in action, out of many in the import subsystem, is jails that have been set up the version 9 way in "rc.conf". Those are turned into service bundles, with "env" environment directories that contain environment settings such as "hostname", "mount_devfs", and "interface". The "run" script for the jail service very simply turns the environment variables into arguments to the "jail" comand. In a system with an original OpenBSD "rcctl" command, one would expect to be able to set (version 9) jail control variables by manipulating /etc/rc.conf with commands like "rcctl set wibble hostname wobble". The "rcctl" shim and this shared convention mean that one need not stray that far from this if "rcctl" is one's habit: "rcctl set v9-jail@wibble hostname wobble" does the "native" thing of setting the "hostname" variable in the (conventional) environment variable directory for the "v9-jail@wibble" service. Bonus feature for those with other habits: With nosh service management in place, one can actually import from /etc/rc.conf settings *on Debian* (as long as one sets up a FreeBSD/PC-BSD-style /etc/defaults/rc.conf pointing to it with rc_conf_files). One can use /etc/ttys, too. As for importing scripts that run "arbitrary shell commands", there are several points. First, you may not need to. Note that most of what you get out of the box in /etc/rc.d/ and /usr/local/etc/rc.d/ on FreeBSD and PC-BSD has already been converted. Remember that project that I had to convert 157 services? Take a look at the nosh roadmap page. It's almost done. Second, you may not need to. Take a look at what actually comes in the nosh-bundles package nowadays. Discounting the 'cyclog@' service bundles there are just over 540 service bundles in there, from samba to ntp, from saned to ossec@agentd. (Including the 'cyclog@' service bundles, it is over a thousand service bundles.) The Debian world doesn't get left out, either. Although it's a lot more difficult than in the BSD worlds to come up with a list of "core" Debian services, a lot of the basics of Debian are also covered by this, from kernel-vt-setfont through irqbalance to update-binfmts. And those more-than-540 service bundles cover lots of "non-core" stuff, from (as aforementioned) OSSEC-HIDS, Salt, and RabbitMQ to publicfile httpd over IPV6. Third, you may not need to. This was mentioned in the 1.28 announcement, in fact. The external configuration import subsystem makes *further* service bundles, beyond the pre-made ones that come in a binary package. It creates service bundles to run (optional) per-user service management, per-user Desktop Bus brokers, MySQL and MariaDB servers (according to your my.cnf), PPP and SPPP, md and pefs, jails (set up with v9 rc.conf or the PC-BSD Warden), tinydns and dnscache services (not quite ready when 1.28 came out, as the announcement said), static IP4/IP6/ARP/NDP setup and teardown, and more besides. Fourth, you may not need to. Out of all of this, there's probably already an existing service bundle for something similar that one can copy and adapt. Fifth, you may not need to. The convert-systemd-units tool exists, after all. If there's a system service/socket unit around, converting that may well be simpler starting point than starting with an rc script. It's usually significantly simpler than starting with a van Smoorenburg rc script, although Mewburn and OpenBSD rc scripts can themselves be fairly simple starting points. I did a "make fetch" on the PC-BSD ports tree a couple of months ago. (As an aside: there are several broken ports that don't do the right thing here.) There are a growing number of packages where there's now a systemd service/socket unit in the fetched source archive. Sixth, the easy cases are easy. As just noted, Mewburn and OpenBSD rc scripts can themselves be fairly simple. (They are not *always* so, though, contrary to popular belief.) If you have an rc script that says "The command name is this, its arguments are that.", it is very easy indeed to convert this into something that can execute as a "run" program. Setting up all of the stuff around the "run" program for a complete service bundle is merely an exercise in two-line shell scripts (for things like "start" and "stop") and making directories and symbolic links (for things like the "before" and "wants" directories). Seventh, the hard cases require a human being anyway. Parsing a shell script that runs "arbitrary shell commands" would require creating what is essentially a full shell script interpreter, that can handle the Almquist, Bourne Again, and Korn shell syntaxes (because such a hypothetical *general-case* conversion tool would have to address van Smoorenburg rc scripts on Debian, Mewburn rc scripts on FreeBSD/PC-BSD/NetBSD and friends, and OpenBSD rc scripts) that knows about at least five quite different sets of "helper" commands (from start-stop-daemon to startproc) and that works out how an entire shell script translates into the actual acts of executing one or (in really bad cases) more services. At this point, I defer to a human being *understanding what is needed* and writing one or more service bundles. (-: And there is, of course, scads of doco, written over the past two decades by many people, on how to write daemontools-family-style "run" scripts. From owner-freebsd-hackers@freebsd.org Mon Aug 22 13:51:05 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 836D8BC2698 for ; Mon, 22 Aug 2016 13:51:05 +0000 (UTC) (envelope-from karu.pruun@gmail.com) Received: from mail-ua0-x242.google.com (mail-ua0-x242.google.com [IPv6:2607:f8b0:400c:c08::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F87E1376 for ; Mon, 22 Aug 2016 13:51:05 +0000 (UTC) (envelope-from karu.pruun@gmail.com) Received: by mail-ua0-x242.google.com with SMTP id 74so10789202uau.3 for ; Mon, 22 Aug 2016 06:51:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=zaVc6HGZcJLWrDvCiXz4S8eZdWFPrFazcMIqJDAsT4Q=; b=X9U7cjDrkr7SSdxkEpGzEZaeUqG8FDqEQtZ/haYf22lAPaP5XkW33NCBdmvR1xgI9n bkEXfOWAeiglBgYurAgabFbpekfmibWj7UEPynFFZOVjcEqM9YpRiYOKLilUvJGutxpX 8GPolk3DxukcFPj7gwoCSjf0Gth8EYlSNTX9zvP3QVqW2jZKFtBW4gH0V+LnY01LmYLD nyc72+c0z8VwOMV3RPZ1c1FI6w+HGgyXheZivVOm4LbaQ/DO4/DZQcrKZmDLRaci77GG Bg0IHfy5wLQB3PsLzb1LRJPnumKNPn4IxIXhWOsNbMiiN7x4W+SK8q6ttx4fHn9vw11I UBqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zaVc6HGZcJLWrDvCiXz4S8eZdWFPrFazcMIqJDAsT4Q=; b=CSMIHamyaSrkSyKcQXrTg+G4PxOEmimXvfmGZ0MI3DO4L4EuRwQFpa6qmAZTbpVXh6 wIRUlDcHS4vxrKng/XG/QGA98HnB6w8dYasC0sk186le2oCm6Ko4znmRs0LCYpJixTjI WMkZQI3xevnhVnaljW+WEwjThpKjX504GWtvWLdKfrzjGL8BfBF+E5c8lwNq3WsTFmCL 4kScKOSR9TJoUYONiAa5GJWLp/4GhAd2GU4hyem7R2gFEJOqy69/gINyQFauQJBf/50V yBo5YLTW4nPZEpdBIO7FwcJVTinyAlMGjrwseER3Nhq7DvJ2LVBKcfa3f+xizVhU+8wV VV8Q== X-Gm-Message-State: AEkoouv348sIO2SYMV1fCBHmriSZon1K37QEyY0m7GyvCj0jLDUTquJ1xJdteztTprNHTsw9fM/xH0EeTgdRbg== X-Received: by 10.159.34.15 with SMTP id 15mr11490010uad.84.1471873864106; Mon, 22 Aug 2016 06:51:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.2.10 with HTTP; Mon, 22 Aug 2016 06:51:03 -0700 (PDT) From: "karu.pruun" Date: Mon, 22 Aug 2016 16:51:03 +0300 Message-ID: Subject: problem attaching driver at LPC bus To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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: , X-List-Received-Date: Mon, 22 Aug 2016 13:51:05 -0000 Hello I am trying to write a small driver for a device (gmux) attached to the LPC bus, but am stuck with allocation of I/O ports. The device shows as follows: --- devinfo -rv | grep GMUX: unknown pnpinfo _HID=APP000B _UID=0 at handle=\_SB_.PCI0.LPCB.GMUX --- I took cue from sys/dev/acpica/acpi_ec.c. Probing works fine with ACPI_ID_PROBE in analogy to acpi_ec.c: --- --- sys/dev/acpica/acpi_ec.c: --- acpi_ec_probe(. . .) { . . . ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids) . . . } --- --- Then attach() calls bus_alloc_resource(): --- --- sys/dev/acpica/acpi_ec.c: --- acpi_ec_attach(. . .) { struct resource *res; . . . res = bus_alloc_resource_any(sc->ec_dev, SYS_RES_IOPORT, &sc->ec_data_rid, RF_ACTIVE); . . . } --- --- But this fails for my driver, res is always NULL. I looked up acpi tables (acpidump -td), the IO resources for GMUX are there: --- --- Scope (\_SB.PCI0.LPCB) { Device (GMUX) { Name (_HID, EisaId ("APP000B")) // _HID: Hardware ID Name (_CID, "gmux") // _CID: Compatible ID Name (_STA, 0x0B) // _STA: Status Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, 0x0700, // Range Minimum 0x07FF, // Range Maximum 0x01, // Alignment 0xFF, // Length ) }) --- --- Could someone explain where I have gone wrong? Thank you Peeter -- From owner-freebsd-hackers@freebsd.org Mon Aug 22 14:17:48 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0EB9BC2F1A for ; Mon, 22 Aug 2016 14:17:48 +0000 (UTC) (envelope-from rank1seeker@gmail.com) 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 916EE161C for ; Mon, 22 Aug 2016 14:17:48 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 90CCBBC2F19; Mon, 22 Aug 2016 14:17:48 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90794BC2F18 for ; Mon, 22 Aug 2016 14:17:48 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27E80161B for ; Mon, 22 Aug 2016 14:17:48 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id o80so13724416wme.0 for ; Mon, 22 Aug 2016 07:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=s8AJIpHl4+xVAsgYqx2MYkf8hi9P2ky0pgiYZNTtHUk=; b=p2Dvkg5HdSvnFENiq5p79QI88F+yke70hyH6q3ffFBVXQu9zyvFrTbTlLM8izhrEF/ hjpUJ/OCvug3yQ9G54TG0txTpA3izWMwynxK2ZSVnXcgVKUt2ILyihZPJPqJAwrR4hVZ +Fl1QMGUIgFyb3o/MhkO8Jx3sOuZZSo+RcFghN8d/tUl4iBe9/L2Wbj3U29dVEz664z6 qFnY6A7u9hjC9+1VgcR4CIWxwVyMNieX7jVZRwOdhDbILwMZfFTkPtp16S5n609hdyQx fFFt+kvLb7TGEdTWXsEHcdKISlKJISW5cau+fVea4MtBj/5Mh7f3I7kJJQMPwaE/NEcQ qTPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=s8AJIpHl4+xVAsgYqx2MYkf8hi9P2ky0pgiYZNTtHUk=; b=hmw0sWJxMzTr360JX7SrnRDu7mJ3H7TfIRkgRvx9iKNaigeLCBarUDgD2iG18zD6K9 CeY3nx00vtXjT2iqVbIo4Gntb4hTpJXb/bKnnW77+NajJIj4guTKLlXSeU2U79XTsi7z q/TsZvkcYT+uVLEHUV/OLyBcOn5OwrOBynNzlmQm6mSnmatOuDDmIE8y5Xbjl1I8UvnY lhVL0NsLJhF19G1DK4OHDrqk5eruXx6MCjk/uwDMgH4qVHxwiwhd8NcBbj1sdYqTspNy N7fLLwFeG5ZxInmA3POn6yRn4rSWJJhtn1V9Z4Yiy/wTmT6ZzXP6G492CvHEX5CCausA Yt5g== X-Gm-Message-State: AEkoouuxV151K67CDBX/Qp44yhjXzhbHaKQJBL/5atQwx9Qn3MW2XQYbXtmv0jaAjc6/rA== X-Received: by 10.28.15.194 with SMTP id 185mr15941424wmp.58.1471875466509; Mon, 22 Aug 2016 07:17:46 -0700 (PDT) Received: from localhost (cpe-94-253-163-194.zg.cable.xnet.hr. [94.253.163.194]) by smtp.gmail.com with ESMTPSA id r67sm21737032wmb.14.2016.08.22.07.17.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Aug 2016 07:17:46 -0700 (PDT) Date: Mon, 22 Aug 2016 16:17:41 +0200 From: To: hackers@freebsd.org Subject: mountroot prompt regresion Message-ID: <20160822161741.00001fd6@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Mon, 22 Aug 2016 14:17:48 -0000 Now at 10.3 REL i386, UFS only, but I'm pretty sure it also occurs in earlier releases too. When "something" happens which makes you reach mountroot prompt, upon typing, nothing is visible until you press shift. Then you see all you typed, up to that point. Also, you need to press shift in order to see output too. This is anoying as it leads to reboots as empty line trigers it and as you don't see the output you would do it. I.e; '?' symbol to list providers, then enter to see list wouldn't display it unless shift was pressed. Those who see nothing would normally press enter again and triger a reboot. This is very anoying. Domagoj S. From owner-freebsd-hackers@freebsd.org Mon Aug 22 14:22:43 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80F93BC155F for ; Mon, 22 Aug 2016 14:22:43 +0000 (UTC) (envelope-from karl@denninger.net) Received: from mail.denninger.net (denninger.net [70.169.168.7]) (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 54E051C32 for ; Mon, 22 Aug 2016 14:22:43 +0000 (UTC) (envelope-from karl@denninger.net) Received: from [192.168.1.40] (Karl-Desktop.Denninger.net [192.168.1.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.denninger.net (Postfix) with ESMTPSA id 36CF12177D for ; Mon, 22 Aug 2016 09:22:35 -0500 (CDT) Subject: Re: mountroot prompt regresion To: freebsd-hackers@freebsd.org References: <20160822161741.00001fd6@gmail.com> From: Karl Denninger Message-ID: <976fab6d-d50a-8b43-72f3-8f21f300988b@denninger.net> Date: Mon, 22 Aug 2016 09:22:26 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160822161741.00001fd6@gmail.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms010908040308050206000902" X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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: , X-List-Received-Date: Mon, 22 Aug 2016 14:22:43 -0000 This is a cryptographically signed message in MIME format. --------------ms010908040308050206000902 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 8/22/2016 09:17, rank1seeker@gmail.com wrote: > Now at 10.3 REL i386, UFS only, but I'm pretty sure it also occurs in e= arlier releases too. > When "something" happens which makes you reach mountroot prompt, upon t= yping, nothing is visible until you press shift. > Then you see all you typed, up to that point. > Also, you need to press shift in order to see output too. > This is anoying as it leads to reboots as empty line trigers it and as = you don't see the output you would do it. > I.e; '?' symbol to list providers, then enter to see list wouldn't disp= lay it unless shift was pressed. > Those who see nothing would normally press enter again and triger a reb= oot. > This is very anoying. > > Recent update to sources? Specifically: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211884 --=20 Karl Denninger karl@denninger.net /The Market Ticker/ /[S/MIME encrypted email preferred]/ --------------ms010908040308050206000902 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC Bl8wggZbMIIEQ6ADAgECAgEpMA0GCSqGSIb3DQEBCwUAMIGQMQswCQYDVQQGEwJVUzEQMA4G A1UECBMHRmxvcmlkYTESMBAGA1UEBxMJTmljZXZpbGxlMRkwFwYDVQQKExBDdWRhIFN5c3Rl bXMgTExDMRwwGgYDVQQDExNDdWRhIFN5c3RlbXMgTExDIENBMSIwIAYJKoZIhvcNAQkBFhND dWRhIFN5c3RlbXMgTExDIENBMB4XDTE1MDQyMTAyMjE1OVoXDTIwMDQxOTAyMjE1OVowWjEL MAkGA1UEBhMCVVMxEDAOBgNVBAgTB0Zsb3JpZGExGTAXBgNVBAoTEEN1ZGEgU3lzdGVtcyBM TEMxHjAcBgNVBAMTFUthcmwgRGVubmluZ2VyIChPQ1NQKTCCAiIwDQYJKoZIhvcNAQEBBQAD ggIPADCCAgoCggIBALmEWPhAdphrWd4K5VTvE5pxL3blRQPyGF3ApjUjgtavqU1Y8pbI3Byg XDj2/Uz9Si8XVj/kNbKEjkRh5SsNvx3Fc0oQ1uVjyCq7zC/kctF7yLzQbvWnU4grAPZ3IuAp 3/fFxIVaXpxEdKmyZAVDhk9az+IgHH43rdJRIMzxJ5vqQMb+n2EjadVqiGPbtG9aZEImlq7f IYDTnKyToi23PAnkPwwT+q1IkI2DTvf2jzWrhLR5DTX0fUYC0nxlHWbjgpiapyJWtR7K2YQO aevQb/3vN9gSojT2h+cBem7QIj6U69rEYcEDvPyCMXEV9VcXdcmW42LSRsPvZcBHFkWAJqMZ Myiz4kumaP+s+cIDaXitR/szoqDKGSHM4CPAZV9Yh8asvxQL5uDxz5wvLPgS5yS8K/o7zDR5 vNkMCyfYQuR6PAJxVOk5Arqvj9lfP3JSVapwbr01CoWDBkpuJlKfpQIEeC/pcCBKknllbMYq yHBO2TipLyO5Ocd1nhN/nOsO+C+j31lQHfOMRZaPQykXVPWG5BbhWT7ttX4vy5hOW6yJgeT/ o3apynlp1cEavkQRS8uJHoQszF6KIrQMID/JfySWvVQ4ksnfzwB2lRomrdrwnQ4eG/HBS+0l eozwOJNDIBlAP+hLe8A5oWZgooIIK/SulUAsfI6Sgd8dTZTTYmlhAgMBAAGjgfQwgfEwNwYI KwYBBQUHAQEEKzApMCcGCCsGAQUFBzABhhtodHRwOi8vY3VkYXN5c3RlbXMubmV0Ojg4ODgw CQYDVR0TBAIwADARBglghkgBhvhCAQEEBAMCBaAwCwYDVR0PBAQDAgXgMCwGCWCGSAGG+EIB DQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUxRyULenJaFwX RtT79aNmIB/u5VkwHwYDVR0jBBgwFoAUJHGbnYV9/N3dvbDKkpQDofrTbTUwHQYDVR0RBBYw FIESa2FybEBkZW5uaW5nZXIubmV0MA0GCSqGSIb3DQEBCwUAA4ICAQBPf3cYtmKowmGIYsm6 eBinJu7QVWvxi1vqnBz3KE+HapqoIZS8/PolB/hwiY0UAE1RsjBJ7yEjihVRwummSBvkoOyf G30uPn4yg4vbJkR9lTz8d21fPshWETa6DBh2jx2Qf13LZpr3Pj2fTtlu6xMYKzg7cSDgd2bO sJGH/rcvva9Spkx5Vfq0RyOrYph9boshRN3D4tbWgBAcX9POdXCVfJONDxhfBuPHsJ6vEmPb An+XL5Yl26XYFPiODQ+Qbk44Ot1kt9s7oS3dVUrh92Qv0G3J3DF+Vt6C15nED+f+bk4gScu+ JHT7RjEmfa18GT8DcT//D1zEke1Ymhb41JH+GyZchDRWtjxsS5OBFMzrju7d264zJUFtX7iJ 3xvpKN7VcZKNtB6dLShj3v/XDsQVQWXmR/1YKWZ93C3LpRs2Y5nYdn6gEOpL/WfQFThtfnat HNc7fNs5vjotaYpBl5H8+VCautKbGOs219uQbhGZLYTv6okuKcY8W+4EJEtK0xB08vqr9Jd0 FS9MGjQE++GWo+5eQxFt6nUENHbVYnsr6bYPQsZH0CRNycgTG9MwY/UIXOf4W034UpR82TBG 1LiMsYfb8ahQJhs3wdf1nzipIjRwoZKT1vGXh/cj3gwSr64GfenURBxaFZA5O1acOZUjPrRT n3ci4McYW/0WVVA3lDGCBRMwggUPAgEBMIGWMIGQMQswCQYDVQQGEwJVUzEQMA4GA1UECBMH RmxvcmlkYTESMBAGA1UEBxMJTmljZXZpbGxlMRkwFwYDVQQKExBDdWRhIFN5c3RlbXMgTExD MRwwGgYDVQQDExNDdWRhIFN5c3RlbXMgTExDIENBMSIwIAYJKoZIhvcNAQkBFhNDdWRhIFN5 c3RlbXMgTExDIENBAgEpMA0GCWCGSAFlAwQCAwUAoIICTTAYBgkqhkiG9w0BCQMxCwYJKoZI hvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xNjA4MjIxNDIyMjZaME8GCSqGSIb3DQEJBDFCBEDe cthtrz+gwsP+3UgFJ8ZfnAQu1V+1deFlWNg19J3VQEJxoFc4ocHCtJJeNIWGqkbXt3qeIpLl 5ZCvmG9xSopcMGwGCSqGSIb3DQEJDzFfMF0wCwYJYIZIAWUDBAEqMAsGCWCGSAFlAwQBAjAK BggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcNAwICAUAwBwYFKw4DAgcwDQYI KoZIhvcNAwICASgwgacGCSsGAQQBgjcQBDGBmTCBljCBkDELMAkGA1UEBhMCVVMxEDAOBgNV BAgTB0Zsb3JpZGExEjAQBgNVBAcTCU5pY2V2aWxsZTEZMBcGA1UEChMQQ3VkYSBTeXN0ZW1z IExMQzEcMBoGA1UEAxMTQ3VkYSBTeXN0ZW1zIExMQyBDQTEiMCAGCSqGSIb3DQEJARYTQ3Vk YSBTeXN0ZW1zIExMQyBDQQIBKTCBqQYLKoZIhvcNAQkQAgsxgZmggZYwgZAxCzAJBgNVBAYT AlVTMRAwDgYDVQQIEwdGbG9yaWRhMRIwEAYDVQQHEwlOaWNldmlsbGUxGTAXBgNVBAoTEEN1 ZGEgU3lzdGVtcyBMTEMxHDAaBgNVBAMTE0N1ZGEgU3lzdGVtcyBMTEMgQ0ExIjAgBgkqhkiG 9w0BCQEWE0N1ZGEgU3lzdGVtcyBMTEMgQ0ECASkwDQYJKoZIhvcNAQEBBQAEggIAT0BdD7ZB Koyl4tfBcoZC8Yca6U7+/WXrzA7pYwOHOD8XQO38Xhyd4eqF8Pmj69wcgGeORTdOw0b+/q37 Noyf9prtWYGEWndcv/RV53Q8mn3wd1I4LE08iUjCKFDpAeVGVes9jcl8zQ9MZCUuYkOFLSR0 4b4oJzNJXZhSw9FiyjWb1WOBEUg5UuUWlK1SO/ypEoC9BbuNxOM9q8zb7vpE66Sn/4wwfSqb O/p+agaPQ33nYsdWf+jpeFYIUAUtoMWMKLSVRhWkkoQo6JTp0gK8R3fq6B19zHKuvgsN+QQ0 LTkr/ghKMi0CaCLXlCEM9qACv/TUif2o9MMNff7f2y+/z1a78h2mz+3zGz8fYRfk/nYYtnB5 e7uC+dirMD3uvfdv5Z0fF25Sb7JYBeB4/15QUGLRI3riYTy/eLuKEkd+6vRC1N7DzCghDqtt kP8I7/vwcBUb7lUZuCvTdRW38qG92LMh1qKZpgr9Rvv1AdlIU7D3ZW1eSv5ILtUtwd0AcHiv b3ga+2MqAWGFafNraqGFnyJSMTI5XrujYnhqSOajWbjkfGi8gKYrruc8F9tvw6/X56QMpAP+ 2HwdMH2wMfsYgkqEwohU4duMbeGa5wnpzsMt98VE7IzygedEZJmslQiuiECs11Zs22KS29QV lkAP3e9BKA4HvmZqHqZaG03uXcAAAAAAAAA= --------------ms010908040308050206000902-- From owner-freebsd-hackers@freebsd.org Mon Aug 22 15:54:45 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2D0BBC2D1D for ; Mon, 22 Aug 2016 15:54:45 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.117.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7506E1C67 for ; Mon, 22 Aug 2016 15:54:45 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from ox-dell39.ox.adestra.com (unknown [85.199.232.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 91888EC21 for ; Mon, 22 Aug 2016 15:54:34 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/91888EC21; dkim=none; dkim-atps=neutral To: freebsd-hackers@freebsd.org From: Matthew Seaman Subject: How do I debug this? Message-ID: Date: Mon, 22 Aug 2016 16:54:22 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Me6iBDatIGq3QgwvnhRJpKmV5vCBhNWCN" X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_SOFTFAIL,URI_NOVOWEL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk 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: , X-List-Received-Date: Mon, 22 Aug 2016 15:54:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Me6iBDatIGq3QgwvnhRJpKmV5vCBhNWCN Content-Type: multipart/mixed; boundary="NhVCCx3Kx3lcXvukKeO7a5CEGcqkHe8si" From: Matthew Seaman To: freebsd-hackers@freebsd.org Message-ID: Subject: How do I debug this? --NhVCCx3Kx3lcXvukKeO7a5CEGcqkHe8si Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable We've got an intermittent crash bug with postgresql92-server-9.2.17_2 which seems to be occurring in process startup: # gdb -c /usr/local/pgsql/data/postgres.core /usr/local/bin/postgres 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 detail= s. This GDB was configured as "amd64-marcel-freebsd"... Core was generated by `postgres'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libthr.so.3...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /usr/local/lib/libxml2.so.2...done. Loaded symbols for /usr/local/lib/libxml2.so.2 Reading symbols from /usr/local/lib/libicuuc.so.55...done. Loaded symbols for /usr/local/lib/libicuuc.so.55 Reading symbols from /usr/local/lib/libicui18n.so.55...done. Loaded symbols for /usr/local/lib/libicui18n.so.55 Reading symbols from /usr/local/lib/libssl.so.8...done. Loaded symbols for /usr/local/lib/libssl.so.8 Reading symbols from /usr/local/lib/libcrypto.so.8...done. Loaded symbols for /usr/local/lib/libcrypto.so.8 Reading symbols from /lib/libm.so.5...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /lib/libz.so.6...done. Loaded symbols for /lib/libz.so.6 Reading symbols from /usr/lib/liblzma.so.5...done. Loaded symbols for /usr/lib/liblzma.so.5 Reading symbols from /usr/local/lib/libicudata.so.55...done. Loaded symbols for /usr/local/lib/libicudata.so.55 Reading symbols from /usr/lib/libc++.so.1...done. Loaded symbols for /usr/lib/libc++.so.1 Reading symbols from /lib/libcxxrt.so.1...done. Loaded symbols for /lib/libcxxrt.so.1 Reading symbols from /lib/libgcc_s.so.1...done. Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /usr/local/lib/postgresql/auto_explain.so...done. Loaded symbols for /usr/local/lib/postgresql/auto_explain.so Reading symbols from /usr/local/lib/postgresql/plpgsql.so...done. Loaded symbols for /usr/local/lib/postgresql/plpgsql.so Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x0000000800d1cd0a in _r_debug_postinit () from /libexec/ld-elf.so.1 [New Thread 805806400 (LWP 100362/)] (gdb) bt full #0 0x0000000800d1cd0a in _r_debug_postinit () from /libexec/ld-elf.so.1 No symbol table info available. #1 0x0000000800d1a46d in .text () from /libexec/ld-elf.so.1 No symbol table info available. #2 0x0000000804ffe174 in ?? () from /lib/libgcc_s.so.1 No symbol table info available. #3 0x00007fffffffe410 in ?? () No symbol table info available. #4 0x00000008050078f1 in ?? () from /lib/libgcc_s.so.1 No symbol table info available. #5 0x00007fffffffe410 in ?? () No symbol table info available. #6 0x0000000800d1d9a8 in dlclose () from /libexec/ld-elf.so.1 No symbol table info available. Previous frame inner to this frame (corrupt stack?) Application is: postgresql92-server-9.2.17_2 On: % freebsd-version -ku 10.3-RELEASE-p4 10.3-RELEASE-p5 This is apparently a postgres child process crashing on startup somewhere before where main() gets called. Doesn't happen often -- only when the server is reasonably busy and then it will take somewhere between a day and a week between incidents. We can't correlate it with any particular SQL being run. This was a production server so we've had to move the customers assigned to it back to some slightly older but very hardware but running the same version of postgresql (same package compiled on our own pkgrepo) and same 10.3-RELEASE-p4/p5 -- where they are running quite happily. Matthew --NhVCCx3Kx3lcXvukKeO7a5CEGcqkHe8si-- --Me6iBDatIGq3QgwvnhRJpKmV5vCBhNWCN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJXuyA0AAoJEABRPxDgqeTnNGoP/0b+v0jyRHvUGKn6tPtlL41i k+xOuyqt/qqyUrGUJguHwOYh60HvxeWw6bWWd7xTJHZiPA2YTGja876orBiZvqPF OQ29YBD5TCvh8MPYBotAPiiHjmqLXXoLm/JyLmRsq2ExlECmAb2Pf6ybbHgZ55yT WwH5TKCiFSFRGCIyQRsKlj2Eq2rIV66PWh8f5PmgZVCPdjdFJwPWqH2D3X5Zcd0G HZJW+2T3G1ijrayNKC6uQ5Fil9YaE0InjjBnxtyj+D1f0r+0gwuyR25kMF2wSJMd mTu/VisReEkof8pCaRYtlNsge5cgMX3nlaDrT/Ww12iY+L8MiTC1NiOZYovO4jcu oMehegoafD+F7xnbtghAjpzDqPR2LZPYVZRYItiUXBkGfoXNU+fC6OO+0f/Ge1zi OxZgWnIYZjrxMKW5GbJK4NmLxHQckkphm9zhP1Ej4HoffwIi9szjTljxVGu4ot2A s0It4DqvsQu3VNBwKtdXdXMDaNTP5h7B01GaMGX7j+Q7TjkJFn+Di/FNylPiPH9h 1PPfNFdDfPpxJXMojey/g7Mlc5uGzTeB1cEC/FGXRll7ktJcLn8H8FA1mPaLjMRg 0375+QXrzMCeEGzUjr86ag/+ncS5c2p1lWs1yPoQGtyizAh6Ypo7h92qvLbSd5mW 9CvXwqiAoVzfRm7upa4B =eNzk -----END PGP SIGNATURE----- --Me6iBDatIGq3QgwvnhRJpKmV5vCBhNWCN-- From owner-freebsd-hackers@freebsd.org Mon Aug 22 16:14:44 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 777DDBC24F7 for ; Mon, 22 Aug 2016 16:14:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0767F1F43; Mon, 22 Aug 2016 16:14:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u7MGEc0b020507 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 22 Aug 2016 19:14:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u7MGEc0b020507 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u7MGEcmX020506; Mon, 22 Aug 2016 19:14:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 22 Aug 2016 19:14:37 +0300 From: Konstantin Belousov To: Matthew Seaman Cc: freebsd-hackers@freebsd.org Subject: Re: How do I debug this? Message-ID: <20160822161437.GC83214@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-1.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,URI_NOVOWEL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: , X-List-Received-Date: Mon, 22 Aug 2016 16:14:44 -0000 On Mon, Aug 22, 2016 at 04:54:22PM +0100, Matthew Seaman wrote: > > We've got an intermittent crash bug with postgresql92-server-9.2.17_2 > which seems to be occurring in process startup: > > # gdb -c /usr/local/pgsql/data/postgres.core /usr/local/bin/postgres > 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 "amd64-marcel-freebsd"... > Core was generated by `postgres'. > Program terminated with signal 11, Segmentation fault. > Reading symbols from /lib/libthr.so.3...done. > Loaded symbols for /lib/libthr.so.3 > Reading symbols from /usr/local/lib/libxml2.so.2...done. > Loaded symbols for /usr/local/lib/libxml2.so.2 > Reading symbols from /usr/local/lib/libicuuc.so.55...done. > Loaded symbols for /usr/local/lib/libicuuc.so.55 > Reading symbols from /usr/local/lib/libicui18n.so.55...done. > Loaded symbols for /usr/local/lib/libicui18n.so.55 > Reading symbols from /usr/local/lib/libssl.so.8...done. > Loaded symbols for /usr/local/lib/libssl.so.8 > Reading symbols from /usr/local/lib/libcrypto.so.8...done. > Loaded symbols for /usr/local/lib/libcrypto.so.8 > Reading symbols from /lib/libm.so.5...done. > Loaded symbols for /lib/libm.so.5 > Reading symbols from /lib/libc.so.7...done. > Loaded symbols for /lib/libc.so.7 > Reading symbols from /lib/libz.so.6...done. > Loaded symbols for /lib/libz.so.6 > Reading symbols from /usr/lib/liblzma.so.5...done. > Loaded symbols for /usr/lib/liblzma.so.5 > Reading symbols from /usr/local/lib/libicudata.so.55...done. > Loaded symbols for /usr/local/lib/libicudata.so.55 > Reading symbols from /usr/lib/libc++.so.1...done. > Loaded symbols for /usr/lib/libc++.so.1 > Reading symbols from /lib/libcxxrt.so.1...done. > Loaded symbols for /lib/libcxxrt.so.1 > Reading symbols from /lib/libgcc_s.so.1...done. > Loaded symbols for /lib/libgcc_s.so.1 > Reading symbols from /usr/local/lib/postgresql/auto_explain.so...done. > Loaded symbols for /usr/local/lib/postgresql/auto_explain.so > Reading symbols from /usr/local/lib/postgresql/plpgsql.so...done. > Loaded symbols for /usr/local/lib/postgresql/plpgsql.so > Reading symbols from /libexec/ld-elf.so.1...done. > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x0000000800d1cd0a in _r_debug_postinit () from /libexec/ld-elf.so.1 > [New Thread 805806400 (LWP 100362/)] > (gdb) bt full > #0 0x0000000800d1cd0a in _r_debug_postinit () from /libexec/ld-elf.so.1 > No symbol table info available. > #1 0x0000000800d1a46d in .text () from /libexec/ld-elf.so.1 > No symbol table info available. > #2 0x0000000804ffe174 in ?? () from /lib/libgcc_s.so.1 > No symbol table info available. > #3 0x00007fffffffe410 in ?? () > No symbol table info available. > #4 0x00000008050078f1 in ?? () from /lib/libgcc_s.so.1 > No symbol table info available. > #5 0x00007fffffffe410 in ?? () > No symbol table info available. > #6 0x0000000800d1d9a8 in dlclose () from /libexec/ld-elf.so.1 > No symbol table info available. > Previous frame inner to this frame (corrupt stack?) > > Application is: > > postgresql92-server-9.2.17_2 > > On: > > % freebsd-version -ku > 10.3-RELEASE-p4 > 10.3-RELEASE-p5 > > This is apparently a postgres child process crashing on startup > somewhere before where main() gets called. Doesn't happen often -- only > when the server is reasonably busy and then it will take somewhere > between a day and a week between incidents. We can't correlate it with > any particular SQL being run. This was a production server so we've had > to move the customers assigned to it back to some slightly older but > very hardware but running the same version of postgresql (same package > compiled on our own pkgrepo) and same 10.3-RELEASE-p4/p5 -- where they > are running quite happily. > Compile rtld/libc/libthr and postgres itself with debugging symbols and re-obtain the backtrace, for start. From owner-freebsd-hackers@freebsd.org Mon Aug 22 19:59:53 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 113D8BC220C for ; Mon, 22 Aug 2016 19:59:53 +0000 (UTC) (envelope-from etnapierala@gmail.com) 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 E2FCD172A for ; Mon, 22 Aug 2016 19:59:52 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id DEAB6BC220B; Mon, 22 Aug 2016 19:59:52 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE504BC220A for ; Mon, 22 Aug 2016 19:59:52 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 729181729 for ; Mon, 22 Aug 2016 19:59:52 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id i138so14968976wmf.3 for ; Mon, 22 Aug 2016 12:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=17oYIBguHYY0d0cCK2BE18rhqIFrTt0UuSbVmllGxN0=; b=zLCXWzEN1SVUFi/pTxH8kpaRxiOFqUO/sN05csA85q5xT2FIO41sj3mfK9zwrjjHDr SyOiSvkowc1f2+B822CX7/aecORGdRjzbiWyL905vZ+oG1V21atXbvPmLUcE7K4+hfqn QyLrEf+xEDct4+X7CgzeowJrDXPCzLQYH/etS30pYMstNdglk7b7ctivpyKNvILnGQn5 R3dCDf4S0Cww5cZMqAm1Gg9f5CfBzz/dZ9kRBR7lxX2dhLKvDd6CndUhtwhz77sW3pJA nScHi7TAQ5iyIjhjKuNIvwh4vLq4r6D7x3ZcBRvohaAv2PNccGGVuTOn4YxT93UbJMr1 yVrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:mime-version:subject:from:in-reply-to :date:cc:content-transfer-encoding:message-id:references:to; bh=17oYIBguHYY0d0cCK2BE18rhqIFrTt0UuSbVmllGxN0=; b=WhuSKa1zSx8EuORnndRKijqP/EfOOFQrAKIa31P0gWb5/3luOnAfE19kHM8YtBKDjh cclSViv106LYcFKVqA1P1jQ+JZGNx68R6kXRkuXvziR0XlKXcDkdbeo/VSh9JJL8rp9z LP/QABUo9NQ5TIPOaSpXlF8svmVy3uRqfj3oX6NcPfyWZqNIfNI35PQ0AkgNPe8aE6jS Kgc7fJ2JbdF0orzo8nTxa58VZ+lWBW/e1HZiy5bp28qqzZZICZJqPmCqcdnEghmCZs7O +Cc+gd+dBTTNKtisEV/NGv9FNGJLa+ymE7Ceo4LpaTvKCS/Vi4RvqZZUg8apmycXNFLf wwfQ== X-Gm-Message-State: AEkooutar7nmUNb2DKMcV1uEW5tAzQagHSewH2ojAW1efwzmpv5o2BlKHdmYQIhQ2Vq50Q== X-Received: by 10.194.28.5 with SMTP id x5mr18084330wjg.11.1471895990466; Mon, 22 Aug 2016 12:59:50 -0700 (PDT) Received: from [192.168.1.19] (abuy188.neoplus.adsl.tpnet.pl. [83.8.196.188]) by smtp.gmail.com with ESMTPSA id a2sm25911163wjg.46.2016.08.22.12.59.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Aug 2016 12:59:49 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: mountroot prompt regresion From: =?utf-8?Q?Edward_Tomasz_Napiera=C5=82a?= X-Mailer: iPhone Mail (13G35) In-Reply-To: <20160822161741.00001fd6@gmail.com> Date: Mon, 22 Aug 2016 21:59:47 +0200 Cc: hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8EF9DEEE-8D8F-4868-8CDA-7EBEB40D5EC9@FreeBSD.org> References: <20160822161741.00001fd6@gmail.com> To: rank1seeker@gmail.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: , X-List-Received-Date: Mon, 22 Aug 2016 19:59:53 -0000 Dnia 22.08.2016 o godz. 16:17 napisa=C5=82(a): > Now at 10.3 REL i386, UFS only, but I'm pretty sure it also occurs in earl= ier releases too. > When "something" happens which makes you reach mountroot prompt, upon typi= ng, nothing is visible until you press shift. > Then you see all you typed, up to that point. > Also, you need to press shift in order to see output too. > This is anoying as it leads to reboots as empty line trigers it and as you= don't see the output you would do it. > I.e; '?' symbol to list providers, then enter to see list wouldn't display= it unless shift was pressed. > Those who see nothing would normally press enter again and triger a reboot= . > This is very anoying. Sounds like a known vt(4) bug. Can you verify that it works correctly with s= yscons? From owner-freebsd-hackers@freebsd.org Tue Aug 23 04:12:16 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78501BC1AF7 for ; Tue, 23 Aug 2016 04:12:16 +0000 (UTC) (envelope-from eric@metricspace.net) 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 624BA198A for ; Tue, 23 Aug 2016 04:12:16 +0000 (UTC) (envelope-from eric@metricspace.net) Received: by mailman.ysv.freebsd.org (Postfix) id 6150FBC1AF6; Tue, 23 Aug 2016 04:12:16 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E99FBC1AF5 for ; Tue, 23 Aug 2016 04:12:16 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (mail.metricspace.net [IPv6:2001:470:1f11:617::107]) by mx1.freebsd.org (Postfix) with ESMTP id 3182D1988 for ; Tue, 23 Aug 2016 04:12:16 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from [IPv6:2001:470:1f11:617:3210:b3ff:fe77:becd] (unknown [IPv6:2001:470:1f11:617:3210:b3ff:fe77:becd]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id 6F9B91A93 for ; Tue, 23 Aug 2016 04:12:09 +0000 (UTC) To: hackers@freebsd.org From: Eric McCorkle Subject: Info about suspend-to-disk Message-ID: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> Date: Mon, 22 Aug 2016 23:41:12 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WIhUp11GE7eGqpSRaa8dscf9px0CNsdFl" 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: , X-List-Received-Date: Tue, 23 Aug 2016 04:12:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WIhUp11GE7eGqpSRaa8dscf9px0CNsdFl Content-Type: multipart/mixed; boundary="OxICMEckHJX6esEqEfqiOVXgRnBSVgAbK" From: Eric McCorkle To: hackers@freebsd.org Message-ID: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> Subject: Info about suspend-to-disk --OxICMEckHJX6esEqEfqiOVXgRnBSVgAbK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi everyone, I'm gathering information in preparation for possibly working on suspend-to-disk functionality. I have a fairly good idea of what it would take and one way to attack it. The overall plan would look something like this: * Use dump functionality to write an entire OS image out to disk. As this is a voluntary dump, it should be possible to go through the FS interface to produce a regular file. * Modify boot1 to check for saved images. Load and resume if one exists.= * Presumably there would need to be some new device methods added to do saving/reinitialization of devices. The major open questions for me are the following: * Is there/has there been significant work in this direction? * Is there perhaps a better strategy? * Do the codepaths currently exist to allow dump functionality to write to a regular file in the case of a voluntary dump, or would this need to be added? * What would be the most sensible default behavior for device hibernate/unhibernate methods? * Any other significant issues --OxICMEckHJX6esEqEfqiOVXgRnBSVgAbK-- --WIhUp11GE7eGqpSRaa8dscf9px0CNsdFl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EARYIAAYFAle7xdgACgkQVsKIQKqABI2XswD/d5koF51216TOHQjpBCgtIsGV Q9Bpy30kCaJV8mIzX5QBAOqGPyi+pZknQOEsUd1lyLUWXvHDiWF0PCsOtMFnZq8P =/LiG -----END PGP SIGNATURE----- --WIhUp11GE7eGqpSRaa8dscf9px0CNsdFl-- From owner-freebsd-hackers@freebsd.org Tue Aug 23 05:14:07 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BFDCBC3982 for ; Tue, 23 Aug 2016 05:14:07 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 7C29B1B3E for ; Tue, 23 Aug 2016 05:14:07 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 7B794BC3981; Tue, 23 Aug 2016 05:14:07 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B19DBC3980 for ; Tue, 23 Aug 2016 05:14:07 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F18D1B3D for ; Tue, 23 Aug 2016 05:14:07 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f43.google.com with SMTP id n128so117510431ith.1 for ; Mon, 22 Aug 2016 22:14:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=g3DlaS77J5/qhvh7Usm5op6N3Fy2rZMXDN+7hejU4RQ=; b=e5y73l0cm33P/EyVaWwZoSAInFnJPX4Rc41rf+GLbZlEZBjrUFUKd5j3CPMLqhxNPU I5UN4ZFUB9SKL9SRs6mJzyiTKYbeeo0gr0XNGFXG5XjERRujYzFOUcYf80c8qEVlg0fY NVKcuFNfyvWrivB+k/yRwjg80eEpdmTDE33dsMdFOU0JQx38CBem+KTqu+Zpf5+pB42z 1ZDm7giP/9KUs5pEGYz7TcZytTnxou8fSCFwrP8Egt6Qj04Tu0OahoElCwBsCQvBuuSM 31BDb7uqVKwTo8IxdGgEEPLly1xUubuCFFY11L4fx5RX+SETTyYB+h3OIv7WmV3XH5gQ CGCw== X-Gm-Message-State: AEkooutxPk3xGhdOjMbBZiuzSGjw2HK8MqX8KN0SKBd9x1sauIUKX4Dc1fAH6XWOOEQ3Ow== X-Received: by 10.107.22.198 with SMTP id 189mr32223414iow.0.1471929245885; Mon, 22 Aug 2016 22:14:05 -0700 (PDT) Received: from mail-it0-f53.google.com (mail-it0-f53.google.com. [209.85.214.53]) by smtp.gmail.com with ESMTPSA id j16sm844225iod.25.2016.08.22.22.14.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Aug 2016 22:14:05 -0700 (PDT) Received: by mail-it0-f53.google.com with SMTP id e63so127936996ith.1 for ; Mon, 22 Aug 2016 22:14:05 -0700 (PDT) X-Received: by 10.107.28.11 with SMTP id c11mr32285463ioc.7.1471929245497; Mon, 22 Aug 2016 22:14:05 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Mon, 22 Aug 2016 22:14:05 -0700 (PDT) In-Reply-To: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> From: Conrad Meyer Date: Mon, 22 Aug 2016 22:14:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Info about suspend-to-disk To: Eric McCorkle Cc: hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 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: , X-List-Received-Date: Tue, 23 Aug 2016 05:14:07 -0000 Hi Eric, On Mon, Aug 22, 2016 at 8:41 PM, Eric McCorkle wrote: > Hi everyone, > > I'm gathering information in preparation for possibly working on > suspend-to-disk functionality. I have a fairly good idea of what it > would take and one way to attack it. The overall plan would look > something like this: > > * Use dump functionality to write an entire OS image out to disk. As > this is a voluntary dump, it should be possible to go through the FS > interface to produce a regular file. > > * Modify boot1 to check for saved images. Load and resume if one exists. That sort of thing should probably go in loader, not boot1. (boot0-2 are just the MBR boot block(s), as I understand it; loader is the last pre-OS stage and where most features live.) > * Presumably there would need to be some new device methods added to do > saving/reinitialization of devices. Probably similar problems to kexec/kboot. (That was a major roadblock for kexec efforts, I believe.) I think getting this right will be the really challenging part. > The major open questions for me are the following: > > * Is there/has there been significant work in this direction? > > * Is there perhaps a better strategy? > > * Do the codepaths currently exist to allow dump functionality to write > to a regular file in the case of a voluntary dump, or would this need to > be added? That would have to be added. You could maybe register a file dumperinfo (as long as you're careful to prevent its use on panic-during-suspend), but nothing does this yet. > * What would be the most sensible default behavior for device > hibernate/unhibernate methods? > > * Any other significant issues Undoubtedly something will come up :-). Best, Conrad From owner-freebsd-hackers@freebsd.org Tue Aug 23 05:23:16 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B1EBBC3D1B for ; Tue, 23 Aug 2016 05:23:16 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 2EF5914B1 for ; Tue, 23 Aug 2016 05:23:15 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [192.168.1.10] (unknown [192.168.1.10]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id B79D81B15 for ; Tue, 23 Aug 2016 05:23:09 +0000 (UTC) Subject: Re: Info about suspend-to-disk To: freebsd-hackers@freebsd.org References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> From: Allan Jude Message-ID: <7a9fcbee-c849-d2b7-6608-732c29fab539@freebsd.org> Date: Tue, 23 Aug 2016 01:23:06 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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: , X-List-Received-Date: Tue, 23 Aug 2016 05:23:16 -0000 On 2016-08-23 01:14, Conrad Meyer wrote: > Hi Eric, > > On Mon, Aug 22, 2016 at 8:41 PM, Eric McCorkle wrote: >> Hi everyone, >> >> I'm gathering information in preparation for possibly working on >> suspend-to-disk functionality. I have a fairly good idea of what it >> would take and one way to attack it. The overall plan would look >> something like this: >> >> * Use dump functionality to write an entire OS image out to disk. As >> this is a voluntary dump, it should be possible to go through the FS >> interface to produce a regular file. >> >> * Modify boot1 to check for saved images. Load and resume if one exists. > > That sort of thing should probably go in loader, not boot1. (boot0-2 > are just the MBR boot block(s), as I understand it; loader is the last > pre-OS stage and where most features live.) > * boot0 (512b) is the MBR/pMBR * boot1 (512b) is the VBR (loads and executes boot2) * boot2 (15kb for UFS+MBR, up to 512kb for GPT, 3.5mb of ZFS) is the first thing that actually understands file systems. This reads the loader from the file system * loader (boot3) But I agree, I don't think you'll need to make it any earlier than the loader to do a resume from suspend-to-disk. It can reload the in-memory image, and then start it executing again. >> * Presumably there would need to be some new device methods added to do >> saving/reinitialization of devices. > > Probably similar problems to kexec/kboot. (That was a major roadblock > for kexec efforts, I believe.) I think getting this right will be the > really challenging part. > >> The major open questions for me are the following: >> >> * Is there/has there been significant work in this direction? >> >> * Is there perhaps a better strategy? >> >> * Do the codepaths currently exist to allow dump functionality to write >> to a regular file in the case of a voluntary dump, or would this need to >> be added? > > That would have to be added. You could maybe register a file > dumperinfo (as long as you're careful to prevent its use on > panic-during-suspend), but nothing does this yet. > >> * What would be the most sensible default behavior for device >> hibernate/unhibernate methods? >> >> * Any other significant issues > > Undoubtedly something will come up :-). > > Best, > Conrad > _______________________________________________ > 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" > -- Allan Jude From owner-freebsd-hackers@freebsd.org Tue Aug 23 05:30:39 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27AD4BC3EED for ; Tue, 23 Aug 2016 05:30:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) 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 0597E16A3 for ; Tue, 23 Aug 2016 05:30:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id 04FCBBC3EEC; Tue, 23 Aug 2016 05:30:39 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04A99BC3EEB for ; Tue, 23 Aug 2016 05:30:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6D7B16A2 for ; Tue, 23 Aug 2016 05:30:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x232.google.com with SMTP id f6so117475488ith.0 for ; Mon, 22 Aug 2016 22:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=rMf/E3o7PzX2BfpbOm+q7lY/FjcYm16vb/NKqYcSCEY=; b=0b8CJJmOSeHm0wqrfZBd9Qp4jNIDhzb3nquk7NFaSKDt3iFXVEnj8j8p70o3wpygAo hbKUxVZ1PkO+aZUeSjS7e92CEvUT4i9/By4q2rfHrdxAKDQY/jaLEP/9CyovRd/nabP0 xS7ticdT3/6+kmsWgZIIxsMoLQ/DJkNgPjvW9NUiXuPkNmXiCmsEFSDCUFQ/zaYNIPqk ciAfnfy2cRJXyBFrHdzUnFrQ54NEgfbnLBPZ63LsjVnWzaEHpYuKs9zy1ekzQbhd2brD ElIwidL4X8fVvMun+dVVxtf893foN+R4MOT0YM8noqqP5nt1/s1yClXmM+AB82x+DPpa 6+Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=rMf/E3o7PzX2BfpbOm+q7lY/FjcYm16vb/NKqYcSCEY=; b=f1pDi17Kek+/kLR5mZoiBt9ZFgfQ7+LCu5zjpnmsxEF4c6uDsLG8AcDSP/zE1FW2+7 4qbL63y/5Sy8y62mWgb/TOHHnG7Akcc9E5OR2vCr+J+rdc46xBayTNSDrLZLnv9EaUJn TdJDSye0fi674n2YKOVi4fOK3gpH7pwRhU0Z3QHQ2P+js+D1zYvPtWA8olR/6GlXgca6 FE05l9kYtS/YFZM+9OtgJqqmcS1sq1JrdOwSkUxO20c9s8mxzmtj8vXZRrJ9yMqHGZmZ z0DgXQHLO2ZN926Qm1qeGf+jZsHbfDCxqJrAHyyQ9hOcqE444IQ0qkKuJiZuzIBz4z52 hBJQ== X-Gm-Message-State: AEkoouupgThI+kBVB1Ph4hvyCFUqCInosHY7IEREh2aWUY9TewTa49nGACj6eZTLyUTYfi1K88SV6DqEmOSCBA== X-Received: by 10.107.9.39 with SMTP id j39mr27095255ioi.73.1471930238199; Mon, 22 Aug 2016 22:30:38 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Mon, 22 Aug 2016 22:30:37 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> From: Warner Losh Date: Mon, 22 Aug 2016 23:30:37 -0600 X-Google-Sender-Auth: C47lZUkYLGHjE1UnNn39mKUMqqw Message-ID: Subject: Re: Info about suspend-to-disk To: "Conrad E. Meyer" Cc: Eric McCorkle , "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 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: , X-List-Received-Date: Tue, 23 Aug 2016 05:30:39 -0000 On Mon, Aug 22, 2016 at 11:14 PM, Conrad Meyer wrote: > Hi Eric, > > On Mon, Aug 22, 2016 at 8:41 PM, Eric McCorkle wrote: >> Hi everyone, >> >> I'm gathering information in preparation for possibly working on >> suspend-to-disk functionality. I have a fairly good idea of what it >> would take and one way to attack it. The overall plan would look >> something like this: >> >> * Use dump functionality to write an entire OS image out to disk. As >> this is a voluntary dump, it should be possible to go through the FS >> interface to produce a regular file. >> >> * Modify boot1 to check for saved images. Load and resume if one exists. > > That sort of thing should probably go in loader, not boot1. (boot0-2 > are just the MBR boot block(s), as I understand it; loader is the last > pre-OS stage and where most features live.) Generally, I concur. However, a lot will depend on the size of the binary that's needed to bring in the image. And the gymnastics to get everything back into the right PA space which might conflict with the PAs that are occupied by the loader... >> * Presumably there would need to be some new device methods added to do >> saving/reinitialization of devices. > > Probably similar problems to kexec/kboot. (That was a major roadblock > for kexec efforts, I believe.) I think getting this right will be the > really challenging part. There's already suspend/resume. Why aren't these hooks sufficient? >> The major open questions for me are the following: >> >> * Is there/has there been significant work in this direction? >> >> * Is there perhaps a better strategy? >> >> * Do the codepaths currently exist to allow dump functionality to write >> to a regular file in the case of a voluntary dump, or would this need to >> be added? > > That would have to be added. You could maybe register a file > dumperinfo (as long as you're careful to prevent its use on > panic-during-suspend), but nothing does this yet. Suspended, but not quite suspended might present problems because all filesystems need to have some threads running, but you don't want user threads changing state running. That's what makes suspend to file quite a bit more challenging than suspend to swap space... Suspend to swap space won't be too hard if you leverage the dump routines of all the drivers... >> * What would be the most sensible default behavior for device >> hibernate/unhibernate methods? We already have suspend / resume. There's been talk of augmenting these to allow for the more nuanced ways that ACPI suspends things vs the old APM. However, so far little urgent need has been seen to make progress on that because the simple ways still work. Warner From owner-freebsd-hackers@freebsd.org Tue Aug 23 07:05:26 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 277EDBC3639 for ; Tue, 23 Aug 2016 07:05:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 104F617D2 for ; Tue, 23 Aug 2016 07:05:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 0F9D2BC3638; Tue, 23 Aug 2016 07:05:26 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F44BBC3637 for ; Tue, 23 Aug 2016 07:05:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CEFA17D1 for ; Tue, 23 Aug 2016 07:05:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u7N75Ghx045069 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 23 Aug 2016 10:05:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u7N75Ghx045069 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u7N75GuH045068; Tue, 23 Aug 2016 10:05:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 23 Aug 2016 10:05:16 +0300 From: Konstantin Belousov To: Eric McCorkle Cc: hackers@freebsd.org Subject: Re: Info about suspend-to-disk Message-ID: <20160823070516.GI83214@kib.kiev.ua> References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: , X-List-Received-Date: Tue, 23 Aug 2016 07:05:26 -0000 On Mon, Aug 22, 2016 at 11:41:12PM -0400, Eric McCorkle wrote: > Hi everyone, > > I'm gathering information in preparation for possibly working on > suspend-to-disk functionality. I have a fairly good idea of what it > would take and one way to attack it. The overall plan would look > something like this: > > * Use dump functionality to write an entire OS image out to disk. As > this is a voluntary dump, it should be possible to go through the FS > interface to produce a regular file. And get fs state unsynchronized between on-disk state and the cached state in memory at the moment where you begin dumping. Even if you preallocate all storage for the dump file before taking kernel memory snapshot, a write to the file may result in reallocation of the blocks and incompatible changes in the inode block, at least. From owner-freebsd-hackers@freebsd.org Tue Aug 23 08:11:26 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 180A6BC3A52 for ; Tue, 23 Aug 2016 08:11:26 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "puchar.net", Issuer "puchar.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 995571BBA for ; Tue, 23 Aug 2016 08:11:25 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.14.9) with ESMTPS id u7N8BFju075689 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 23 Aug 2016 10:11:16 +0200 (CEST) (envelope-from wojtek@puchar.net) Received: from laptop.wojtek.intra (localhost [127.0.0.1]) by laptop.wojtek.intra (8.14.9/8.14.9) with ESMTP id u7N8BFJC004552 for ; Tue, 23 Aug 2016 10:11:15 +0200 (CEST) (envelope-from wojtek@puchar.net) Received: from localhost (wojtek@localhost) by laptop.wojtek.intra (8.14.9/8.14.9/Submit) with ESMTP id u7N8BADi004549 for ; Tue, 23 Aug 2016 10:11:10 +0200 (CEST) (envelope-from wojtek@puchar.net) X-Authentication-Warning: laptop.wojtek.intra: wojtek owned process doing -bs Date: Tue, 23 Aug 2016 10:11:10 +0200 (CEST) From: Wojciech Puchar X-X-Sender: wojtek@laptop.wojtek.intra To: freebsd-hackers@freebsd.org Subject: problem with bridging Message-ID: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (puchar.net [10.0.1.1]); Tue, 23 Aug 2016 10:11:16 +0200 (CEST) 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: , X-List-Received-Date: Tue, 23 Aug 2016 08:11:26 -0000 i added my 10Gb/s ethernet port (used as 1Gbit/s actually now) to bridge interface. ix1 is up, when i plug it in, i've got connection properly, but nothing works just like bridging would not work. is anything that should be changed in sysctls or other place ? ix1: flags=8943 metric 0 mtu 1500 options=e400b9 ether 0c:c4:7a:6e:7e:9f media: Ethernet autoselect bridge0: flags=8843 metric 0 mtu 1500 ether 02:75:52:4e:f6:00 inet 10.0.1.1 netmask 0xffffff00 broadcast 10.0.1.255 inet 10.0.1.252 netmask 0xffffff00 broadcast 10.0.1.255 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: ix1 flags=143 ifmaxaddr 0 port 2 priority 128 path cost 2000 member: tap6 flags=143 ifmaxaddr 0 port 14 priority 128 path cost 2000000 member: tap5 flags=143 ifmaxaddr 0 port 13 priority 128 path cost 2000000 member: tap4 flags=143 ifmaxaddr 0 port 9 priority 128 path cost 2000000 member: tap3 flags=143 ifmaxaddr 0 port 8 priority 128 path cost 2000000 member: tap2 flags=143 ifmaxaddr 0 port 7 priority 128 path cost 2000000 member: tap1 flags=143 ifmaxaddr 0 port 6 priority 128 path cost 2000000 member: tap0 flags=143 ifmaxaddr 0 port 5 priority 128 path cost 2000000 From owner-freebsd-hackers@freebsd.org Tue Aug 23 10:48:08 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC3E1BC2453 for ; Tue, 23 Aug 2016 10:48:08 +0000 (UTC) (envelope-from mailinglists@toco-domains.de) 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 99EFA15DE for ; Tue, 23 Aug 2016 10:48:08 +0000 (UTC) (envelope-from mailinglists@toco-domains.de) Received: by mailman.ysv.freebsd.org (Postfix) id 993F5BC2451; Tue, 23 Aug 2016 10:48:08 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98E3EBC2450 for ; Tue, 23 Aug 2016 10:48:08 +0000 (UTC) (envelope-from mailinglists@toco-domains.de) Received: from toco-domains.de (mail.toco-domains.de [176.9.39.170]) (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 650A715DD for ; Tue, 23 Aug 2016 10:48:08 +0000 (UTC) (envelope-from mailinglists@toco-domains.de) Received: from [192.168.0.120] (port-212-202-156-99.static.qsc.de [212.202.156.99]) by toco-domains.de (Postfix) with ESMTPA id 82C201AAF018; Tue, 23 Aug 2016 12:48:00 +0200 (CEST) Subject: Re: Info about suspend-to-disk To: Eric McCorkle , hackers@freebsd.org References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> From: Torsten Zuehlsdorff Message-ID: <9a1f190c-9d43-cb8f-ab85-a0caa132a4e6@toco-domains.de> Date: Tue, 23 Aug 2016 12:48:00 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Tue, 23 Aug 2016 10:48:08 -0000 On 23.08.2016 05:41, Eric McCorkle wrote: > Hi everyone, > > I'm gathering information in preparation for possibly working on > suspend-to-disk functionality. I have a fairly good idea of what it > would take and one way to attack it. The overall plan would look > something like this: > > * Use dump functionality to write an entire OS image out to disk. As > this is a voluntary dump, it should be possible to go through the FS > interface to produce a regular file. > > * Modify boot1 to check for saved images. Load and resume if one exists. > > * Presumably there would need to be some new device methods added to do > saving/reinitialization of devices. > > > The major open questions for me are the following: > > * Is there/has there been significant work in this direction? > > * Is there perhaps a better strategy? > > * Do the codepaths currently exist to allow dump functionality to write > to a regular file in the case of a voluntary dump, or would this need to > be added? > > * What would be the most sensible default behavior for device > hibernate/unhibernate methods? > > * Any other significant issues What about encryption? I used encryption and ZFS - how should this work? ;) Greetings, Torsten From owner-freebsd-hackers@freebsd.org Tue Aug 23 11:54:56 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DA00BC3330 for ; Tue, 23 Aug 2016 11:54:56 +0000 (UTC) (envelope-from eric@metricspace.net) 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 63C061C90 for ; Tue, 23 Aug 2016 11:54:56 +0000 (UTC) (envelope-from eric@metricspace.net) Received: by mailman.ysv.freebsd.org (Postfix) id 5F97CBC332F; Tue, 23 Aug 2016 11:54:56 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F40BBC332E for ; Tue, 23 Aug 2016 11:54:56 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (mail.metricspace.net [IPv6:2001:470:1f11:617::107]) by mx1.freebsd.org (Postfix) with ESMTP id 370F91C8F for ; Tue, 23 Aug 2016 11:54:56 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from [172.16.0.117] (unknown [172.16.0.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id 4E09F1E2C; Tue, 23 Aug 2016 11:54:55 +0000 (UTC) Subject: Re: Info about suspend-to-disk To: Torsten Zuehlsdorff , hackers@freebsd.org References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> <9a1f190c-9d43-cb8f-ab85-a0caa132a4e6@toco-domains.de> From: Eric McCorkle Message-ID: Date: Tue, 23 Aug 2016 07:23:58 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <9a1f190c-9d43-cb8f-ab85-a0caa132a4e6@toco-domains.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2Ci9VV3MVUGim61GtiMadnbIwmjSsst8W" 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: , X-List-Received-Date: Tue, 23 Aug 2016 11:54:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2Ci9VV3MVUGim61GtiMadnbIwmjSsst8W Content-Type: multipart/mixed; boundary="Sino2UmT7PPjkvbgaDwDMNDLJXvlvCaoC" From: Eric McCorkle To: Torsten Zuehlsdorff , hackers@freebsd.org Message-ID: Subject: Re: Info about suspend-to-disk References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> <9a1f190c-9d43-cb8f-ab85-a0caa132a4e6@toco-domains.de> In-Reply-To: <9a1f190c-9d43-cb8f-ab85-a0caa132a4e6@toco-domains.de> --Sino2UmT7PPjkvbgaDwDMNDLJXvlvCaoC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/23/16 06:48, Torsten Zuehlsdorff wrote: > encryption? I used encryption and ZFS - how should this work? ;) GELI support exists for legacy BIOS, and I have work pending that adds EFI support. If you're dumping to/restoring from a GELI partition, that provides an encryption story. --Sino2UmT7PPjkvbgaDwDMNDLJXvlvCaoC-- --2Ci9VV3MVUGim61GtiMadnbIwmjSsst8W Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EARYIAAYFAle8Mk4ACgkQVsKIQKqABI1hAQEA4kMNHFHQ4omEey82Dvqime3/ wJSjzW3X26XJt/07aSkBALoAuwYCBxKkkm75xqx8fflJxci3EVtw231iXuuVZHsH =PLIK -----END PGP SIGNATURE----- --2Ci9VV3MVUGim61GtiMadnbIwmjSsst8W-- From owner-freebsd-hackers@freebsd.org Tue Aug 23 12:12:44 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B928BC25E5 for ; Tue, 23 Aug 2016 12:12:44 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id F2AF61F26 for ; Tue, 23 Aug 2016 12:12:43 +0000 (UTC) (envelope-from eric@metricspace.net) Received: by mailman.ysv.freebsd.org (Postfix) id F202DBC25E4; Tue, 23 Aug 2016 12:12:43 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1A65BC25E3 for ; Tue, 23 Aug 2016 12:12:43 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (207-172-209-83.c3-0.arl-ubr1.sbo-arl.ma.static.cable.rcn.com [207.172.209.83]) by mx1.freebsd.org (Postfix) with ESMTP id A8CD21F25; Tue, 23 Aug 2016 12:12:43 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from [IPv6:2001:470:1f11:617:3210:b3ff:fe77:becd] (unknown [IPv6:2001:470:1f11:617:3210:b3ff:fe77:becd]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id 1B8691EB9; Tue, 23 Aug 2016 12:12:42 +0000 (UTC) Subject: Re: Info about suspend-to-disk To: Warner Losh , "Conrad E. Meyer" References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> Cc: "freebsd-hackers@freebsd.org" From: Eric McCorkle Message-ID: <60cd4f2c-13a8-3fc1-5f5d-c442cafc6e80@metricspace.net> Date: Tue, 23 Aug 2016 07:41:47 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q2L3ShLS7gPJBFLPslcesXsAi6hlKQbQu" 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: , X-List-Received-Date: Tue, 23 Aug 2016 12:12:44 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Q2L3ShLS7gPJBFLPslcesXsAi6hlKQbQu Content-Type: multipart/mixed; boundary="SWqjJvR0GAtMkxrs2k69KFstwmlb4ug0H" From: Eric McCorkle To: Warner Losh , "Conrad E. Meyer" Cc: "freebsd-hackers@freebsd.org" Message-ID: <60cd4f2c-13a8-3fc1-5f5d-c442cafc6e80@metricspace.net> Subject: Re: Info about suspend-to-disk References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> In-Reply-To: --SWqjJvR0GAtMkxrs2k69KFstwmlb4ug0H Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/23/16 01:30, Warner Losh wrote: >>> * Modify boot1 to check for saved images. Load and resume if one exi= sts. >> >> That sort of thing should probably go in loader, not boot1. (boot0-2 >> are just the MBR boot block(s), as I understand it; loader is the last= >> pre-OS stage and where most features live.) >=20 > Generally, I concur. However, a lot will depend on the size of the > binary that's needed to bring in the image. And the gymnastics to > get everything back into the right PA space which might conflict > with the PAs that are occupied by the loader... My only reservation about loader is that users will likely want the system to come back up quickly, as if resuming. Dropping them into the loader menu might not be what they want/expect. If it ends up being done in loader, it might be worth having a "fast-path" option that skips the usual menu. Actually, the "fast-path" loader option might be a worthwhile feature generally, for people who just want fast boot times. >>> * Do the codepaths currently exist to allow dump functionality to wri= te >>> to a regular file in the case of a voluntary dump, or would this need= to >>> be added? >> >> That would have to be added. You could maybe register a file >> dumperinfo (as long as you're careful to prevent its use on >> panic-during-suspend), but nothing does this yet. >=20 > Suspended, but not quite suspended might present problems > because all filesystems need to have some threads running, > but you don't want user threads changing state running. That's > what makes suspend to file quite a bit more challenging than > suspend to swap space... Suspend to swap space won't > be too hard if you leverage the dump routines of all the > drivers... Does suspend-to-swap wipe out what's already stored there? Since you plan on coming back online, you'd want to preserve all contents of swap. In any case, I could see it failing if there's not enough free space in swap (which I guess would also be a possibility with suspend-to-file) If dump to swap does preserve the contents of swap, it might be better to do it that way first to work out all the other issues. >>> * What would be the most sensible default behavior for device >>> hibernate/unhibernate methods? >=20 > We already have suspend / resume. There's been talk of > augmenting these to allow for the more nuanced ways that > ACPI suspends things vs the old APM. However, so far little > urgent need has been seen to make progress on that because > the simple ways still work. Wouldn't there need to be some extra re-initialization for deeper power states? In the worst case scenario, you're coming back online from a hard power-off, so I'd imagine you'd want another codepath. --SWqjJvR0GAtMkxrs2k69KFstwmlb4ug0H-- --Q2L3ShLS7gPJBFLPslcesXsAi6hlKQbQu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EARYIAAYFAle8NnsACgkQVsKIQKqABI2NVgD/SwuiyE4nK9QYAPzo0HOgftnR KGsEB2Ed7WqB0ZQa+OUA/1YANu2SOrRU6fKWmwKdbAqd1R4bxaKzg4mYH4ab2ToK =SMqK -----END PGP SIGNATURE----- --Q2L3ShLS7gPJBFLPslcesXsAi6hlKQbQu-- From owner-freebsd-hackers@freebsd.org Tue Aug 23 12:18:04 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 740A0BC2B4B for ; Tue, 23 Aug 2016 12:18:04 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (207-172-209-83.c3-0.arl-ubr1.sbo-arl.ma.static.cable.rcn.com [207.172.209.83]) by mx1.freebsd.org (Postfix) with ESMTP id 49EE413D9 for ; Tue, 23 Aug 2016 12:18:03 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from [IPv6:2001:470:1f11:617:3210:b3ff:fe77:becd] (unknown [IPv6:2001:470:1f11:617:3210:b3ff:fe77:becd]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id 3DF571EC5 for ; Tue, 23 Aug 2016 12:18:03 +0000 (UTC) Subject: Re: Info about suspend-to-disk To: freebsd-hackers@freebsd.org References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> <7a9fcbee-c849-d2b7-6608-732c29fab539@freebsd.org> From: Eric McCorkle Message-ID: Date: Tue, 23 Aug 2016 07:47:08 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <7a9fcbee-c849-d2b7-6608-732c29fab539@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4THNG6hb71DcU4ASUiAD1Bwo0CvlMsFlx" 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: , X-List-Received-Date: Tue, 23 Aug 2016 12:18:04 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4THNG6hb71DcU4ASUiAD1Bwo0CvlMsFlx Content-Type: multipart/mixed; boundary="GaGx3QIfpCsQPgFPlU4Oqao8GwINobgtQ" From: Eric McCorkle To: freebsd-hackers@freebsd.org Message-ID: Subject: Re: Info about suspend-to-disk References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> <7a9fcbee-c849-d2b7-6608-732c29fab539@freebsd.org> In-Reply-To: <7a9fcbee-c849-d2b7-6608-732c29fab539@freebsd.org> --GaGx3QIfpCsQPgFPlU4Oqao8GwINobgtQ Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 08/23/16 01:23, Allan Jude wrote: > * boot0 (512b) is the MBR/pMBR > * boot1 (512b) is the VBR (loads and executes boot2) > * boot2 (15kb for UFS+MBR, up to 512kb for GPT, 3.5mb of ZFS) is the > first thing that actually understands file systems. This reads the > loader from the file system > * loader (boot3) Ah. I was thinking in terms of EFI: * boot1 (stored on ESP, which is < 200MB by EFI spec) * loader (stored on main FS) --GaGx3QIfpCsQPgFPlU4Oqao8GwINobgtQ-- --4THNG6hb71DcU4ASUiAD1Bwo0CvlMsFlx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EARYIAAYFAle8N7wACgkQVsKIQKqABI2ZeQD/ZBxP3hMEBvNCU7HldGbLB2Yo I3NRUb+CUVCpQSB39qwBAOmdmTynbLHv7SazaaoHKiVNLHnvnMlkc9e8FrjFsy4K =clFm -----END PGP SIGNATURE----- --4THNG6hb71DcU4ASUiAD1Bwo0CvlMsFlx-- From owner-freebsd-hackers@freebsd.org Tue Aug 23 15:13:57 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 659CDBC3BA9 for ; Tue, 23 Aug 2016 15:13:57 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BD161DB4 for ; Tue, 23 Aug 2016 15:13:57 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OCD00000BEPMO00@mr11p00im-asmtp004.me.com> for freebsd-hackers@freebsd.org; Tue, 23 Aug 2016 15:13:56 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1471965235; bh=Mdnet/FapYwKjG9HSVgjNGePjLJ0yMoFkySoJDpaD9c=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=spbMBdkMNcchxinA9jLwA5CFJYOt2/ztjPLxSg9dFUmBdEWc0VWTvuM7GM1DHbcY6 /4H9D6plers81rsewku0Zx4kEDWKEovkrYqEL03Uy8UtPps/YwVjxlObJ8jxvoQWhZ eWVge0U4ordg4ifRCpllqHaTFmJalikHddxPMFJsaX5DGlYBEPGgLIBuovbtvcUXq+ YQbHgRZzMz+ftz4CdUoXC5CtNSqLQ4DtzZWdwoBad9Thap3N0JpO7O0oq25iVsZWSd BpgGZ9GIeeB4Eis2WWhkIoY3zLGkpedM1Pv7lqt32AzXIQWBuEyVVTmJp1kVdzIcT8 VR9F08fRNlFng== Received: from [192.168.1.4] (c-67-188-225-23.hsd1.ca.comcast.net [67.188.225.23]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OCD00CWWBN6QU10@mr11p00im-asmtp004.me.com>; Tue, 23 Aug 2016 15:13:55 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-23_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1608230152 User-Agent: Microsoft-MacOutlook/f.18.0.160709 Date: Tue, 23 Aug 2016 08:13:53 -0700 Subject: Re: problem attaching driver at LPC bus From: Ravi Pokala Sender: "Pokala, Ravi" To: "freebsd-hackers@freebsd.org" , karu.pruun@gmail.com Message-id: <20A27669-0B16-4199-853F-46D84E876AE9@panasas.com> Thread-topic: problem attaching driver at LPC bus MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit 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: , X-List-Received-Date: Tue, 23 Aug 2016 15:13:57 -0000 Hi Peeter, I wrote a driver for a pair of LPC-attached GPIO controllers last year, so this is (somewhat) in my head. In my case, ACPI didn't actually have the correct information for either controller. For the controller that was embedded in the chipset, I got the address info from the parent ISA bridge. In my case, that involved reading and masking various registers, as defined by the chipset specs. I also got the resource size from the specs. For the standalone controller attached to the LPC bus, I had to do something similar - inb() the address registers, mask accordingly, and set up the resource. During their respective probe()s: rc = bus_set_resource(dev, SYS_RES_IOPORT, sc->gp_nextrid, XXX_base, XXX_RESOURCE_BYTES); if (rc != 0) { device_printf(dev, " probe failed to setup resource: %d\n", rc); return ENXIO; } /* Because we needed multiple controllers to be connected to the same * devnode, increment to ensure they get their own RID */ sc->gp_XXX_ctlr.gpio_ctlr_rid = sc->gp_nextrid; sc->gp_nextrid++; Then, during attach(): rid = sc->gp_XXX_ctlr.gpio_ctlr_rid; /* Allocate resource setup in probe method */ res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); if (res == NULL) { /* Failed to allocate I/O space resource */ device_printf(dev, "Failed to allocate resource for RID %d\n", rid); return ENOMEM; } sc->gp_XXX_ctlr.gpio_ctlr_res = res; device_printf(dev, "Attached: %s @ 0x%08lx\n", cfg->gc_desc, rman_get_start(res)); One thing to note is that I was careful about keeping track of the RIDs. Several of the existing drivers in the tree seem to just use 0 indiscriminately, and it works because they only use one resource. Hope that helps, Ravi (rpokala@) -----Original Message----- Reply-To: "freebsd-hackers@freebsd.org" Date: Mon, 22 Aug 2016 16:51:03 +0300 From: "karu.pruun" To: freebsd-hackers@freebsd.org Subject: problem attaching driver at LPC bus Message-ID: Content-Type: text/plain; charset=UTF-8 > Hello > > I am trying to write a small driver for a device (gmux) attached to the LPC > bus, but am stuck with allocation of I/O ports. The device shows as > follows: > > --- > devinfo -rv | grep GMUX: > > unknown pnpinfo _HID=APP000B _UID=0 at handle=\_SB_.PCI0.LPCB.GMUX > --- > > I took cue from sys/dev/acpica/acpi_ec.c. Probing works fine with > ACPI_ID_PROBE in analogy to acpi_ec.c: > > --- --- > sys/dev/acpica/acpi_ec.c: > --- > > acpi_ec_probe(. . .) > { > . . . > > ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids) > > . . . > } > --- --- > > Then attach() calls bus_alloc_resource(): > > --- --- > sys/dev/acpica/acpi_ec.c: > --- > > acpi_ec_attach(. . .) > { > struct resource *res; > . . . > > res = bus_alloc_resource_any(sc->ec_dev, SYS_RES_IOPORT, > &sc->ec_data_rid, RF_ACTIVE); > > . . . > } > --- --- > > But this fails for my driver, res is always NULL. I looked up acpi tables > (acpidump -td), the IO resources for GMUX are there: > > --- --- > Scope (\_SB.PCI0.LPCB) > { > Device (GMUX) > { > Name (_HID, EisaId ("APP000B")) // _HID: Hardware ID > Name (_CID, "gmux") // _CID: Compatible ID > Name (_STA, 0x0B) // _STA: Status > Name (_CRS, ResourceTemplate () // _CRS: Current Resource > Settings > { > IO (Decode16, > 0x0700, // Range Minimum > 0x07FF, // Range Maximum > 0x01, // Alignment > 0xFF, // Length > ) > }) > --- --- > > Could someone explain where I have gone wrong? > > Thank you > > Peeter From owner-freebsd-hackers@freebsd.org Tue Aug 23 15:20:20 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 129FFBC3EA3 for ; Tue, 23 Aug 2016 15:20:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D95751468 for ; Tue, 23 Aug 2016 15:20:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22c.google.com with SMTP id n128so141091967ith.1 for ; Tue, 23 Aug 2016 08:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=f94q9S6SPlBtWs7UcIyfajMLO9SHU35vZY2XfoKv6t4=; b=h+lpFD53gsxn7xCCamS5NHh3FHV1ZEOFVjKE6fUCEWPAWoly+vo+6VrGnwqNlPBl1u lCfC9ThevWPPU7oIpy8b7rpZEQISVGKKXFbucU0o0pOemaGhhwlNAZiujFD72JmVJmgR IPSMwoKQOMeaAWpr0KbFmaUjoXCe9tU4gl91X2AlktrqL6vAoOurLlQ/Kt7YbLD7r8t3 mscIVABEMnvHKI+aIruVMZ6zRVL+6cNEELKYlvh2sEwy1seuYLse1boKieLPcnyLsG5e RDivv9qwmcYYc5sHLx3450CfARIwLhr8Xh0pBru0oDYsxuBxNRc/QoZsh8B3ZUjTHTc+ LG6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=f94q9S6SPlBtWs7UcIyfajMLO9SHU35vZY2XfoKv6t4=; b=LdCjbtMdl7/r+tEQviY1CGwdpk76VGtC0OXoIoOWoRqAI0QidqE0NUQIJdO9QsFmBL 3AE3UyQANNJo3uIPF/VP1VBGRFK/Nmigw1671UPy57zw4Z0udHzV0QV/y2iUC6nEsO6D rXCYHHbD1cWx/3mQAQ1Jk7JvUoX1bc+861DKKHRItPISdNs6ZNllLoYz/Mzr4//2jbjh YqnkTlZPlsGq6rnmBzCdAwY6sU5TCRn7ypUPbpm/D5uw2n3EOBeDR8QXqKbpxwm4V8M7 v6P1hDflTMf907UoI7PwakgEDRdPMwocsbQLchc+0mi4deWTuuWXNuMnXjLbehYSI+sO vXzg== X-Gm-Message-State: AEkoousKTTNYQUdFJOfoXlk8SQD6mcwSjR+DdLMAopL+D2mVRmLCigtM9cp6q+uTH6okGL5jvW6Lz7YYH+CFvQ== X-Received: by 10.107.21.134 with SMTP id 128mr29065312iov.59.1471965618978; Tue, 23 Aug 2016 08:20:18 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Tue, 23 Aug 2016 08:20:18 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <20A27669-0B16-4199-853F-46D84E876AE9@panasas.com> References: <20A27669-0B16-4199-853F-46D84E876AE9@panasas.com> From: Warner Losh Date: Tue, 23 Aug 2016 09:20:18 -0600 X-Google-Sender-Auth: u06238Fgl_7C8y77XfB79VHDYOA Message-ID: Subject: Re: problem attaching driver at LPC bus To: Ravi Pokala Cc: "freebsd-hackers@freebsd.org" , karu.pruun@gmail.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: , X-List-Received-Date: Tue, 23 Aug 2016 15:20:20 -0000 On Tue, Aug 23, 2016 at 9:13 AM, Ravi Pokala wrote: > Hi Peeter, > > I wrote a driver for a pair of LPC-attached GPIO controllers last year, s= o this is (somewhat) in my head. In my case, ACPI didn't actually have the = correct information for either controller. > > For the controller that was embedded in the chipset, I got the address in= fo from the parent ISA bridge. In my case, that involved reading and maskin= g various registers, as defined by the chipset specs. I also got the resour= ce size from the specs. For the standalone controller attached to the LPC b= us, I had to do something similar - inb() the address registers, mask accor= dingly, and set up the resource. During their respective probe()s: > > rc =3D bus_set_resource(dev, SYS_RES_IOPORT, sc->gp_nextrid, XXX_= base, > XXX_RESOURCE_BYTES); > if (rc !=3D 0) { > device_printf(dev, " probe failed to setup resource: %d\n= ", rc); > return ENXIO; > } > /* Because we needed multiple controllers to be connected to the = same > * devnode, increment to ensure they get their own RID > */ > sc->gp_XXX_ctlr.gpio_ctlr_rid =3D sc->gp_nextrid; > sc->gp_nextrid++; > > > Then, during attach(): > > rid =3D sc->gp_XXX_ctlr.gpio_ctlr_rid; > /* Allocate resource setup in probe method */ > res =3D bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTI= VE); > if (res =3D=3D NULL) { > /* Failed to allocate I/O space resource */ > device_printf(dev, "Failed to allocate resource for RID %= d\n", rid); > return ENOMEM; > } > sc->gp_XXX_ctlr.gpio_ctlr_res =3D res; > device_printf(dev, "Attached: %s @ 0x%08lx\n", cfg->gc_desc, rman= _get_start(res)); > > One thing to note is that I was careful about keeping track of the RIDs. = Several of the existing drivers in the tree seem to just use 0 indiscrimina= tely, and it works because they only use one resource. For ISA drivers, RID is just a number, best thought of as an index. So incrementing here like you've done is the right call. Warner From owner-freebsd-hackers@freebsd.org Tue Aug 23 15:45:37 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E353BC3BB7 for ; Tue, 23 Aug 2016 15:45:37 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52F4B1E6E for ; Tue, 23 Aug 2016 15:45:37 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp001.me.com by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OCD00300BO9KE00@mr11p00im-asmtp001.me.com> for freebsd-hackers@freebsd.org; Tue, 23 Aug 2016 15:45:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1471967134; bh=R0VJVzKBIZ+oUmmLn0uFLHaHxsEP850aJ2zuW1rriYo=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=d7WuzM/oDdwfsquBHJdQ/x5K1B2cOHJQ1OHoIaqusi4hEKb9plUpLsjSUacLoboUq j/wn6YbujaQj/qi7ftWdalDhpFZRwiPgVqCAExkw/4mT2OoOdGrGANQQno83hQQz3c 5P7n/+nSm87hIrwLAiyhh4p9Mw4PvpbSC5JzBtSG/ikS4RMh4kKYKe5o41fex6IWd1 aRAufsMtnR1eOKz8t0qOciHrpC41SE2qyn+9arhjaubUTgTOpyb9gzfHr2HWsXHGKu 2Y9yJrcQXC0BveRpb747gV0wnc4YlezdwcfYAnSDDumCREolbb0MpEfcSVIbSUrpT9 X658J6D/ieLew== Received: from [192.168.1.4] (c-67-188-225-23.hsd1.ca.comcast.net [67.188.225.23]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OCD001FVD3XWQ30@mr11p00im-asmtp001.me.com>; Tue, 23 Aug 2016 15:45:34 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-23_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1608230157 User-Agent: Microsoft-MacOutlook/f.18.0.160709 Date: Tue, 23 Aug 2016 08:45:33 -0700 Subject: Re: problem attaching driver at LPC bus From: Ravi Pokala Sender: "Pokala, Ravi" To: Warner Losh Cc: "freebsd-hackers@freebsd.org" , karu.pruun@gmail.com Message-id: <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com> Thread-topic: problem attaching driver at LPC bus References: <20A27669-0B16-4199-853F-46D84E876AE9@panasas.com> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit 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: , X-List-Received-Date: Tue, 23 Aug 2016 15:45:37 -0000 -----Original Message----- From: on behalf of Warner Losh Date: 2016-08-23, Tuesday at 08:20 To: Ravi Pokala Cc: "freebsd-hackers@freebsd.org" , Subject: Re: problem attaching driver at LPC bus On Tue, Aug 23, 2016 at 9:13 AM, Ravi Pokala wrote: >> ... >> >> One thing to note is that I was careful about keeping track of the RIDs. Several of the existing drivers in the tree seem to just use 0 indiscriminately, and it works because they only use one resource. > > For ISA drivers, RID is just a number, best thought of as an index. > So incrementing here like you've done is the right call. > > Warner Right, someone (jhb?) explained that to me at the time. My point is that the common practice of just passing in 0 doesn't always DTRT, especially if you're dealing with multiple resources. -Ravi (rpokala@) From owner-freebsd-hackers@freebsd.org Tue Aug 23 15:48:50 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A779ABC3DC0 for ; Tue, 23 Aug 2016 15:48:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F097146F for ; Tue, 23 Aug 2016 15:48:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x232.google.com with SMTP id x131so155337535ite.0 for ; Tue, 23 Aug 2016 08:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5pgHbxhsV4ZXXqTCiSJwbdhyE64dHBNSZpggq+y4uRk=; b=VNz+sK6l1vati6sHxUr8N9nTIgssGuo5ksB4L5/DcI19tJNP+wEZb+4O3iuMD+5XJk XmZDfk7e1Ak4DjrrqrZIe1apv3oUuEruSMjyaQYPuxm3m7bXCPH5I7X36z999iP0p+OP 1aFgKFuHsK5dutXeljpdXqZZx3lMBQyU/rkRMOO1hSspce5roTxsFOJfZctVbonaJkaI nwfBZH5cIQj67J8Xbwf+kInirvhbVhy21G7DnpoYy+5MRAqzhN9wtwJLKv9PkRLzPbQA 1M5BYFFYsyqSpSEs7dqaMZStpdDpjcSHV+cjN1Psfg619hS8bU8wMhhqcNoGGxnYdjkG 280Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=5pgHbxhsV4ZXXqTCiSJwbdhyE64dHBNSZpggq+y4uRk=; b=EcXnuo2lL8z/wnjH7IHi4f4OSR36hXF6HJ9Osx1n0YulFg2iYNIHoeZ7+42MVsqP92 7AB+Q2IHPRT4WMYxkCDZtEJFdxC/9bOeTkYrxK9t+IhxUHZp9AfHIS+QosBBKyNUb67V FCRxH8h6mCCGaSj6HazbztZJbpixmpuK0i0jcc1Jw1jbxrV1r3Vy8B0v3c1PDR/S4t9y dJz9o2epsh65+L0Kr7swOJVUpaCL8Z5B71EbSvMrpElbFozgTYpOoEyHtzTraDzlJMi5 cjutRrIkJnWNVrS+FlVk6ILodyRp8T+iM8H3+W7K17XKdUkOczeAK+5EM8hjVCjwcL4t ZJLQ== X-Gm-Message-State: AEkoouuJRMoYspSBuIoDGhBOm9ojZFvRrtSx1I/sAC1QVk7wzC5pROemvHI270bbdQrFBk825YMTEn1YiXO6HQ== X-Received: by 10.107.21.134 with SMTP id 128mr29206185iov.59.1471967329875; Tue, 23 Aug 2016 08:48:49 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Tue, 23 Aug 2016 08:48:49 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com> References: <20A27669-0B16-4199-853F-46D84E876AE9@panasas.com> <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com> From: Warner Losh Date: Tue, 23 Aug 2016 09:48:49 -0600 X-Google-Sender-Auth: e-gvmPwdYwfLAXc5LUQDG3WhNeU Message-ID: Subject: Re: problem attaching driver at LPC bus To: Ravi Pokala Cc: "freebsd-hackers@freebsd.org" , karu.pruun@gmail.com Content-Type: text/plain; charset=UTF-8 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: , X-List-Received-Date: Tue, 23 Aug 2016 15:48:50 -0000 On Tue, Aug 23, 2016 at 9:45 AM, Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Warner Losh > Date: 2016-08-23, Tuesday at 08:20 > To: Ravi Pokala > Cc: "freebsd-hackers@freebsd.org" , > Subject: Re: problem attaching driver at LPC bus > > On Tue, Aug 23, 2016 at 9:13 AM, Ravi Pokala wrote: >>> ... >>> >>> One thing to note is that I was careful about keeping track of the RIDs. Several of the existing drivers in the tree seem to just use 0 indiscriminately, and it works because they only use one resource. >> >> For ISA drivers, RID is just a number, best thought of as an index. >> So incrementing here like you've done is the right call. >> >> Warner > > Right, someone (jhb?) explained that to me at the time. My point is that the common practice of just passing in 0 doesn't always DTRT, especially if you're dealing with multiple resources. And in PCI drivers :) But yes, you're correct. I just wanted to state simply the ISA policy: They are numbered 0 to N-1. Warner From owner-freebsd-hackers@freebsd.org Tue Aug 23 22:48:14 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31421BC4E39 for ; Tue, 23 Aug 2016 22:48:14 +0000 (UTC) (envelope-from cse.cem@gmail.com) 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 0EF241340 for ; Tue, 23 Aug 2016 22:48:14 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 0DFA4BC4E38; Tue, 23 Aug 2016 22:48:14 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B617BC4E37 for ; Tue, 23 Aug 2016 22:48:14 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6F8F133E for ; Tue, 23 Aug 2016 22:48:13 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f42.google.com with SMTP id f6so4010538ith.0 for ; Tue, 23 Aug 2016 15:48:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=9ofUtcirVC8NFfJ1SsCf/2jCkwfKZETbu7sa1WhcN6c=; b=EuPZt/jX46ikiB/2a5yIfl8d0fbUaOXryYgSYkuKn7kpVO7sBGqMBhhrqtdIgsr3F8 tJYP8BHBKf2yPRrUoE/ePhcxjULIAWbbWxMhyVTTdc/ccUfqodILOOq4Q4EzvlZ2zJpR khD1sCyQeeeZP+IpgS2zoyifaXCweSuvlt698fW8ZyPSxWYlLzPEhedj41YoRJdmv8OI BWZUKXvY76JXJItrPR7fSGxw2ifkDS+LS0/EyyLKns9HLR2vY5gyPXZsshaxWiF1gxaZ UCuqWeLQUnt3/sVKwTRYRzzHrsqTzCjRXVy6OEfNQoPe2RmoaHqHQX3+LhMS598DjruU llGw== X-Gm-Message-State: AEkoouvxhNYnQfOGtU+EkGMHAwyOH4kkKUa15JSS/naaWDJSQrCDwCwcco8nd+OGqx+hWg== X-Received: by 10.36.43.70 with SMTP id h67mr3174527ita.57.1471986592540; Tue, 23 Aug 2016 14:09:52 -0700 (PDT) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com. [209.85.214.45]) by smtp.gmail.com with ESMTPSA id 192sm10284872itk.17.2016.08.23.14.09.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Aug 2016 14:09:52 -0700 (PDT) Received: by mail-it0-f45.google.com with SMTP id f6so292240ith.0 for ; Tue, 23 Aug 2016 14:09:52 -0700 (PDT) X-Received: by 10.107.28.11 with SMTP id c11mr19356ioc.7.1471986591928; Tue, 23 Aug 2016 14:09:51 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.220.129 with HTTP; Tue, 23 Aug 2016 14:09:51 -0700 (PDT) In-Reply-To: <60cd4f2c-13a8-3fc1-5f5d-c442cafc6e80@metricspace.net> References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> <60cd4f2c-13a8-3fc1-5f5d-c442cafc6e80@metricspace.net> From: Conrad Meyer Date: Tue, 23 Aug 2016 14:09:51 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Info about suspend-to-disk To: Eric McCorkle Cc: Warner Losh , "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 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: , X-List-Received-Date: Tue, 23 Aug 2016 22:48:14 -0000 On Tue, Aug 23, 2016 at 4:41 AM, Eric McCorkle wrote: > My only reservation about loader is that users will likely want the > system to come back up quickly, as if resuming. Dropping them into the > loader menu might not be what they want/expect. If it ends up being > done in loader, it might be worth having a "fast-path" option that skips > the usual menu. > > Actually, the "fast-path" loader option might be a worthwhile feature > generally, for people who just want fast boot times. That exists: autoboot_delay="-1" > Does suspend-to-swap wipe out what's already stored there? Since you > plan on coming back online, you'd want to preserve all contents of swap. > In any case, I could see it failing if there's not enough free space in > swap (which I guess would also be a possibility with suspend-to-file) > > If dump to swap does preserve the contents of swap, it might be better > to do it that way first to work out all the other issues. It wouldn't have to be to an *active* swap partition; the point is, it's just a raw disk device (partition) that supports polled IO. Best, Conrad From owner-freebsd-hackers@freebsd.org Wed Aug 24 06:31:48 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66796BC4BE6 for ; Wed, 24 Aug 2016 06:31:48 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "puchar.net", Issuer "puchar.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B16A1DB0 for ; Wed, 24 Aug 2016 06:31:47 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.14.9) with ESMTPS id u7O6Vh59087956 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 24 Aug 2016 08:31:43 +0200 (CEST) (envelope-from wojtek@puchar.net) Received: from laptop.wojtek.intra (localhost [127.0.0.1]) by laptop.wojtek.intra (8.14.9/8.14.9) with ESMTP id u7O6Vhck005782 for ; Wed, 24 Aug 2016 08:31:43 +0200 (CEST) (envelope-from wojtek@puchar.net) Received: from localhost (wojtek@localhost) by laptop.wojtek.intra (8.14.9/8.14.9/Submit) with ESMTP id u7O6Vbrq005779 for ; Wed, 24 Aug 2016 08:31:38 +0200 (CEST) (envelope-from wojtek@puchar.net) X-Authentication-Warning: laptop.wojtek.intra: wojtek owned process doing -bs Date: Wed, 24 Aug 2016 08:31:37 +0200 (CEST) From: Wojciech Puchar X-X-Sender: wojtek@laptop.wojtek.intra To: freebsd-hackers@freebsd.org Subject: Re: problem with bridging In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (puchar.net [10.0.1.1]); Wed, 24 Aug 2016 08:31:43 +0200 (CEST) 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: , X-List-Received-Date: Wed, 24 Aug 2016 06:31:48 -0000 any help? On Tue, 23 Aug 2016, Wojciech Puchar wrote: > i added my 10Gb/s ethernet port (used as 1Gbit/s actually now) to bridge > interface. > > ix1 is up, when i plug it in, i've got connection properly, but nothing works > just like bridging would not work. > > is anything that should be changed in sysctls or other place ? > > > ix1: flags=8943 metric 0 mtu > 1500 > > options=e400b9 > ether 0c:c4:7a:6e:7e:9f > media: Ethernet autoselect > > > bridge0: flags=8843 metric 0 mtu 1500 > ether 02:75:52:4e:f6:00 > inet 10.0.1.1 netmask 0xffffff00 broadcast 10.0.1.255 > inet 10.0.1.252 netmask 0xffffff00 broadcast 10.0.1.255 > id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 > maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 > root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 > member: ix1 flags=143 > ifmaxaddr 0 port 2 priority 128 path cost 2000 > member: tap6 flags=143 > ifmaxaddr 0 port 14 priority 128 path cost 2000000 > member: tap5 flags=143 > ifmaxaddr 0 port 13 priority 128 path cost 2000000 > member: tap4 flags=143 > ifmaxaddr 0 port 9 priority 128 path cost 2000000 > member: tap3 flags=143 > ifmaxaddr 0 port 8 priority 128 path cost 2000000 > member: tap2 flags=143 > ifmaxaddr 0 port 7 priority 128 path cost 2000000 > member: tap1 flags=143 > ifmaxaddr 0 port 6 priority 128 path cost 2000000 > member: tap0 flags=143 > ifmaxaddr 0 port 5 priority 128 path cost 2000000 > > _______________________________________________ > 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" > > From owner-freebsd-hackers@freebsd.org Wed Aug 24 07:49:25 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8866EBC4E50 for ; Wed, 24 Aug 2016 07:49:25 +0000 (UTC) (envelope-from karu.pruun@gmail.com) Received: from mail-ua0-x22d.google.com (mail-ua0-x22d.google.com [IPv6:2607:f8b0:400c:c08::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FE3F1343 for ; Wed, 24 Aug 2016 07:49:25 +0000 (UTC) (envelope-from karu.pruun@gmail.com) Received: by mail-ua0-x22d.google.com with SMTP id 74so14984307uau.0 for ; Wed, 24 Aug 2016 00:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TrpeLhkOaCUisYzicITcgBmXCLaiTtkgYQl+P4M0S6w=; b=Br+l7nKobKLJGRTVWSQQ+RrjC82V1dtjpn6vUxD9BFEtI9o4WoY9mR22Nb/Nh3ggAv C0u7+DoRxn1YusjvSVfj5L95Ih8GQA88px7fG4doSlS6E3MotURhjCcEpJpCQMWck4S0 7UyaHceqjOKAmIsMUUNDZIQjmN4tKhpKAjck4L6fXH6won/BDGy5w+rKrwZ92hZzTLRs pqwQFs3M4+/cLKrO5cZhUYErOcO23Wobz0hPo9CflDihE68SC8RvisfOxL84g9EX9R3X G6aNT7yKjrtYQBhlWIDDbmAbxz7h7cJHEt8pI3a87S8BNheAFFeOWxvrv4+uL0rbOgCF 49AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TrpeLhkOaCUisYzicITcgBmXCLaiTtkgYQl+P4M0S6w=; b=VXnZt2oTj911qnHk64eeGQ49l3LdB7O0PKwW0LGwzIYjbk5+TyIhrvIT1OmJym+qvo NdHggEPFXDUjs+DtPTdlpvOLC83qT6SXxruY7yA7vHVTIw6zD3oqa9SO+ag6Nkqkb5l3 z7Q/oxqKr4AM89kTMH6dHWeV8ERGJ+dJFRcC4KuPi5YU+SOdEafV7gi5TwemD5ffJWE5 Ub9BclOyo9hInY5d+h2x92G7y8YilXXc7//e/0qJnBf9WEbvCjbUAtJZ6abMPKRV7w0k MLMN8eZt7QAabZYFlyo2+tHtC2mkFpuJyyRVDwVB6vITvqL3/maUG0OIx72TbmDhwjkF tmFQ== X-Gm-Message-State: AEkoouv05D0ksv4BOI20z0U4kYsjdvHH8BlVXlWtN8ugFsEGa8pqmpJEaPnHrUDLzSbuMbc1ucaNgQ2OK1mDsQ== X-Received: by 10.31.170.9 with SMTP id t9mr937353vke.131.1472024964406; Wed, 24 Aug 2016 00:49:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.2.10 with HTTP; Wed, 24 Aug 2016 00:49:23 -0700 (PDT) In-Reply-To: <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com> References: <20A27669-0B16-4199-853F-46D84E876AE9@panasas.com> <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com> From: "karu.pruun" Date: Wed, 24 Aug 2016 10:49:23 +0300 Message-ID: Subject: Re: problem attaching driver at LPC bus To: Ravi Pokala Cc: Warner Losh , "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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: , X-List-Received-Date: Wed, 24 Aug 2016 07:49:25 -0000 On Tue, Aug 23, 2016 at 6:45 PM, Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Warner Losh > Date: 2016-08-23, Tuesday at 08:20 > To: Ravi Pokala > Cc: "freebsd-hackers@freebsd.org" , < > karu.pruun@gmail.com> > Subject: Re: problem attaching driver at LPC bus > > On Tue, Aug 23, 2016 at 9:13 AM, Ravi Pokala wrote: > >> ... > >> > >> One thing to note is that I was careful about keeping track of the > RIDs. Several of the existing drivers in the tree seem to just use 0 > indiscriminately, and it works because they only use one resource. > > > > For ISA drivers, RID is just a number, best thought of as an index. > > So incrementing here like you've done is the right call. > > > > Warner > > Right, someone (jhb?) explained that to me at the time. My point is that > the common practice of just passing in 0 doesn't always DTRT, especially if > you're dealing with multiple resources. > > -Ravi (rpokala@) > > Hi Ravi Thanks for these suggestions. I'll study the spec and try implement this. Question: the XXX_base in bus_set_resource --- did you find this address from the spec? I suppose in my case this is the one I see in the acpi tables, 0x0700. Another question: on my naive thinking, the acpi subsystem scans the acpi tables and populates the entries in the device tree, setting aside the address ranges (IO and mem) for which there is no driver. The handle items in the tree (e.g. \_SB_.PCI0.LPCB.GMUX) look very similar to the ones in the acpi tables. So I thought the driver then later claims these resource using the bus_alloc_resource(). Does this sound like anything that is actually happening? Thanks again Peeter -- From owner-freebsd-hackers@freebsd.org Wed Aug 24 07:58:31 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D45BBC223A for ; Wed, 24 Aug 2016 07:58:31 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00CF61D4C for ; Wed, 24 Aug 2016 07:58:31 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OCE00O00LRDBS00@mr11p00im-asmtp004.me.com> for freebsd-hackers@freebsd.org; Wed, 24 Aug 2016 07:58:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1472025510; bh=ZFifROKAfgVTWMRss+9APQVuR9qfXhT71uVkPFPVwkc=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=XEl0sXwPxu2sf72SXyjNnjosCRxiGQ+IuOSzgVb5wVmn8UNf2wjtrV2tTLZCwPsDg f0EyqxVH8r/qXy+iNgyU3FIXubCGNToVwdT864mIyNESILKXhFny+GZN3+LoPfGyo5 dJaqvaIXmPHrYgodZCISl3k72WQuPS3KmXfrdUWGnSrJfLwGEYESDTMUnsEFnYi4Gg 0EoPKVnlqu9C6TzZ45T7YEZjHmoG1nnBYL8vL9bTKB4MeYso0urom/ywQEAd/MsxRB EjGAPuUR9hlneUo41L94wJQu6QrkiN2JGNTWy8ZesrwUyoB/XpO2l7E1Zss3MLxjTp 61JHbJgPUSLWw== Received: from [192.168.1.4] (c-67-188-225-23.hsd1.ca.comcast.net [67.188.225.23]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OCE0073MM5G9E10@mr11p00im-asmtp004.me.com>; Wed, 24 Aug 2016 07:58:30 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-24_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1608240072 User-Agent: Microsoft-MacOutlook/f.19.0.160817 Date: Wed, 24 Aug 2016 00:58:27 -0700 Subject: Re: problem attaching driver at LPC bus From: Ravi Pokala Sender: "Pokala, Ravi" To: "karu.pruun" Cc: Warner Losh , "freebsd-hackers@freebsd.org" Message-id: Thread-topic: problem attaching driver at LPC bus References: <20A27669-0B16-4199-853F-46D84E876AE9@panasas.com> <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit 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: , X-List-Received-Date: Wed, 24 Aug 2016 07:58:31 -0000 -----Original Message----- From: "karu.pruun" Date: 2016-08-24, Wednesday at 00:49 To: Ravi Pokala Cc: Warner Losh , "freebsd-hackers@freebsd.org" Subject: Re: problem attaching driver at LPC bus > Hi Ravi > > Thanks for these suggestions. I'll study the spec and try implement this. Question: the XXX_base in bus_set_resource --- did you find this address from the spec? I suppose in my case this is the one I see in the acpi tables, 0x0700. Yes, I got them from the specs. For the embedded controller, the chipset spec defined which registers in the bridge to look at, which held the LPC address of the embedded GPIO controller. For the discrete controller, the controller spec documented a default and an alternate LPC address, and the BIOS developers told us which one they used. > Another question: on my naive thinking, the acpi subsystem scans the acpi tables and populates the entries in the device tree, setting aside the address ranges (IO and mem) for which there is no driver. The handle items in the tree (e.g. \_SB_.PCI0.LPCB.GMUX) look very similar to the ones in the acpi tables. So I thought the driver then later claims these resource using the bus_alloc_resource(). Does this sound like anything that is actually happening? I know almost nothing about ACPI, so I'll leave that someone who knows more about it than I do. :-) > > Thanks again > > Peeter Glad to help. -Ravi (rpokala@) From owner-freebsd-hackers@freebsd.org Thu Aug 25 04:55:08 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14352BC361B for ; Thu, 25 Aug 2016 04:55:08 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from know-smtprelay-omc-10.server.virginmedia.net (know-smtprelay-omc-10.server.virginmedia.net [80.0.253.74]) by mx1.freebsd.org (Postfix) with ESMTP id 7BF1F1A7D for ; Thu, 25 Aug 2016 04:55:06 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from [192.168.1.100] ([86.10.211.13]) by know-smtprelay-10-imp with bizsmtp id bGtv1t00z0HtmFq01GtwSe; Thu, 25 Aug 2016 05:53:56 +0100 X-Originating-IP: [86.10.211.13] X-Spam: 0 X-Authority: v=2.1 cv=Ha/pNXw8 c=1 sm=1 tr=0 a=SB7hr1IvJSWWr45F2gQiKw==:117 a=SB7hr1IvJSWWr45F2gQiKw==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=QZam-5MpAAAA:8 a=c4UfU4WNFLURoqdW9w4A:9 a=QEXdDO2ut3YA:10 a=EYKBeT-ksXgA:10 a=a8ySuYoXnTE1t6fLJY6E:22 To: Adrian Chadd , Supervision , FreeBSD Hackers From: Jonathan de Boyne Pollard Subject: Linuxisms in s6 Message-ID: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> Date: Thu, 25 Aug 2016 05:53:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Thu, 25 Aug 2016 04:55:08 -0000 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? From owner-freebsd-hackers@freebsd.org Thu Aug 25 09:56:41 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org 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) 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) 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) Subject: Re: Linuxisms in s6 To: Jonathan de Boyne Pollard , Adrian Chadd , Supervision , FreeBSD Hackers References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> From: Jan Bramkamp Message-ID: Date: Thu, 25 Aug 2016 11:56:37 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Thu, 25 Aug 2016 09:56:41 -0000 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. From owner-freebsd-hackers@freebsd.org Thu Aug 25 15:46:12 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46ABDBC696B for ; Thu, 25 Aug 2016 15:46:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11174199A for ; Thu, 25 Aug 2016 15:46:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x22e.google.com with SMTP id e63so33826466ith.1 for ; Thu, 25 Aug 2016 08:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Oc3VwLH/nlm/gxcPtOA6IzBp8xW2rmhmDoNTu4Vtc7E=; b=U/MY922BBx6+KTR14TMihMpyQ1TmTamHVDRA+OQnLKG7LzmWvY0vLiC9nXCdOL5UJL ef/1wDdCfm/hkhgnctNI2To2UmhtvDaLUSz/KDRLjBBojMgC9AicE1K36CzkdvRiPCqv Obj9a/bqsLH4Tc6D2hDDTnWQrSizc1LsnVrBORMTa5NsYxIErHUhf5xyjLYDphvt/2vX 0lLx3ejZR5uzigvsjVZDuy6X3Y888qgtOTinQrICTwDpBRu+9cZ1sSKGBuLxZA7gYsTJ A4VNOdrSqLZvvSjd+J/CZDzsWVMRPP0GgjJmi63lcTIRV/HVEO+M+qmJ8/Zj+pbsxaxc okbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Oc3VwLH/nlm/gxcPtOA6IzBp8xW2rmhmDoNTu4Vtc7E=; b=T3nUqCyetwPFin3fQNznLwclh3MNnzIV4mavHedZOQk6VaY4Oj0UwHCTrnR5mTzhP1 mrxzV9d6E2p4F6MoIpbaVprQoXokVr2JMo/RqYbtri3gaUNYMgZiAytpwOtpa+zcHfx9 juch/+FysAKV0AwxslOlIUiTk2nA845+21DPjxTt1n1iheUVvKQweDdysTYyc4qViWB2 6h4zv421RUhxlIciWXDmbUh97H/eoh+AwiNJOSHrtOgAy/wKkGqoSlebpfDPOTeyvD/f P2PiIqHFfycWWQrLwaGbkukJAB77IcWXImqHobvKBOJdS+NAS2BNMTA80OtipP79Ii0K mdhg== X-Gm-Message-State: AE9vXwMz7ykyd72wcvdBYQbeb2ujQXUycNYCEHmBXy96Y7QC/Ona0JoREkdQl1sOl6QKlDrnqz0hKhVkFou4aQ== X-Received: by 10.107.144.10 with SMTP id s10mr10738746iod.165.1472139971201; Thu, 25 Aug 2016 08:46:11 -0700 (PDT) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.36.141.129 with HTTP; Thu, 25 Aug 2016 08:46:10 -0700 (PDT) In-Reply-To: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> From: Adrian Chadd Date: Thu, 25 Aug 2016 08:46:10 -0700 X-Google-Sender-Auth: jwDm-0Ca81xRotGkl4pVXuGZHXs Message-ID: Subject: Re: Linuxisms in s6 To: Jonathan de Boyne Pollard Cc: Supervision , FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 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: , X-List-Received-Date: Thu, 25 Aug 2016 15:46:12 -0000 On 24 August 2016 at 21: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? We just had a bunch of fun trying to get it to build right, and the uptime stuff really threw us. It's fine though, I found that s6 may start growing an IPC mechanism so we could possibly do a launchd/jobd style service later (ie to run things upon event changes, like ifup, ifdown, ifcreate, ifdestroy, arbitrary messages, etc) so I may try incorporating it again. :) -adrian From owner-freebsd-hackers@freebsd.org Thu Aug 25 19:48:25 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59C19BC6873 for ; Thu, 25 Aug 2016 19:48:25 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "0x20.net", Issuer "StartCom Class 1 DV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1FB62113A; Thu, 25 Aug 2016 19:48:24 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id B7B606E0082; Thu, 25 Aug 2016 21:48:21 +0200 (CEST) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.7/8.14.7) with ESMTP id u7PJmLAF033943; Thu, 25 Aug 2016 21:48:21 +0200 (CEST) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.7/8.14.7/Submit) id u7PJmKEk032882; Thu, 25 Aug 2016 21:48:20 +0200 (CEST) (envelope-from lars) Date: Thu, 25 Aug 2016 21:48:20 +0200 From: Lars Engels To: Adrian Chadd Cc: Jonathan de Boyne Pollard , Supervision , FreeBSD Hackers Subject: Re: Linuxisms in s6 Message-ID: <20160825194820.GI92256@e-new.0x20.net> References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9iyR+p8Z2cn535Lj" Content-Disposition: inline In-Reply-To: X-Editor: VIM - Vi IMproved 7.4 X-Operation-System: FreeBSD 8.4-RELEASE-p23 User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailman-Approved-At: Thu, 25 Aug 2016 20:11:52 +0000 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: , X-List-Received-Date: Thu, 25 Aug 2016 19:48:25 -0000 --9iyR+p8Z2cn535Lj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 25, 2016 at 08:46:10AM -0700, Adrian Chadd wrote: > On 24 August 2016 at 21:53, Jonathan de Boyne Pollard > wrote: > > http://adrianchadd.blogspot.co.uk/2016/08/freebsd-on-tiny-system-whats-= missing.html?showComment=3D1471236502051#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? >=20 > We just had a bunch of fun trying to get it to build right, and the > uptime stuff really threw us. >=20 > It's fine though, I found that s6 may start growing an IPC mechanism > so we could possibly do a launchd/jobd style service later (ie to run > things upon event changes, like ifup, ifdown, ifcreate, ifdestroy, > arbitrary messages, etc) so I may try incorporating it again. :) >=20 Can't this be done with devd?=20 --9iyR+p8Z2cn535Lj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJXv0uDXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RjQwMDE3RTRERjUzMTI1N0FGRTUxNDlF NTRDQjM3RDNBMDg5RDZEAAoJEOVMs306CJ1tuBAH/31yXT1XuIS+ZLS/5o5w1OdP w+UYHz6+6BaaLNyp5YlMR8hodeXkzUr0uiaDLJUijKuPYCHt2DfhWs8lDyeG/pub 16MFffeSetsvmSwvo+/grONzEHU+BSIuvgvF3F/4aZWvheW31GCAXNqxbQPrbYqf K2DVeFgh1Kb8vZsfFjTCPHm7rcYJ71NH+smXZ3Y91KFHWRc3vIYH5R/a3/AUKmbw TVtXDT7Fv8f2EJYsNBFa1Jcb+Nlg0GZvkqyUKPUylMUrwqennyq1H5SH3dlIl3x1 THQ/E0Uckuh6Ed5cEa73Pzepf8lIZRwXvO2l442PMqisixbfAbUgDwpZbmU6BDs= =KXRV -----END PGP SIGNATURE----- --9iyR+p8Z2cn535Lj-- From owner-freebsd-hackers@freebsd.org Thu Aug 25 21:08:57 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF39BBC6293 for ; Thu, 25 Aug 2016 21:08:57 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97D6F1C87 for ; Thu, 25 Aug 2016 21:08:57 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x243.google.com with SMTP id f6so7250577ith.2 for ; Thu, 25 Aug 2016 14:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fUtLxft7k3Eb9zoOMTochzyVjzf07/7VgAx1mAQM+Ak=; b=eIjZohW9kk7jLu+kfq0HXRKp5Zvlmibhb+lXZP/RmpTekWb2O0IT3MItzaK/5AVUB2 U7KIWuCglECT6IPt7ryBgQAmRjGLL3EOUsCj/+BxJvQJtaD2q6YWOgGQy2/F3E/oaB+t lf3QRyqdK2+ONFE6jAlw8slZ0dsHta0Prjl/iePcgwd0O0MlLRCC4ymQZ2T7HyuWi7VD MyPOmnSFVCdEVRQbbGpdz8oOsz+WoN/NMPZwFgre+KhzcO+JhnQp6NMbgaKIxAzC7Dml hzhYBev+UKH4aZMxVfrHYtF1nx5PXawdlJ0mK+HUt6In/GcKmQavtQolLqRM3hO18Frc ACqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=fUtLxft7k3Eb9zoOMTochzyVjzf07/7VgAx1mAQM+Ak=; b=MLi+hGJpYRmJF6oe8Oq+OSP0+ExjEWww9wpVXwvQKR+r4gBfLPFHovtxx7bNt8/ut2 wlCgMxpUXZ2HhaIFuaaXtbRD5XmltE3UGGrgHXlKSaOwJJnrS/VtrW4jtXeNMFlqFxSI gOw7ZtLu0AV9kPN8HwmdDwiHpQj0MSo+epEBD3SQ7tZI6jtgbkwXY5XIfx/FZjkpyGaL EUiLwKiM7IrqbxinHIi8zh2BbtxrFTufwlNNGJioFuiEODylY9Y6dMjrvjeZle5QSYDZ 7tV0gNTC+qysYs0Mj9dNf8lh7+ws3yZWr3t9MBfJIM69ilqtD/TBkde9cWoPuHv77bhH ZiYA== X-Gm-Message-State: AEkooutF38d6qjTjfzXBhgm0EPOPs4ISsh4S/QteuUmq9r3xORE2NDPGw34MPg632BuKgIiGFTIjQmpqHNALoA== X-Received: by 10.107.53.163 with SMTP id k35mr12960777ioo.75.1472159337012; Thu, 25 Aug 2016 14:08:57 -0700 (PDT) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.36.141.129 with HTTP; Thu, 25 Aug 2016 14:08:56 -0700 (PDT) In-Reply-To: <20160825194820.GI92256@e-new.0x20.net> References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <20160825194820.GI92256@e-new.0x20.net> From: Adrian Chadd Date: Thu, 25 Aug 2016 14:08:56 -0700 X-Google-Sender-Auth: i2ERPCxfh44y0iEmsTV13K4yCpM Message-ID: Subject: Re: Linuxisms in s6 To: Lars Engels Cc: Jonathan de Boyne Pollard , Supervision , FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 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: , X-List-Received-Date: Thu, 25 Aug 2016 21:08:57 -0000 On 25 August 2016 at 12:48, Lars Engels wrote: > On Thu, Aug 25, 2016 at 08:46:10AM -0700, Adrian Chadd wrote: >> On 24 August 2016 at 21: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? >> >> We just had a bunch of fun trying to get it to build right, and the >> uptime stuff really threw us. >> >> It's fine though, I found that s6 may start growing an IPC mechanism >> so we could possibly do a launchd/jobd style service later (ie to run >> things upon event changes, like ifup, ifdown, ifcreate, ifdestroy, >> arbitrary messages, etc) so I may try incorporating it again. :) >> > > Can't this be done with devd? Sure, but I'm looking for something more generic than just devd. Like, notifications about events like "default route is up" can be done by sniffing the rtsock, but notifications like "ntpdate has updated the date, we can now do crypto services" doesn't happen there right now. -adrian From owner-freebsd-hackers@freebsd.org Thu Aug 25 21:13:20 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0727ABC6496 for ; Thu, 25 Aug 2016 21:13:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3F5F11D3 for ; Thu, 25 Aug 2016 21:13:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x230.google.com with SMTP id x131so296330418ite.0 for ; Thu, 25 Aug 2016 14:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=79w5fCyUfm4wF8ml5pMeIpg6cubu9R1GnYxM5Pya1tw=; b=XjF744g09RuRydpmN/C2+ZXE2xupHkbUDcZpaRv7cbYYLMzlABFOy00U2K/uHTUUXC tjkAHo2bEKAx10W/F1GD7Kj72TWOf7ZpSUFEKfeVA21kHIRv+aR4iDWJ4wxs1L/Emm0x DKxW9JrTGQYtaryKsxUabV0qpDEZiijES3+V9K28V/IXASCeh7kuQM11gQ3snC8VkZHi BwYOSihGPvBHYkp8Ei7yufWOkIZdiFMgsWf1uSwO/ous7PSD+KYT0/MwcWDsvI8MEoFK s7IIAFpxvEkb/+Jvunk6gbL2hN47QIcpsCydBcYtsYYx/Fq9/vhLKz70it0yH09dMlXm WU+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=79w5fCyUfm4wF8ml5pMeIpg6cubu9R1GnYxM5Pya1tw=; b=UK4RX5kc4vITw5QQrUHHCP0A6PMpx/0cwiIKFGRTtcHZHPAgtiahOdHeU73NWE3Z/A lB72JpdDzQPLdAYRnBca2GjNfgWo9DvIdg58mU5sT8rPxmGqap3JHJBf/fvhvKkYgmr9 fj3xVGYsNnzhnWlLMJu6cX8Qgz17Un28r+o62zQKkL7pHWq643IYUwlvQUsI434rl4QX XMe0Nqlq1/AgVXKOA59caxZZPnqlCHXBTmNZ/FDw4cQmsWGHYme6IvK6bednwv8WmnbQ JJXj1pmD83pvvUl+TZpWLbZnXkuKnxZuEK6oXT5nBc0ZaFx8bOnwgkK8Kb6yPXzE3rH8 XXOA== X-Gm-Message-State: AE9vXwMranzybp1VuiCmQaTFEew+pBGphb/HHGsyU7Iw1/rMfFo+8KjvNiyAjAj0J2GM1R/dJ9U1Z1j9YTF6fg== X-Received: by 10.107.21.134 with SMTP id 128mr12247333iov.59.1472159599275; Thu, 25 Aug 2016 14:13:19 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Thu, 25 Aug 2016 14:13:18 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <20160825194820.GI92256@e-new.0x20.net> From: Warner Losh Date: Thu, 25 Aug 2016 15:13:18 -0600 X-Google-Sender-Auth: Ak6UPw4CyJR37RxmiZRD9Vu4MIM Message-ID: Subject: Re: Linuxisms in s6 To: Adrian Chadd Cc: Lars Engels , Supervision , Jonathan de Boyne Pollard , FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 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: , X-List-Received-Date: Thu, 25 Aug 2016 21:13:20 -0000 On Thu, Aug 25, 2016 at 3:08 PM, Adrian Chadd wrote: > On 25 August 2016 at 12:48, Lars Engels wrote: >> On Thu, Aug 25, 2016 at 08:46:10AM -0700, Adrian Chadd wrote: >>> On 24 August 2016 at 21: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? >>> >>> We just had a bunch of fun trying to get it to build right, and the >>> uptime stuff really threw us. >>> >>> It's fine though, I found that s6 may start growing an IPC mechanism >>> so we could possibly do a launchd/jobd style service later (ie to run >>> things upon event changes, like ifup, ifdown, ifcreate, ifdestroy, >>> arbitrary messages, etc) so I may try incorporating it again. :) >>> >> >> Can't this be done with devd? > > Sure, but I'm looking for something more generic than just devd. Like, > notifications about events like "default route is up" can be done by > sniffing the rtsock, but notifications like "ntpdate has updated the > date, we can now do crypto services" doesn't happen there right now. devd was never intended to be limited to just device events from the kernel. It has grown beyond that, and could easily grow to cope with routing events and other notifications. No need to reinvent everything for that. What devd doesn't do is launchd / job control. That would be a whole new kettle of fish for it, and one for which it may be ill suited. Though viewed in the right way, it's all just a series of notifications: This service is up, this is down, user wants to start this other one, etc, so maybe it wouldn't so bad... Warner From owner-freebsd-hackers@freebsd.org Thu Aug 25 21:17:23 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CC58BC65AE for ; Thu, 25 Aug 2016 21:17:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 637EE1608 for ; Thu, 25 Aug 2016 21:17:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x243.google.com with SMTP id e63so7321473ith.1 for ; Thu, 25 Aug 2016 14:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cUIn/dBkWlGGm3JPbPw0GK4hSRmhOI4SD2OwVXyFp3w=; b=l7IBhSzVCXBQmwXmclnlczwcihV+FY07ecZeR1S+OAmXbfjEO6U9uPcDQZ3DfrPp85 0I1yofPzj49iAagWUTtJ/b/FU0P6ONdIAOp9+s3/zlcZ3M+InxbLRzRMFsde3gxdu1ZM D9TR8k3kGqqX5YzHWJ7sND6hxyKDGpwFnqpw2s6ZfCbjrbtDtdfBvmoRFP112tsFHTTJ auNpLf8uK/HiOVdEftOXF1VJJsfKqf1NedGJ1mOxa7KpEf4NOecTsSaVxBaTyft94Fjb /npi7vrd50w3cTjTVwCjPIkRfSIOH2KotQpBK9o7j6uOOKZi1EWExCr6jYxV36ZdNjar DrAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cUIn/dBkWlGGm3JPbPw0GK4hSRmhOI4SD2OwVXyFp3w=; b=llKgI+H2l9M3+Xn4blx20dTUkbR1Y6s9WL4c83kgLK1iQqlB5J7/HI+nZE4mYibcQM 78M1mjMvZ2DOKwKBZbjL3W+m4v81B0FccXgUIxi3SMHrryee2LTHFTTO2+yas2qhDeOa 6FWWfbKSfwRIBU5EU6mj0F57IJyw22Hy7ppO8rW+issJprnw7CyDzoVrf7puqe5iGTEW wA056oBOSppMbi0BFZBC1gsyo/pK9iOurG2asqBmRVicmbDM5exLTlGkhVI2ZW+gw+zp ZIut2AZEj6hNHNO5QyRPoTldM9Xj5MJOR22ZRQfYJpAAHs5kZea9dmBDX8yi/YayjXEi z6TQ== X-Gm-Message-State: AE9vXwPXvQlvyLUZtUcC/pdTolcuYYDNyXafD/LDf6/Ag+fDjpjASKQVWLdAZRrnwcpVB1ma9GibYACBy0Go8A== X-Received: by 10.36.242.68 with SMTP id j65mr7225720ith.25.1472159842837; Thu, 25 Aug 2016 14:17:22 -0700 (PDT) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.36.141.129 with HTTP; Thu, 25 Aug 2016 14:17:21 -0700 (PDT) In-Reply-To: References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <20160825194820.GI92256@e-new.0x20.net> From: Adrian Chadd Date: Thu, 25 Aug 2016 14:17:21 -0700 X-Google-Sender-Auth: 9vw88eCSlq6Wfn_QWbN80t0P48w Message-ID: Subject: Re: Linuxisms in s6 To: Warner Losh Cc: Lars Engels , Supervision , Jonathan de Boyne Pollard , FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 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: , X-List-Received-Date: Thu, 25 Aug 2016 21:17:23 -0000 On 25 August 2016 at 14:13, Warner Losh wrote: > On Thu, Aug 25, 2016 at 3:08 PM, Adrian Chadd wrote: >> On 25 August 2016 at 12:48, Lars Engels wrote: >>> On Thu, Aug 25, 2016 at 08:46:10AM -0700, Adrian Chadd wrote: >>>> On 24 August 2016 at 21: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? >>>> >>>> We just had a bunch of fun trying to get it to build right, and the >>>> uptime stuff really threw us. >>>> >>>> It's fine though, I found that s6 may start growing an IPC mechanism >>>> so we could possibly do a launchd/jobd style service later (ie to run >>>> things upon event changes, like ifup, ifdown, ifcreate, ifdestroy, >>>> arbitrary messages, etc) so I may try incorporating it again. :) >>>> >>> >>> Can't this be done with devd? >> >> Sure, but I'm looking for something more generic than just devd. Like, >> notifications about events like "default route is up" can be done by >> sniffing the rtsock, but notifications like "ntpdate has updated the >> date, we can now do crypto services" doesn't happen there right now. > > devd was never intended to be limited to just device events from the > kernel. It has grown beyond that, and could easily grow to cope with > routing events and other notifications. No need to reinvent everything > for that. Right. I don't want to reinvent the wheel if it can be avoided. But there are other things that want to produce and consume events. eg, openvpn bringing up a VPN triggering possible ipfw rule changes. Or openvpn coming down triggering other ipfw rule changes. > What devd doesn't do is launchd / job control. That would be a whole > new kettle of fish for it, and one for which it may be ill suited. Though > viewed in the right way, it's all just a series of notifications: This service > is up, this is down, user wants to start this other one, etc, so maybe > it wouldn't so bad... Well, ideally the jobd would sit on the message bus and take commands to do things. Like dbus and udevd did in linux, before systemd steamrolled over them. But then if I suggest we need a message bus daemon up and going so arbitrary system pieces could talk to other system pieces, I'll likely be shouted at. But not by jkh. He'd likely be "YOURE ONLY JUST GETTING AROUND TO THIS NOW?" and laugh a lot. (jkh - please come to the next bafug so we can talk shop..) -a From owner-freebsd-hackers@freebsd.org Fri Aug 26 01:11:50 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B7B3BC5561 for ; Fri, 26 Aug 2016 01:11:50 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qt0-x22b.google.com (mail-qt0-x22b.google.com [IPv6:2607:f8b0:400d:c0d::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47F981E4B for ; Fri, 26 Aug 2016 01:11:50 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qt0-x22b.google.com with SMTP id 52so31337409qtq.3 for ; Thu, 25 Aug 2016 18:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=kVBNtKA+hLqaSuFT4JMJI/F1Z74pnQYN28i9O/tsBdg=; b=JS9SBhRqqXFobOllbgCPtxnhhIsD5S1x6OypYF/veFWtXTyGatLlenlyUKUvMWG+h3 MMUsrAVxssarsynu4UfwJMI/E52qvd1bq+U2x5pa7TYF/C1YfQ8bFstHiRkEQTj/wfIy A9GiHPk/KNK7qT+7VhVv0r3LRrWfPDLMU1W+U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=kVBNtKA+hLqaSuFT4JMJI/F1Z74pnQYN28i9O/tsBdg=; b=a9dzBSbS5Ah4qHc3BZTiMZaOvFAa8E5CurL2xMGLvnr6IFVleR9Ca8TBKpggeBnI2+ lxxaa8Hga2WJsOgh7TlnO+2eH18M4EWtiqIRMZBKveduGC6VJhiLcUhnHI6nSJ5h+xQQ sEs5g3QMgwXL5FVrIvvjzOGdz9l9TYP59VBpeYCTMjaNS0AEVsmjntrnZ8yOo8qAC40A VZifV54VYMpz6KYJHJiLjmVsu+rlVqyw/h/bm1AiwTuSW6M6z1U9b/U191CtgTJtY4+H bREtaCI9LmMcQ+wLp8mE8o0krPjWj4DKkHCFd+lhTQoUONm8RUHFFPynwQ9qP81iArWC QhCQ== X-Gm-Message-State: AE9vXwPUJKh553MXodLYYk/s1p0ojfIoAvyewzZ0di9EMaGXWunmuj/Wr1PCFtcjkYt0Sw== X-Received: by 10.237.41.225 with SMTP id o88mr563965qtd.18.1472173909224; Thu, 25 Aug 2016 18:11:49 -0700 (PDT) Received: from [192.168.0.11] ([187.60.94.34]) by smtp.googlemail.com with ESMTPSA id w10sm9070611qtc.28.2016.08.25.18.11.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Aug 2016 18:11:48 -0700 (PDT) To: "freebsd-hackers@freebsd.org" From: =?UTF-8?B?T3RhY8OtbGlv?= Subject: urtwn0: ieee80211_crypto_encap returns NULL Message-ID: <156f5963-ee7c-4c65-8fb9-fb6cbcfab42b@bsd.com.br> Date: Thu, 25 Aug 2016 22:11:44 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Fri, 26 Aug 2016 01:11:50 -0000 I'm get instability when using my beaglebone black to transmit video by wifi. The urtwn randomly disconnects and this time I got this error: Network is down urtwn0: ieee80211_crypto_encap returns NULL. urtwn0: ieee80211_crypto_encap returns NULL. urtwn0: ieee80211_crypto_encap returns NULL. urtwn0: ieee80211_crypto_encap returns NULL. urtwn0: ieee80211_crypto_encap returns NULL. I'm using FreeBSD 11.0-BETA4 #0 r303242M []'s -Otacilio From owner-freebsd-hackers@freebsd.org Fri Aug 26 01:28:42 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81C61BC5B7A for ; Fri, 26 Aug 2016 01:28:42 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4424C19B4 for ; Fri, 26 Aug 2016 01:28:41 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qk0-x232.google.com with SMTP id z190so63513611qkc.0 for ; Thu, 25 Aug 2016 18:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=UNihwKVDGmMwMRiZE0CxYwOkkEAgSm6VxxH55xSzo7o=; b=Lg1VjBeJliz5xMFQTcb8GX5fJ9tGhDACWfxxalJ6Lyu7u4liwu2DIfZ0wfMpNF3taE ZxrJvzkqS/eOclGsb4jYI0Z0a2aHZdbf8AQ6eZfSOX9+NT50gCIm7dVaconuofNtuGU6 TVkHkYXSpMZQ4mbnOVdYjm1O4PV8U82ff0FV4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=UNihwKVDGmMwMRiZE0CxYwOkkEAgSm6VxxH55xSzo7o=; b=OAMxOT9POl7LpCpNREHfCQ4CPmJpE7OjoA5X+38iiiCp6vJfuGRewDNoFCCD3Tl0S+ Lp54uj0SU6ebwqAR186ep4Xwvrwh5XlqSXc84RFLQ1gV/g8yaedQrs7o2Otl0QlQvo/o RqF6ShTUBvVcXckUBGU+iVqBTlpAloyfCE+El5RHzoceZu+QWP12kODj7jwa61VGwD25 7VKHVR5Rn4kuBa2tXDzXX1bGSvqT4Ew1XnyEVqwiYfNo/WKsjwNMbZ6d3bhLy3U2QbIX P6CYhoSMD7XJH3sCeMjyUnfO7GRbzLn/8iauFyQys5wmuB+6X4RAggjNGpLwMbmQRGUp U8WQ== X-Gm-Message-State: AE9vXwNTB81JZ7U0pLv53C3AXLnNhb1CFU29LmebHMJSSWjnkgqR3FCeuN3ciqwfweB/pg== X-Received: by 10.55.134.199 with SMTP id i190mr502637qkd.195.1472174920765; Thu, 25 Aug 2016 18:28:40 -0700 (PDT) Received: from [192.168.0.11] ([187.60.94.34]) by smtp.googlemail.com with ESMTPSA id 133sm9104060qkf.33.2016.08.25.18.28.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Aug 2016 18:28:40 -0700 (PDT) Subject: Re: urtwn0: ieee80211_crypto_encap returns NULL To: Adrian Chadd References: <156f5963-ee7c-4c65-8fb9-fb6cbcfab42b@bsd.com.br> Cc: "freebsd-hackers@freebsd.org" From: =?UTF-8?B?T3RhY8OtbGlv?= Message-ID: <8f453d0d-ac34-f6c7-9fa7-5fd942dae92a@bsd.com.br> Date: Thu, 25 Aug 2016 22:28:35 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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: , X-List-Received-Date: Fri, 26 Aug 2016 01:28:42 -0000 Hi Adrian No others messages before this error. The relevant fact is that I'm using this dongle on a USB hub with my webcam. This configuration works fine on my notebook, but when using it on my beaglebone I'm facing lots of "Network is down" some times or webcam freezes other times. I suspect about some instability in USB drivers but can't affirm. []'s -Otacilio Em 25/08/2016 22:20, Adrian Chadd escreveu: > hi, > > Hm, that shouldn't happen unless you're low on memory? I'd have to check. > > What's said before it disconnects? > > > > -adrian > > > On 25 August 2016 at 18:11, Otacílio wrote: >> I'm get instability when using my beaglebone black to transmit video by >> wifi. The urtwn randomly disconnects and this time I got this error: >> >> Network is down >> urtwn0: ieee80211_crypto_encap returns NULL. >> urtwn0: ieee80211_crypto_encap returns NULL. >> urtwn0: ieee80211_crypto_encap returns NULL. >> urtwn0: ieee80211_crypto_encap returns NULL. >> urtwn0: ieee80211_crypto_encap returns NULL. >> >> I'm using FreeBSD 11.0-BETA4 #0 r303242M >> >> >> []'s >> >> -Otacilio >> >> >> _______________________________________________ >> 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" From owner-freebsd-hackers@freebsd.org Fri Aug 26 01:20:05 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0024BC58DD for ; Fri, 26 Aug 2016 01:20:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A419128E for ; Fri, 26 Aug 2016 01:20:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x230.google.com with SMTP id x131so305286672ite.0 for ; Thu, 25 Aug 2016 18:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=GX4L8PKucGqHYwodZnKVo7zrL73IhpIGbiw0Rm46SXs=; b=D0Lp2j80GBdqytSj5+Mbu5LdK1JM5u/VlfwOewO7Md1NO0EL6s+2gQLQ8Vjv4oYu6s LGegUeFAvFqPdmDXTrFrX/tEyjoK1VmvRl2eREtKJPMDHZCV8RjxQXFk+K/WJwpWjigu 5u/lpNeYH62CYF4Lgl1ihs+FjRWubQdqbUjTUUVmRFyWEtbvojA6McYOT3iFGTnJtdSs dRY/QKSd3H29uJQ1Ut5HyyydJ/5SeUr6j/78g2OnKOc1NNaw5T180PdBAy3nWFuQBP8Y fuV7zCayOX71xwblxM3blvUGPwB/EbdL69d/nwFZufU3rWNA3suS/gVlTlt2iBZzBk0r mf9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=GX4L8PKucGqHYwodZnKVo7zrL73IhpIGbiw0Rm46SXs=; b=EJTERZyEj2JeBYwqUkbLvBwMukEd7WtyRRED4OAFrvr36N8cILV/cSlTzkPgJGsTlq 6H1E4qltIQ2EGNpgsenRi5th3DLv5Xh5JIF6MIaSBtXqq1V91vI9i/IBCbY0tfgLq00m 1QNSVoFTSYE8X5PyVrUqULXj7tLN5DAfd5wZg+u2WgHRHHDkrgtOf2sxBMhfLfjOOpWf BOZK7//8BUWrCUVSwvXMGvLhl/SDpHvopKtgUTsoY5kgjc3jDGoLjBqn8ZkCpNs1fbj4 yAJyU14wqRRQ5ync5sExaBCx0WMAmMs9w9dCouTBHM6ZYqddgCYHhIwVvvmjCgEYhkWa BKEw== X-Gm-Message-State: AEkoousI5TwnAYjt7g3A/r4sv7yH4ezog0kGMExnn3O8vW+HXWdrtHOplmzXna/LxS6IZFTr9D+01hZQPmQF0Q== X-Received: by 10.36.150.70 with SMTP id z67mr8138628itd.80.1472174404931; Thu, 25 Aug 2016 18:20:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.141.129 with HTTP; Thu, 25 Aug 2016 18:20:04 -0700 (PDT) In-Reply-To: <156f5963-ee7c-4c65-8fb9-fb6cbcfab42b@bsd.com.br> References: <156f5963-ee7c-4c65-8fb9-fb6cbcfab42b@bsd.com.br> From: Adrian Chadd Date: Thu, 25 Aug 2016 18:20:04 -0700 Message-ID: Subject: Re: urtwn0: ieee80211_crypto_encap returns NULL To: =?UTF-8?B?T3RhY8OtbGlv?= Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 26 Aug 2016 01:35:14 +0000 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: , X-List-Received-Date: Fri, 26 Aug 2016 01:20:05 -0000 hi, Hm, that shouldn't happen unless you're low on memory? I'd have to check. What's said before it disconnects? -adrian On 25 August 2016 at 18:11, Otac=C3=ADlio wrote: > I'm get instability when using my beaglebone black to transmit video by > wifi. The urtwn randomly disconnects and this time I got this error: > > Network is down > urtwn0: ieee80211_crypto_encap returns NULL. > urtwn0: ieee80211_crypto_encap returns NULL. > urtwn0: ieee80211_crypto_encap returns NULL. > urtwn0: ieee80211_crypto_encap returns NULL. > urtwn0: ieee80211_crypto_encap returns NULL. > > I'm using FreeBSD 11.0-BETA4 #0 r303242M > > > []'s > > -Otacilio > > > _______________________________________________ > 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= " From owner-freebsd-hackers@freebsd.org Fri Aug 26 10:45:00 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D9BCA94E31 for ; Fri, 26 Aug 2016 10:45:00 +0000 (UTC) (envelope-from crest@rlwinm.de) 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 C574B7B; Fri, 26 Aug 2016 10:44:59 +0000 (UTC) (envelope-from crest@rlwinm.de) 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 ECDA410001; Fri, 26 Aug 2016 12:44:56 +0200 (CEST) Subject: Re: Linuxisms in s6 To: Adrian Chadd , Warner Losh References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <20160825194820.GI92256@e-new.0x20.net> Cc: Supervision , Jonathan de Boyne Pollard , Lars Engels , FreeBSD Hackers From: Jan Bramkamp Message-ID: Date: Fri, 26 Aug 2016 12:44:56 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Fri, 26 Aug 2016 10:45:00 -0000 On 25/08/16 23:17, Adrian Chadd wrote: > On 25 August 2016 at 14:13, Warner Losh wrote: >> On Thu, Aug 25, 2016 at 3:08 PM, Adrian Chadd wrote: >>> On 25 August 2016 at 12:48, Lars Engels wrote: >>>> On Thu, Aug 25, 2016 at 08:46:10AM -0700, Adrian Chadd wrote: >>>>> On 24 August 2016 at 21: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? >>>>> >>>>> We just had a bunch of fun trying to get it to build right, and the >>>>> uptime stuff really threw us. >>>>> >>>>> It's fine though, I found that s6 may start growing an IPC mechanism >>>>> so we could possibly do a launchd/jobd style service later (ie to run >>>>> things upon event changes, like ifup, ifdown, ifcreate, ifdestroy, >>>>> arbitrary messages, etc) so I may try incorporating it again. :) >>>>> >>>> >>>> Can't this be done with devd? >>> >>> Sure, but I'm looking for something more generic than just devd. Like, >>> notifications about events like "default route is up" can be done by >>> sniffing the rtsock, but notifications like "ntpdate has updated the >>> date, we can now do crypto services" doesn't happen there right now. >> >> devd was never intended to be limited to just device events from the >> kernel. It has grown beyond that, and could easily grow to cope with >> routing events and other notifications. No need to reinvent everything >> for that. > > Right. I don't want to reinvent the wheel if it can be avoided. Afaik devd is limited handling events reported by the kernel on /etc/devctl. There is no way to inject events into arbitrary events from userspace into devd (no ptrace hacks don't count). > But there are other things that want to produce and consume events. > eg, openvpn bringing up a VPN triggering possible ipfw rule changes. > Or openvpn coming down triggering other ipfw rule changes. FreeBSD offers several IPC APIs but non of them can implemented reliable multicast as this would require an unbounded journal in stable memory. For most use-cases reliable notification of the current state is enough. Instead of reliably multicasting each message to each recipient just send each observer the latest state of each observed value e.g. in your OpenVPN example the IPFW wrapper doesn't care how many time the tunnel flapped. The user just wants the right firewall configuration for his current network environment. He doesn't want to replay every change on the way. In macOS has notifyd offers this service. The optimizations in notifyd make it too large to just import its services into an init process, but having a simpler reliable notification mechanism early would be useful. >> What devd doesn't do is launchd / job control. That would be a whole >> new kettle of fish for it, and one for which it may be ill suited. Though >> viewed in the right way, it's all just a series of notifications: This service >> is up, this is down, user wants to start this other one, etc, so maybe >> it wouldn't so bad... > > Well, ideally the jobd would sit on the message bus and take commands > to do things. Like dbus and udevd did in linux, before systemd > steamrolled over them. But then if I suggest we need a message bus > daemon up and going so arbitrary system pieces could talk to other > system pieces, I'll likely be shouted at. > > But not by jkh. He'd likely be "YOURE ONLY JUST GETTING AROUND TO THIS > NOW?" and laugh a lot. > > (jkh - please come to the next bafug so we can talk shop..) Process spawning and supervision should be separate from the policy engine(s) as the process supervision graph should be a tree rooted in pid 1, but the user might want to run multiple rule/policy engines. An init process should just offer the required mechanisms and nothing more. Convenient policies can be implemented on top of those mechanisms. For my own init system I'm still not sure if the init process should track services and their dependencies at all or just processes and keep the concept of services and dependencies in a service management process instead of the init process. From owner-freebsd-hackers@freebsd.org Fri Aug 26 14:11:45 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E7ECB71353 for ; Fri, 26 Aug 2016 14:11:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 281B8CB8 for ; Fri, 26 Aug 2016 14:11:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22f.google.com with SMTP id d65so27111774ith.0 for ; Fri, 26 Aug 2016 07:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=GYf2Mkb9LHaD3O5mGfMjOnPj7qD/8E2rzSWQLM9yjtI=; b=DhyCcCW3s5RnMzjPZu5fMuroCFiCUlY1mch4ywiOYLaDrJl5veqo6d6RWJl6bd/kvQ 5Jvrj6/Q8QzVyi/1Pb9vNYgDXImRQBjLxUiBKT+zgq+Z4QcQAPsYe/q2R9kg4exJnmkw DMKwWub5ggMytEJHPLaB53HRLeCIE5i+kYTm43+4EBjur9S1zq4hRF2rIB8hd0EQBKqA MCx2zAXoarupW9WO2GAHoa3nLiNrMaxshMylk/UK673+ep2KO3yXAVhBh4PSU1oWkawv 04uGrNqsRcNfEEqeB+XEeBBsle7cEA2ciGE2C1pk18CfYzZC85UWH8xNvnKEzK7cAAE3 dSGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=GYf2Mkb9LHaD3O5mGfMjOnPj7qD/8E2rzSWQLM9yjtI=; b=OTqXC/v2XwBJroQJC671hDgWFih7fhMLZLp6hOo30cuM/qrOhzMopMfBanZz8kBv2x by5nvC9kWdZACENEeMhcTb1PebB49z8T108KrdPoX/oJ9ShKLAV5B2yoFbqqfMImb+yk OyMLXrU9/zWwCDY3zq6WyicFpzmibZ2hxnWwMFmabijAyAsbStCnywWimwTaJVAgStl4 MypKU1iRljvYSErPqqpA6TWJll4YUkdq+3t46MdWmk3WF3SaeTkYbwftN250bTOmtXM5 vvHOU//Ope2U1saTBGZB8192Lf6zpBl+0zcAkAUI/0lNSlxf88TK2R1YsT0J6n4M2HKu mBWQ== X-Gm-Message-State: AE9vXwNNqzOz54BylnMEbN8oAtQfASqHOfiyjPL0Xc7wLi4Z3qrFhVBlhgV/bGcaPJ4ZFLC/tVkusK6XwHfWcw== X-Received: by 10.107.21.134 with SMTP id 128mr4154138iov.59.1472220704498; Fri, 26 Aug 2016 07:11:44 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Fri, 26 Aug 2016 07:11:43 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <20160825194820.GI92256@e-new.0x20.net> From: Warner Losh Date: Fri, 26 Aug 2016 08:11:43 -0600 X-Google-Sender-Auth: JpaXLBh-YRese_orewIbrlEKJ7s Message-ID: Subject: Re: Linuxisms in s6 To: Jan Bramkamp Cc: Adrian Chadd , Supervision , Jonathan de Boyne Pollard , Lars Engels , FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 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: , X-List-Received-Date: Fri, 26 Aug 2016 14:11:45 -0000 On Fri, Aug 26, 2016 at 4:44 AM, Jan Bramkamp wrote: > On 25/08/16 23:17, Adrian Chadd wrote: >> >> On 25 August 2016 at 14:13, Warner Losh wrote: >>> >>> On Thu, Aug 25, 2016 at 3:08 PM, Adrian Chadd wrote: >>>> >>>> On 25 August 2016 at 12:48, Lars Engels wrote: >>>>> >>>>> On Thu, Aug 25, 2016 at 08:46:10AM -0700, Adrian Chadd wrote: >>>>>> >>>>>> On 24 August 2016 at 21: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? >>>>>> >>>>>> >>>>>> We just had a bunch of fun trying to get it to build right, and the >>>>>> uptime stuff really threw us. >>>>>> >>>>>> It's fine though, I found that s6 may start growing an IPC mechanism >>>>>> so we could possibly do a launchd/jobd style service later (ie to run >>>>>> things upon event changes, like ifup, ifdown, ifcreate, ifdestroy, >>>>>> arbitrary messages, etc) so I may try incorporating it again. :) >>>>>> >>>>> >>>>> Can't this be done with devd? >>>> >>>> >>>> Sure, but I'm looking for something more generic than just devd. Like, >>>> notifications about events like "default route is up" can be done by >>>> sniffing the rtsock, but notifications like "ntpdate has updated the >>>> date, we can now do crypto services" doesn't happen there right now. >>> >>> >>> devd was never intended to be limited to just device events from the >>> kernel. It has grown beyond that, and could easily grow to cope with >>> routing events and other notifications. No need to reinvent everything >>> for that. >> >> >> Right. I don't want to reinvent the wheel if it can be avoided. > > > Afaik devd is limited handling events reported by the kernel on /etc/devctl. > There is no way to inject events into arbitrary events from userspace into > devd (no ptrace hacks don't count). It would be trivial to add though, especially since the author is easy to work with :). It already fans out data to multiple listeners. Warner From owner-freebsd-hackers@freebsd.org Fri Aug 26 15:54:58 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B6C0B74215 for ; Fri, 26 Aug 2016 15:54:58 +0000 (UTC) (envelope-from crest@rlwinm.de) 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 A63E2E7 for ; Fri, 26 Aug 2016 15:54:57 +0000 (UTC) (envelope-from crest@rlwinm.de) 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 1C9061026E; Fri, 26 Aug 2016 17:54:55 +0200 (CEST) Subject: Re: Linuxisms in s6 To: Warner Losh References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <20160825194820.GI92256@e-new.0x20.net> Cc: FreeBSD Hackers From: Jan Bramkamp Message-ID: <366b32cd-057c-a5c3-d8b4-087db6cb32ff@rlwinm.de> Date: Fri, 26 Aug 2016 17:54:54 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Fri, 26 Aug 2016 15:54:58 -0000 On 26/08/16 16:11, Warner Losh wrote: > On Fri, Aug 26, 2016 at 4:44 AM, Jan Bramkamp wrote: >> On 25/08/16 23:17, Adrian Chadd wrote: >>> >>> On 25 August 2016 at 14:13, Warner Losh wrote: >>>> >>>> On Thu, Aug 25, 2016 at 3:08 PM, Adrian Chadd wrote: >>>>> >>>>> On 25 August 2016 at 12:48, Lars Engels wrote: >>>>>> >>>>>> On Thu, Aug 25, 2016 at 08:46:10AM -0700, Adrian Chadd wrote: >>>>>>> >>>>>>> On 24 August 2016 at 21: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? >>>>>>> >>>>>>> >>>>>>> We just had a bunch of fun trying to get it to build right, and the >>>>>>> uptime stuff really threw us. >>>>>>> >>>>>>> It's fine though, I found that s6 may start growing an IPC mechanism >>>>>>> so we could possibly do a launchd/jobd style service later (ie to run >>>>>>> things upon event changes, like ifup, ifdown, ifcreate, ifdestroy, >>>>>>> arbitrary messages, etc) so I may try incorporating it again. :) >>>>>>> >>>>>> >>>>>> Can't this be done with devd? >>>>> >>>>> >>>>> Sure, but I'm looking for something more generic than just devd. Like, >>>>> notifications about events like "default route is up" can be done by >>>>> sniffing the rtsock, but notifications like "ntpdate has updated the >>>>> date, we can now do crypto services" doesn't happen there right now. >>>> >>>> >>>> devd was never intended to be limited to just device events from the >>>> kernel. It has grown beyond that, and could easily grow to cope with >>>> routing events and other notifications. No need to reinvent everything >>>> for that. >>> >>> >>> Right. I don't want to reinvent the wheel if it can be avoided. >> >> >> Afaik devd is limited handling events reported by the kernel on /etc/devctl. >> There is no way to inject events into arbitrary events from userspace into >> devd (no ptrace hacks don't count). > > It would be trivial to add though, especially since the author is easy to > work with :). It already fans out data to multiple listeners. In that case dear author I have two requests: * Read messages from sequential packet sockets in addition to /dev/devctl. * Please offer a flag to keep devd from forking without spamming the log with debugging messages. The first would allow userspace tools to inject messages into devd and the second would allow devd to run under a process supervisor without ugly workarounds. -- Jan Bramkamp From owner-freebsd-hackers@freebsd.org Sat Aug 27 00:02:18 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7EB6B76655 for ; Sat, 27 Aug 2016 00:02:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81517332 for ; Sat, 27 Aug 2016 00:02:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x234.google.com with SMTP id x131so18587308ite.0 for ; Fri, 26 Aug 2016 17:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=72Vhqmn/etTvsNjn/kUWlBm7Vvv/aXGUPNlDdw1VswU=; b=URRy3IBD7FBCpghoT5Ak358DQPU1JHRwPcyG+VKrJPEyXqPo7tjaCBYab/F0f96WPD ppynnpgIGrGQTDsdK194n/0iww+BTnl34VtzkD+iy5isGFKt29RHHzR4amsBSxTEEiP8 RqFdpJMnkR/Gx2OZydfbrH9lDrQmz2KdWrv70k2jloCIxIBP/+LZv8kc2/IncJumBHOq Dnd7Aim+Rcld84oYUl4ADut8tOu7reC97RkMkTHw8Uh7Jzis4V67vIlDlWKZqYrXlZz1 9UHyygXzX5E1e3oKCSwPTK/lWT358nZ7ZKu0YVFgitIqvixx95XXSNslKp5Jwa9Sz8yn GURA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=72Vhqmn/etTvsNjn/kUWlBm7Vvv/aXGUPNlDdw1VswU=; b=YSIRV6RtmDSp9WsgWihFMmuaMhEkjOkUHF+Mc0xtHa1DcoHj7wgiiY4QOv20g/+9rq DrRazT8qPtQCKtnsDvcx2yidN7svrf2HQWeFSwf7yun795+yr9wVZJY95SMsxBzwVW8Z cK3lpLZaQ37A9Z1vOJgcO9gU5H2SRDOZIBRRf8R77gW5tW2MJzCFP9kFhUrxFEbubaYa HEPMTE+ko6/w6nwIoTJNX8WnfKhvtzGL6ryBTNgvtItloJuw+qCWnm4ufXc4BDjRiV3O ci2OOwRDI9yQM3T8Jtj3Uui+dGP62v1QWfJwYrkriE+4qF7Apvs0kjQEQbdPjy/PlbLE nnSw== X-Gm-Message-State: AE9vXwPww0g4OWhj1L/uHzTAuPIMEXUzNXQj97K8OJu3Js5+IkaQBbDucXtYOu0aN2fTmKxInVUjVw5Wvw7LXQ== X-Received: by 10.107.53.163 with SMTP id k35mr7214006ioo.75.1472256137981; Fri, 26 Aug 2016 17:02:17 -0700 (PDT) MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.36.141.129 with HTTP; Fri, 26 Aug 2016 17:02:17 -0700 (PDT) In-Reply-To: <8f453d0d-ac34-f6c7-9fa7-5fd942dae92a@bsd.com.br> References: <156f5963-ee7c-4c65-8fb9-fb6cbcfab42b@bsd.com.br> <8f453d0d-ac34-f6c7-9fa7-5fd942dae92a@bsd.com.br> From: Adrian Chadd Date: Fri, 26 Aug 2016 17:02:17 -0700 X-Google-Sender-Auth: PecsfSeY0HnwEcHhhTBm0sYm7Fw Message-ID: Subject: Re: urtwn0: ieee80211_crypto_encap returns NULL To: =?UTF-8?B?T3RhY8OtbGlv?= Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 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: , X-List-Received-Date: Sat, 27 Aug 2016 00:02:18 -0000 Hi, My guess is that this is a symptom of it disconnecting whilst doing active traffic. Does wpa_supplicant log anything? What's 'ifconfig wlan0 -v list sta' look like when it's running? -a From owner-freebsd-hackers@freebsd.org Sat Aug 27 13:39:57 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E42ECB76AB0 for ; Sat, 27 Aug 2016 13:39:57 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from know-smtprelay-omc-4.server.virginmedia.net (know-smtprelay-omc-4.server.virginmedia.net [80.0.253.68]) by mx1.freebsd.org (Postfix) with ESMTP id 56FEAAAB for ; Sat, 27 Aug 2016 13:39:56 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from [192.168.1.100] ([86.10.211.13]) by know-smtprelay-4-imp with bizsmtp id cDel1t00Z0HtmFq01Del6s; Sat, 27 Aug 2016 14:38:45 +0100 X-Originating-IP: [86.10.211.13] X-Spam: 0 X-Authority: v=2.1 cv=KbMvylsD c=1 sm=1 tr=0 a=SB7hr1IvJSWWr45F2gQiKw==:117 a=SB7hr1IvJSWWr45F2gQiKw==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=VE6uUYnhP91B3vbJdF0A:9 a=QEXdDO2ut3YA:10 a=zJbNhL6oh1kA:10 Subject: Re: Linuxisms in s6 To: Adrian Chadd References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> Cc: Supervision , FreeBSD Hackers From: Jonathan de Boyne Pollard Message-ID: <7c227428-5bb8-88f4-8bb9-a621b1e1b75a@NTLWorld.com> Date: Sat, 27 Aug 2016 14:38:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Sat, 27 Aug 2016 13:39:58 -0000 Jonathan de Boyne Pollard: > What are these Linuxisms in s6? s6-linux-utils and s6-linux-init have > Linuxisms, obviously. But what Linuxisms does s6 have? > Adrian Chadd: > We just had a bunch of fun trying to get it to build right, [...] > Such as what, specifically? From owner-freebsd-hackers@freebsd.org Sat Aug 27 16:22:29 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8043DB77056 for ; Sat, 27 Aug 2016 16:22:29 +0000 (UTC) (envelope-from hoomanfazaeli@gmail.com) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 190119E5 for ; Sat, 27 Aug 2016 16:22:29 +0000 (UTC) (envelope-from hoomanfazaeli@gmail.com) Received: by mail-wm0-x236.google.com with SMTP id o80so32407026wme.1 for ; Sat, 27 Aug 2016 09:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-transfer-encoding; bh=tzeERnAycSCeuZcMXPajhNKLjfIGxj+cXGp0nd9IVpc=; b=PD4VBJE5i07w4Wi8ZT39X9r6wcdzx41QTgjpjSUcTQu353+gA5JiulOFhaS0jkzUYt O4LqwxrLu5mqn694dMg2m9UNzwnj2vMieuI9RY9R6l1jncsPrmYSOeKHj/rFZVnVd8Am G3kROwvIgZxvXqRueh7RyhfnOI/UT3RuaL6SRKPtBC++XkhbsvPCnGDHIEgyww3EO6Kk eRMPvPzWS3UnZHQI3HzDeM8ifPHGwfCSeFE8dHx9IsaRMbK2vxB5wotMfhpTswlreC8G CLSusDUo+IaX77iwUlN6HtQxn0VAxQdUXjJcW/d0sKjtJQS2n1d+pqXLeMAG2vVErJKX Kihw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-transfer-encoding; bh=tzeERnAycSCeuZcMXPajhNKLjfIGxj+cXGp0nd9IVpc=; b=B3eZEAWeVT1sBm2ESQKjbSV3RBY46BbQnynHj0mRE5FWtnYa/L8rbdiQ6NFFGWa+Q4 8NMeahGnJDNPv1GkZK4PmNqAeLweJsE1AQMItZm5e0eHSQH/guNPV6/MkPFmgTOuWYpv Adeps266Ixd/7Frtf4U4jZDA7QTgt2RtjTVkNmIMVCvly7J5WI3tpuJVzZUOrHDgXSpt 0jQf4WFsv1MmYXHVCvb1WxuDmsF32jQ08/7e8lKLSRCsvcD8SXMszMu2f07JCWC7jkdM 87aTSP0+hpOWtLFPqN1HSBD/JPCz6zQBOVxEdqhX+fW+nFh4pEgCK+i8sVGj8ztjTpwM +o5w== X-Gm-Message-State: AE9vXwOtPXMdTb6Z4ny6GP7XwfeMYh8pUMEpH4GHc5tWyNsKBnFkrYCV1vLOD7mejQ/qUA== X-Received: by 10.194.98.139 with SMTP id ei11mr8891507wjb.19.1472314947635; Sat, 27 Aug 2016 09:22:27 -0700 (PDT) Received: from [192.168.2.30] ([2.190.218.206]) by smtp.googlemail.com with ESMTPSA id a3sm5686798wjw.15.2016.08.27.09.22.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Aug 2016 09:22:27 -0700 (PDT) Message-ID: <57C1BE40.2060902@gmail.com> Date: Sat, 27 Aug 2016 20:52:24 +0430 From: Hooman Fazaeli User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: "Batutis, Ed" CC: "freebsd-hackers@freebsd.org" Subject: Re: get number of open files in a process? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Sat, 27 Aug 2016 16:22:29 -0000 On 2016-01-21 17:04, Batutis, Ed wrote: > Hi, > > I need to determine the number of open files in my process - all types of file handles total - sockets, files, everything. > > Does this work reliably for that purpose? > > int num_open = 0; /* number of open files? */ > kinfo_file *inf = kinfo_getfile(getpid(), &num_open); > if ( inf ) { > free(inf); > } > > > Thanks, > > =Ed > > > _______________________________________________ > 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" My reply may be late and you may already solved the problem. Anyway, one possible solution is to do (slow) fd counting in another thread and update an atomic integer which the main thread can read and act upon: volatile int num_open = 0; fdcount_thread_proc(void *arg){ while (!exit_flag) { num_open = get_the_number_of_open_files_in_whatever_way_you_prefer(); usleep(1000); } } Of course, the main thread does not get the __exact__ number of open files when it reads num_open, butif you just need to know when your are approaching the limit, a close estimation would be enough. -- Best regards Hooman Fazaeli From owner-freebsd-hackers@freebsd.org Sat Aug 27 16:37:28 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2818DB7746A for ; Sat, 27 Aug 2016 16:37:28 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from know-smtprelay-omc-4.server.virginmedia.net (know-smtprelay-omc-4.server.virginmedia.net [80.0.253.68]) by mx1.freebsd.org (Postfix) with ESMTP id 8CC6E289 for ; Sat, 27 Aug 2016 16:37:26 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from [192.168.1.100] ([86.10.211.13]) by know-smtprelay-4-imp with bizsmtp id cGdQ1t01f0HtmFq01GdRrl; Sat, 27 Aug 2016 17:37:25 +0100 X-Originating-IP: [86.10.211.13] X-Spam: 0 X-Authority: v=2.1 cv=KbMvylsD c=1 sm=1 tr=0 a=SB7hr1IvJSWWr45F2gQiKw==:117 a=SB7hr1IvJSWWr45F2gQiKw==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=oycnWgklaELcr_AiKp4A:9 a=QEXdDO2ut3YA:10 Subject: Re: Linuxisms in s6 To: Adrian Chadd , Supervision , FreeBSD Hackers References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <20160825194820.GI92256@e-new.0x20.net> From: Jonathan de Boyne Pollard Message-ID: Date: Sat, 27 Aug 2016 17:37:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Sat, 27 Aug 2016 16:37:28 -0000 Adrian Chadd: > Sure, but I'm looking for something more generic than just devd. Like, > notifications about events like "default route is up" can be done by > sniffing the rtsock, but notifications like "ntpdate has updated the > date, we can now do crypto services" doesn't happen there right now. > You're reinventing upstart. The lesson of upstart is that whilst the event-driven paradigm looks like the bright shiny future, once one gets down to the details it is a lot harder than it at first appears. I strongly recommended learning about upstart, and especially learning the problems that people hit with it, to anyone going down the same route. The Debian systemd Hoo-Hah had some lengthy discussion of upstart. (I regret not having bookmarked the discussion that I once came across, where someone opined that xe preferred systemd to upstart because at a Linux conference the systemd presentation had been exciting and had been put forward as the wave of the future, where upstart had been presented as old-school, traditional, and boring. Ironically, this person wasn't aware that the designs are exactly the opposite of that. upstart has the novel event-driven design where the system is configured with the information that event A triggers programs P, Q, and R, and the system starts by raising a "first event", that runs programs, that raise further events, that run further programs. Whereas it is systemd that has the conventional design, shared by Mewburn rc and others, of starting from a goal, working through a dependency tree, and doing topological sorts.) The Debian people chose to improve a non-event-driven architecture instead. It's a lesson to be learned from SMF, in fact. One can have a lot more additional abstract targets, such as "/milestone/name-services" and "/milestone/system-clock", and dependencies to and from them. The world is not 2 to 4 run levels plus "DAEMON", "NETWORKING", and "$local-fs". That said, something like this hypothetical "/milestone/system-clock" is a milestone that would need to be reached *very* early on in the bootstrap process. Fixing up the clock is something that both the nosh system manager and systemd handle themselves directly, outwith of service management. More on this in a moment. From owner-freebsd-hackers@freebsd.org Sat Aug 27 16:50:34 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D69FB77B6E; Sat, 27 Aug 2016 16:50:34 +0000 (UTC) (envelope-from hoomanfazaeli@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5C92B14; Sat, 27 Aug 2016 16:50:33 +0000 (UTC) (envelope-from hoomanfazaeli@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id q128so28333579wma.1; Sat, 27 Aug 2016 09:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-transfer-encoding; bh=XIyBGPPtOdpenvDuBzNQB63wPTxJG01Xirg97z0qSzE=; b=zkmbvhB33KouET7IL0S+7e3i03MV7sZcQNg7LapkW44LD7KyFOMgW6i5duCVoY9pR7 vNotXn4iQnKBXkiJmShZ7xrIuiEXG7TDLzMI7JLHFPqFYC1oau66yP036w2vr6EiCpy2 Fy+cKQOQgt/ZrfbK+M+HLE+d2+muMIxy2oK1HWOYLeZA7Fq3UjVlrwZNtNPBS7GU355T CyJQOeGBA/WXq92dtn6oFY0FvgYw3K1kqydQEbP9gfQEw+vO4KlDn7F205cmTy5IFJDe 9qZGv1WPMs+JXTwayFrWIDsbzZCYTgn66jRdE8OCVeHJUwZszg98ClEl9m6kAKxPekgf gnhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-transfer-encoding; bh=XIyBGPPtOdpenvDuBzNQB63wPTxJG01Xirg97z0qSzE=; b=B7IhWBzGvZkgdfyGJ+LFz5fzb5K+DPuey65ND+ApcK7Jtrp8vJvC/CysVAc7Odz+oA 3bU2mvVuuCH34hPWe8w9sV3sSJsYStHwAYWS6zb+pN5GjGCdwd2Gl/rj99F+6eiOd3eb PCuESX0jmUdDCZpMcY0Sx3y0HSPNgpNm/eC6V1vcxZ4s5mTmzkNq/vR4JWZpzquWXHUh sojOa0QwYquicSA5ALB716mYyxo1TtAW4x4SMbZMp4oX7HwGiOuC8Q+PVitd2mYudPfC jmebiyoLqe033VJqBQF1Z3+HiulWs3MvvwJylwm1qeeIH5Vw8IC+4LpIxGW3ZCnfbNkr LRxw== X-Gm-Message-State: AE9vXwOZTzfpLcC+YOBQ2wXcL4OwsVaUFsTKDbPxPd7hLRY+igE+vAcPWGkGjDIjc05GdQ== X-Received: by 10.28.39.134 with SMTP id n128mr3490014wmn.60.1472316632128; Sat, 27 Aug 2016 09:50:32 -0700 (PDT) Received: from [192.168.2.30] ([2.190.218.206]) by smtp.googlemail.com with ESMTPSA id i1sm25447334wjf.12.2016.08.27.09.50.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Aug 2016 09:50:31 -0700 (PDT) Message-ID: <57C1C4D3.8060604@gmail.com> Date: Sat, 27 Aug 2016 21:20:27 +0430 From: Hooman Fazaeli User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: "Alexander V. Chernikov" CC: FreeBSD Net , freebsd-hackers@freebsd.org, freebsd-arch@freebsd.org Subject: Re: projects/routing announcement/status References: <6151261453419663@web14j.yandex.ru> In-Reply-To: <6151261453419663@web14j.yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: , X-List-Received-Date: Sat, 27 Aug 2016 16:50:34 -0000 On 2016-01-22 03:11, Alexander V. Chernikov wrote: > I would like to introduce routing rework which started as projects/routing SVN branch. > It has been around for quite a long time, some of the code has made its way to HEAD, but there hasn't been any public announcements. > > So, what is projects/routing about? > > First, it is about bringing more scalability by solving most annoying problems on packet output path. > To be more specific, it eliminates 2 out of 4 locks, converts other 2 to rmlock(9) and adds infrastructure to reduce locking to single rmlock for certain traffic types. > With these changes, OS is able to forward 12MPPS on 16-core box for both IPv4/IPv6 which is 6-10 times better than stock HEAD. > > Second, it eases hacking by avoiding direct access to route/lltable internals and providing higher level API instead. > > Third, it is about bringing advanced features like route multipath, and even more speed by adding modular lookup API permitting to use different route lookup algorithms based on server role. > > Description with graphs and links is available at: http://wiki.freebsd.org/ProjectsRoutingProposal > Used API is described in http://wiki.freebsd.org/ProjectsRoutingProposal/API > Current status is available at http://wiki.freebsd.org/ProjectsRoutingProposal/ConversionStatus > > It is probably much more convenient to read project details on wiki, however I’ll try to summarise the most important things here (wiki readers can skip till the end). > > Typical packet processing (forwarding for router, or output for web server) path consists of: > > doing routing lookup (radix read rwlock + routing entry (rte) mutex lock) > (optionally) interface address (ifa) atomic refcount acquire/release > doing link level entry (lle, llentry) lookup (afdata read rwlock + llentry read (or write) lock) > > > Most annoying one is the rtentry mutex. The only goal of this mutex is to provide rtentry refcounting so consumer code can use it without the risk of rtentrry being deleted. > We solve this by saving all needed data into on-stack optimised structure instead of refcounting. > Additionally, we are trying to pre-calculate the data we need to pass by using special next-hop structures instead of route entries. > Several different (in terms of returned info and relative overhead) functions for retrieving routing data are provided. > Most of the consumers have already been switched to the new KPI. Actual output/forward path are not converted yet. > > It should be noted, that since individual rtentries are not returned, it is not possible to do per-ifa output packet accouting (can be observed in netstat -s). > > Route table lock is switched to ipfw-like dual-locking mode (read rmlock() for data path, rwlock for config changes, route export, etc..). > The reasons of having rwlock are to 1) provide serialization for things in control plane not directly used for data path and 2) avoid acquiring contested/sleeping locks for rmlock. See projects/routing r287078 for an example. > > Lltable entry locks were eliminated in r291853, r292155. > > Lltable lock is also planned to be converted to dual-locking model, with the similar reasoning. > However, instead of (ab)using AFDATA lock, it needs to be converted to per-lltable set of locks. > > > Open problems: > SCTP/Flowtable references rtentries directly. It is not possible to convert ip[6]_output() path without dealing with that. > > Brief merge plan: > Discuss/merge new routing KPI for data path > Discuss/merge lltable dual-lock (WIP) > Discuss/merge explicit nexthop changes > Discuss/merge IPv4/IPv6 output path (along with converted sctp/flowtable) > Discuss/merge route table dual-lock > > Current outstanding reviews (I encourage you to take a look at these) > > D5009 (IPv4 fast forwarding conversion) > D5010 (IPv6 forwarding conversion) > D4794 (Deal with per-ifa output counters) > D4962 (new LLE lookup functions, no sockaddrs in lltable data path) > D4751 (move all lltable code to separate files) > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" First, thanks for the effort. I personally very much appreciate any improvements made to the network related stuff. Second have you considered replacing the existing radix tree with a faster data structure, specially the Luigi DXR tables? (http://info.iet.unipi.it/~luigi/papers/20120601-dxr.pdf ) I apologize if the question is not much relevant to your work. -- Best regards Hooman Fazaeli From owner-freebsd-hackers@freebsd.org Sat Aug 27 16:52:08 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9224BB77D96 for ; Sat, 27 Aug 2016 16:52:08 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from know-smtprelay-omc-4.server.virginmedia.net (know-smtprelay-omc-4.server.virginmedia.net [80.0.253.68]) by mx1.freebsd.org (Postfix) with ESMTP id DC398F59 for ; Sat, 27 Aug 2016 16:52:07 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from [192.168.1.100] ([86.10.211.13]) by know-smtprelay-4-imp with bizsmtp id cGs61t00N0HtmFq01Gs6SW; Sat, 27 Aug 2016 17:52:06 +0100 X-Originating-IP: [86.10.211.13] X-Spam: 0 X-Authority: v=2.1 cv=KbMvylsD c=1 sm=1 tr=0 a=SB7hr1IvJSWWr45F2gQiKw==:117 a=SB7hr1IvJSWWr45F2gQiKw==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=danhDmx_AAAA:8 a=Br9LfDWDAAAA:8 a=07d9gI8wAAAA:8 a=dZwYQNWPF_19G2bF6zYA:9 a=QEXdDO2ut3YA:10 a=P4VdviVPEcjfz_PVVggX:22 a=gR_RJRYUad_6_ruzA8cR:22 a=e2CUPOnPG4QKp8I52DXD:22 Subject: Re: Linuxisms in s6 To: Adrian Chadd , Supervision , FreeBSD Hackers References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> From: Jonathan de Boyne Pollard Message-ID: <482f9512-2634-74e5-ac72-45d3a344eee1@NTLWorld.com> Date: Sat, 27 Aug 2016 17:51:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Sat, 27 Aug 2016 16:52:08 -0000 Adrian Chadd: > [...] the uptime stuff really threw us. > It's unfair to lay such system time problems at s6's door. Systems whose system clock jumps 46 years during system bootstrap don't get to blame s6 for mad time gaps that appear in logs and service start time records. There is a *lot* of the Unix and Linux worlds that depends from time being right. It's not just s6 that is affected by such things. You note crypto. There are a lot of other things as well that have unstated, sometimes undocumented, and sometimes surprising dependencies upon system time being current. Here's one such. For quite a while, Linux distributions had rather an odd problem at bootstrap. They'd repeatedly fsck volumes at every bootstrap when they need not have. And this didn't affect U.S. or U.K. people, which is in part why it persisted for so long. * https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/63175 * https://bugs.archlinux.org/task/17438 * http://lwn.net/Articles/264498/ The problem was that people were erroneously running their real-time clocks in local time rather than UTC, and this triggered an odd hidden dependency upon having the right time in the system clock in countries where local time was in advance of UTC. The Linux method for handling RTCs erroneously running in local time is for the system bootstrap to make a special settimeofday() call that effectively tells the kernel what the UTC offset is for the RTC hardware. This could happen *after* the fsck of the root volume, however. So whilst that fsck was happening, the kernel was assuming that UTC was the local time that it had taken from the RTC and initialized its system clock with. In effect, as soon as the special settimeofday() call was executed, the system clock would jump backwards by one or more hours, to what UTC actually was. But the ext2/3/4 filesystem format has last checked/mounted/written timestamps in its superblock. Part of the checking to see whether a full fsck is needed at bootstrap is comparing them to the current time. If they are in the future by hours or more, something is clearly wrong, thinks fsck, and it runs the full check. At bootstrap, when the initial fsck (of at least the root volume and sometimes other volumes as well) is run, the system clock is not UTC yet. Comedy results. Both systemd and the nosh system manager have to ensure that they do the special settimeofday() system call before they start off service management and thus run mount/fsck services, or indeed anything else that might have a closet dependency from not stepping the system time by hours partway through bootstrap. The nosh system-manager's manual page has a whole section on this subject. FreeBSD/PC-BSD has a mechanism for correctly reading a RTC that is erroneously in local time. One sets up the RTC's offset from UTC in the machdep.adjkerntz variable in /boot/loader.conf{,.local} and the system clock never has to jump by hours during bootstrap. I've yet to experience a FreeBSD/PC-BSD system where the installer actually configures this, though. Interestingly, FreeBSD/PC-BSD also has a fallback mechanism that uses the latest volume mount timestamp that it can find as the initial system time when no hardware clock device registers at bootstrap. Presumably you have a clock device that registers but it is not battery-backed, your volumes don't preserve (or reset) their mount timestamps, or you are encountering the comedy situation where FreeBSD/PC-BSD is setting the system clock to 1970-01-01 because the last time around it mounted the filesystems before the clock was corrected. From owner-freebsd-hackers@freebsd.org Sat Aug 27 17:58:18 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F73FB77DCD for ; Sat, 27 Aug 2016 17:58:18 +0000 (UTC) (envelope-from jim@netgate.com) Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com [IPv6:2607:f8b0:4003:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DAD3F29F for ; Sat, 27 Aug 2016 17:58:17 +0000 (UTC) (envelope-from jim@netgate.com) Received: by mail-oi0-x235.google.com with SMTP id j203so3522381oih.2 for ; Sat, 27 Aug 2016 10:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netgate.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=4dPAAALVKOIu+4bKoxmxWFFT1KMtBl0AXzJ43MUtURA=; b=PcOIqwhsQI/jLsCThBnIES5v8A73JSX+NqHqmMEriL7zH1X7hl7EDtScv/mA+iB8j9 Voig7jgLRsHCgh0xYw713dJBmyXqtpQJrT6eZ0TgJ84AdrlNNV/ceCka5DTJOI0MLs7D mXnQlmKZINi6A/BH1/MkXCsp1O5U7x79VMRzI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=4dPAAALVKOIu+4bKoxmxWFFT1KMtBl0AXzJ43MUtURA=; b=gJFNepShyP76zpQ/K5YxgYpkPUjzBtXMuvGd87w9G45uC/IcGlqTjQ74I0kA+2v/1t b/FT1/cDhqXJ9PnfKGp08zgn28H+VRhDQOOjjVtR9tNBR7f7kbeHrjt0winirhH+7SQH 6yURcjunlvzkrYTvTZmBGr0WZfAHdEWuvMqv4ERYvNq7TrvMUIhy9Aim1uMRDlXzC6hX Pd/S/KzEKTIrKMpHpaMTRtuiQGsFYLg/Vv66H42UpcvHjoXebigs7auMvi8PlcwqrDkM Py3TlXtt8c7X4ow5+r5kG+O/b8k/UM4vykgMl+uzs9XndOgFVCkhVuzQ6JYYhLQjdOAs 8xDg== X-Gm-Message-State: AE9vXwOFsLYNPalfEED1R4ilLAONM25Pnf6IYfH1dohCuvBJcKUWzdgHBXH5ciCSM9BF75ud X-Received: by 10.202.105.139 with SMTP id e133mr7111366oic.33.1472320697177; Sat, 27 Aug 2016 10:58:17 -0700 (PDT) Received: from [29.135.35.125] (66-87-121-125.pools.spcsdns.net. [66.87.121.125]) by smtp.gmail.com with ESMTPSA id d40sm11574242oic.7.2016.08.27.10.58.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 27 Aug 2016 10:58:16 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: projects/routing announcement/status From: Jim Thompson X-Mailer: iPhone Mail (13G36) In-Reply-To: <57C1C4D3.8060604@gmail.com> Date: Sat, 27 Aug 2016 12:58:15 -0500 Cc: "Alexander V. Chernikov" , FreeBSD Net , freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <6151261453419663@web14j.yandex.ru> <57C1C4D3.8060604@gmail.com> To: Hooman Fazaeli 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: , X-List-Received-Date: Sat, 27 Aug 2016 17:58:18 -0000 > On Aug 27, 2016, at 11:50 AM, Hooman Fazaeli wro= te: >=20 > Second have you considered replacing the existing radix tree with a faster= data structure, specially the Luigi DXR > tables? DXR only supports IPv4. FYI.=20= From owner-freebsd-hackers@freebsd.org Sat Aug 27 19:30:07 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47912B777AD; Sat, 27 Aug 2016 19:30:07 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward4j.cmail.yandex.net (forward4j.cmail.yandex.net [IPv6:2a02:6b8:0:1630::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0A2493C; Sat, 27 Aug 2016 19:30:06 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mxback13h.mail.yandex.net (mxback13h.mail.yandex.net [84.201.186.131]) by forward4j.cmail.yandex.net (Yandex) with ESMTP id C73B920843; Sat, 27 Aug 2016 22:29:53 +0300 (MSK) Received: from web23h.yandex.ru (web23h.yandex.ru [84.201.187.157]) by mxback13h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id pZZBsN02id-TruK6xLx; Sat, 27 Aug 2016 22:29:53 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1472326193; bh=yFGS6au4QYw6nWvsfkns0g9TEOmL6mLwleiMy3hLRDM=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date; b=qUDpTYrdFCvnLlMAxDFDo7AHnWvmr4FWUtnPFhqX/bjL/Crr3lPKi9nX7mQmV7uQO er3Fw/e+wdRrsM63t0LZLdWlBIIcPa3IU6Vx5e3Ts3mkFzUorF5E3RI+OI3yNrbVaP muiQcGLrQfWShdwRf1GgfN5D6PbEWucMu1kYu2Uc= Authentication-Results: mxback13h.mail.yandex.net; dkim=pass header.i=@ipfw.ru Received: by web23h.yandex.ru with HTTP; Sat, 27 Aug 2016 22:29:53 +0300 From: Alexander V. Chernikov Envelope-From: melifaro@ipfw.ru To: Jim Thompson , Hooman Fazaeli Cc: FreeBSD Net , "freebsd-hackers@freebsd.org" , "freebsd-arch@freebsd.org" In-Reply-To: References: <6151261453419663@web14j.yandex.ru> <57C1C4D3.8060604@gmail.com> Subject: Re: projects/routing announcement/status Message-Id: <217371472326193@web23h.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sat, 27 Aug 2016 22:29:53 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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: , X-List-Received-Date: Sat, 27 Aug 2016 19:30:07 -0000 From owner-freebsd-hackers@freebsd.org Sat Aug 27 20:34:21 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79F3DB779CF; Sat, 27 Aug 2016 20:34:21 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward19h.cmail.yandex.net (forward19h.cmail.yandex.net [IPv6:2a02:6b8:0:f35::a4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36860D1E; Sat, 27 Aug 2016 20:34:20 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [77.88.29.165]) by forward19h.cmail.yandex.net (Yandex) with ESMTP id DC45D21414; Sat, 27 Aug 2016 23:34:14 +0300 (MSK) Received: from web2g.yandex.ru (web2g.yandex.ru [95.108.252.102]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7ow1pFXgdw-YEgOrGxw; Sat, 27 Aug 2016 23:34:14 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1472330054; bh=Ee8Xx8VoRChQQTNVDaV4ExGh7RBHsTCH22RnbBzHBsk=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date; b=B5KrZwWHOdSYyTQtUo/eZh8Dqddzi7mcf/XTyKUWtRhLJWFxFYXpdlFxPceYZygxO LCUIpKel8YSpR9ttQJnk1i695yBgIhEMaSxG67c9qxjxIKQY6IIBVhNEJz+1w5wdB3 ZRbRJ/7qB6csm828+uV7HhMMe7EwLX6Y+hZzqeys= Authentication-Results: mxback4g.mail.yandex.net; dkim=pass header.i=@ipfw.ru Received: by web2g.yandex.ru with HTTP; Sat, 27 Aug 2016 23:34:14 +0300 From: Alexander V. Chernikov Envelope-From: melifaro@ipfw.ru To: Jim Thompson , Hooman Fazaeli Cc: FreeBSD Net , "freebsd-hackers@freebsd.org" , "freebsd-arch@freebsd.org" In-Reply-To: References: <6151261453419663@web14j.yandex.ru> <57C1C4D3.8060604@gmail.com> Subject: Re: projects/routing announcement/status Message-Id: <75031472330054@web2g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sat, 27 Aug 2016 23:34:14 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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: , X-List-Received-Date: Sat, 27 Aug 2016 20:34:21 -0000 From owner-freebsd-hackers@freebsd.org Sat Aug 27 20:43:21 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03CB9B77E73; Sat, 27 Aug 2016 20:43:21 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward15m.cmail.yandex.net (forward15m.cmail.yandex.net [IPv6:2a02:6b8:b030::9c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B42A87C9; Sat, 27 Aug 2016 20:43:20 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mxback10g.mail.yandex.net (mxback10g.mail.yandex.net [77.88.29.171]) by forward15m.cmail.yandex.net (Yandex) with ESMTP id E3CB0213BA; Sat, 27 Aug 2016 23:43:08 +0300 (MSK) Received: from web2g.yandex.ru (web2g.yandex.ru [95.108.252.102]) by mxback10g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 3qVVkn6cfJ-h8DGG4ei; Sat, 27 Aug 2016 23:43:08 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1472330588; bh=Egnjt8qnVZIJYB+FkBUpMuIzu0YM76nZMAF4np6aN+4=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date; b=Custj51Jn46ft783VjbRcO/usXFRVcg+WgFZ+lMwe3yCiwaCMgcEfGotUXLKNLJKB q4KLEJ7MHxAlVO/L4mKUvPNklqj1TrRV57kBqzTpX3TayH7vM1M9Dkn4eHN2e2oJP7 L+S0O/dX2bY/FnvvpApd+m2cpjMx7ED332SkLxPI= Authentication-Results: mxback10g.mail.yandex.net; dkim=pass header.i=@ipfw.ru Received: by web2g.yandex.ru with HTTP; Sat, 27 Aug 2016 23:43:08 +0300 From: Alexander V. Chernikov Envelope-From: melifaro@ipfw.ru To: Jim Thompson , Hooman Fazaeli Cc: FreeBSD Net , "freebsd-hackers@freebsd.org" , "freebsd-arch@freebsd.org" In-Reply-To: References: <6151261453419663@web14j.yandex.ru> <57C1C4D3.8060604@gmail.com> Subject: Re: projects/routing announcement/status MIME-Version: 1.0 Message-Id: <80401472330588@web2g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sat, 27 Aug 2016 23:43:08 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 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: , X-List-Received-Date: Sat, 27 Aug 2016 20:43:21 -0000 27.08.2016, 20:58, "Jim Thompson" : >>  On Aug 27, 2016, at 11:50 AM, Hooman Fazaeli wrote: >> >>  Second have you considered replacing the existing radix tree with a faster data structure, specially the Luigi DXR >>  tables? (Sorry for re-posting #2, I incidentally sent an html-only reply). One of the goals was to be able to ease switching between different structures for different purposes on-fly. I did consider using DXR and there was even some glue code to make it modular lookup algo in ipfw tables: https://svnweb.freebsd.org/base?view=revision&revision=271932 DXR is very fast when handling full-view, but, as Jim already mentioned it is ipv4-specific. Also, it might be overkill when having small number of routes (e.g. typical non-routing host). > > DXR only supports IPv4. FYI. > _______________________________________________ > 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"