Invalid FFC node allocation algorithm (Was: maxusers and randomsystem freezes)
Hi, It seems that kern/32672 is not fixed yet on FreeBSD 4.5-STABLE. System 4Gb RAM, 4x700MHz When the system is not using all RAM, the FFS node memory grows up to a limit of 102400K which leads to a system deadlocking. *** Type InUse MemUse HighUse LimitRequests Limit Limit Size(s) FFS node 361722 90431K 90431K 102400K 91562170 0 256 kern.maxvnodes: 229508 kern.minvnodes: 57377 vm.stats.vm.v_vnodein: 206541 vm.stats.vm.v_vnodeout: 0 vm.stats.vm.v_vnodepgsin: 838385 vm.stats.vm.v_vnodepgsout: 0 debug.sizeof.vnode: 168 debug.numvnodes: 361773 debug.wantfreevnodes: 25 debug.freevnodes: 23 *** Kern/32672: * State-Changed-From-To: open-closed This is believed to be fixed in -stable (and thus for the upcoming 4.5 release). * So as it seems, it's really not fixed there... Regards Alexander Varshavchick, Metrocom Joint Stock Company Phone: (812)118-3322, 118-3115(fax) On Thu, 19 Dec 2002, Maxim Konovalov wrote: Date: Thu, 19 Dec 2002 17:05:14 +0300 (MSK) From: Maxim Konovalov [EMAIL PROTECTED] To: Varshavchick Alexander [EMAIL PROTECTED] Cc: Dmitry Morozovsky [EMAIL PROTECTED], David Schultz [EMAIL PROTECTED], Terry Lambert [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: maxusers and random system freezes On 16:51+0300, Dec 19, 2002, Varshavchick Alexander wrote: On Thu, 19 Dec 2002, Maxim Konovalov wrote: [...] [ Trim -questions ] On 16:21+0300, Dec 19, 2002, Varshavchick Alexander wrote: There seems to be archive posts already on the subject, the most informative of them is here: http://www.freebsd.org/cgi/getmsg.cgi?fetch=1093170+1102546+/usr/local/www/db/text/2001/freebsd-stable/20010923.freebsd-stable Did this issue got solved somehow? More specifically, how the size of the FFS node malloc area can be increased? Sounds like kern/32672. Yes it does, but the problem seems to remain in 4.5-STABLE, how can it be patched? * State-Changed-From-To: open-closed This is believed to be fixed in -stable (and thus for the upcoming 4.5 release). The problem was that the vnode/inode reclamation system depends on the VM system running out of memory and having to free vnodes/inodes up. Machines with large amounts of ram, however, will often run the malloc bucket for vnodes or inodes out before they run out of memory. Our solution is to enforce the kern.maxvnodes limit by proactively reclaiming vnodes/inodes when the limit is reached, even if there is still lots of free memory. * Can you point me to a code performing it, if it's fixed in the latest release? We should CC: Matt Dillon, dillon@. Could you please summarize all information and send a complete bug report to -hackers? [...] -- Maxim Konovalov, MAcomnet, Internet Dept., system engineer phone: +7 (095) 796-9079, mailto:[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
FEC doesn't build on 5.0
Hello, Neither of the original (http://people.freebsd.org/~wpaul/FEC/) nor the in tree FEC implementations build. In /usr/src/sys/modules/netgraph/fec change KMODDEPS to MODULES_DEPEND and type make: # make Warning: Object directory not changed from original /usr/src/sys/modules/netgrap h/fec @ - /usr/src/sys machine - /usr/src/sys/i386/include touch opt_inet.h touch opt_inet6.h cc -O -pipe -march=pentium3 -DINET -DINET6 -Wall -D_KERNEL -Wall -Wredundant-de cls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith - Winline -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I- -I. -I@ -I@/dev -I@/../include -I/usr/include -fno-common -mno-align-long-strings - mpreferred-stack-boundary=2 -ffreestanding -Wall -Wredundant-decls -Wnested-exte rns -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qu al -fformat-extensions -ansi -c /usr/src/sys/modules/netgraph/fec/../../../netg raph/ng_fec.c /usr/src/sys/netgraph/ng_fec.c: In function `ng_fec_addport': /usr/src/sys/netgraph/ng_fec.c:379: `ifnet_addrs' undeclared (first use in this function) /usr/src/sys/netgraph/ng_fec.c:379: (Each undeclared identifier is reported only once /usr/src/sys/netgraph/ng_fec.c:379: for each function it appears in.) /usr/src/sys/netgraph/ng_fec.c: In function `ng_fec_delport': /usr/src/sys/netgraph/ng_fec.c:449: `ifnet_addrs' undeclared (first use in this function) /usr/src/sys/netgraph/ng_fec.c: In function `ng_fec_input': /usr/src/sys/netgraph/ng_fec.c:763: warning: passing arg 1 of `bpf_mtap' from in compatible pointer type /usr/src/sys/netgraph/ng_fec.c: In function `ng_fec_start': /usr/src/sys/netgraph/ng_fec.c:981: warning: passing arg 1 of `bpf_mtap' from in compatible pointer type /usr/src/sys/netgraph/ng_fec.c: In function `ng_fec_constructor': /usr/src/sys/netgraph/ng_fec.c:1096: `ng_ether_input_p' undeclared (first use in this function) /usr/src/sys/netgraph/ng_fec.c:1100: `ETHER_BPF_SUPPORTED' undeclared (first use in this function) /usr/src/sys/netgraph/ng_fec.c: In function `ng_fec_shutdown': /usr/src/sys/netgraph/ng_fec.c:1191: `ng_ether_input_p' undeclared (first use in this function) /usr/src/sys/netgraph/ng_fec.c:1193: `ETHER_BPF_SUPPORTED' undeclared (first use in this function) /usr/src/sys/netgraph/ng_fec.c:1193: too many arguments to function `ether_ifdet ach' *** Error code 1 Stop in /usr/src/sys/modules/netgraph/fec. The above is a recent RELENG_5_0... Could somebody take a look at it? Thanks! --[ Free Software ISOs - http://www.fsn.hu/?f=download ]-- Attila Nagy e-mail: [EMAIL PROTECTED] Free Software Network (FSN.HU)phone @work: +361 210 1415 (194) cell.: +3630 306 6758 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Invalid FFC node allocation algorithm (Was: maxusers and randomsystem freezes)
:Hi, : :It seems that kern/32672 is not fixed yet on FreeBSD 4.5-STABLE. : :System 4Gb RAM, 4x700MHz : :When the system is not using all RAM, the FFS node memory grows up to a :limit of 102400K which leads to a system deadlocking. Well, there was some further work done to the vnode reclamation code after the 4.5 release. RELENG_4_5 has 1.249.2.23 RELENG_4_6 has 1.249.2.27. Peter Wemm introduced a major upgrade to the vnode reclamation in 1.249.2.24. I don't think I can really go back and backport this stuff to the 4.5 branch. If you upgrade to 4.6 or 4.7 and still have the problem I can look into it (the differences in this particular area of code between 4.6 and 4.7 are minor and it would be easy to make fixes in both branches). -Matt To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Invalid FFC node allocation algorithm (Was: maxusers and randomsystem freezes)
On Fri, 20 Dec 2002, Matthew Dillon wrote: :Hi, : :It seems that kern/32672 is not fixed yet on FreeBSD 4.5-STABLE. : :System 4Gb RAM, 4x700MHz : :When the system is not using all RAM, the FFS node memory grows up to a :limit of 102400K which leads to a system deadlocking. Well, there was some further work done to the vnode reclamation code after the 4.5 release. RELENG_4_5 has 1.249.2.23 RELENG_4_6 has 1.249.2.27. Peter Wemm introduced a major upgrade to the vnode reclamation in 1.249.2.24. I don't think I can really go back and backport this stuff to the 4.5 branch. If you upgrade to 4.6 or 4.7 and still have the problem I can look into it (the differences in this particular area of code between 4.6 and 4.7 are minor and it would be easy to make fixes in both branches). -Matt So, at least a possible cause of the server halts seems to have been cleared. As for now, we'll see if this server can be saved from the block-outs by periodically checking the freevnodes value and running a ram-consuming program to free vnodes if this value is getting too low. Or eventually upgrading to a new version. Thank you for the answer Alexander Varshavchick, Metrocom Joint Stock Company Phone: (812)118-3322, 118-3115(fax) To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Perl issue on freebsd 4.x?
In a message written on Fri, Dec 20, 2002 at 07:37:14AM +, Matthew Seaman wrote: I've used syslogging with FreeBSD 4.4/4.5. Have not tried it lately. /usr/bin/perl as shipped on 4.4, 4.5, and 4.7. The perl-5.6.1 and perl-5.8.0 ports show exactly the same behaviour on 4.7. I think I'm going to submit this is a perl bug in the end. Turns out I had a misunderstanding of how the C-library syslog worked, which carried over into perl. I thought both used inet sockets by default (which perl is clearly documented to do), and that syslog -s merely said only listen to things from your local ip (eg, -s was the same as -a box.ip -a 127.0.0.1). In reality, the libc syslog only knows how to do unix domain sockets (see /usr/src/lib/libc/gen/syslog.c, in particular connectlog). For some reason perl has chosen the opposite behavior as the default, to do inet sockets. For anyone running any sort of secure syslog this results in failure. -- Leo Bicknell - [EMAIL PROTECTED] - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - [EMAIL PROTECTED], www.tmbg.org msg38789/pgp0.pgp Description: PGP signature
Re: Perl issue on freebsd 4.x?
On Fri, 20 Dec 2002, Leo Bicknell wrote: For some reason perl has chosen the opposite behavior as the default, This is to maintain historical behaviour. Sys::Syslog never used to know how to do unix sockets at all so to not change behaviour of old scripts inet had to be the default. Andrew To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
RE: 3COM PCI FaxModem with shared IRQ causes FBSD to freeze
The subject line is the same subject line as kern/28856 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/28856 The above PR refers to an issue, with a workaround, for 5.0-CURRENT circa July 2001. I have nearly the identical issue under 4.7-RELEASE. I see an additional symptom, however, under my setup. With a kernel config that looks like this: #device sio0at isa? port IO_COM1 flags 0x10 irq 4 device sio0at isa? port IO_COM1 flags 0x10 irq 11 #device sio2at isa? disable port IO_COM3 irq 5 #device sio3at isa? disable port IO_COM4 irq 9 A dmesg looks like this: sio0: 3COM PCI FaxModem port 0xec00-0xec07 irq 5 at device 10.0 on pci0 sio0: moving to sio2 sio2: type 16550A ... sio0: configured irq 11 not in bitmap of probed irqs 0x10 sio0 at port 0x3f8-0x3ff irq 11 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A Note the 'sio0: moving to sio2' line. That's the new symptom. If I try to access sio0, I don't probe a modem. If I try to access sio2, my machine wedges up tight. I tried this with a stock kernel as well: device sio0at isa? port IO_COM1 flags 0x10 irq 4 device sio1at isa? port IO_COM2 irq 3 device sio2at isa? disable port IO_COM3 irq 5 device sio3at isa? disable port IO_COM4 irq 9 yeilds: sio0: 3COM PCI FaxModem port 0xec00-0xec07 irq 5 at device 10.0 on pci0 sio0: moving to sio4 sio4: type 16550A I've tried varying combos of the 'PnP BIOS' settings, to no avail. Of course, Win98 has no problem with the hardware, as-is. The idea of putting the modem on it's own IRQ (the workaround in the original PR) seems sound, but I'm being thwarted by this 'sio0: moving to sioN' behavior; I don't know why it's saying that, and I don't know which device I'm supposed to use for access afterward... 'sioN' seems to always resolve to a higher number than the number of sio devices I configured in my kernel. I'm seeing this problem described in a few other places: 4.6.2-RELEASE-p2 http://www.atm.tut.fi/list-archive/freebsd-stable/msg05830.html 4.7-stable circa Oct 2002 http://www.geocrawler.com/mail/msg.php3?msg_id=10027753list=152 but no one seems to be resolve it. Does anyone have any new advice on this matter? May not be new or a fix, but I had the same issues with a Dell Dimension L566cx and sioN moving around, and locking up the box (sharing IRQ) uname -v FreeBSD 4.7-STABLE #0: Sat Dec 7 21:58:02 EST 2002 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/FORTYTWO dmesg snip puc0: US Robotics (3Com) 3CP5609 PCI 16550 Modem port 0xdff0-0xdff7 irq 10 at device 11.0 on pci1 sio0: type 16550A uhci0: Intel 82801AA (ICH) USB controller port 0xef80-0xef9f irq 10 at d evice 31.2 on pci0 sio1: configured irq 3 not in bitmap of probed irqs 0x10 sio1 at port 0x3f8-0x3ff irq 3 on isa0 sio1: type 16550A and my kernel config looks like: device sio1at isa? port IO_COM1 irq 3 options CONSPEED=115200 device puc options PUC_FASTINTR I'm using the modem on: set device /dev/cuaa0 I have PnP off in the BIOS, and the options pnpbios out of the kernel. All *seems* to be working fine now, (execpt for multiple sound sources and the sysctl vchans kill all sound *shrugs*) so I hope this may shed some light, or offer some ideas. (please c.c me, as I'm not on the list, thank you) Jimmie James = -BEGIN GEEK CODE BLOCK- Version: 3.12 GMU dpu s+:+ a? C UB P+++ L E--- W+++ N+++ o K+ w--- O+++ M- V-- PS+++ PE+++ Y++ PGP+++ 5-- X+ R* !tv b DI D G++ e* h* r+ z** --END GEEK CODE BLOCK-- __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Syscall number.
Hello hackers... Simple example (from kld module): sysent[SYS_chmod].sy_call = myfunction; sysent[SYS_open].sy_call = myfunction; sysent[SYS_execve].sy_call = myfunction; int myfunction(register struct proc *p, register void *uap) { int syscallno; syscallno = ? return (0); } How to get syscall number inside myfunction()? I've always use method used in spy from Andrzej Bialecki: syscallno = p-p_md.md_regs-tf_eax; for i386 arch. But when I catch many syscalls I got false numbers. Hmm, not false numbers, one false numer: SYS___syscall (and I don't catch it). So is there some diffrent way to get syscall number (in -STABLE or in -CURRENT)? Anyone? -- Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. msg38792/pgp0.pgp Description: PGP signature
RE: panic: icmp_error: bad length
Hello All, I wonder if any patch has been produced/committed for this problem? Best Regards, Patrick Soltani. -Original Message- From: Robert Watson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 7:19 PM To: Ian Dowse Cc: Luigi Rizzo; Alexander Langer; Patrick Soltani; [EMAIL PROTECTED] Subject: Re: panic: icmp_error: bad length BTW, if this bug exists in 5.0 for the same reasons (or even different ones), we should try to generate a fix ASAP and get it committed. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects [EMAIL PROTECTED] Network Associates Laboratories On Thu, 12 Dec 2002, Ian Dowse wrote: In message [EMAIL PROTECTED], Luigi Rizzo writes: the diagnosis looks reasonable, though i do not remember changing anything related to this between 4.6 and 4.7 so i wonder why the error did not appear in earlier versions of the code. Yes strange - actually, it looks like the THERE IS NO FUNCTIONAL OR EXTERNAL API CHANGE IN THIS COMMIT commit may be to blame :-) Some fragments below. Ian bridge.c 1.16.2.2: +#ifdef PFIL_HOOKS ... -* before calling the firewall, swap fields the same as IP does. -* here we assume the pkt is an IP one and the header is contiguous ... - ip = mtod(m0, struct ip *); - NTOHS(ip-ip_len); - NTOHS(ip-ip_off); ip_fw.c 1.131.2.34: - if (0 BRIDGED) { /* not yet... */ - offset = (ntohs(ip-ip_off) IP_OFFMASK); + if (BRIDGED) { /* bridged packets are as on the wire */ + ip_off = ntohs(ip-ip_off); ip_len = ntohs(ip-ip_len); } else { To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Bootable FreeBSD CD
Greetings, How does the kernel on the FreeBSD install CD know which device to mount as root? I'm assuming it hasn't got a ROOTDEVNAME config option, since that would make it fairly specific to certain hardware. Mine always tries to mount fd0. thanks, sh To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Syscall number.
On Fri, Dec 20, 2002 at 07:43:37PM +0100, Pawel Jakub Dawidek wrote: + Simple example (from kld module): + + sysent[SYS_chmod].sy_call = myfunction; + sysent[SYS_open].sy_call = myfunction; + sysent[SYS_execve].sy_call = myfunction; + + int + myfunction(register struct proc *p, register void *uap) + { + int syscallno; + + syscallno = ? + + return (0); + } + + How to get syscall number inside myfunction()? + + I've always use method used in spy from Andrzej Bialecki: + + syscallno = p-p_md.md_regs-tf_eax; + + for i386 arch. + But when I catch many syscalls I got false numbers. + Hmm, not false numbers, one false numer: SYS___syscall (and I don't catch it). Ok, I've found solution (ripped from trap.c, ehh). int myfunction(register struct proc *p, register void *uap) { int scno; caddr_t params; scno = p-p_md.md_regs-tf_eax; params = (caddr_t)p-p_md.md_regs-tf_esp + sizeof(int); if (scno == SYS_syscall) { scno = fuword(params); params += sizeof(int); } else if (scno == SYS___syscall) { scno = fuword(params); params += sizeof(quad_t); } /* Now we got correct syscall number in 'scno'. */ [...] return (0); } -- Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. msg38795/pgp0.pgp Description: PGP signature
Re: Bootable FreeBSD CD
At 7:12 PM -0800 12/20/02, Sean Hamilton wrote: Greetings, How does the kernel on the FreeBSD install CD know which device to mount as root? I'm assuming it hasn't got a ROOTDEVNAME config option, since that would make it fairly specific to certain hardware. Mine always tries to mount fd0. You might want to check out http://www.sourceforge.net/projects/freebsdtogo/ It might be helpful for whatever you're trying to do... -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Bootable FreeBSD CD
--- Garance A Drosihn [EMAIL PROTECTED] wrote: At 7:12 PM -0800 12/20/02, Sean Hamilton wrote: Greetings, How does the kernel on the FreeBSD install CD know which device to mount as root? I'm assuming it hasn't got a ROOTDEVNAME config option, since that would make it fairly specific to certain hardware. Mine always tries to mount fd0. You might want to check out http://www.sourceforge.net/projects/freebsdtogo/ It might be helpful for whatever you're trying to do... -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message I think the quick answer is that the kernel on the install CD uses a built in image of a memory file system to mount as root. So, the default root device is a memory file system that can be guaranteed not to change (and permits you to remove the CD ROM once booting is over I think). This is probably the reason why FreeBSD needs more memory to install as conmpared to running normally (16MB for install vs. 6MB normally?). I think it is MDROOT/MFS or something similar in the kernel configuartion file. There are also man pages, but I forget the specific terms (mdroot() maybe? definately mfs(4)). __ Post your free ad now! http://personals.yahoo.ca To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
redundant firewall + vpn server howto
it's a bit of a work-in-progress, but if anyone is interested in setting up freebsd as a bridging ipfilter firewall + pptp vpn server, in rc.diskless2 mode, along with the option of having a redundant failover machine: http://isber.ucsb.edu/~randall/firewall/redundant/ despite the complexity at first sight, it's fairly easy to setup thanks to freebsd's including of ipfilter and ppp in the base system, along with a very easy way to setup using a solid state device as the main drive. and all the other utilities you need are in the ports tree. -- :// randall s. ehren :// voice 805.893.5632 :// systems administrator:// isber|survey|avss.ucsb.edu :// institute for social, behavioral, and economic research To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Perl issue on freebsd 4.x?
In a message written on Sat, Dec 21, 2002 at 03:03:53AM +1100, Andrew wrote: This is to maintain historical behaviour. Sys::Syslog never used to know how to do unix sockets at all so to not change behaviour of old scripts inet had to be the default. While of course only my opinion, but this to me seems a prime case of someone making a mistake early on that should be corrected, even at the expense of some backwards compatability. That said, I suspect making unix the default will not only fix some things, but it's unlikely to break anything. The current code does not allow you to specify the (inet) destination, it does a gethostname and then does a DNS lookup. How many boxes have a hostname that doesn't look up right in DNS so this fails, and thus the code fails? It should have been coded to 127.0.0.1, if it was going to do the inet thing. Since I don't see any flags to syslog to turn off unix domain sockets (although there is one to locate it at a different path) it seems assuming that exists is far safer than inet, where there are flags to turn it off, default security options in a base install that turn it off, and recomendations running around to turn it off. All things considered, if it's not going to be changed the documentation needs to be updated. The man page claims: NAME Sys::Syslog, openlog, closelog, setlogmask, syslog - Perl interface to the UNIX syslog(3) calls Note that syslog(3) in libc does not know how to do inet sockets at all. Thus it's not a perl interface to syslog(3), it should rather be called Perl implementation of the syslog protocol, similar to syslog(3). It may be picking at nits, but when I see something called an interface to...I assume it has the same semantics as the base code. -- Leo Bicknell - [EMAIL PROTECTED] - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - [EMAIL PROTECTED], www.tmbg.org msg39138/pgp0.pgp Description: PGP signature