Re: Some questions about jails on FreeBSD9.0-RC1
On 10/26/2011 08:09 AM, lego...@legolasweb.nl wrote: I have setup one jail using ezjail. My first surprise is that ezjail only installs -RELEASE versions and not RC versions. Ok, I supouse that it is normal. But my first question is: can I install a FreeBSD 8.2 jail under a FreeBSD 9.0 host?? I have upgraded my ezjails using something like: env UNAME_r="8.2-RELEASE" freebsd-update -b /usr/jails/basejail -r 9.0-RC1 upgrade install This is some hassle, for example, one has to upgrade /etc and /var in /usr/jails/newjail by hand. (And maybe even more, not completely sure there.) is not possible to update the jail using "ejzail-admin update -u" instead of use freebsd-update directly?? -- CL Martinez carlopmart {at} gmail {d0t} com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Some questions about jails on FreeBSD9.0-RC1
On 10/26/2011 03:12 AM, Patrick Lamaiziere wrote: Le Tue, 25 Oct 2011 22:52:55 +0200, carlopmart a écrit : Hello, I have installed one FreeBSD 9.0-RC1 host to run different services (dns, smtp and www only) using jails. This host has two physical nics: em0 and em1. em0 is assigned to pyhiscal host, and I would like to assign em1 to jails. But em0 and em1 are on different networks: em0 is on 192.168.1.0/24 and em1 in 192.168.2.0/29. I have setup one jail using ezjail. My first surprise is that ezjail only installs -RELEASE versions and not RC versions. Ok, I supouse that it is normal. But my first question is: can I install a FreeBSD 8.2 jail under a FreeBSD 9.0 host?? You may run 8.2 installed ports on 9.0 by using the port /usr/ports/misc/compat8x/ But I suggest to upgrade the port ASAP. And the real question: How do I need to configure network under this jail to access it? I have configured ifconfig param for em1 on host's rc.conf, but what about the default route under this jail?? I thought to use pf rules, but I am not sure. jail enforces the use of the jail IP address in the jail, but that's all. Just enable routing on the host. But, that is not possible. Between host and jail exists a firewall ... I can't do simple routing with the host. Maybe a posible solution is to use policy source routing ?? -- CL Martinez carlopmart {at} gmail {d0t} com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Some questions about jails on FreeBSD9.0-RC1
On 10/26/2011 12:38 AM, George Kontostanos wrote: On Tue, Oct 25, 2011 at 11:52 PM, carlopmart wrote: Hi all, I have installed one FreeBSD 9.0-RC1 host to run different services (dns, smtp and www only) using jails. This host has two physical nics: em0 and em1. em0 is assigned to pyhiscal host, and I would like to assign em1 to jails. But em0 and em1 are on different networks: em0 is on 192.168.1.0/24 and em1 in 192.168.2.0/29. I have setup one jail using ezjail. My first surprise is that ezjail only installs -RELEASE versions and not RC versions. Ok, I supouse that it is normal. But my first question is: can I install a FreeBSD 8.2 jail under a FreeBSD 9.0 host?? ezjail doesn't necessarily install a release version.< ezjail-admin update -p -i> will install the basejail from your source. I have installed this jail using "ezjail-admin install". I can't compile source every time that I need to do an update in this host ... And the real question: How do I need to configure network under this jail to access it? I have configured ifconfig param for em1 on host's rc.conf, but what about the default route under this jail?? I thought to use pf rules, but I am not sure. gateway_enable="YES" should take care of this. In host or in the jail?? Thanks. -- CL Martinez carlopmart {at} gmail {d0t} com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org" Regards -- CL Martinez carlopmart {at} gmail {d0t} com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Some questions about jails on FreeBSD9.0-RC1
> On 10/26/2011 08:09 AM, lego...@legolasweb.nl wrote: >> I have setup one jail using ezjail. My first surprise is that ezjail only installs -RELEASE versions and not RC versions. Ok, I supouse that it is normal. But my first question is: can I install a FreeBSD 8.2 jail under a FreeBSD 9.0 host?? >> >> I have upgraded my ezjails using something like: >> env UNAME_r="8.2-RELEASE" freebsd-update -b /usr/jails/basejail -r >> 9.0-RC1 >> upgrade install >> >> This is some hassle, for example, one has to upgrade /etc and /var in >> /usr/jails/newjail by hand. (And maybe even more, not completely sure >> there.) >> > > is not possible to update the jail using "ejzail-admin update -u" > instead of use freebsd-update directly?? > Updating can be done, upgrading not. (Thus, a security update can be done, a full version not, if I understand it correctly.) This functionality exists (prematurely) in CVS: https://erdgeist.org/cvsweb/ezjail/ezjail-admin.diff?r1=1.263&r2=1.264&f=h ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: can audio CDs be played with ATA_CAM ?
On 10/26/2011 03:28, Craig Rodrigues wrote: On Tue, Oct 25, 2011 at 3:15 AM, Claude Buisson wrote: Hi, When upgrading a system to 8.2-STABLE, I switched my kernel from atapicam to ATA_CAM, and found that vlc could not play audio CDs anymore. Reverting to atapicam (and reverting from cdN to acdN of course), vlc was OK again. Hi, Would vlc have worked if, while ATA_CAM was enabled, there was a symlink so that /dev/acd0 -> cd0 ? Just to be sure, I just made the test, and the answer is: NO I have already written that vlc writes a susccession of messages [0x2caf2a3c] cdda access error: Could not set block size [0x2caf2a3c] cdda access error: cannot read sector n incrementing each time the sector number. So I infer that vlc cannot set the correct (audio specific) sector size for the cam device. Thanks for your attention. Claude Buisson P.S. As I can see reading GENERIC, ATA_CAM will be the default for 9.X so there is a risk of complaints from FreeBSD workstation users (who cares ?) after the release.. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Some questions about jails on FreeBSD9.0-RC1
On 10/26/2011 10:09 AM, lego...@legolasweb.nl wrote: On 10/26/2011 08:09 AM, lego...@legolasweb.nl wrote: I have setup one jail using ezjail. My first surprise is that ezjail only installs -RELEASE versions and not RC versions. Ok, I supouse that it is normal. But my first question is: can I install a FreeBSD 8.2 jail under a FreeBSD 9.0 host?? I have upgraded my ezjails using something like: env UNAME_r="8.2-RELEASE" freebsd-update -b /usr/jails/basejail -r 9.0-RC1 upgrade install This is some hassle, for example, one has to upgrade /etc and /var in /usr/jails/newjail by hand. (And maybe even more, not completely sure there.) is not possible to update the jail using "ejzail-admin update -u" instead of use freebsd-update directly?? Updating can be done, upgrading not. (Thus, a security update can be done, a full version not, if I understand it correctly.) This functionality exists (prematurely) in CVS: https://erdgeist.org/cvsweb/ezjail/ezjail-admin.diff?r1=1.263&r2=1.264&f=h Me too ... But downloading latest ezjail-admin code from cvs: 885 # Make the host systems os version our target version 886 # Users can override this by setting the UNAME_r environment variable 887 ezjail_osversion_target="`uname -r`" 888 889 # Finally run freebsd-update to upgrade our basejail 890 env UNAME_r="${ezjail_osversion_source}" freebsd-update -b ${ezjail_jailbase} -r ${ezjail_osversion_target} upgrade install If I am not wrong, it is possible to do a full upgrade between releases, right?? ezjail-admin cvs's version is 1.269: # $Id: ezjail-admin,v 1.269 2011/07/27 11:20:32 erdgeist Exp $ -- CL Martinez carlopmart {at} gmail {d0t} com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
installing 9.0-RC1 via netboot still fails
Installing 9.0-RC1 via netbooting still fails, at least on sparc64. See also http://www.freebsd.org/cgi/getmsg.cgi?fetch=41704+0+/usr/local/www/db/text/2011/freebsd-sparc64/20111016.freebsd-sparc64 for a possible fix/workaround. Cheers Michiel ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: can audio CDs be played with ATA_CAM ?
On 26/10/2011, at 19:03, Claude Buisson wrote: > > [0x2caf2a3c] cdda access error: Could not set block size > [0x2caf2a3c] cdda access error: cannot read sector n > > incrementing each time the sector number. > > So I infer that vlc cannot set the correct (audio specific) sector size for > the > cam device. > > Thanks for your attention. > > Claude Buisson > > P.S. As I can see reading GENERIC, ATA_CAM will be the default for 9.X so > there > is a risk of complaints from FreeBSD workstation users (who cares ?) after the > release.. Does cdparanoia work for you? -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: can audio CDs be played with ATA_CAM ?
On 10/26/2011 11:22, Daniel O'Connor wrote: On 26/10/2011, at 19:03, Claude Buisson wrote: [0x2caf2a3c] cdda access error: Could not set block size [0x2caf2a3c] cdda access error: cannot read sector n incrementing each time the sector number. So I infer that vlc cannot set the correct (audio specific) sector size for the cam device. Thanks for your attention. Claude Buisson P.S. As I can see reading GENERIC, ATA_CAM will be the default for 9.X so there is a risk of complaints from FreeBSD workstation users (who cares ?) after the release.. Does cdparanoia work for you? With cdparanoia-3.9.8_9: YES tested on 8.2 (from Sep 18) and 9.0 (from Sep 25) both with ATA_CAM Claude Buisson ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Some questions about jails on FreeBSD9.0-RC1
On 26.10.2011 10:33, carlopmart wrote: On 10/26/2011 10:09 AM, lego...@legolasweb.nl wrote: On 10/26/2011 08:09 AM, lego...@legolasweb.nl wrote: I have setup one jail using ezjail. My first surprise is that ezjail only installs -RELEASE versions and not RC versions. Ok, I supouse that it is normal. But my first question is: can I install a FreeBSD 8.2 jail under a FreeBSD 9.0 host?? I have upgraded my ezjails using something like: env UNAME_r="8.2-RELEASE" freebsd-update -b /usr/jails/basejail -r 9.0-RC1 upgrade install This is some hassle, for example, one has to upgrade /etc and /var in /usr/jails/newjail by hand. (And maybe even more, not completely sure there.) is not possible to update the jail using "ejzail-admin update -u" instead of use freebsd-update directly?? Updating can be done, upgrading not. (Thus, a security update can be done, a full version not, if I understand it correctly.) This functionality exists (prematurely) in CVS: https://erdgeist.org/cvsweb/ezjail/ezjail-admin.diff?r1=1.263&r2=1.264&f=h Me too ... But downloading latest ezjail-admin code from cvs: 885 # Make the host systems os version our target version 886 # Users can override this by setting the UNAME_r environment variable 887 ezjail_osversion_target="`uname -r`" 888 889 # Finally run freebsd-update to upgrade our basejail 890 env UNAME_r="${ezjail_osversion_source}" freebsd-update -b ${ezjail_jailbase} -r ${ezjail_osversion_target} upgrade install If I am not wrong, it is possible to do a full upgrade between releases, right?? ezjail-admin cvs's version is 1.269: # $Id: ezjail-admin,v 1.269 2011/07/27 11:20:32 erdgeist Exp $ I think the installing of the new world is not included. (Thus, the part after the first reboot when doing a freebsd-update to 9.0-RC1 on the host system.) ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: can audio CDs be played with ATA_CAM ?
On 26/10/2011, at 20:50, Claude Buisson wrote: >>> P.S. As I can see reading GENERIC, ATA_CAM will be the default for 9.X so >>> there >>> is a risk of complaints from FreeBSD workstation users (who cares ?) after >>> the >>> release.. >> >> >> Does cdparanoia work for you? >> > > With cdparanoia-3.9.8_9: YES > > tested on 8.2 (from Sep 18) and 9.0 (from Sep 25) both with ATA_CAM Strange, I would have thought VLC would use the same sort of access method as VLC.. I don't know what it's trying so it's hard to know why it doesn't work :( -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Fwd: Re: Some questions about jails on FreeBSD9.0-RC1
On 26.10.2011 10:33, carlopmart wrote: On 10/26/2011 10:09 AM, lego...@legolasweb.nl wrote: On 10/26/2011 08:09 AM, lego...@legolasweb.nl wrote: I have setup one jail using ezjail. My first surprise is that ezjail only installs -RELEASE versions and not RC versions. Ok, I supouse that it is normal. But my first question is: can I install a FreeBSD 8.2 jail under a FreeBSD 9.0 host?? I have upgraded my ezjails using something like: env UNAME_r="8.2-RELEASE" freebsd-update -b /usr/jails/basejail -r 9.0-RC1 upgrade install This is some hassle, for example, one has to upgrade /etc and /var in /usr/jails/newjail by hand. (And maybe even more, not completely sure there.) is not possible to update the jail using "ejzail-admin update -u" instead of use freebsd-update directly?? Updating can be done, upgrading not. (Thus, a security update can be done, a full version not, if I understand it correctly.) This functionality exists (prematurely) in CVS: https://erdgeist.org/cvsweb/ezjail/ezjail-admin.diff?r1=1.263&r2=1.264&f=h Me too ... But downloading latest ezjail-admin code from cvs: 885 # Make the host systems os version our target version 886 # Users can override this by setting the UNAME_r environment variable 887 ezjail_osversion_target="`uname -r`" 888 889 # Finally run freebsd-update to upgrade our basejail 890 env UNAME_r="${ezjail_osversion_source}" freebsd-update -b ${ezjail_jailbase} -r ${ezjail_osversion_target} upgrade install If I am not wrong, it is possible to do a full upgrade between releases, right?? ezjail-admin cvs's version is 1.269: # $Id: ezjail-admin,v 1.269 2011/07/27 11:20:32 erdgeist Exp $ I think the installing of the new world is not included. (Thus, the part after the first reboot when doing a freebsd-update to 9.0-RC1 on the host system.) ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: ntpd couldn't resolve host name on system boot
On Tue, 25 Oct 2011, Miroslav Lachman wrote: Hi all, I have a problem with ntpd on many of our servers running 8.2-RELEASE or newer. Some of them are newly installed, most of them are 7.x upgraded to 8.2 or 8-STABLE amd64 with GENERIC. hmm, could it be I didn't MFC all fixes I had done to help that, which are partly (mostly, all these days) existent in newer upstream version (esepcially the latest devels). I'll go an look in my 70 oustanding MFCs. Would be cool if you could test 9 temporary and see if things are better there. /bz -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Some questions about jails on FreeBSD9.0-RC1
> On 10/26/2011 03:12 AM, Patrick Lamaiziere wrote: >> Le Tue, 25 Oct 2011 22:52:55 +0200, >> carlopmart a écrit : >> >> Hello, >> >>>I have installed one FreeBSD 9.0-RC1 host to run different services >>> (dns, smtp and www only) using jails. This host has two physical >>> nics: em0 and em1. em0 is assigned to pyhiscal host, and I would like >>> to assign em1 to jails. But em0 and em1 are on different networks: >>> em0 is on 192.168.1.0/24 and em1 in 192.168.2.0/29. >>> >>>I have setup one jail using ezjail. My first surprise is that >>> ezjail only installs -RELEASE versions and not RC versions. Ok, I >>> supouse that it is normal. But my first question is: can I install a >>> FreeBSD 8.2 jail under a FreeBSD 9.0 host?? >> >> You may run 8.2 installed ports on 9.0 by using the port >> /usr/ports/misc/compat8x/ >> >> But I suggest to upgrade the port ASAP. >> >>>And the real question: How do I need to configure network under >>> this jail to access it? I have configured ifconfig param for em1 on >>> host's rc.conf, but what about the default route under this jail?? I >>> thought to use pf rules, but I am not sure. >> >> jail enforces the use of the jail IP address in the jail, but that's >> all. Just enable routing on the host. >> > > But, that is not possible. Between host and jail exists a firewall ... I > can't do simple routing with the host. Maybe a posible solution is to > use policy source routing ?? > > > > -- > CL Martinez > carlopmart {at} gmail {d0t} com > ___ I'm using FIBs. The host is in on a private network with gateway of 192.168.1.1 and jails are on public network with their own real/public gateway. FIBs work without the box becoming a gateway: %grep gateway /etc/rc.conf gateway_enable="NO" I have this in system startup to setup "public gateway" for jails: %cat /usr/local/etc/rc.d/0.setfib.sh #!/bin/sh echo setfib 1 for public jails /usr/sbin/setfib 1 /sbin/route add default 216.241.167.1 and in /usr/local/etc/ezjail/myjail I added this line to the end of configs: export jail_myjail_fib="1" [/usr/sbin/jail has FIB support built in, but at that time ezjail did not, so I had to manually add it in the config - nowadays I believe ezjail has FIB support natively, but the resulting config file is the same] The host is using NAT to get out via private IP, and jails are available via public IP. All the IPs are defined in rc.conf the normal _alias way. FIB support as I remember needs a custom kernel - not sure about 9, this is in 8.2. I even run openbsd spamd on the host and using FIBs to start the spamd daemon via a 'setfib 1' wrapper script: %cat /usr/local/etc/rc.d/obspamdfib.sh #!/bin/sh # # this just calls the orignal file, but with setfib 1 /usr/sbin/setfib 1 /usr/local/etc/rc.d.fib/obspamd $1 I had moved the 'obspamd' startup script to rc.d.fib just so a 'setfib 1' wrapper is called. ]Peter[ FIBs are awesome when you don't have many public IPs and when host is _only_ a jail host running no services ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: can audio CDs be played with ATA_CAM ?
On 10/26/2011 13:50, Daniel O'Connor wrote: On 26/10/2011, at 20:50, Claude Buisson wrote: P.S. As I can see reading GENERIC, ATA_CAM will be the default for 9.X so there is a risk of complaints from FreeBSD workstation users (who cares ?) after the release.. Does cdparanoia work for you? With cdparanoia-3.9.8_9: YES tested on 8.2 (from Sep 18) and 9.0 (from Sep 25) both with ATA_CAM Strange, I would have thought VLC would use the same sort of access method as VLC.. I don't know what it's trying so it's hard to know why it doesn't work :( Doing my home work step by step: I found only 1 place in VLC where the first message: [0x2caf2a3c] cdda access error: Could not set block size is emitted, after an: ioctl( p_vcddev->i_device_handle, CDRIOCSETBLOCKSIZE, &i_size ) CDRIOCSETBLOCKSIZE is defined in sys/cdrio.h, and in the kernel used in: sys/dev/ata/atapi-cd.c which is a brought into the kernel by: device atapicd So the natural question is: Is this ioctl supported with ATA_CAM (and atapicam) ? If not, what is to be used instead ? Claude Buisson ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
FreeBSD 9.0-RC1 freeze after swapoff/swapon procedure on md/vnode-backend file
Hi I get easy reproducible a hang-up servers that use the file-based swap file after swapoff / swapon procedure (in this case, some of the data must be swapped). For example: 1) dd if=/dev/zero of=/usr/swp1 bs=1m count=100 2) mdconfig -a -t vnode -f /usr/swp1 3) swapon /dev/md0 4) begin to allocated memory, for example by simple: tail /dev/zero 5) after a filling of some percent, do swapoff /dev/md0, then swapon /dev/md0. you can try this procedure again. The system may stop responding to commands and freezes or locks up after some time. From the outside - the core lives (icmp response goes) but the disk system is not available. PS: one of my server to my mind is frozen without swapoff/on - just had three swapfile, a day after he crashed. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: can audio CDs be played with ATA_CAM ?
On Wed, Oct 26, 2011 at 9:57 AM, Claude Buisson wrote: > > Doing my home work step by step: > > I found only 1 place in VLC where the first message: > > [0x2caf2a3c] cdda access error: Could not set block size > > is emitted, after an: > > ioctl( p_vcddev->i_device_handle, CDRIOCSETBLOCKSIZE, &i_size ) > > CDRIOCSETBLOCKSIZE is defined in sys/cdrio.h, and in the kernel used in: > > sys/dev/ata/atapi-cd.c > > which is a brought into the kernel by: > > device atapicd > > So the natural question is: > > Is this ioctl supported with ATA_CAM (and atapicam) ? > > If not, what is to be used instead ? Claude, Thanks for digging into this a bit. I just added some code to make it easier for applications to detect at runtime if ATA_CAM has been configured in the kernel: http://lists.freebsd.org/pipermail/svn-src-stable-9/2011-October/000114.html I am not 100% sure how the CD driver works with ATA_CAM. I think you might need to look at: src/sys/cam/scsi/scsi_cd.c and also read the cd(4) man page. We may need to extend scsi_cd.c, but I'm not sure. -- Craig Rodrigues rodr...@crodrigues.org ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: FreeBSD 9.0-RC1 freeze after swapoff/swapon procedure on md/vnode-backend file
On 26 October 2011 23:31, Subbsd wrote: > Hi > > I get easy reproducible a hang-up servers that use the file-based > swap file after swapoff / swapon procedure (in this case, some of the > data must be swapped). For example: > > 1) dd if=/dev/zero of=/usr/swp1 bs=1m count=100 > 2) mdconfig -a -t vnode -f /usr/swp1 > 3) swapon /dev/md0 > 4) begin to allocated memory, for example by simple: > tail /dev/zero > > 5) after a filling of some percent, do swapoff /dev/md0, then swapon > /dev/md0. you can try this procedure again. > > The system may stop responding to commands and freezes or locks up > after some time. From the outside - the core lives (icmp response > goes) but the disk system is not available. > > PS: one of my server to my mind is frozen without swapoff/on - just > had three swapfile, a day after he crashed. Something interesting while trying to reproduce your problem: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 1048970, size: 4096 swap_pager: indefinite wait buffer: bufobj: 0, blkno: 1057174, size: 4096 panic: swapoff: failed to locate 16056 swap blocks cpuid = 1 KDB: stack backtrace: db_trace_self_wrapper() at 0x802e009a = db_trace_self_wrapper+0x2a kdb_backtrace() at 0x80486d87 = kdb_backtrace+0x37 panic() at 0x8044f6ee = panic+0x2ee swapoff_one() at 0x80687425 = swapoff_one+0x475 sys_swapoff() at 0x8068789b = sys_swapoff+0x1bb amd64_syscall() at 0x806c60c9 = amd64_syscall+0x299 Xfast_syscall() at 0x806b1467 = Xfast_syscall+0xf7 --- syscall (424, FreeBSD ELF64, sys_swapoff), rip = 0x800ab307c, rsp = 0x7fffd9c8, rbp = 0 --- KDB: enter: panic [ thread pid 63255 tid 100211 ] Stopped at 0x8048696b = kdb_enter+0x3b:movq $0,0x735f72(%rip) Below is a trace for a process on another CPU that's doing intensive malloc+bzero in userland: db> bt 63066 Tracing pid 63066 tid 100199 td 0xfe000e89f000 cpustop_handler() at 0x806bb46b = cpustop_handler+0x2b ipi_nmi_handler() at 0x806bb540 = ipi_nmi_handler+0x50 trap() at 0x806c7035 = trap+0x2a5 nmi_calltrap() at 0x806b15bf = nmi_calltrap+0x8 --- trap 0x13, rip = 0x8043e0d0, rsp = 0x80dc4dc0, rbp = 0xff80908de750 --- _mtx_unlock_flags() at 0x8043e0d0 = _mtx_unlock_flags+0x170 swp_pager_meta_ctl() at 0x806841aa = swp_pager_meta_ctl+0xea swap_pager_haspage() at 0x80684272 = swap_pager_haspage+0x42 vm_fault_hold() at 0x8068e379 = vm_fault_hold+0x599 trap_pfault() at 0x806c6c26 = trap_pfault+0xe6 trap() at 0x806c733f = trap+0x5af calltrap() at 0x806b1183 = calltrap+0x8 --- trap 0xc, rip = 0x4006ed, rsp = 0x7fffdad0, rbp = 0x7fffdae0 --- That corresponds to kgdb: #9 0x8044f6e4 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:624 #10 0x80687425 in swapoff_one (sp=0xfe000dc3dc00, cred=0xff808e5bf340) at /usr/src/sys/vm/swap_pager.c:1774 #11 0x8068789b in sys_swapoff (td=0xfe000e90f000, uap=Variable "uap" is not available. ) at /usr/src/sys/vm/swap_pager.c:2236 #12 0x806c60c9 in amd64_syscall (td=0xfe000e90f000, traced=0) at subr_syscall.c:131 ---Type to continue, or q to quit--- #13 0x806b1467 in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:387 and (kgdb) thr 108 [Switching to thread 108 (Thread 100199)]#0 cpustop_handler () at /usr/src/sys/amd64/amd64/mp_machdep.c:1394 1394CPU_SET_ATOMIC(cpu, &stopped_cpus); (kgdb) bt #0 cpustop_handler () at /usr/src/sys/amd64/amd64/mp_machdep.c:1394 #1 0x806bb540 in ipi_nmi_handler () at /usr/src/sys/amd64/amd64/mp_machdep.c:1376 #2 0x806c7035 in trap (frame=0x80dc4d10) at /usr/src/sys/amd64/amd64/trap.c:200 #3 0x806b15bf in nmi_calltrap () at /usr/src/sys/amd64/amd64/exception.S:501 #4 0x8043e0d0 in _mtx_unlock_flags (m=0x80d8af80, opts=0, file=0x80791e48 "/usr/src/sys/vm/swap_pager.c", line=2040) at /usr/src/sys/kern/kern_mutex.c:221 [smth. wrong there -- no further stack: swap_pager_*, etc] Here both swap_pager_swapoff() and swp_pager_meta_ctl() contend on swhash_mtx. Or rather that's due to low limit set on retries counter? Let's see again for another crash: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 1062783, size: 4096 panic: swapoff: failed to locate 22133 swap blocks cpuid = 2 KDB: stack backtrace: db_trace_self_wrapper() at 0x802e009a = db_trace_self_wrapper+0x2a kdb_backtrace() at 0x80486d87 = kdb_backtrace+0x37 panic() at 0x8044f6ee = panic+0x2ee swapoff_one() at 0x80687425 = swapoff_one+0x475 sys_swapoff() at 0x8068789b = sys_swapoff+0x1bb amd64_syscall() at 0x806c60c9 = amd64_syscall+0x299 Xfast_syscall() at 0x806b1467 = Xfast_syscall+0xf7 --- syscall (424, FreeBSD ELF64, sys_swapoff), rip = 0x800ab307c, rsp = 0x7ff