Re: pf and short packets
On Tuesday 25 October 2005 23:21, Anton Nikiforov wrote: > tcpdump -n -e -ttt -x -i pflog0 host 127.0.0.1 > 34 rule 0/3(short): pass out on lo0: IP 127.0.0.1.514 > > 127.0.0.1.643: . ack 30 win 65535 > 0x: 4600 002c 6605 4000 0306 11c5 7f00 0001 F..,[EMAIL > PROTECTED] > 0x0010: 7f00 0001 0100 0202 0283 8129 5dab .)]. > 0x0020: 5db7 f2f2 5010 7dce ]...P...}... > 34 rule 0/3(short): pass out on lo0: IP 127.0.0.1.514 > > 127.0.0.1.643: . ack 30 win 65535 > 0x: 4600 002c d21d 4000 0306 a5ac 7f00 0001 F..,[EMAIL > PROTECTED] > 0x0010: 7f00 0001 0100 0202 0283 8129 5dab .)]. > 0x0020: 5db7 f2f2 5010 7dce ]...P...}... > > The rule for this packet is not a "log" one, but the sign (short) is > what i cannot understand. Read 'man 1 tcpdump' about key "-s". You command must be like "tcpdump -s 1000 -n -e -ttt -x -i pflog0 host 127.0.0.1" Change value 1000 to appropriate. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: make.conf for 6.0
On 25/10/05, Kris Kennaway <[EMAIL PROTECTED]> wrote: > On Mon, Oct 24, 2005 at 08:57:27PM +0100, Chris wrote: > > On 22/10/05, Chuck Swiger <[EMAIL PROTECTED]> wrote: > > > dick hoogendijk wrote: > > > > My make.conf contains (fbsd-5.4) > > > > CFLAGS= -O -pipe > > > > COPTFLAGS= -O -pipe > > > > > > > > Are these settings the same for the upcoming release6 or do I need to > > > > set -O2 in this new version? > > > > > > FreeBSD is moving towards "-O2 -fno-strict-aliasing" by default [1], but > > > there > > > is nothing wrong with using "-O" only. On most platforms, there isn't > > > much > > > difference between -O and -O2, although -O2 does help more with the x86 > > > architecture. > > > > > > -- > > > -Chuck > > > > > Hmm so using "-O2" is bad in 5.4 and it should be "-O2 > > -fno-strict-aliasing"? > > If you use any third-party software, yes. i.e. FreeBSD itself is > fine, but not ports. > > Kris > > > Ok thanks I already use it for ports, but just plain -O2 -pipe for the world and kernel. Chris ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Strange crashing/rebooting problem
On 10/25/05, Dan Charrois <[EMAIL PROTECTED]> wrote: > Hi all. I'm wondering if anyone can shed some light on a strange > crashing/rebooting problem I'm having. First, the specs: > > Hardware: Dell PowerEdge 2850 rack mounted server, Dual 3.4 Ghz Xeon, > 5 Gb memory [snip] You didn't mention, have you run Dell diagnostics on the machine to rule out hardware issues? Bryan ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: make installworld failure
Alexander 'alxl' Lobachov sat at his 'puter and typed on 10/26/2005 10:12: Hello, Just cvsuped and built the kernel and installed it ok, buildworld went clear also, tried to installworld and got this: $ sudo make installworld mkdir -p /tmp/install.QhTsbtJk for prog in [ awk cap_mkdb cat chflags chmod chown date echo egrep find grep ln make mkdir mtree mv pwd_mkdb rm sed sh sysctl test true uname wc zic; do cp `which $prog` /tmp/install.QhTsbtJk; done cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=i386 MACHINE=i386 CPUTYPE=athlon-xp GROFF_BIN_PATH=/usr/obj/usr/src/i386/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/i386/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/i386/legacy/usr/share/tmac PATH=/usr/obj/usr/src/i386/legacy/usr/sbin:/usr/obj/usr/src/i386/legacy/usr/bin:/usr/obj/usr/src/i386/legacy/usr/games:/usr/obj/usr/src/i386/usr/sbin:/usr/obj/usr/src/i386/usr/bin:/usr/obj/usr/src/i386/usr/games:/tmp/install.QhTsbtJk make -f Makefile.inc1 reinstall make: Permission denied *** Error code 126 Stop in /usr/src. *** Error code 1 Stop in /usr/src. The box was quite new actually, already running -STABLE maybe a few weeks old or so. Any hints how to fix it will be greatly appreciated. Thanks. Type this and give the output: sysctl kern.securelevel mount Thanks S. -- ---+-- | Subhro Sankha Kar \ / | GSM: +919831064613 -- Fax: +919831832913 \./ | MSN:[EMAIL PROTECTED] -- Yahoo: subhro82 (0Y0) | ICQ: 203567534 -- AIM: bsdboy1982 ooO--(_)--Ooo--+-- ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
make installworld failure
Hello, Just cvsuped and built the kernel and installed it ok, buildworld went clear also, tried to installworld and got this: $ sudo make installworld mkdir -p /tmp/install.QhTsbtJk for prog in [ awk cap_mkdb cat chflags chmod chown date echo egrep find grep ln make mkdir mtree mv pwd_mkdb rm sed sh sysctl test true uname wc zic; do cp `which $prog` /tmp/install.QhTsbtJk; done cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=i386 MACHINE=i386 CPUTYPE=athlon-xp GROFF_BIN_PATH=/usr/obj/usr/src/i386/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/i386/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/i386/legacy/usr/share/tmac PATH=/usr/obj/usr/src/i386/legacy/usr/sbin:/usr/obj/usr/src/i386/legacy/usr/bin:/usr/obj/usr/src/i386/legacy/usr/games:/usr/obj/usr/src/i386/usr/sbin:/usr/obj/usr/src/i386/usr/bin:/usr/obj/usr/src/i386/usr/games:/tmp/install.QhTsbtJk make -f Makefile.inc1 reinstall make: Permission denied *** Error code 126 Stop in /usr/src. *** Error code 1 Stop in /usr/src. The box was quite new actually, already running -STABLE maybe a few weeks old or so. Any hints how to fix it will be greatly appreciated. Thanks. -- Alexander 'alxl' Lobachov mailto:[EMAIL PROTECTED] KeyID: 0x0ACA53C6 Key fingerprint:8C07 4350 C429 C4E6 B4A9 BF59 1103 9E47 0ACA 53C6 pgpliCSZa29zE.pgp Description: PGP signature
math/grace port: "libXcursor.so.1.0" not found ??
Hi, I'm running FreeBSD 5-Stable. I only seem to encounter this problem with the math/graphical port 'grace', and the dlopen() call inthere. It seems to be a FreeBSD specific problem and I wonder if other people on this list encounter the same problem. This is the problem: 1. Install Grace from ports (math/grace) 2. Create $HOME/.grace/gracerc.user and put one line in this file: USE "pow" TYPE f_of_dd FROM "/usr/lib/libm.so" (this is the example from the Grace UsersGuide) 3. Start grace like this: $ xmgrace Shared object "libXcursor.so.1.0" not found, required by "xmgrace" DL module load failed: USE "pow" TYPE F_OF_DD FROM "/usr/lib/libm.so" Error at line 1 Because if this library problem, Grace cannot load "pow" from "/usr/lib/libm.so". However, apart from that, grace starts normally. The syntax in file "gracerc.user" is correct; I have verified this with the Grace mailinglist. The line "Shared object...not found" is the error message-string set by the dlopen() call in Grace: handle = (void *)dlopen("/usr/lib/libm.so", RTLD_LAZY) When I do a 'locate libXcursor.so.1.0', I get: /usr/compat/linux/usr/X11R6/lib/libXcursor.so.1.0.2 Why is dlopen() failing on "libXcursor.so.1.0" ? A possible hint could be that "libXcursor.so.1.0.2" appears when 'strings /usr/X11R6/lib/libX11.so.6'. Why is it in libX11.so.6 ?? Thanks for help or clues! Rob. __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
6.0 RC1 usbd.conf (and installation comments)
Hi, I've just overnight upgraded from 5 stable to 6 on one of my workstations. As I'm becoming used to expecting, this was a very smooth migration - my perennial thanks to all of the developers who make this type of operation almost trivial. A couple of notes on the extremely few 'gotchas' I experienced - I should quickly add that none of these are in any way serious: most files in /etc/rc.d changed, so installing them all with mergemaster was laborious - a note in UPDATING similar to that for 5.x: "The simplest solution is an 'rm -rf /etc/rc.d/*' and then 'mergemaster -i'." would have reminded me to do just that and saved about 10 minutes of clicking 'q', then 'i' :) I did, in this case, run mergemaster -i, but didn't think to do the above. On this note, I still can't work out how to use the edit-merge part of mergemaster properly, but it is certainly a pebkac issue. /etc/usbd.conf has lost the [Device] configuration for the mouse, which although doesn't prevent the mouse from working, it did mean that I had to add those lines again so that I could turn on '-z 4' for the scroll wheel. If this was the wrong way to do it, let me know - adding this item to the moused_flags didn't work. I'm actually wondering if this shouldn't be the default nowadays - what standard usb mouse _doesn't_ have one? DHCP configuration - for some reason my machine didn't acquire a default route on boot, but rerunning the dhclient script after boot caused the interface to be set up again successfully. I haven't looked into this further yet, I'll repost if it is a repeatable problem. I rebuilt all of my ports afterwards (with portupgrade -af), with no failures, and everything so far appears to be working fine. cheers, -- Joel Hatton -- Security Analyst| Hotline: +61 7 3365 4417 AusCERT - Australia's national CERT | Fax: +61 7 3365 7031 The University of Queensland| WWW: www.auscert.org.au Qld 4072 Australia | Email: [EMAIL PROTECTED] ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Strange crashing/rebooting problem
Jayton Garnett wrote: Hello, You should be using the IA-64 version of FreeBSD as these are Intel chips and nor AMD chips? FreeBSD 5.4 IA-64 is for the Intel EM64T/Xeon/Itainium CPU's, FreeBSD 5.4 AMD64 is for the AMD 64/x2/Opteron/FX CPU's. You will have more luck using the IA-64 release, I am not sure if you can cvsup the source and rebuild the IA-64 version so you might have to do a fresh install, and since you have backups of your databases it should not take you longer than 1hour to get it all running smoothly again. Kind regards, Jayton Garnett Hiyas, This is incorrect. The IA-64 builds are for Intel Itanium and Itanium-2 processors only [1]. The AMD64 builds are the correct ones to use for both AMD64 and Intel EM64T processors when 64-bit support is required [2]. Regards, Jase Thew. [1] http://www.freebsd.org/releases/5.4R/hardware-ia64.html#PROC-IA64 [2] http://www.freebsd.org/releases/5.4R/hardware-amd64.html#PROC ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Strange crashing/rebooting problem
Hello, You should be using the IA-64 version of FreeBSD as these are Intel chips and nor AMD chips? FreeBSD 5.4 IA-64 is for the Intel EM64T/Xeon/Itainium CPU's, FreeBSD 5.4 AMD64 is for the AMD 64/x2/Opteron/FX CPU's. You will have more luck using the IA-64 release, I am not sure if you can cvsup the source and rebuild the IA-64 version so you might have to do a fresh install, and since you have backups of your databases it should not take you longer than 1hour to get it all running smoothly again. Kind regards, Jayton Garnett Dan Charrois wrote: Hi all. I'm wondering if anyone can shed some light on a strange crashing/rebooting problem I'm having. First, the specs: Hardware: Dell PowerEdge 2850 rack mounted server, Dual 3.4 Ghz Xeon, 5 Gb memory Hard Drives: LSILogic PERC 4e/Di, configured as RAID 5, with 3 X 40 Gb disks OS: FreeBSD 5.4-RELEASE-p6 for amd64 Other related software: mysql Ver 14.7 Distrib 4.1.14, for portbld- freebsd5.4 (amd64) using 4.3 I currently have hyperthreading enabled, since I'm not too concerned about the security of the system (it's on an internal-only network, with no user accounts other than the administrator, and figure that if the security issue associated with hyperthreading is the only problem, it wouldn't hurt to get a bit more speed). It's intended to be a single-purpose MySQL server to other client machines via TCP/IP, and supposed to be a high reliability, fast as possible machine. But the problem is this. I have it set to run mysqlhotcopy a couple of times during the day to back up the databases. And twice now in the last month or so, when it starts to run, it brings down the server. But the odd thing is that it doesn't lock up indefinitely, or even reboot itself normally. Instead, it suddenly seems to quit as though someone unplugged it and then goes through the boot sequence. It's at a remote location from me, so I haven't been able to see the console while it goes through its problems, but according to /var/log/messages, everything is running fine, and then suddenly, starts to write its initial boot messages: sql syslogd: kernel boot file is /boot/kernel/kernel sql kernel: Copyright (c) 1992-2005 The FreeBSD Project. etc.. There are no logs of any "shutting down" variety, and sure enough, I get sql kernel: Mounting root from ufs:/dev/amrd0s1a sql kernel: WARNING: / was not properly dismounted sql kernel: WARNING: /usr was not properly dismounted messages written a bit later in the boot sequence. What gets me is that if the machine was "really" locking up due to a kernel panic or something, I would expect it to stay frozen and not restart itself. But within a couple of minutes of going down hard, it has rebooted itself. There isn't any kind of watchdog timer that reboots itself after a lockup that I'm not aware of, is there? Because of this, I sometimes don't even realize it's happened until I found that the odd MySQL database needs to be repaired, and then I checked the logs and see what's happened. According to the logs, it's almost as though it's getting physically unplugged midstream, then plugged back in and boots from there. But it's in a locked cabinet in a colocation centre with other machines of mine which aren't having the problem, and it's happened twice now at exactly the same time - just right as mysqlhotcopy is about to run. Considering that this machine is supposed to be high availability, being down for even a couple of minutes like this is a problem. Plus, I really don't like not understanding what's making it go down like it does, and I'm obviously concerned about data corruption to the databases when something like this happens. Does anyone have any advice on what may be wrong, or something to try? I really have no idea even how to begin to troubleshoot this problem. If you need any more information at all, please let me know. Thanks for your help! Dan -- Syzygy Research & Technology Box 83, Legal, AB T0G 1L0 Canada Phone: 780-961-2213 ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Strange crashing/rebooting problem
Hi all. I'm wondering if anyone can shed some light on a strange crashing/rebooting problem I'm having. First, the specs: Hardware: Dell PowerEdge 2850 rack mounted server, Dual 3.4 Ghz Xeon, 5 Gb memory Hard Drives: LSILogic PERC 4e/Di, configured as RAID 5, with 3 X 40 Gb disks OS: FreeBSD 5.4-RELEASE-p6 for amd64 Other related software: mysql Ver 14.7 Distrib 4.1.14, for portbld- freebsd5.4 (amd64) using 4.3 I currently have hyperthreading enabled, since I'm not too concerned about the security of the system (it's on an internal-only network, with no user accounts other than the administrator, and figure that if the security issue associated with hyperthreading is the only problem, it wouldn't hurt to get a bit more speed). It's intended to be a single-purpose MySQL server to other client machines via TCP/IP, and supposed to be a high reliability, fast as possible machine. But the problem is this. I have it set to run mysqlhotcopy a couple of times during the day to back up the databases. And twice now in the last month or so, when it starts to run, it brings down the server. But the odd thing is that it doesn't lock up indefinitely, or even reboot itself normally. Instead, it suddenly seems to quit as though someone unplugged it and then goes through the boot sequence. It's at a remote location from me, so I haven't been able to see the console while it goes through its problems, but according to /var/log/messages, everything is running fine, and then suddenly, starts to write its initial boot messages: sql syslogd: kernel boot file is /boot/kernel/kernel sql kernel: Copyright (c) 1992-2005 The FreeBSD Project. etc.. There are no logs of any "shutting down" variety, and sure enough, I get sql kernel: Mounting root from ufs:/dev/amrd0s1a sql kernel: WARNING: / was not properly dismounted sql kernel: WARNING: /usr was not properly dismounted messages written a bit later in the boot sequence. What gets me is that if the machine was "really" locking up due to a kernel panic or something, I would expect it to stay frozen and not restart itself. But within a couple of minutes of going down hard, it has rebooted itself. There isn't any kind of watchdog timer that reboots itself after a lockup that I'm not aware of, is there? Because of this, I sometimes don't even realize it's happened until I found that the odd MySQL database needs to be repaired, and then I checked the logs and see what's happened. According to the logs, it's almost as though it's getting physically unplugged midstream, then plugged back in and boots from there. But it's in a locked cabinet in a colocation centre with other machines of mine which aren't having the problem, and it's happened twice now at exactly the same time - just right as mysqlhotcopy is about to run. Considering that this machine is supposed to be high availability, being down for even a couple of minutes like this is a problem. Plus, I really don't like not understanding what's making it go down like it does, and I'm obviously concerned about data corruption to the databases when something like this happens. Does anyone have any advice on what may be wrong, or something to try? I really have no idea even how to begin to troubleshoot this problem. If you need any more information at all, please let me know. Thanks for your help! Dan -- Syzygy Research & Technology Box 83, Legal, AB T0G 1L0 Canada Phone: 780-961-2213 ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
pf and short packets
Dear ALL! Maybe someone can help me with my problem? I have no adea what is happening with my packets :( I have 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 box running pf. And i have ipcad daemon running (installed from ports) pf.conf says pass quick on lo0 all and when i'm trying to rsh to ipcad that is listening on anna# netstat -a|grep shell tcp4 0 0 localhost.shell *.*LISTEN anna# rsh -l root localhost show ip accounting i got no replay, but pflog says the following: anna# tcpdump -n -e -ttt -x -i pflog0 host 127.0.0.1 34 rule 0/3(short): pass out on lo0: IP 127.0.0.1.514 > 127.0.0.1.643: . ack 30 win 65535 0x: 4600 002c 6605 4000 0306 11c5 7f00 0001 F..,[EMAIL PROTECTED] 0x0010: 7f00 0001 0100 0202 0283 8129 5dab .)]. 0x0020: 5db7 f2f2 5010 7dce ]...P...}... 34 rule 0/3(short): pass out on lo0: IP 127.0.0.1.514 > 127.0.0.1.643: . ack 30 win 65535 0x: 4600 002c d21d 4000 0306 a5ac 7f00 0001 F..,[EMAIL PROTECTED] 0x0010: 7f00 0001 0100 0202 0283 8129 5dab .)]. 0x0020: 5db7 f2f2 5010 7dce ]...P...}... The rule for this packet is not a "log" one, but the sign (short) is what i cannot understand. The only place i have found this word is in man pflogd (reason why this packet appers in this log) When i'm disabling pf by pfctl -d everything works just fine and i can get my ip accounting. Best regards, Anton Nikiforov smime.p7s Description: S/MIME Cryptographic Signature
Re: DHCP DDNS updates.
>> FreeBSD 6-STABLE has imported dhclient from OpenBSD: >> >> OpenBSD dhclient as of OpenBSD 3.7 has been imported. It replaces the >> ISC DHCP client used in prior versions of FreeBSD. >> (http://www.freebsd.org/relnotes/6-STABLE/relnotes/i386/article.html) >> >> making /etc/dhclient.conf no longer accept this syntax: >> send fqdn.fqdn "some.host.name."; >> send fqdn.server-update on; >> >> Ironically, OpenBSD 3.8-current has reverted back to accepting this DDNS >> related syntax a month or so ago. >> >> Is there a chance we get a fresher merge from OpenBSD? If you are managing the DHCP server too, you can configure it to send the updates, instead from the client. My Unix clients are configured as follow: interface "if0" { send domain-name "example.com"; send host-name "hostname"; } The server has, in the conrresponding subnet : option fqdn.server-update true; option fqdn.encoded true; Regards, -- -jpeg. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: make.conf for 6.0
On Mon, Oct 24, 2005 at 08:57:27PM +0100, Chris wrote: > On 22/10/05, Chuck Swiger <[EMAIL PROTECTED]> wrote: > > dick hoogendijk wrote: > > > My make.conf contains (fbsd-5.4) > > > CFLAGS= -O -pipe > > > COPTFLAGS= -O -pipe > > > > > > Are these settings the same for the upcoming release6 or do I need to > > > set -O2 in this new version? > > > > FreeBSD is moving towards "-O2 -fno-strict-aliasing" by default [1], but > > there > > is nothing wrong with using "-O" only. On most platforms, there isn't much > > difference between -O and -O2, although -O2 does help more with the x86 > > architecture. > > > > -- > > -Chuck > > > Hmm so using "-O2" is bad in 5.4 and it should be "-O2 -fno-strict-aliasing"? If you use any third-party software, yes. i.e. FreeBSD itself is fine, but not ports. Kris pgp7q4p7ODuIS.pgp Description: PGP signature
Re: kmem_malloc(4096): kmem_map too small: 536870912 total allocated
On Tue, Oct 25, 2005 at 06:04:15PM +0200, Max Laier wrote: M> On Tuesday 25 October 2005 17:00, Gleb Smirnoff wrote: M> > Vladimir, M> > M> > please confirm that the attached patch fix your problem. The patch is M> > relative to src/sys tree. M> > M> > Kris, Christian, please review it. Thanks. M> M> Are you sure it's safe to free the nlminfo struct before calling to fdfree() M> in exit1()? It sounds like it might need the structure if there are pending M> locks? Just a guess, though. The locks are actually held on the server side, so we aren't leaking them here. Anyway, the fix is directly from BSD/OS, from where nlminfo have came from. M> On a side note, there are some whitespace errors in and before M> nlminfo_release(). Thanks. I'll take this into account. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kmem_malloc(4096): kmem_map too small: 536870912 total allocated
On Tuesday 25 October 2005 17:00, Gleb Smirnoff wrote: > Vladimir, > > please confirm that the attached patch fix your problem. The patch is > relative to src/sys tree. > > Kris, Christian, please review it. Thanks. Are you sure it's safe to free the nlminfo struct before calling to fdfree() in exit1()? It sounds like it might need the structure if there are pending locks? Just a guess, though. On a side note, there are some whitespace errors in and before nlminfo_release(). -- /"\ Best regards, | [EMAIL PROTECTED] \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | [EMAIL PROTECTED] / \ ASCII Ribbon Campaign | Against HTML Mail and News pgpvPsEBzghFs.pgp Description: PGP signature
Re: kmem_malloc(4096): kmem_map too small: 536870912 total allocated
Vladimir, please confirm that the attached patch fix your problem. The patch is relative to src/sys tree. Kris, Christian, please review it. Thanks. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE Index: nfsclient/nfs_lock.c === RCS file: /home/ncvs/src/sys/nfsclient/nfs_lock.c,v retrieving revision 1.40 diff -u -r1.40 nfs_lock.c --- nfsclient/nfs_lock.c6 Dec 2004 08:31:32 - 1.40 +++ nfsclient/nfs_lock.c25 Oct 2005 14:51:11 - @@ -62,9 +62,13 @@ #include #include +extern void (*nlminfo_release_p)(struct proc *p); + MALLOC_DEFINE(M_NFSLOCK, "NFS lock", "NFS lock request"); +MALLOC_DEFINE(M_NLMINFO, "nlminfo", "NFS lock process structure"); static int nfslockdans(struct thread *td, struct lockd_ans *ansp); +static void nlminfo_release(struct proc *p); /* * * A miniature device driver which the userland uses to talk to us. @@ -194,6 +198,7 @@ printf("nfslock: pseudo-device\n"); mtx_init(&nfslock_mtx, "nfslock", NULL, MTX_DEF); TAILQ_INIT(&nfslock_list); + nlminfo_release_p = nlminfo_release; nfslock_dev = make_dev(&nfslock_cdevsw, 0, UID_ROOT, GID_KMEM, 0600, _PATH_NFSLCKDEV); return (0); @@ -259,7 +264,7 @@ */ if (p->p_nlminfo == NULL) { MALLOC(p->p_nlminfo, struct nlminfo *, - sizeof(struct nlminfo), M_LOCKF, M_WAITOK | M_ZERO); + sizeof(struct nlminfo), M_NLMINFO, M_WAITOK | M_ZERO); p->p_nlminfo->pid_start = p->p_stats->p_start; timevaladd(&p->p_nlminfo->pid_start, &boottime); } @@ -381,3 +386,12 @@ return (0); } +/* + * Free nlminfo attached to process. + */ +void +nlminfo_release(struct proc *p) +{ +free(p->p_nlminfo, M_NLMINFO); +p->p_nlminfo = NULL; +} Index: nfsclient/nlminfo.h === RCS file: /home/ncvs/src/sys/nfsclient/nlminfo.h,v retrieving revision 1.2 diff -u -r1.2 nlminfo.h --- nfsclient/nlminfo.h 18 Sep 2001 23:31:53 - 1.2 +++ nfsclient/nlminfo.h 25 Oct 2005 14:40:30 - @@ -40,5 +40,3 @@ int getlk_pid; struct timeval pid_start; /* process starting time */ }; - -extern void nlminfo_release(struct proc *p); Index: kern/kern_exit.c === RCS file: /home/ncvs/src/sys/kern/kern_exit.c,v retrieving revision 1.268 diff -u -r1.268 kern_exit.c --- kern/kern_exit.c23 Oct 2005 12:19:08 - 1.268 +++ kern/kern_exit.c25 Oct 2005 14:45:35 - @@ -82,6 +82,9 @@ /* Required to be non-static for SysVR4 emulator */ MALLOC_DEFINE(M_ZOMBIE, "zombie", "zombie proc status"); +/* Hook for NFS teardown procedure. */ +void (*nlminfo_release_p)(struct proc *p); + /* * exit -- * Death of process. @@ -234,6 +237,12 @@ funsetownlst(&p->p_sigiolst); /* +* If this process has an nlminfo data area (for lockd), release it +*/ + if (nlminfo_release_p != NULL && p->p_nlminfo != NULL) + (*nlminfo_release_p)(p); + + /* * Close open files and release open-file table. * This may block! */ Index: sys/lockf.h === RCS file: /home/ncvs/src/sys/sys/lockf.h,v retrieving revision 1.18 diff -u -r1.18 lockf.h --- sys/lockf.h 25 Jan 2005 10:15:25 - 1.18 +++ sys/lockf.h 25 Oct 2005 14:51:28 - @@ -40,10 +40,6 @@ struct vop_advlock_args; -#ifdef MALLOC_DECLARE -MALLOC_DECLARE(M_LOCKF); -#endif - /* * The lockf structure is a kernel structure which contains the information * associated with a byte range lock. The lockf structures are linked into ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kmem_malloc(4096): kmem_map too small: 536870912 total allocated
Pete French wrote: >> I found the sources of the leak: if exim accessess ANY configuration/text >> files over NFS, there will be leak. And, how often exim will be called, then >> quicker your system dies. PF> Surely this has to be a problenm wth NFS in the kernel, not with exim PF> though? Did you log a FreeBSD PR on this ? I've been following your tracking PF> of it with interest, and I don't want it to get lost in the noise! So, the test: #include #include #include int main() { int lockfd; char* tempfile="/media/testfile"; lockfd=open(tempfile,O_CREAT); printf("Open errno: %d\n",errno); if (flock(lockfd, LOCK_SH|LOCK_NB)==-1) { printf("ERROR shared lock: %d\n",errno); } if (flock(lockfd, LOCK_EX|LOCK_NB)==-1) { printf("ERROR exclusive lock: %d\n",errno); } close(lockfd); } If *ANY* lock will be transfered over a wire, memory after them will not be freed. Regardless to errno. Even in case, where we do not start rpc.lockd (errno 45) or correctly start locking, in any case leak will be there. The only way to avoid leak is mount NFS share with -L (do not transfer fcntl() locks over a wire). Systems affected: any FreeBSD 6.0 up to rc1. Whoooh! 30 hours of investigations ;-) -- UKR.NET Postmaster ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kmem_malloc(4096): kmem_map too small: 536870912 total allocated
> I found the sources of the leak: if exim accessess ANY configuration/text > files over NFS, there will be leak. And, how often exim will be called, then > quicker your system dies. Surely this has to be a problenm wth NFS in the kernel, not with exim though? Did you log a FreeBSD PR on this ? I've been following your tracking of it with interest, and I don't want it to get lost in the noise! -pcf. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kmem_malloc(4096): kmem_map too small: 536870912 total allocated
I found the sources of the leak: if exim accessess ANY configuration/text files over NFS, there will be leak. And, how often exim will be called, then quicker your system dies. My main problem now is to build near-realtime mirroring solution nfs-to-local for around 20 files (up to 1Mb everything). Any /ports solution ? The next question to Philip Hazel: any comments why this happens ? Vladimir Sharun wrote: VS> We have 2xOpteron/2Gb RAM server with extensive disk load. Every week or two VS> it suddenly hangs with "kmem_malloc(4096): kmem_map too small 335bla-bla allocated". VS> I look onto handbook and put vm.kmem_size_max="536870912" onto /boot/loader.conf. VS> Today was the same with the new parameters. Is there any other solutions ? VS> # sysctl -a | grep kmem VS> vm.kmem_size: 536870912 VS> vm.kmem_size_max: 536870912 VS> vm.kmem_size_scale: 3 VS> The only vm.kmem_size_max on loader.conf, no vm.kmem_size. VS> We're running FreeBSD 6.0-BETA5 #0: Wed Sep 28 16:54:33 EEST 2005 VS> in i386 mode. The same was with 5.3/5.4 and NetBSD 2.0 on this machine. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
FreeBSD5.4 oops interesting message
Hello, list. Today, when i was working remotely with my proxy server this message appeared on console Assertion failed: (lu->lu_myreq->lr_watcher == ((void *)0)), function _lock_acquire, file /usr/src/lib/libpthread/sys/lock.c, line 170. There was no point about this message in /var/log/message. The proxy software is oops version 1.5.24. uname -srm is: FreeBSD 5.4-RELEASE-p8 i386 and dmesg is: Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.4-RELEASE-p8 #0: Fri Oct 21 12:08:06 AZST 2005 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/PROXY_AZERIN Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Athlon(tm) 64 Processor 3000+ (2009.79-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0xfc0 Stepping = 0 Features=0x78bfbff AMD Features=0xe050 real memory = 1610547200 (1535 MB) avail memory = 1572720640 (1499 MB) npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 cpu0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf0-0xcf3,0xcf8-0xcff on acpi0 pci0: on pcib0 isab0: at device 1.0 on pci0 isa0: on isab0 pci0: at device 1.1 (no driver attached) pci0: at device 2.0 (no driver attached) pci0: at device 2.1 (no driver attached) pci0: at device 2.2 (no driver attached) pci0: at device 5.0 (no driver attached) pci0: at device 6.0 (no driver attached) atapci0: port 0xf000-0xf00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 8.0 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 atapci1: port 0xdc00-0xdc0f,0xb70-0xb73,0x970-0x977,0xbf0-0xbf3,0x9f0-0x9f7 irq 10 at device 10.0 on pci0 ata2: channel #0 on atapci1 ata3: channel #1 on atapci1 pcib1: at device 11.0 on pci0 pci1: on pcib1 pcib2: at device 14.0 on pci0 pci2: on pcib2 pci2: at device 6.0 (no driver attached) fxp0: port 0xa000-0xa03f mem 0xf500-0xf50f,0xf510-0xf5100fff irq 5 at device 8.0 on pci2 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:90:27:5d:8d:a8 ncr0: port 0xa400-0xa4ff mem 0xf5102000-0xf5102fff,0xf5101000-0xf51010ff irq 11 at device 10.0 on pci2 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 orm0: at iomem 0xd-0xd0fff,0xc8000-0xc,0xc-0xc7fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa-0xb on isa0 Timecounter "TSC" frequency 2009787198 Hz quality 800 Timecounters tick every 10.000 msec ipfw2 initialized, divert disabled, rule-based forwarding enabled, default to accept, logging disabled ad0: 38165MB [77542/16/63] at ata0-master UDMA100 acd0: CDROM at ata0-slave PIO4 Waiting 2 seconds for SCSI devices to settle da0 at ncr0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device da0: 40.000MB/s transfers (20.000MHz, offset 16, 16bit), Tagged Queueing Enabled da0: 34732MB (71132959 512 byte sectors: 255H 63S/T 4427C) Mounting root from ufs:/dev/ad0s1a ohci0: mem 0xf8005000-0xf8005fff irq 10 at device 2.0 on pci0 usb0: OHCI version 1.0, legacy support usb0: on ohci0 usb0: USB revision 1.0 uhub0: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 4 ports with 4 removable, self powered ohci1: mem 0xf800-0xf8000fff irq 10 at device 2.1 on pci0 usb1: OHCI version 1.0, legacy support usb1: on ohci1 usb1: USB revision 1.0 uhub1: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 4 ports with 4 removable, self powered ehci0: mem 0xf8001000-0xf80010ff irq 10 at device 2.2 on pci0 usb2: EHCI version 1.0 usb2: companion controllers, 4 ports each: usb0 usb1 usb2: on ehci0 usb2: USB revision 2.0 uhub2: nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub2: 8 ports with 8 removable, self powered Any ideas? -- Elkhanzade Sarkhan Azerin ISP, U.Hajibeyov 36, Baku Systems Administrator Phone work : +994124982533 e-mail : [EMAIL PROTECTED] ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"