Re: Device cloning
On Tue, 2002-06-11 at 06:45, Poul-Henning Kamp wrote: The idea is simple: the same device(major,minor) can be opened several times by different processes (or possibly threads within the same process) and each process (thread) will have unique device instance. Sorry, but this wont work for a large number of reasons. For one thing none of the dup(2) or fork(2) like systemcalls report what happens to the filedescriptors down to the device drivers so you have no way to correctly track which process or which instance you are working on. Can't you kludge this by creating /dev/foo0 and when it is opened replacing it with a different minor number? Or perhaps /dev/foo0 as a symlink to /dev/foo0.0 and when it is opened create /dev/foo0.1 and change the symlink. This is obviously a different major,minor pair but those are the constraints in the system :) -- 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 - 9A8C 569F 685A D928 5140 AE4B 319B 41F4 5D17 FDD5 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
On Mon, 10 Jun 2002, Maksim Yevmenkin wrote: MYHackers, MY MYThe project i'm working on might require some sort of MYdevice cloning. The current way of cloning, i.e. use MYDEVFS and allocate unique minor numbers, is not very MYgood for my purpose. MY MYThe idea is simple: the same device(major,minor) can MYbe opened several times by different processes (or MYpossibly threads within the same process) and each MYprocess (thread) will have unique device instance. MYDevice driver will create new instance, every time MYopen() called. It will use D_TRACKCLOSE flag and MYdestroy instances in close(). MY MYWhat kind of information should i store to identify MYeach instance? Is/Will it be possible to identify a MYsingle thread within a process? Is there any problems MYwith fork()? The support for the threads is optional. MYI can live with single instance per process. In MHO this idea is based on a fundamental misunderstanding of what a device is under unix. If you need such a behaviour you should put another abstraction on top of you devices (as the filesystem is put on top of disks and sockets on top of network devices), that handle multiple contexts for multiple processes. A device is just a device... harti -- harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: about beforeinstall target in /usr/share/mk/*.mk
On Mon, 10 Jun 2002, Masahide -mac- NODA wrote: In /usr/share/mk/bsd.*.mk, 'beforeinstall' target execute after install on current. You found it to doing below in current: % cd /usr/src/share/mk % make install -n install -c -o root -g wheel -m 444 bsd.README ... date '+%Y%m%d' /var/db/port.mkversion % but, in makefile, beforeinstall: date '+%Y%m%d' ${DESTDIR}/var/db/port.mkversion beforeinstall target execute after install. ### I found it at installing portupgrade from ports. :-) This bug seems to be mainly in bsd.file.mk. realinstall depends on both installfiles and beforeinstall, but there is no dependency of installfiles on beforeinstall. This can probably be fixed by adding the dependency (in bsd.files.mk). Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
Harti Brandt wrote: In MHO this idea is based on a fundamental misunderstanding of what a device is under unix. If you need such a behaviour you should put another abstraction on top of you devices (as the filesystem is put on top of disks and sockets on top of network devices), that handle multiple contexts for multiple processes. A device is just a device... I really disagree with this. SVR4 and AIX have supported clone devices for a very long time now, starting with support for pty's. Cloning eliminates several things: o The search requirement for allocating an instance of a device type; this is generally a linear search, through an O(n^2) interface, e.g. looking up the next pty in the space defined by /dev/pty* o The normal limit on the number of devices that's imposed because of both the namespace limits, and on static declaration of things that should be allocated on a per instance bases, up to the limits of system resources o The system dependence on naming that goes into building code that it portable between systems. For pty's, in particular, instance is identified via minor number; the need to actually try to open and obtain exclusive use of the master pty, up to the first unallocated one, and the fact that when you run out of names, you run out of pty's, are both enough, each on their own, to justify cloning devices. FreeBSD today can not run more than one VMWare seassion at a time because it lacks the ability to distinguish open instances to the device that exports the VMWare kernel context information to the user space application: because FreeBSD lacks device cloning. Rather than trying to say what someone should do, it'd be nice, at least in the case of commercial code that can't be demanded to be rewritten, and which runs under a non-native ABI on FreeBSD, to be able to support all of the functionality of the OS whose ABI is being emulated, and thus, if for no other reason, to support device cloning. It's not like third parties are going to be willing to port their code to FreeBSD, particularly after the last 6 years or so of being told *by FreeBSD people* to target the Linux ABI. So trying to change people wanting cloning in the first place is not really a winable fight. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Fixing could sleeep... was (Re: ../../../vm/uma_core.c:132
On 10-Jun-2002 Mike Makonnen wrote: Well, the real solution probably involves changing where we dink with uidinfo structs so we bump the reference count on teh new one before we grab the proc lock, change over to the new one while holding the proc lock, then release the reference to the old one after we are done. Well... this is basically what happens setuid - creates a new ucred - locks p - calls change_ruid() change_ruid - calls uifind() uifind - does MALLOC w/ M_WAITOK After thinking about it for a while, this is the solution I came up with: Each new struct ucred will carry an array of pointers to struct uidinfo. This will be an array of 3 elements (a spare for cr_ruidinfo, cr_uidinfo, null). Obviously, it gets added after -cr_endcopy. When crget() is called it calls a function whose job it is to create an array of pointers to struct uidinfo and allocate the memory for them. When uifind() is called it will be given an array of pointers to uidinfo structs (the ones from ucred), in addition to the uid it is to lookup. If it already has a uidinfo for that uid, then it returns that to the calling function. If it can't find the uid, then it unhooks (copies the address, and deletes it from the array) the last struct uidinfo from the array, initializes it, inserts it into the hashtable and returns it to the caller. When crfree is called it calls a function that deallocates the spare structs uidinfo. This solution has the advantage that the only code that has to change is the ucred and setuid/gid helper functions that already know about the struct uidinfo functions. In fact only three functions not related to uidinfo(9) need to be touched: proc0_init(), change_ruid(), change_uid(). The disadvantage is the memory bloat and a small amount of code complexity (but as I said, this is localized, and not very complex either). Do you like it? Should I go ahead and implement a patch? Anything I overlooked? It won't work if you have to change a uidinfo more than once. I still prefer just doing the uifind() at the beginning of the function, passing in the uidinfo pointer to the chnage_fooid() functions, and adding cleanup uifree's in case of failure. -- John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/ Power Users Use the Power to Serve! - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
RE: new zero copy sockets snapshot, WITNESS problems
On 10-Jun-2002 Kenneth D. Merry wrote: 3. ti_attach() calls bus_alloc_resource(), which through a ton of calls ends up calling vm_map_entry_create(), same problem as above. 4. ti_attach() calls bus_setup_intr(), which through various calls ends up calling ithread_create(), which calls malloc() with M_WAITOK. 5. ti_attach() calls bus_setup_intr(), which through various calls ends up calling ithread_create(), which calls kthread_create(), which calls fork1(), which calls uma_zalloc() with M_WAITOK. 6. ti_attach() calls bus_setup_intr(), which through various calls ends up calling ithread_create(), which calls kthread_create(), which calls fork1(), which calls MALLOC() with M_WAITOK in various places. 7. see the previous entry, fork1() calls fdcopy(), which calls MALLOC() with M_WAITOK. 8. see entry 6, fork1() calls vm_forkproc(), which calls pmap_new_proc(), which calls vm_object_allocate(), which does a uma_zalloc with M_WAITOK. 9. see above, pmap_new_proc() calls kmem_alloc_nofault(), which calls vm_map_find(), which through several calls calls vm_map_entry_create(). 10. fork1() calls pmap_new_thread(), which calls vm_object_allocate(), which does a uma_zalloc() with M_WAITOK. 11. ti_attach() calls bus_setup_intr(), which ends up calling ithread_add_handler() through several layers of indirection. ithread_add_handler() calls malloc with M_WAITOK. ti_attach() doesn't need to hold its lock while doing these things. Don't actually enable the logical network device until all the setup for it is done. 12. ti_attach() calls contigmalloc() *with* M_NOWAIT, but contigmalloc1() calls vm_map_insert(), which calls vm_map_entry_create(), which calls uma_zalloc with M_WAITOK. 13. ti_attach() calls jumbo_vm_init() (jumbo buffer initialization function), which calls kmem_alloc_pageable(). See number 1 above, same problem here with vm_map_entry_create(). 14. jumbo_vm_init() calls malloc() *with* M_NOWAIT, but vm_map_insert() gets called, which calls vm_map_entry_create(), which calls uma_zalloc() with M_WAITOK. 15. several more instances, the same as 14, but vm_map_entry_create() gets called through a slightly different path from the same root malloc() call in jumbo_vm_init(). Same as above with regards to ti_attach(). - the bus_setup_intr(), or rather the kthread code in general apparantly isn't safe to be called while holding a mutex. This is the cause of the problems in entries 4, 5, 6, 7, 8, 9, 10, and 11. Yes. -- John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/ Power Users Use the Power to Serve! - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
On Tue, 11 Jun 2002, Terry Lambert wrote: TLHarti Brandt wrote: TL In MHO this idea is based on a fundamental misunderstanding of what a TL device is under unix. If you need such a behaviour you should put another TL abstraction on top of you devices (as the filesystem is put on top of TL disks and sockets on top of network devices), that handle multiple TL contexts for multiple processes. A device is just a device... TL TLI really disagree with this. SVR4 and AIX have supported clone TLdevices for a very long time now, starting with support for pty's. TL TLCloning eliminates several things: TL TLoThe search requirement for allocating an instance of a TL device type; this is generally a linear search, through TL an O(n^2) interface, e.g. looking up the next pty in the TL space defined by /dev/pty* TL TLoThe normal limit on the number of devices that's imposed TL because of both the namespace limits, and on static TL declaration of things that should be allocated on a per TL instance bases, up to the limits of system resources TL TLoThe system dependence on naming that goes into building TL code that it portable between systems. TL TLFor pty's, in particular, instance is identified via minor number; TLthe need to actually try to open and obtain exclusive use of the TLmaster pty, up to the first unallocated one, and the fact that TLwhen you run out of names, you run out of pty's, are both enough, TLeach on their own, to justify cloning devices. TL TLFreeBSD today can not run more than one VMWare seassion at a time TLbecause it lacks the ability to distinguish open instances to the TLdevice that exports the VMWare kernel context information to the TLuser space application: because FreeBSD lacks device cloning. TL TLRather than trying to say what someone should do, it'd be nice, TLat least in the case of commercial code that can't be demanded to TLbe rewritten, and which runs under a non-native ABI on FreeBSD, TLto be able to support all of the functionality of the OS whose TLABI is being emulated, and thus, if for no other reason, to TLsupport device cloning. TL TLIt's not like third parties are going to be willing to port their TLcode to FreeBSD, particularly after the last 6 years or so of TLbeing told *by FreeBSD people* to target the Linux ABI. TL TLSo trying to change people wanting cloning in the first place is TLnot really a winable fight. Terry, I was talking about real devices, not pseudo devices that you can get out of thin air. Device driver for real devices should be just what they are: device drivers. If you take a disk driver, then there is no code there that tries to present multiple contexts to multiple openers - supporting this is the task of the file system. If you take a sound card, the multiplexing stuff, that handles multiple processes open the soundcard should not be in the driver, but in the abstraction above. The same holds for the network devices. The situation is different for pseudo devices which you can create on demand. harti -- harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
Harti Brandt wrote: I was talking about real devices, not pseudo devices that you can get out of thin air. Device driver for real devices should be just what they are: device drivers. If you take a disk driver, then there is no code there that tries to present multiple contexts to multiple openers - supporting this is the task of the file system. If you take a sound card, the multiplexing stuff, that handles multiple processes open the soundcard should not be in the driver, but in the abstraction above. The same holds for the network devices. The situation is different for pseudo devices which you can create on demand. This is true for most real devices, but not all of them. For a disk device, it would be nice if I could ioctl() it to change it's instance to that of a parent, e.g. for slice management. For a sound device, it would be nice if multiple instances to the devices were mux'ed. I've had cases where the program I was using was using a smaller number that the total available channels, and it would have been nice if the next open instance got the remaining channels, rather than a device in use error. You'd have to manage this by giving all remaining available channels to an opener, and then having them ioctl() the unused ones back (e.g. allocate N when there are M available, means give M-N back). For a DVD, it would be nice if you could select the instance of the device you were going to get for seperation of the ISO9660 and UDF FS's (e.g. which record boundary the device actually used). The way that OS X supports this is by doing DVD mounts on both the character and block device seperately. For FreeBSD, UDF support, which has to have access to the ISO9660 FS for the purposes of index access, is much more messy. You could also make an argument for multiple input devices and the management of which one you get when you open /dev/mouse. Finally, there's a long history on SCO Xenix and UNIX, starting with Computone multiport serial cards, of multiplexing access to the device seperately for printing vs. terminal I/O. Yes, Digiboard and other vendors handle this by having two device nodes for a single pgysical device, and maintaining a state machine for the escape sequences. But this is really a matter of preference, not necessity. Writing to one instance, you talk to the terminal, and writing to the other, you talk to the aux port. I don't think the original poster wanted cloning for support on physical devices for which there was a 1:1 relationship anyway (8^)), but there *are* cases where it could be useful. Actually, I think the original poster never really disclosed *what* they wanted to use the feature for... -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
On Tue, 11 Jun 2002, Terry Lambert wrote: TLHarti Brandt wrote: TL I was talking about real devices, not pseudo devices that you can get out TL of thin air. Device driver for real devices should be just what they are: TL device drivers. If you take a disk driver, then there is no code there TL that tries to present multiple contexts to multiple openers - supporting TL this is the task of the file system. If you take a sound card, the TL multiplexing stuff, that handles multiple processes open the soundcard TL should not be in the driver, but in the abstraction above. The same holds TL for the network devices. The situation is different for pseudo devices TL which you can create on demand. TL TLThis is true for most real devices, but not all of them. TL TLFor a disk device, it would be nice if I could ioctl() it to change TLit's instance to that of a parent, e.g. for slice management. Can't see any 'cloning' here. TLFor a sound device, it would be nice if multiple instances to the TLdevices were mux'ed. I've had cases where the program I was using TLwas using a smaller number that the total available channels, and TLit would have been nice if the next open instance got the remaining TLchannels, rather than a device in use error. You'd have to manage TLthis by giving all remaining available channels to an opener, and TLthen having them ioctl() the unused ones back (e.g. allocate N TLwhen there are M available, means give M-N back). That has also nothing to do with cloning. Look at the current pcm driver - it just has a device entry per channel. Where cloning could come into the play is when more than one process tries to open a 1-channel device and you want to mix the audio. As I said this would be a task of a layer above the sound driver (just as X 'multiplexes' N processes onto one display device). Unfortunately there is no good sound API up to now. TLFor a DVD, it would be nice if you could select the instance of the TLdevice you were going to get for seperation of the ISO9660 and UDF TLFS's (e.g. which record boundary the device actually used). The way TLthat OS X supports this is by doing DVD mounts on both the character TLand block device seperately. For FreeBSD, UDF support, which has to TLhave access to the ISO9660 FS for the purposes of index access, is TLmuch more messy. No cloning here. TLYou could also make an argument for multiple input devices and the TLmanagement of which one you get when you open /dev/mouse. Again you just get it the wrong way around. You need per process/open context if you try to put the multiplexing of ONE mouse between MULTIPLE processes into the hardware mouse driver. Again this would be plain wrong. TLFinally, there's a long history on SCO Xenix and UNIX, starting with TLComputone multiport serial cards, of multiplexing access to the TLdevice seperately for printing vs. terminal I/O. Yes, Digiboard and TLother vendors handle this by having two device nodes for a single TLpgysical device, and maintaining a state machine for the escape TLsequences. But this is really a matter of preference, not necessity. TLWriting to one instance, you talk to the terminal, and writing to the TLother, you talk to the aux port. Again this is not about 'cloning a physical' device. TLI don't think the original poster wanted cloning for support on TLphysical devices for which there was a 1:1 relationship anyway TL(8^)), but there *are* cases where it could be useful. TL TLActually, I think the original poster never really disclosed *what* TLthey wanted to use the feature for... That's true... From reading the original post I was under the impression that this is again a 'hey, I write a device driver and I need to track the number of opens and to tack a context onto each open' that periodically comes up. If I'm wrong, well, sorry then... harti -- harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: GCC3.1 internal compiler error when compiling XFree86-4-libraries
On Mon, Jun 10, 2002 at 09:18:32PM +0200, Szilveszter Adam wrote: Sorry David, but I experienced the same thing. No matter if I used the base system c++ compiler, or the latest gcc31 port. The problem is all the more interesting, because X worked for me fine, no matter what compiler I used to build it (with a few patches from the XFree86-4-libraries port) and libGLU is the only part of XFree that is wirtten in C++. If I specify -lstdc++ on the link line of any programs that use libGLU, it works (see xc/programs/glxinfo). My -CURRENT is from Saturday (8th), NO_CXX is *not* set. me too. current from sunday, and i had to link libstdc++ manually to it, for it to work. after that - no probs -tacho To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Fixing could sleeep... was (Re: ../../../vm/uma_core.c:132
On Tue, 11 Jun 2002 04:36:41 -0400 (EDT) John Baldwin [EMAIL PROTECTED] wrote: This solution has the advantage that the only code that has to change is the ucred and setuid/gid helper functions that already know about the struct uidinfo functions. In fact only three functions not related to uidinfo(9) need to be touched: proc0_init(), change_ruid(), change_uid(). The disadvantage is the memory bloat and a small amount of code complexity (but as I said, this is localized, and not very complex either). Do you like it? Should I go ahead and implement a patch? Anything I overlooked? It won't work if you have to change a uidinfo more than once. I still prefer just doing the uifind() at the beginning of the function, passing in the uidinfo pointer to the chnage_fooid() functions, and adding cleanup uifree's in case of failure. Yes... if you don't go through the setuid/gid family of functions. Currently, the only place uifind() is called, besides change_[re]uid() is in proc0_init. My assumption was that you need to change the uidinfo only when changing ucreds (either an exec or specific seteuid,etc), and that when you change ucreds you always crget() a new one and not reuse the old one. So, in this case there could be a maximum of 2 allocations (both on the new ucred): one for cr_uidinfo and one for cr_ruidinfo. With that assumption in mind I wanted to compartmentalize the allocation of struct uidinfo. It seemed cleaner to me to have only uifind() and its immediate callers have intimate knowledge struct uidinfo creation and destruction, but I suppose if setuid() (for example) knows enough to compare cr_ruid et al, its knowledge of one more member isn't that bad. Basically, I wanted to avoid having to touch every function that changes the r/e uid, and touch just those that already dealt with the uidinfo. In any case, I'll submit a patch to you doing it the way you suggested. Cheers, Mike Makonnen To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: libncurses cannot show the first column on the screen
On Wed, Jun 05, 2002 at 04:28:35 -0700, Shizuka Kudo wrote: The libncurses commit on May 21 seems not working properly. I cvsupped latest current ports, build a typical ncurses app (lynx) and find that the first column is not shown correctly. Bascially it is blank This bug reason now is known (thanx to Thomas). Peter, please upgrade to newer version to fix it. --- That was a blunder which was fixed (in the 20020525 patch): 20020523 + correct and simplify logic for lib_pad.c change in 20020518 (reported by Mike Castle). 20020518 + fix lib_pad.c for case of drawing a double-width character which falls off the left margin of the pad (patch by Kriang Lerdsuwanakij [EMAIL PROTECTED]) -- -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: World is broken
Ruslan Ermilov wrote: On Mon, May 27, 2002 at 02:28:26PM +0300, Maxim Sobolev wrote: Finally I have decided to give post gcc-3.1 perless world a try, but found that world doesn't build. :(( The system in question is 5-CURRENT makeworlded about a month ago. Any ideas? Your /usr/include is hosed, well, actually your machine/stdarg.h is the broken version (rev. 1.12). Please manually install the revision 1.14 under /usr/include/machine/ and try again. Still broken. :(( Following is piece of log (sources cvsup'ed today). Any ideas are appreciated. -Maxim root@notebook# make buildworld -- Rebuilding the temporary build tree -- rm -rf /usr/obj/usr/src/i386 [...] -- stage 4: building libraries -- cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=i386 MACHINE=i386 OBJFORMAT_PATH=/usr/obj/usr/src/i386/usr/libexec GROFF_BIN_PATH=/usr/obj/usr/src/i386/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/i386/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/i386/usr/share/tmac DESTDIR=/usr/obj/usr/src/i386 INSTALL=sh /usr/src/tools/install.sh PATH=/usr/obj/usr/src/i386/usr/sbin:/usr/obj/usr/src/i386/usr/bin:/usr/obj/usr/src/i386/usr/games:/sbin:/bin:/usr/sbin:/usr/bin make -f Makefile.inc1 -DNOHTML -DNOINFO -DNOMAN -DNOFSCHG libraries cd /usr/src; make -f Makefile.inc1 _startup_libs; make -f Makefile.inc1 _prebuild_libs; make -f Makefile.inc1 _generic_libs; cd /usr/src/gnu/lib/csu; make DIRPRFX=gnu/lib/csu/ depend; make DIRPRFX=gnu/lib/csu/ all; make DIRPRFX=gnu/lib/csu/ install make -f /usr/src/gnu/lib/csu/../../usr.bin/cc/cc_tools/Makefile MFILE=/usr/src/gnu/lib/csu/../../usr.bin/cc/cc_tools/Makefile GCCDIR=/usr/src/gnu/lib/csu/../../../contrib/gcc tconfig.h echo 'struct rtx_def;' tconfig.h echo 'typedef struct rtx_def *rtx;' tconfig.h echo 'struct rtvec_def;' tconfig.h echo 'typedef struct rtvec_def *rtvec;' tconfig.h echo 'union tree_node;' tconfig.h echo 'typedef union tree_node *tree;'tconfig.h echo '' tconfig.h echo '#include ansidecl.h' tconfig.h echo '#include i386/i386.h'tconfig.h echo '#include i386/att.h' tconfig.h echo '#include dbxelf.h' tconfig.h echo '#include elfos.h'tconfig.h echo '#include freebsd-native.h' tconfig.h echo '#include freebsd-spec.h' tconfig.h echo '#include freebsd.h' tconfig.h echo '#include i386/freebsd.h' tconfig.h echo '#include defaults.h' tconfig.h echo '#ifndef POSIX' tconfig.h echo '# define POSIX'tconfig.h echo '#endif'tconfig.h echo '#define CONFIG_SJLJ_EXCEPTIONS 0' tconfig.h rm -f .depend CC=cc MKDEP_CPP_OPTS=-M -DCRT_BEGIN mkdep -f .depend -a -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -I/usr/src/gnu/lib/csu/../../../contrib/gcc/config -I/usr/src/gnu/lib/csu/../../../contrib/gcc -I. -I/usr/src/gnu/lib/csu/../../usr.bin/cc/cc_tools /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c:0: malformed option `-A system=unix' /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c:0: malformed option `-A system=bsd' /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c:0: malformed option `-A system=FreeBSD' /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c:0: malformed option `-A cpu=i386' /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c:0: malformed option `-A machine=i386' mkdep: compile failed *** Error code 1 Stop in /usr/src/gnu/lib/csu. *** Error code 1 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Looking for comments on a new utility...
Hej, As some of you may have noticed, I've done some poking of ps(1) lately, and this has brought attention of people who have ideas for things that they would like to see done to ps(1) :) The most notable request was for a feature I've missed having in our ps(1) for a while, the ability to get a tree of processes printed so you can tell who is whose child, etc. ps(1)'s internals, however, didn't seem quite right to me, but after about 10 minutes reading kvm(3) manpages and recalling some tricks with recursive programming to produce an N-level tree with as many as N-1 elements, I had come up with a simple utility to print out a process tree. You can find the code here: http://people.freebsd.org/~jmallett/.proctree/proctree.c And some example output from a cluster machine here: http://people.freebsd.org/~jmallett/.proctree/proctree.out Lots of people have given feedback that they don't care much for the \_ formatting of the tree, and I'm willing to look at patches that provide noticably more readable output. I'd actually like to hear what information otherwise could better be included along with associated login, pid, cpu, etc. And I'd really like to hear thoughts about inclusion of this into the tree. Does anyone hold the opinion that it absolutely cannot be included? Does anyone have any suggestions to make the code better? I'm asking you guys, the CURRENT userbase, since you are users who obviously seem to take more of an interest in FreeBSD's future, etc. :) Thanks, juli. -- Juli Mallett [EMAIL PROTECTED] FreeBSD: The Power To Serve Perception is prejudice / Don't classify me / Accept me as me / Not what you see To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
Solaris has something similar in /usr/proc/bin/ptree. One of the things it lets you do is specify _which_ user to use. Isn't the kvm_*() interface somewhat frowned upon? Is there anything missing from /proc that you need kvm_* for? -- Cheers, Peter. Juli Mallett wrote: Hej, As some of you may have noticed, I've done some poking of ps(1) lately, and this has brought attention of people who have ideas for things that they would like to see done to ps(1) :) The most notable request was for a feature I've missed having in our ps(1) for a while, the ability to get a tree of processes printed so you can tell who is whose child, etc. ps(1)'s internals, however, didn't seem quite right to me, but after about 10 minutes reading kvm(3) manpages and recalling some tricks with recursive programming to produce an N-level tree with as many as N-1 elements, I had come up with a simple utility to print out a process tree. You can find the code here: http://people.freebsd.org/~jmallett/.proctree/proctree.c And some example output from a cluster machine here: http://people.freebsd.org/~jmallett/.proctree/proctree.out Lots of people have given feedback that they don't care much for the \_ formatting of the tree, and I'm willing to look at patches that provide noticably more readable output. I'd actually like to hear what information otherwise could better be included along with associated login, pid, cpu, etc. And I'd really like to hear thoughts about inclusion of this into the tree. Does anyone hold the opinion that it absolutely cannot be included? Does anyone have any suggestions to make the code better? I'm asking you guys, the CURRENT userbase, since you are users who obviously seem to take more of an interest in FreeBSD's future, etc. :) Thanks, juli. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
Le 2002-06-11, Juli Mallett écrivait : feature I've missed having in our ps(1) for a while, the ability to get a tree of processes printed so you can tell who is whose child, etc. Yes, this would be an invaluable feature! Even nicer would be a user interface (command line, output style) consistent with the existing Linux pstree utility. This one also has a nice functionality: by default it will collapse all siblings with the same name, in order to limit display clutter, eg: |-omniNames---omniNames---3*[omniNames] with the following being printed if you ask for pids ('-p'): |-omniNames(313)---omniNames(335)-+-omniNames(336) | |-omniNames(338) | `-omniNames(345) (note: this is not the same as our sysutils/pstree port, which postprocesses the output of ps(1)). One version of the Linux pstree is available from the psmisc port. Another, more recent, has been ported to several platforms (including NetBSD), see http://www.chiark.greenend.org.uk/~bjharris/. Thomas. -- [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
On Tue, 11 Jun 2002 05:15:17 MST, Juli Mallett wrote: As some of you may have noticed, I've done some poking of ps(1) lately, and this has brought attention of people who have ideas for things that they would like to see done to ps(1) :) The most notable request was for a feature I've missed having in our ps(1) for a while, the ability to get a tree of processes printed so you can tell who is whose child, etc. Like pstree in the ports tree? Ciao, Sheldon. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
Juli Mallett [EMAIL PROTECTED] writes: ps(1)'s internals, however, didn't seem quite right to me, but after about 10 minutes reading kvm(3) manpages and recalling some tricks with recursive programming to produce an N-level tree with as many as N-1 elements, I had come up with a simple utility to print out a process tree. Don't do anything in ps(1) that depends on libkvm. It has to be doable with sysctl as well. DES -- Dag-Erling Smorgrav - [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
* Thomas Quinot [EMAIL PROTECTED] escriurères Le 2002-06-11, Juli Mallett écrivait : feature I've missed having in our ps(1) for a while, the ability to get a tree of processes printed so you can tell who is whose child, etc. Yes, this would be an invaluable feature! Even nicer would be a user interface (command line, output style) consistent with the existing Linux pstree utility. This one also has a nice functionality: by default it will collapse all siblings with the same name, in order to limit display clutter, eg: |-omniNames---omniNames---3*[omniNames] That seems frighteningly useless to me though. Seems a bit like a number of utilities I've seen from the Linux camp which take useful functionality and mask it behind something that looks good. What exactly can you get from that kind of output? with the following being printed if you ask for pids ('-p'): |-omniNames(313)---omniNames(335)-+-omniNames(336) | |-omniNames(338) | `-omniNames(345) That output's pretty useful, on the other hand, but it seems overly difficult to do that sort of formatting without kludging everything with a lot of conditionals and rather than simple recursion, something more complex. (note: this is not the same as our sysutils/pstree port, which postprocesses the output of ps(1)). Yuck. One version of the Linux pstree is available from the psmisc port. Another, more recent, has been ported to several platforms (including NetBSD), see http://www.chiark.greenend.org.uk/~bjharris/. Interesting. Thanks for the pointers. -- Juli Mallett [EMAIL PROTECTED] FreeBSD: The Power To Serve Perception is prejudice / Don't classify me / Accept me as me / Not what you see To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
* Sheldon Hearn [EMAIL PROTECTED] escriurères On Tue, 11 Jun 2002 05:15:17 MST, Juli Mallett wrote: As some of you may have noticed, I've done some poking of ps(1) lately, and this has brought attention of people who have ideas for things that they would like to see done to ps(1) :) The most notable request was for a feature I've missed having in our ps(1) for a while, the ability to get a tree of processes printed so you can tell who is whose child, etc. Like pstree in the ports tree? Wasn't really aware of that existing, but my understanding from another message in this thread is it just works with the output from ps(1)? That seems a bit icky to me. -- Juli Mallett [EMAIL PROTECTED] FreeBSD: The Power To Serve Perception is prejudice / Don't classify me / Accept me as me / Not what you see To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
+---[ Juli Mallett ]-- | | Wasn't really aware of that existing, but my understanding from another message | in this thread is it just works with the output from ps(1)? That seems a bit | icky to me. Piping commands through other commands seems icky? -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | M:+61 416 022 411 | ACN: 082 081 472 ABN: 83 082 081 472 |[EMAIL PROTECTED]| Carpe Daemon To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
(no subject)
unsubscribe freebsd-current To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
Le 2002-06-11, Juli Mallett écrivait : mask it behind something that looks good. What exactly can you get from that kind of output? The overall organization of the tree. Useless if the information you are looking for is 'what is the PID of the father of X', but may be useful when you have some complex activity going on and want to grasp the overall structure of running processes. Thomas. -- [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
* Andrew Kenneth Milton [EMAIL PROTECTED] escriurères +---[ Juli Mallett ]-- | | Wasn't really aware of that existing, but my understanding from another message | in this thread is it just works with the output from ps(1)? That seems a bit | icky to me. Piping commands through other commands seems icky? Relying on reasonable output from ps(1) seems icky when you can extract the data yourself and not have to worry about formatting getting in the way of processing data properly. -- Juli Mallett [EMAIL PROTECTED] FreeBSD: The Power To Serve Perception is prejudice / Don't classify me / Accept me as me / Not what you see To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Kernel Panic and Automagic Reboots
Hi, Today my system rebooted twice automagically. This is what the message log shows. -- Jun 11 19:00:00 calvin kernel: /usr/src/sys/vm/uma_core.c:1327: could sleep with process lock locked from /usr/src/sys/kern/kern_prot.c:511 Jun 11 19:00:00 calvin kernel: /usr/src/sys/vm/uma_core.c:1327: could sleep with process lock locked from /usr/src/sys/kern/kern_prot.c:613 Jun 11 19:02:20 calvin kernel: Memory modified after free 0xd33f5900(252) Jun 11 19:02:20 calvin kernel: panic: Most recently used by kqueue Jun 11 19:02:20 calvin kernel: Jun 11 19:02:20 calvin kernel: Jun 11 19:02:20 calvin kernel: syncing disks... panic: bremfree: bp 0xc76431a0 n ot locked Jun 11 19:02:20 calvin kernel: Uptime: 6h1m9s Jun 11 19:02:20 calvin kernel: pfs_vncache_unload(): 1 entries remaining Jun 11 19:02:20 calvin kernel: Terminate ACPI Jun 11 19:02:20 calvin kernel: Automatic reboot in 15 seconds - press a key on t he console to abort Jun 11 19:02:20 calvin kernel: -- Press a key on the console to reboot, Jun 11 19:02:20 calvin kernel: -- or switch off the system now. Jun 11 19:02:20 calvin kernel: Rebooting... -- This has happened twice and more info about the compiled kernel is -- FreeBSD calvin 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Mon Jun 10 13:55:43 IST 2002 root@calvin:/usr/obj/usr/src/sys/GENERIC i386 Jun 11 19:02:20 calvin kernel: Timecounter i8254 frequency 1193182 Hz Jun 11 19:02:20 calvin kernel: Timecounter TSC frequency 996769599 Hz Jun 11 19:02:20 calvin kernel: CPU: Pentium III/Pentium III Xeon/Celeron (996.77 -MHz 686-class CPU) Jun 11 19:02:20 calvin kernel: Origin = GenuineIntel Id = 0x68a Stepping = 1 0 Jun 11 19:02:20 calvin kernel: Features=0x383fbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE ,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE Jun 11 19:02:20 calvin kernel: real memory = 267255808 (260992K bytes) Jun 11 19:02:20 calvin kernel: avail memory = 253108224 (247176K bytes) -- Has anyone else encountered this ? Something wrong with my machine ? TIA Regards Sid -- I've known him as a man, as an adolescent and as a child -- sometimes on the same day. Sid Carter FreeBSD oder Debian GNU/Linux. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
[Fwd: (no subject)]
unsubscribe freebsd-current To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
Peter Edwards [EMAIL PROTECTED] writes: Isn't the kvm_*() interface somewhat frowned upon? Is there anything missing from /proc that you need kvm_* for? /proc is also frowned upon, use sysctl. DES -- Dag-Erling Smorgrav - [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
On Tue, 11 Jun 2002 06:46:13 MST, Juli Mallett wrote: Piping commands through other commands seems icky? Relying on reasonable output from ps(1) seems icky when you can extract the data yourself and not have to worry about formatting getting in the way of processing data properly. I don't think you should worry too much about _not_ getting reasonable output from POSIX-conformant utilities. :-) I didn't want to be the one to break the pstree exists news, because I know how frustrating it is to discover that you've just engineered a solution to a solved problem, but it's an unfortunate fact of life. I was very annoyed when I realized that my waitpid(1) program that I was so proud of already existed in several incarnations. :-) Still, you can be proud of the work you've done. You could even get it into the ports tree. It's always nice to have choices. Ciao, Sheldon. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
* Sheldon Hearn [EMAIL PROTECTED] escriurères On Tue, 11 Jun 2002 06:46:13 MST, Juli Mallett wrote: Piping commands through other commands seems icky? Relying on reasonable output from ps(1) seems icky when you can extract the data yourself and not have to worry about formatting getting in the way of processing data properly. I don't think you should worry too much about _not_ getting reasonable output from POSIX-conformant utilities. :-) I'd read SUS's ps(1) escription a little closer. Very few guarantees with it. I didn't want to be the one to break the pstree exists news, because I know how frustrating it is to discover that you've just engineered a solution to a solved problem, but it's an unfortunate fact of life. I was very annoyed when I realized that my waitpid(1) program that I was so proud of already existed in several incarnations. :-) It's fine :) Still, you can be proud of the work you've done. You could even get it into the ports tree. It's always nice to have choices. That's something to think about :) Thanks. -- Juli Mallett [EMAIL PROTECTED] FreeBSD: The Power To Serve Perception is prejudice / Don't classify me / Accept me as me / Not what you see To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
On Tue, 11 Jun 2002 07:29:56 MST, Juli Mallett wrote: I don't think you should worry too much about _not_ getting reasonable output from POSIX-conformant utilities. :-) I'd read SUS's ps(1) escription a little closer. Very few guarantees with it. My POSIX.2 (1993) suggests that you can get a sufficient level of regularity out of ps(1) to provide reliable input for a tree printer. I think the 5.23.6.1 Standard Output section defines the impact of the format specified with the -o option well enough. I haven't looked at what SUS has to say about the issue, but if it's more ambiguous, then it's a regression from POSIX.2 (1993) and should be corrected. :-) Ciao, Sheldon. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: The great perl rewrite - progress report
Will Andrews wrote: On Thu, Jun 06, 2002 at 05:31:12PM +0100, Mark Murray wrote: /usr/sbin/sysinstall * - fix - * What part of this uses perl?? Perhaps it was just a general comment ;-) Andrew. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Crash after world/kernel upgrade
System crashed after updating today. During the start of system services, in specific at the start of sendmail the system crashes with the new kernel. :/ uname -a: - FreeBSD vampire.lothlorien.no 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Tue Jun 11 15:41:09 CEST 2002 root:/usr/src/sys/i386/compile/VAMPIRE i386 gdb/bt: --- GNU gdb 5.2 (FreeBSD) This GDB was configured as i386-portbld-freebsd5.0... IdlePTD at phsyical address 0x0050d000 initial pcb at physical address 0x003d9b80 panicstr: from debugger panic messages: --- panic: system call close returning with mutex(s) held panic: from debugger Uptime: 1m15s Dumping 255 MB ata0: resetting devices .. ad0: DMA limited to UDMA33, non-ATA66 cable or device done 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 --- #0 doadump () at /usr/src/sys/kern/kern_shutdown.c:213 213 dumping++; (kgdb) bt #0 doadump () at /usr/src/sys/kern/kern_shutdown.c:213 #1 0xc0202024 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:346 #2 0xc0202201 in panic () at /usr/src/sys/kern/kern_shutdown.c:490 #3 0xc0143dd4 in db_command_loop () at /usr/src/sys/ddb/db_command.c:449 #4 0xc0143d69 in db_command (last_cmdp=0xc03810a0, cmd_table=0xcdffeb10, aux_cmd_tablep=0xc0143dd4, aux_cmd_tablep_end=0xc0339bc8) at /usr/src/sys/ddb/db_command.c:345 #5 0xc0143e4c in db_command_loop () at /usr/src/sys/ddb/db_command.c:471 #6 0xc014656c in db_trap (type=3, code=0) at /usr/src/sys/ddb/db_trap.c:72 #7 0xc030efeb in kdb_trap (type=3, code=0, regs=0xcdffec78) at /usr/src/sys/i386/i386/db_interface.c:161 #8 0xc031e231 in trap (frame= {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = -838889472, tf_esi = 256, tf_ebp = -838865724, tf_isp = -838865756, tf_ebx = 0, tf_edx = 0, tf_ecx = 32, tf_eax = 18, tf_trapno = 3, tf_err = 0, tf_eip = -1070534051, tf_cs = 8, tf_eflags = 662, tf_esp = -1070127393, tf_ss = -1070254436}) at /usr/src/sys/i386/i386/trap.c:585 #9 0xc030f25d in Debugger (msg=0x0) at cpufunc.h:68 #10 0xc02021ea in panic (fmt=0x0) at /usr/src/sys/kern/kern_shutdown.c:477 #11 0xc031ec5e in syscall (frame= {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 135235593, tf_esi = 420, tf_ebp = -1077943416, tf_isp = -838865548, tf_ebx = 673845760, tf_edx = 135217248, tf_ecx = 0, tf_eax = 0, tf_trapno = 12, tf_err = 2, tf_eip = 673441123, tf_cs = 31, tf_eflags = 518, tf_esp = -1077943460, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1081 #12 0xc031060d in syscall_with_err_pushed () at {standard input}:128 #13 0x0806c149 in ?? () #14 0x0804c08d in ?? () (kgdb) -- Thomas Ugland - If everything is coming your way then you're in the wrong lane. - signature.asc Description: This is a digitally signed message part
Re: Looking for comments on a new utility...
* Dag-Erling Smorgrav [EMAIL PROTECTED] escriurères Juli Mallett [EMAIL PROTECTED] writes: ps(1)'s internals, however, didn't seem quite right to me, but after about 10 minutes reading kvm(3) manpages and recalling some tricks with recursive programming to produce an N-level tree with as many as N-1 elements, I had come up with a simple utility to print out a process tree. Don't do anything in ps(1) that depends on libkvm. It has to be doable with sysctl as well. I believe I can get pid, ppid, username (or at least uid [yay user_from_uid]), etc., from sysctl(3) at least as easily as with kvm(3). -- Juli Mallett [EMAIL PROTECTED] FreeBSD: The Power To Serve Perception is prejudice / Don't classify me / Accept me as me / Not what you see To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
Juli Mallett [EMAIL PROTECTED] writes: I believe I can get pid, ppid, username (or at least uid [yay user_from_uid]), etc., from sysctl(3) at least as easily as with kvm(3). You can get the full process table from sysctl (kern.proc.all) DES -- Dag-Erling Smorgrav - [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Kernel Panic and Automagic Reboots
Quoting Sid Carter [EMAIL PROTECTED]: | Hi, | | Today my system rebooted twice automagically. This is what the message | log shows. | | -- | Jun 11 19:00:00 calvin kernel: /usr/src/sys/vm/uma_core.c:1327: could sleep | with | process lock locked from /usr/src/sys/kern/kern_prot.c:511 | Jun 11 19:00:00 calvin kernel: /usr/src/sys/vm/uma_core.c:1327: could sleep | with | process lock locked from /usr/src/sys/kern/kern_prot.c:613 | Jun 11 19:02:20 calvin kernel: Memory modified after free | 0xd33f5900(252) | Jun 11 19:02:20 calvin kernel: panic: Most recently used by kqueue | Jun 11 19:02:20 calvin kernel: | Jun 11 19:02:20 calvin kernel: | Jun 11 19:02:20 calvin kernel: syncing disks... panic: bremfree: bp | 0xc76431a0 n | ot locked | Jun 11 19:02:20 calvin kernel: Uptime: 6h1m9s | Jun 11 19:02:20 calvin kernel: pfs_vncache_unload(): 1 entries remaining | Jun 11 19:02:20 calvin kernel: Terminate ACPI | Jun 11 19:02:20 calvin kernel: Automatic reboot in 15 seconds - press a | key on t | he console to abort | Jun 11 19:02:20 calvin kernel: -- Press a key on the console to reboot, | Jun 11 19:02:20 calvin kernel: -- or switch off the system now. | Jun 11 19:02:20 calvin kernel: Rebooting... | -- | | This has happened twice and more info about the compiled kernel is | | -- | FreeBSD calvin 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Mon Jun 10 13:55:43 IST | 2002 root@calvin:/usr/obj/usr/src/sys/GENERIC i386 | | Jun 11 19:02:20 calvin kernel: Timecounter i8254 frequency 1193182 Hz | Jun 11 19:02:20 calvin kernel: Timecounter TSC frequency 996769599 Hz | Jun 11 19:02:20 calvin kernel: CPU: Pentium III/Pentium III Xeon/Celeron | (996.77 | -MHz 686-class CPU) | Jun 11 19:02:20 calvin kernel: Origin = GenuineIntel Id = 0x68a | Stepping = 1 | 0 | Jun 11 19:02:20 calvin kernel: | Features=0x383fbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE | ,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE | Jun 11 19:02:20 calvin kernel: real memory = 267255808 (260992K bytes) | Jun 11 19:02:20 calvin kernel: avail memory = 253108224 (247176K bytes) | -- | | Has anyone else encountered this ? Something wrong with my machine ? | My laptop is rebooting with todays current/kernel in ifconfig. I just got it up with an old kernel and am checking now. It will run with the new kernel if I don't try to configure the network. I may have something wrong though. ed To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Crash after world/kernel upgrade
System crashed after updating today. During the start of system services, in specific at the start of sendmail the system crashes with the new kernel. :/ There are some problems with the inpcb locking: - attempts to destroy held lock in in_pcbdetach. - typo in unlocking (causing recursive lock instead) - lack of inet6 support for inpcb locking, e.g. no handling of locks in in6_pcbdetach. I had to comment out INET6 from my kernel config file and apply the enclosed patch to get my machine to boot today. - Tor Egge Index: sys/netinet/in_pcb.c === RCS file: /home/ncvs/src/sys/netinet/in_pcb.c,v retrieving revision 1.106 diff -u -r1.106 in_pcb.c --- sys/netinet/in_pcb.c10 Jun 2002 20:05:36 - 1.106 +++ sys/netinet/in_pcb.c11 Jun 2002 16:13:29 - -573,6 +573,11 rtfree(inp-inp_route.ro_rt); ip_freemoptions(inp-inp_moptions); inp-inp_vflag = 0; + /* XXX: Kludge: Unlock inp before crashing */ + if (mtx_owned(inp-inp_mtx)) { + printf(Warning: INP_LOCK held in in_pcbdetach\n); + INP_UNLOCK(inp); + } INP_LOCK_DESTROY(inp); uma_zfree(ipi-ipi_zone, inp); } -741,7 +746,7 } INP_UNLOCK(inp); } - INP_INFO_RLOCK(pcbinfo); + INP_INFO_RUNLOCK(pcbinfo); } /*
Re: new zero copy sockets snapshot, WITNESS problems
On Tue, Jun 11, 2002 at 04:37:04 -0400, John Baldwin wrote: On 10-Jun-2002 Kenneth D. Merry wrote: 3. ti_attach() calls bus_alloc_resource(), which through a ton of calls ends up calling vm_map_entry_create(), same problem as above. 4. ti_attach() calls bus_setup_intr(), which through various calls ends up calling ithread_create(), which calls malloc() with M_WAITOK. 5. ti_attach() calls bus_setup_intr(), which through various calls ends up calling ithread_create(), which calls kthread_create(), which calls fork1(), which calls uma_zalloc() with M_WAITOK. 6. ti_attach() calls bus_setup_intr(), which through various calls ends up calling ithread_create(), which calls kthread_create(), which calls fork1(), which calls MALLOC() with M_WAITOK in various places. 7. see the previous entry, fork1() calls fdcopy(), which calls MALLOC() with M_WAITOK. 8. see entry 6, fork1() calls vm_forkproc(), which calls pmap_new_proc(), which calls vm_object_allocate(), which does a uma_zalloc with M_WAITOK. 9. see above, pmap_new_proc() calls kmem_alloc_nofault(), which calls vm_map_find(), which through several calls calls vm_map_entry_create(). 10. fork1() calls pmap_new_thread(), which calls vm_object_allocate(), which does a uma_zalloc() with M_WAITOK. 11. ti_attach() calls bus_setup_intr(), which ends up calling ithread_add_handler() through several layers of indirection. ithread_add_handler() calls malloc with M_WAITOK. ti_attach() doesn't need to hold its lock while doing these things. Don't actually enable the logical network device until all the setup for it is done. Okay, will do. 12. ti_attach() calls contigmalloc() *with* M_NOWAIT, but contigmalloc1() calls vm_map_insert(), which calls vm_map_entry_create(), which calls uma_zalloc with M_WAITOK. 13. ti_attach() calls jumbo_vm_init() (jumbo buffer initialization function), which calls kmem_alloc_pageable(). See number 1 above, same problem here with vm_map_entry_create(). 14. jumbo_vm_init() calls malloc() *with* M_NOWAIT, but vm_map_insert() gets called, which calls vm_map_entry_create(), which calls uma_zalloc() with M_WAITOK. 15. several more instances, the same as 14, but vm_map_entry_create() gets called through a slightly different path from the same root malloc() call in jumbo_vm_init(). Same as above with regards to ti_attach(). - the bus_setup_intr(), or rather the kthread code in general apparantly isn't safe to be called while holding a mutex. This is the cause of the problems in entries 4, 5, 6, 7, 8, 9, 10, and 11. Yes. Thanks! Ken -- Kenneth Merry [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
no /dev/apmctl ?
I have included apm in kernel (cvsupped yesterday) config file. However, it does not create /dev/apmctl l /dev/apm* crw-rw-r-- 1 root operator 39, 0 Jun 11 19:31 /dev/apm How is this possible? Driver code /usr/src/sys/i386/apm/apm.c calls creation of both device nodes around line 1106 without any conditionals make_dev(apm_cdevsw, 0, 0, 5, 0664, apm); make_dev(apm_cdevsw, 8, 0, 5, 0660, apmctl); best regards, taavi To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
Hackers, [...] TLI don't think the original poster wanted cloning for support on TLphysical devices for which there was a 1:1 relationship anyway TL(8^)), but there *are* cases where it could be useful. TL TLActually, I think the original poster never really disclosed *what* TLthey wanted to use the feature for... That's true... From reading the original post I was under the impression that this is again a 'hey, I write a device driver and I need to track the number of opens and to tack a context onto each open' that periodically comes up. If I'm wrong, well, sorry then... I'm sorry people :) I should have been more specific. Here is what i meant. I'm working on Bluetooth stack for FreeBSD. Everything is implemented in Netgraph. The real device driver nodes are connected to HCI layer. You can talk to any Bluetooth device via HCI layer. It does not really matter what kind of device you have, PC-CARD, serial or USB dongle. They all MUST talk via HCI. So HCI is not really a device driver, and, IMO, it is not a pseudo device driver. It sort of looks like /dev/tcp :) Currently there is a single control hook for every HCI node. Control application connects to the hook and sends HCI commands and receives HCI events. It does work, but once the hook is connected, nobody else can connect to the same hook. That is a limitation, IMO. It would really be nice to have several control applications. For example, - HCI dump (a-la tcpdump) - HCI link key/PIN manager (security) My choices were: 1) Create /dev/hci[0-9]+ for every HCI node and implement cloning pid 1 - /dev/hci0 -+- hci0 node - device driver node pid 2 - /dev/hci0(clone 0) -+ This will not work work. 2) Raw HCI sockets The problem here is how to identify device, i.e. what to put into sockaddr? Netgraph node name? May be not a good choice, because it can be changed at any time. Device BD_ADDR? Does not work also, because in order to get BD_ADDR you must send HCI command to the device. 3) Multiple control/raw Netgraph hooks I like it best for now. Each hook will have a filter and every message/data will be delivered to each hook if it has not been filtered. Anyway, i got answers i wanted. Thanks everyone. thanks, max __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
In message [EMAIL PROTECTED], Maksim Yevmenk in writes: I'm sorry people :) I should have been more specific. Here is what i meant. I'm working on Bluetooth stack for FreeBSD. Everything is implemented in Netgraph. The real device driver nodes are connected to HCI layer. You can talk to any Bluetooth device via HCI layer. It does not really matter what kind of device you have, PC-CARD, serial or USB dongle. They all MUST talk via HCI. So HCI is not really a device driver, and, IMO, it is not a pseudo device driver. It sort of looks like /dev/tcp :) That's called a protocol family in BSD and you access it using sockets. Based on what little I know about Blåtand it will be much easier to work with as a socket than as a /dev/bla entry. Currently there is a single control hook for every HCI node. Control application connects to the hook and sends HCI commands and receives HCI events. It does work, but once the hook is connected, nobody else can connect to the same hook. That is a limitation, IMO. It would really be nice to have several control applications. For example, This is exactly the kind of semantics sockets offer you. 2) Raw HCI sockets The problem here is how to identify device, i.e. what to put into sockaddr? Netgraph node name? May be not a good choice, because it can be changed at any time. Device BD_ADDR? Does not work also, because in order to get BD_ADDR you must send HCI command to the device. Well, many TCP clients don't care about the name, so they ask for INADDR_ANY and get whatever the kernel feels like giving them, you could do the same and have the kernel hand out random numbers. In fact, you don't actually have to call bind(2) at all, you can just call socket(2) and run with the result... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Crash after world/kernel upgrade
An Tue, Jun 11, 2002 at 04:58:39PM +0200, Thomas Ugland schreib : System crashed after updating today. During the start of system services, in specific at the start of sendmail the system crashes with the new kernel. :/ uname -a: - FreeBSD vampire.lothlorien.no 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Tue Jun 11 15:41:09 CEST 2002 root@:/usr/src/sys/i386/compile/VAMPIRE i386 Hi, Just rebooted after a crash and am presently doing a cvsup for a rebuild. I got similar error messages and this is what my /var/log/messages shows. -- Jun 11 22:29:29 calvin kernel: /usr/src/sys/vm/uma_core.c:1327: could sleep with process lock locked from /usr/src/sys/kern/kern_prot.c:511 Jun 11 22:29:38 calvin kernel: /usr/src/sys/vm/uma_core.c:1327: could sleep with inp locked from /usr/src/sys/netinet/tcp_usrreq.c:650 Jun 11 22:29:38 calvin kernel: /usr/src/sys/vm/uma_core.c:1327: could sleep with tcp locked from /usr/src/sys/netinet/tcp_usrreq.c:633 Jun 11 22:29:38 calvin kernel: acquiring duplicate lock of same type: inp Jun 11 22:29:38 calvin kernel: 1st inp @ /usr/src/sys/netinet/tcp_input.c:631 Jun 11 22:29:38 calvin kernel: 2nd inp @ /usr/src/sys/netinet/tcp_usrreq.c:144 Jun 11 22:34:47 calvin syslogd: kernel boot file is /boot/kernel/kernel Jun 11 22:34:47 calvin kernel: lock order reversal Jun 11 22:34:47 calvin kernel: 1st 0xd311c2f8 inp (inp) @ /usr/src/sys/netinet/tcp_usrreq.c:581 Jun 11 22:34:47 calvin kernel: 2nd 0xc04a5340 Giant (Giant) @ /usr/src/sys/kern/subr_trap.c:76 Jun 11 22:34:47 calvin kernel: exclusive sleep mutex inp r = 0 (0xd311c2f8) locked @ /usr/src/sys/netinet/tcp_usrreq.c:581 Jun 11 22:34:47 calvin kernel: panic: system call shutdown returning with mutex(s) held -- uname -a FreeBSD calvin 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Tue Jun 11 21:20:29 IST 2002 root@calvin:/usr/obj/usr/src/sys/GENERIC i386 Regards Sid -- I've known him as a man, as an adolescent and as a child -- sometimes on the same day. Sid Carter FreeBSD oder Debian GNU/Linux. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Crash after world/kernel upgrade
On Tue, Jun 11, 2002 at 10:51:25PM +0530, Sid Carter wrote: An Tue, Jun 11, 2002 at 04:58:39PM +0200, Thomas Ugland schreib : System crashed after updating today. During the start of system services, in specific at the start of sendmail the system crashes with the new kernel. :/ uname -a: - FreeBSD vampire.lothlorien.no 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Tue Jun 11 15:41:09 CEST 2002 root@:/usr/src/sys/i386/compile/VAMPIRE i386 Hi, Just rebooted after a crash and am presently doing a cvsup for a rebuild. I got similar error messages and this is what my /var/log/messages shows. You got way more info than I did. With this mornings -CURRENT (around 9AM EDT): Jun 11 09:22:10 : Doing initial network setup: Jun 11 09:22:10 : host.conf Jun 11 09:22:10 : hostname Jun 11 09:22:10 : . Jun 11 09:22:10 : Jun 11 09:22:10 : Jun 11 09:22:10 : Fatal trap 12: page fault while in kernel mode Jun 11 09:22:10 : fault virtual address = 0x28 Jun 11 09:22:10 : fault code= supervisor read, page not present Jun 11 09:22:10 : instruction pointer = 0x8:0xc01851c1 Jun 11 09:22:10 : stack pointer = 0x10:0xd7865bdc Jun 11 09:22:10 : frame pointer = 0x10:0xd7865bec Jun 11 09:22:10 : code segment = base 0x0, limit 0xf, type 0x1b Jun 11 09:22:10 : = DPL 0, pres 1, def32 1, gran 1 Jun 11 09:22:10 : processor eflags = interrupt enabled, resume, IOPL = 0 Jun 11 09:22:10 : current process = 11 (swi1: net) Jun 11 09:22:10 : trap number = 12 Jun 11 09:22:10 : panic: page fault Jun 11 09:22:10 : Jun 11 09:22:10 : syncing disks... panic: bdwrite: buffer is not busy Jun 11 09:22:10 : Uptime: 3s Jun 11 09:22:10 : pfs_vncache_unload(): 1 entries remaining Jun 11 09:22:10 : Terminate ACPI Jun 11 09:22:10 : Automatic reboot in 15 seconds - press a key on the console to abort To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
I'm sorry people :) I should have been more specific. Here is what i meant. I'm working on Bluetooth stack for FreeBSD. Everything is implemented in Netgraph. The real device driver nodes are connected to HCI layer. You can talk to any Bluetooth device via HCI layer. It does not really matter what kind of device you have, PC-CARD, serial or USB dongle. They all MUST talk via HCI. So HCI is not really a device driver, and, IMO, it is not a pseudo device driver. It sort of looks like /dev/tcp :) That's called a protocol family in BSD and you access it using sockets. Well, HCI _IS_NOT_ a network protocol like TCP or even UDP. It is a predefined set of control messages and events that user might send to the device. L2CAP which is runs over HCI _IS_ a network protocol and it is implemented in AF_BLUETOOTH protocol family. So application can say s = socket(AF_BLUETOOTH, SOCK_SEQ, BTPROTO_L2CAP) and then bind(s) and connect(s). Based on what little I know about Blåtand it will be much easier to work with as a socket than as a /dev/bla entry. Currently there is a single control hook for every HCI node. Control application connects to the hook and sends HCI commands and receives HCI events. It does work, but once the hook is connected, nobody else can connect to the same hook. That is a limitation, IMO. It would really be nice to have several control applications. For example, This is exactly the kind of semantics sockets offer you. 2) Raw HCI sockets The problem here is how to identify device, i.e. what to put into sockaddr? Netgraph node name? May be not a good choice, because it can be changed at any time. Device BD_ADDR? Does not work also, because in order to get BD_ADDR you must send HCI command to the device. Well, many TCP clients don't care about the name, so they ask for INADDR_ANY and get whatever the kernel feels like giving them, you could do the same and have the kernel hand out random numbers. Again, i have to ask specific device on _HCI_ layer. Here is an example. User plugged the card. Now HCI layer MUST query the card and ask - what is the BD_ADDR (MAC) ? - what are the capabilities of the device? - what is the size of the data buffer? - etc. HCI layer _has_ all this commands defined. In fact control application sends several HCI commands to the device to initialze it. After device is connected to the stack - no problem - you now can use BD_ADDR in sockaddr and do whatever you want to do. thanks, max __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: no /dev/apmctl ?
In message [EMAIL PROTECTED], Taavi Talvik wrote: I have included apm in kernel (cvsupped yesterday) config file. However, it does not create /dev/apmctl l /dev/apm* crw-rw-r-- 1 root operator 39, 0 Jun 11 19:31 /dev/apm This can be fake apm device node made by ACPI driver. How is this possible? Driver code /usr/src/sys/i386/apm/apm.c calls creation of both device nodes around line 1106 without any conditionals make_dev(apm_cdevsw, 0, 0, 5, 0664, apm); make_dev(apm_cdevsw, 8, 0, 5, 0660, apmctl); Are you surely using apm driver? You may have to disable acpi loading by typing 'unset acpi_load' in boot loader. ACPI makes apm node only, not apmctl node. Takanori Watanabe To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Crash after world/kernel upgrade
Quoting Steve Ames [EMAIL PROTECTED]: | On Tue, Jun 11, 2002 at 10:51:25PM +0530, Sid Carter wrote: | An Tue, Jun 11, 2002 at 04:58:39PM +0200, Thomas Ugland schreib : | System crashed after updating today. | During the start of system services, in specific | at the start of sendmail the system crashes with | the new kernel. :/ | uname -a: | - | FreeBSD vampire.lothlorien.no 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Tue | Jun 11 15:41:09 CEST 2002 root@:/usr/src/sys/i386/compile/VAMPIRE | i386 | | Hi, | | Just rebooted after a crash and am presently doing a cvsup for a | rebuild. I got similar error messages and this is what my | /var/log/messages shows. | | | You got way more info than I did. With this mornings -CURRENT (around 9AM | EDT): | I get blown away with network setup with a Fatal trap 12, too. I've cvsuped and rebuilt twice with no change. ed | Jun 11 09:22:10 : Doing initial network setup: | Jun 11 09:22:10 : host.conf | Jun 11 09:22:10 : hostname | Jun 11 09:22:10 : . | Jun 11 09:22:10 : | Jun 11 09:22:10 : | Jun 11 09:22:10 : Fatal trap 12: page fault while in kernel mode | Jun 11 09:22:10 : fault virtual address = 0x28 | Jun 11 09:22:10 : fault code = supervisor read, page not present | Jun 11 09:22:10 : instruction pointer = 0x8:0xc01851c1 | Jun 11 09:22:10 : stack pointer = 0x10:0xd7865bdc | Jun 11 09:22:10 : frame pointer = 0x10:0xd7865bec | Jun 11 09:22:10 : code segment= base 0x0, limit 0xf, type 0x1b | Jun 11 09:22:10 : = DPL 0, pres 1, def32 1, gran 1 | Jun 11 09:22:10 : processor eflags= interrupt enabled, resume, IOPL = 0 | Jun 11 09:22:10 : current process = 11 (swi1: net) | Jun 11 09:22:10 : trap number = 12 | Jun 11 09:22:10 : panic: page fault | Jun 11 09:22:10 : | Jun 11 09:22:10 : syncing disks... panic: bdwrite: buffer is not busy | Jun 11 09:22:10 : Uptime: 3s | Jun 11 09:22:10 : pfs_vncache_unload(): 1 entries remaining | Jun 11 09:22:10 : Terminate ACPI | Jun 11 09:22:10 : Automatic reboot in 15 seconds - press a key on the console | to abort | | To Unsubscribe: send mail to [EMAIL PROTECTED] | with unsubscribe freebsd-current in the body of the message -- To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: no /dev/apmctl ?
On Wed, 12 Jun 2002, Takanori Watanabe wrote: In message [EMAIL PROTECTED], Taavi Talvik wrote: Yes, acpi the case. Acpi tries to emulate apm, but seams that this emulation is incomplete. At least it does not provide support for apmd. Actually, i should have looked at acpi sources before asking from list. Again fingers are faster than brain:( best regards, taavi I have included apm in kernel (cvsupped yesterday) config file. However, it does not create /dev/apmctl l /dev/apm* crw-rw-r-- 1 root operator 39, 0 Jun 11 19:31 /dev/apm This can be fake apm device node made by ACPI driver. How is this possible? Driver code /usr/src/sys/i386/apm/apm.c calls creation of both device nodes around line 1106 without any conditionals make_dev(apm_cdevsw, 0, 0, 5, 0664, apm); make_dev(apm_cdevsw, 8, 0, 5, 0660, apmctl); Are you surely using apm driver? You may have to disable acpi loading by typing 'unset acpi_load' in boot loader. ACPI makes apm node only, not apmctl node. Takanori Watanabe To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message --- Taavi Talvik| Internet: [EMAIL PROTECTED] AS Uninet | phone: +372 6800013 Parnu mnt. 105 | fax: +372 681 Tallinn 11312, Estonia | gsm: +372 56569996 To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Kernel Panic and Automagic Reboots
On Tue, Jun 11, 2002 at 09:13:44AM -0700, Edwin Culp wrote: My laptop is rebooting with todays current/kernel in ifconfig. I just got it up with an old kernel and am checking now. It will run with the new kernel if I don't try to configure the network. I may have something wrong though. Same thing happens to me, reboot during the startup process when ifoncfig tries to get iself an IP from the dhcp server. I didn't have the time to write down the entire thing, but I'll try to get to it tonight. -- Munish Chopra The FreeBSD NVIDIA Driver Initiative http://nvidia.netexplorer.org To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Crash after world/kernel upgrade
On Tue, Jun 11, 2002 at 12:28:48PM -0500, Steve Ames wrote: You got way more info than I did. With this mornings -CURRENT (around 9AM EDT): Jun 11 09:22:10 : Doing initial network setup: Jun 11 09:22:10 : host.conf Jun 11 09:22:10 : hostname Jun 11 09:22:10 : . Jun 11 09:22:10 : Jun 11 09:22:10 : Jun 11 09:22:10 : Fatal trap 12: page fault while in kernel mode Jun 11 09:22:10 : fault virtual address = 0x28 Jun 11 09:22:10 : fault code = supervisor read, page not present Jun 11 09:22:10 : instruction pointer = 0x8:0xc01851c1 Jun 11 09:22:10 : stack pointer = 0x10:0xd7865bdc Jun 11 09:22:10 : frame pointer = 0x10:0xd7865bec Jun 11 09:22:10 : code segment= base 0x0, limit 0xf, type 0x1b Jun 11 09:22:10 : = DPL 0, pres 1, def32 1, gran 1 Jun 11 09:22:10 : processor eflags= interrupt enabled, resume, IOPL = 0 Jun 11 09:22:10 : current process = 11 (swi1: net) Jun 11 09:22:10 : trap number = 12 Jun 11 09:22:10 : panic: page fault Jun 11 09:22:10 : Jun 11 09:22:10 : syncing disks... panic: bdwrite: buffer is not busy Jun 11 09:22:10 : Uptime: 3s Jun 11 09:22:10 : pfs_vncache_unload(): 1 entries remaining Jun 11 09:22:10 : Terminate ACPI Jun 11 09:22:10 : Automatic reboot in 15 seconds - press a key on the console to abort My bad, this is exactly what I was referring to in the other thread. -- Munish Chopra The FreeBSD NVIDIA Driver Initiative http://nvidia.netexplorer.org To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
Harti Brandt wrote: TLFor a sound device, it would be nice if multiple instances to the TLdevices were mux'ed. I've had cases where the program I was using TLwas using a smaller number that the total available channels, and TLit would have been nice if the next open instance got the remaining TLchannels, rather than a device in use error. You'd have to manage TLthis by giving all remaining available channels to an opener, and TLthen having them ioctl() the unused ones back (e.g. allocate N TLwhen there are M available, means give M-N back). That has also nothing to do with cloning. Look at the current pcm driver - it just has a device entry per channel. A device entry per channel is a stupid idea. It means that I can not write software to open the sound device, I have gto write software to open the *right* sound device out of N sound devices, so that I get the right channel. It's a lot easier to just open the thing, than it is to teach every single piece of software that uses sound to do the right thing, and know how to do that. If nothing else, it wil mean an incredible duplication of code in all sound using user space programs, and programs written by naieve programmers (yeah, I know -- like rattus giganticus, they don't exist, right) so that if you want to run A and B, you have to run B first, because B doesn't know aboout anything but the first sound device. This is just a recipe for disaster. Where cloning could come into the play is when more than one process tries to open a 1-channel device and you want to mix the audio. As I said this would be a task of a layer above the sound driver (just as X 'multiplexes' N processes onto one display device). Unfortunately there is no good sound API up to now. If only you could differentiate open instances of the same device from each other, so that mixing would just be implied, and just work... if only the sound device were a *cloning device*. 8-). TLFor a DVD, it would be nice if you could select the instance of the TLdevice you were going to get for seperation of the ISO9660 and UDF TLFS's (e.g. which record boundary the device actually used). The way TLthat OS X supports this is by doing DVD mounts on both the character TLand block device seperately. For FreeBSD, UDF support, which has to TLhave access to the ISO9660 FS for the purposes of index access, is TLmuch more messy. No cloning here. ??? You are suggesting two devices? That's quite interesting. I suppose it's possible, if you absolutely insist on it. I guess pushing the complexity from a relatively trivial device driver operation into a much more complex file system operation would work. IMO, though, it would not really be a good idea. It's like laying carpet, and leaving a bubble in it. You can chase it all around your living room, but the bubble is going to be *somewhere*. TLYou could also make an argument for multiple input devices and the TLmanagement of which one you get when you open /dev/mouse. Again you just get it the wrong way around. You need per process/open context if you try to put the multiplexing of ONE mouse between MULTIPLE processes into the hardware mouse driver. Again this would be plain wrong. I'm not *talking* about multiple processes. For example, I have three mice on the machine from which I am currently typing: 1) A 3 button USB two axis optical mouse 2) A 2 buttom glidepoint two axis touchpad 3) A 1 button one axis jogdial All of these are devices to mux into a single program, the X server, and from there, into the Window Manager, so that I can make them behave as they do under Windows (e.g. my jogdial input needs to be routed to a popup utility that can launch programs). While my #1 and #2 need to be treated as synonyms (including treating the third button on the optical mouse the same as a chord of button 12 on the touchpad). I'd rather not have to go outside the normal operation of my X server input manager, in order to be able to achieve this. I'd rather just set it up so that the jogdial were reported as button events. TLFinally, there's a long history on SCO Xenix and UNIX, starting with TLComputone multiport serial cards, of multiplexing access to the TLdevice seperately for printing vs. terminal I/O. Yes, Digiboard and TLother vendors handle this by having two device nodes for a single TLpgysical device, and maintaining a state machine for the escape TLsequences. But this is really a matter of preference, not necessity. TLWriting to one instance, you talk to the terminal, and writing to the TLother, you talk to the aux port. Again this is not about 'cloning a physical' device. You're high. What happens when I have two programs, and one of them doesn't know to make it's write of escape sequences atomic, because it's not expecting a second program to be sending escape sequences to select and deselect output to the AUX port on the terminal?!? Someone, somewhere has to
Re: Looking for comments on a new utility...
Juli Mallett wrote: |-omniNames---omniNames---3*[omniNames] That seems frighteningly useless to me though. Seems a bit like a number of utilities I've seen from the Linux camp which take useful functionality and mask it behind something that looks good. What exactly can you get from that kind of output? with the following being printed if you ask for pids ('-p'): |-omniNames(313)---omniNames(335)-+-omniNames(336) | |-omniNames(338) | `-omniNames(345) That output's pretty useful, on the other hand, but it seems overly difficult to do that sort of formatting without kludging everything with a lot of conditionals and rather than simple recursion, something more complex. Theres a program in -ports. If you insist on doing it, though, look at the output of w -d (yeah, I have a vested interest in it, but it's still pretty cool). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
Juli Mallett wrote: Piping commands through other commands seems icky? Relying on reasonable output from ps(1) seems icky when you can extract the data yourself and not have to worry about formatting getting in the way of processing data properly. This is just wrong on so many levels... -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
Maksim Yevmenkin wrote: I'm sorry people :) I should have been more specific. Here is what i meant. I'm working on Bluetooth stack for FreeBSD. Everything is implemented in Netgraph. The real device driver nodes are connected to HCI layer. You can talk to any Bluetooth device via HCI layer. It does not really matter what kind of device you have, PC-CARD, serial or USB dongle. They all MUST talk via HCI. So HCI is not really a device driver, and, IMO, it is not a pseudo device driver. It sort of looks like /dev/tcp :) Ah. You have a device which is an addressable bus. Yes, if cloning worked, it would be the best way to implement it. The typical BSD way of dealing with this would probably be to create a socket interface. The problem with a socket interface is that you woun't be able to run standard protocols over top of your HCI, unless you (re)implement them as netgraph nodes (e.g. like a /dev/tcp with a streams stack pushed on it). I think that your current Netgraph approach is probably the best one available to you, if you want to avoid additional plumbing work. Good luck on your work, it sounds interesting! -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Device cloning
Maksim Yevmenkin wrote: Well, HCI _IS_NOT_ a network protocol like TCP or even UDP. It is a predefined set of control messages and events that user might send to the device. L2CAP which is runs over HCI _IS_ a network protocol and it is implemented in AF_BLUETOOTH protocol family. So application can say s = socket(AF_BLUETOOTH, SOCK_SEQ, BTPROTO_L2CAP) and then bind(s) and connect(s). You might want to look at how you issue raw SCSI commands on devices via CAM. You can start with man cam. Your situation is exactly analogous (IMO) to a device interface to a raw bus. You will notice that most of it is section 3 (e.g. implemented in a set of user space library routines on top of the SCSI bus commands). If you look at how the CAM toys talk to the SCSI bus itself, though, you will see an interface for jamming known format SCSI commands down onto a SCSI bus, which is probably the level at which you want your interface. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
looking for warn quota tools
Hi, I am looking for a tool that will email to the user if his/her account (more specifically email box) is approaching quota limit. I've searched everywhere for such a tool but to no avail. On Linux, there is a tool called warnquota that fits my need but I am running FreeBSD 4.5 -RELEASE so I can't utilize that tool. Also, from searching on google, I've found a tool called psntools that has the warnquota feature but it doesn't work on a filesystem that has a mailspool. Can someone help me? Thanks, Paul To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: looking for warn quota tools
I always just used the following script in the /etc/csh.login: #if (`quota | grep '\*'` != ) then # echo Warning: Quota Exceeded: # quota #endif Given that the output of the quota command is fairly parseable, a little bit of scripting or perl should do the trick. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects [EMAIL PROTECTED] Network Associates Laboratories On Tue, 11 Jun 2002, Paul S. Puth wrote: Hi, I am looking for a tool that will email to the user if his/her account (more specifically email box) is approaching quota limit. I've searched everywhere for such a tool but to no avail. On Linux, there is a tool called warnquota that fits my need but I am running FreeBSD 4.5 -RELEASE so I can't utilize that tool. Also, from searching on google, I've found a tool called psntools that has the warnquota feature but it doesn't work on a filesystem that has a mailspool. Can someone help me? Thanks, Paul To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Çѹ¹Õé¤Ø³´ÙáÅÊØ¢ÀÒ¾áÅéÇËÃ×ÍÂѧ
á¹Ð¹Óâ»Ãá¡ÃÁ¤Çº¤ØÁ¹éÓ˹ѡ à¾ÔèÁ¹éÓ˹ѡ ÃÑ¡ÉÒÊØ¢ÀÒ¾ ¤Ø³ËÃ×ͤ¹·Õè¤Ø³ÃÑ¡¡ÓÅѧÁͧËÒÇÔ¸Õ´ÙáÅÊØ¢ÀÒ¾·Õèà»ç¹¸ÃÃÁªÒµÔÍÂÙèãªèäËÁ? ËÒ¡¤Ø³àº×èÍ˹èÒ¡Ѻ¤ÇÒÁ¾ÂÒÂÒÁ·ÕèäÁè»ÃÐʺ¤ÇÒÁÊÓàÃ稤ÃÑé§áÅéǤÃÑé§àÅèÒ ã¹¡ÒôÙáÅÊØ¢ÀÒ¾à¾×èÍÃÙ»ÃèÒ§·Õè´Õ àÃÒÁÕâ»Ãá¡ÃÁâÀª¹Ò¡ÒÃà¾×èÍÊØ¢ÀÒ¾ ·ÕèªèǤسä´é ÊÓËÃѺ¼Ùé·ÕèÁÕ»ÑËÒ ¹éÓ˹ѡà¡Ô¹ËÃ×ÍÍéǹ, ¼ÍÁà¡Ô¹ä», ÁÕ»ÑËÒÊØ¢ÀÒ¾ (¼ÍÁáËé§áç¹éÍÂ, ¾Ø§ËéÍÂÍ×´ÍÒ´, ¢Ò´¤ÇÒÁÁÑè¹ã¨, âäÀѶÒÁËÒ,ãºË¹éÒà»ç¹ÊÔÇ, ¼ÔǾÃóàËÕèÂÇÂè¹, ¤¹àÅ蹡ÕÌÒ, ¤Ø³»éÒÇÑ·ͧ, ¤Ø³¹éÍ§æ ·ÕèÍÂÒ¡ÊÇÂ)à»ç¹¼ÅÔµÀѳ±ì¨Ò¡¸ÃÃÁªÒµÔ 100 % äÁèãªèÂÒ äÁèµéͧʹÍÒËÒà äÁèÁռŢéÒ§à¤Õ§ äÁèµéͧÍÍ¡¡ÓÅѧ¡Ò ¿Ñ§´ÙäÁè¹èÒàª×èÍáµè¡çµéͧàª×èÍà¾ÃÒмèÒ¹ ÍÂ.·Ø¡»ÃÐà·È·Õèà¢éÒ仢ÒÂâ´Â੾ÒлÃÐà·Èä·ÂáÅÐÍàÁÃÔ¡Ò ãËéÊÒÃÍÒËÒäú¶éǹ »ÃѺÊÁ´ØŢͧÃèÒ§¡ÒÂÅ´ä¢ÁѹÊèǹà¡Ô¹ ÃѺÃͧ¼ÅÀÒÂã¹30Çѹ´éÇÂÃкº¤×¹à§Ô¹100%(á¾·Âì¼Ùé¤Ô´¤é¹ÍÒËÒÃÊٵùÕé¤×ͤ¹·Õè¤Ô´¤é¹ÍÒËÒÃãËé¹Ñ¡ºÔ¹ÍÇ¡ÒÈͧ¤ì¡ÒùҫèÒ) ʹ㨠¢Í¤Óá¹Ð¹Óà¾ÔèÁàµÔÁä´é·Õè ¤Ø³ÊÔÃÔ 01-8901701¾º¤ÓµÍºÊØ´·éÒ¢ͧ¤Ø³ä´é·Õè¹Õè http://www.smartslender.com/foodforhealth To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: looking for warn quota tools
Thank for the quick response, Robert. I fail to mention that this machine is strictly a mail server with over 10K+ accounts. Users cannot log into their shell account and they check email via POP/IMAP only. At 05:31 PM 6/11/2002 -0400, Robert Watson wrote: I always just used the following script in the /etc/csh.login: #if (`quota | grep '\*'` != ) then # echo Warning: Quota Exceeded: # quota #endif Given that the output of the quota command is fairly parseable, a little bit of scripting or perl should do the trick. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects [EMAIL PROTECTED] Network Associates Laboratories On Tue, 11 Jun 2002, Paul S. Puth wrote: Hi, I am looking for a tool that will email to the user if his/her account (more specifically email box) is approaching quota limit. I've searched everywhere for such a tool but to no avail. On Linux, there is a tool called warnquota that fits my need but I am running FreeBSD 4.5 -RELEASE so I can't utilize that tool. Also, from searching on google, I've found a tool called psntools that has the warnquota feature but it doesn't work on a filesystem that has a mailspool. Can someone help me? Thanks, Paul To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: looking for warn quota tools
Paul S. Puth wrote: I am looking for a tool that will email to the user if his/her account (more specifically email box) is approaching quota limit. I've searched everywhere for such a tool but to no avail. On Linux, there is a tool called warnquota that fits my need but I am running FreeBSD 4.5 -RELEASE so I can't utilize that tool. Also, from searching on google, I've found a tool called psntools that has the warnquota feature but it doesn't work on a filesystem that has a mailspool. Can someone help me? The warnquota program is a program that's based on you using Cyrus IMAP for you message store. We are not talking about disk quotas here. In fact, we can't, since disk quotas appear as write errors for the MDA (the local mailer), not accept errors for the MTA (the SMTP server). FWIW: It's kind of a dumb idea to send email warning about a condition which is caused by having too much email. We did this on the InterJet, and it was actually a pretty dumb thing to do; you end up with a recursive problem that's unsolvable -- you basically have to let certain cenders be priviledged for the delivery of the messages, which means hacking both the MDA (deliver) and warnquota. Another issue is that quota enforcement only occurs *after* you exceed the quota, not *when* you exceed the quota. This is because email messages must be treated as atomic units; so if you are within 3k of a 100k quota, and you get an 80k message, you can't not accept it. Further, quota enforcement involves a quota *on the mailbox*; an interesting side effect of this is that the following happens: 1) You receive a message to the local queue which, if it were delivered, would push the user over quota (or the user is already over quota) 2) You attempt to deliver it, and delivery fails because of the quota 3) You leave the message in the queue, to retry later, in hopes that the user has reduced the size of their mailbox So not matter how you look at it, if you deliver it don't deliver it, it's taking up your disk space, whether you have quotas on users or have no quotas on users. The way HotMail handles this condition is to drop email that it has accepted to delivery, if it can't be delivered to the user because of them being over quota. But since it has already accepted the email for delivery (by sending 250 OK to the remote SMTP client or MTA, it has pledged to deliver the message, or give failure notification, so the message contents are not lost), the email is basically lost with no recourse. The inability to guarantee delivery is the basis for the liability disclaimer, and the terms of service not allowing business use of the service (i.e. to prevent legal liability problems). You really don't want to bet your business on this level of (dis)service. Basically, the only way to really handle this is to refuse delivery at the SMTP level. The problem with doing this is that you would have to do it on a per maildrop (locally hosted email address) basis. This, in turn, requires that your MTA have promiscuous knowledge of the quota information in a per maildrop basis. I.e. you must tightly, rather than loosely, couple the MTA and the maildrop storage management, not simply hand off the delivery to a mailer after it's been accepted. This means that you introduce a delivery latency into the 250 OK response. In addition, message bodies are sent via the SMTP protocol *after* the addresses are accepted/rejected. This basically means that if the peer machine does not use the SIZE extension to indicate on the MAIL FROM: SMTP command the size of the message that will be sent -- OR it lies about it/gets it wrong (the SMTP SIZE extenson normally does *NOT* give an absolutely accurate representation because of transfer encoding and wire encoding differences, which tend to change the size), then you are still screwed, by having said that you will accept a message that you can't deliver. The only upside in this is that you can ignore the size, and only reject addresses that are actually *over* quota -- rather than addresses that would be pushed over quota by the current message. That leaves you with the requirement that you allow the mailbox to go over quota by one message, but that you claim 101% is the same as 150%. Otherwise, you are stuck with the message in the local queue, but locally undeliverable for an indefinite period of time. The obvious problem with this is that, no matter what your per account quota is, you can't prevent the delivery of any message which is less than the maximum size that the server is willing to accept from a peer via SMTP. So setting a maximum transfer size of 10M, with accounts with 1M quotas, means that each account can in fact end up with 10M - 1 byte over quota. Now... if you are going to go to all this trouble... then the over quota email should actually be metadata about the account; and then when someone goes to download, there are
Re: Fixing could sleeep... was (Re: ../../../vm/uma_core.c:132
On Tue, 11 Jun 2002 13:07:03 -0400 (EDT) John Baldwin [EMAIL PROTECTED] wrote: Yes... if you don't go through the setuid/gid family of functions. Currently, the only place uifind() is called, besides change_[re]uid() is in proc0_init. My assumption was that you need to change the uidinfo only when changing ucreds (either an exec or specific seteuid,etc), and that when you change ucreds you always crget() a new one and not reuse the old one. So, in this case there could be a maximum of 2 allocations (both on the new ucred): one for cr_uidinfo and one for cr_ruidinfo. Oh, duh, you are right, it should work then. You can implement whichever you please then. I can see pros and cons cleanliness-wise of both. :) Disregard my earlier patch. It has a bug. Is it possible to sleep when doing a FREE()? I had assumed not, but it seems I may be mistaken. On which way to go: I like your idea better, because it is less work and less bloat. Sometimes I have to keep reminding myself: Choose the simplest design that works. Cheers, Mike Makonnen To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Çѹ¹Õé¤Ø³´ÙáÅÊØ¢ÀÒ¾áÅéÇËÃ×ÍÂѧ
á¹Ð¹Óâ»Ãá¡ÃÁ¤Çº¤ØÁ¹éÓ˹ѡ à¾ÔèÁ¹éÓ˹ѡ ÃÑ¡ÉÒÊØ¢ÀÒ¾ ¤Ø³ËÃ×ͤ¹·Õè¤Ø³ÃÑ¡¡ÓÅѧÁͧËÒÇÔ¸Õ´ÙáÅÊØ¢ÀÒ¾·Õèà»ç¹¸ÃÃÁªÒµÔÍÂÙèãªèäËÁ? ËÒ¡¤Ø³àº×èÍ˹èÒ¡Ѻ¤ÇÒÁ¾ÂÒÂÒÁ·ÕèäÁè»ÃÐʺ¤ÇÒÁÊÓàÃ稤ÃÑé§áÅéǤÃÑé§àÅèÒ ã¹¡ÒôÙáÅÊØ¢ÀÒ¾à¾×èÍÃÙ»ÃèÒ§·Õè´Õ àÃÒÁÕâ»Ãá¡ÃÁâÀª¹Ò¡ÒÃà¾×èÍÊØ¢ÀÒ¾ ·ÕèªèǤسä´é ÊÓËÃѺ¼Ùé·ÕèÁÕ»ÑËÒ ¹éÓ˹ѡà¡Ô¹ËÃ×ÍÍéǹ, ¼ÍÁà¡Ô¹ä», ÁÕ»ÑËÒÊØ¢ÀÒ¾ (¼ÍÁáËé§áç¹éÍÂ, ¾Ø§ËéÍÂÍ×´ÍÒ´, ¢Ò´¤ÇÒÁÁÑè¹ã¨, âäÀѶÒÁËÒ,ãºË¹éÒà»ç¹ÊÔÇ, ¼ÔǾÃóàËÕèÂÇÂè¹, ¤¹àÅ蹡ÕÌÒ, ¤Ø³»éÒÇÑ·ͧ, ¤Ø³¹éÍ§æ ·ÕèÍÂÒ¡ÊÇÂ)à»ç¹¼ÅÔµÀѳ±ì¨Ò¡¸ÃÃÁªÒµÔ 100 % äÁèãªèÂÒ äÁèµéͧʹÍÒËÒà äÁèÁռŢéÒ§à¤Õ§ äÁèµéͧÍÍ¡¡ÓÅѧ¡Ò ¿Ñ§´ÙäÁè¹èÒàª×èÍáµè¡çµéͧàª×èÍà¾ÃÒмèÒ¹ ÍÂ.·Ø¡»ÃÐà·È·Õèà¢éÒ仢ÒÂâ´Â੾ÒлÃÐà·Èä·ÂáÅÐÍàÁÃÔ¡Ò ãËéÊÒÃÍÒËÒäú¶éǹ »ÃѺÊÁ´ØŢͧÃèÒ§¡ÒÂÅ´ä¢ÁѹÊèǹà¡Ô¹ ÃѺÃͧ¼ÅÀÒÂã¹30Çѹ´éÇÂÃкº¤×¹à§Ô¹100%(á¾·Âì¼Ùé¤Ô´¤é¹ÍÒËÒÃÊٵùÕé¤×ͤ¹·Õè¤Ô´¤é¹ÍÒËÒÃãËé¹Ñ¡ºÔ¹ÍÇ¡ÒÈͧ¤ì¡ÒùҫèÒ) ʹ㨠¢Í¤Óá¹Ð¹Óà¾ÔèÁàµÔÁä´é·Õè ¤Ø³ÊÔÃÔ 01-8901701¾º¤ÓµÍºÊØ´·éÒ¢ͧ¤Ø³ä´é·Õè¹Õè http://www.smartslender.com/foodforhealth To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Looking for comments on a new utility...
On Tue, Jun 11, 2002 at 05:15:17AM -0700, Juli Mallett wrote: Hej, As some of you may have noticed, I've done some poking of ps(1) lately, and this has brought attention of people who have ideas for things that they would like to see done to ps(1) :) The most notable request was for a feature I've missed having in our ps(1) for a while, the ability to get a tree of processes printed so you can tell who is whose child, etc. ps(1)'s internals, however, didn't seem quite right to me, but after about 10 minutes reading kvm(3) manpages and recalling some tricks with recursive programming to produce an N-level tree with as many as N-1 elements, I had come up with a simple utility to print out a process tree. You can find the code here: http://people.freebsd.org/~jmallett/.proctree/proctree.c And some example output from a cluster machine here: http://people.freebsd.org/~jmallett/.proctree/proctree.out Lots of people have given feedback that they don't care much for the \_ formatting of the tree, and I'm willing to look at patches that provide noticably more readable output. how about this one ? 1 ?0 \_ init 2814 ttyp00 \_ sh 2816 ttyp00 | \_ sh 57423 ?0 | \_ sleep 2596 ?0 \_ inetd 24834 ?0 | \_ rlogind 24838 ttyp00 | | \_ ksh 24912 ttyp00 | | \_ ksh 57504 ?0 | \_ telnetd ^^ command tree standard ps fields taken from ast-open `ps -T'. see http://www.research.att.com/~gsf/download/tgz/ for details (maybe one I'll will finish this !@#$%^* port which is still broken in some way ?) for fun, how about a simple awk script like the one in attachment ;^) Cyrille. -- Cyrille Lefevre mailto:[EMAIL PROTECTED] #!/bin/sh # was ps -ef ps axwo user pid ppid start tt time command | awk ' BEGIN { getline } { if (! nchild[$3]) nchild[$3] = 0 father[$2] = $3 children[$3, nchild[$3]] = $2 nchild[$3] ++ start[$2] = $4 tty[$2] = $5 time[$2] = $6 cmd[$2] = $7 for (i = 8; i = NF; i++) cmd[$2] = cmd[$2] $i } function print_parents(pid) { if (pid != 1) prefix =print_parents(father[pid]) else prefix = printf %6i %6i %7s %s %s %s\\_ %s\n, \ pid, father[pid], start[pid], tty[pid], time[pid], \ substr(prefix, 1, length(prefix)-2), cmd[pid] returnprefix } function print_children (pid, prefix, child) { printf %6i %6i %7s %s %s %s\\_ %s\n, \ pid, father[pid], start[pid], tty[pid], time[pid], \ substr(prefix, 1, length(prefix)-2), cmd[pid] if (! nchild[pid]) return for (child = 0; child nchild[pid] - 1; child ++) print_children(children[pid, child], prefix | ) print_children(children[pid, child], prefix ) } END { if (! whichpid) whichpid = 1 if (! cmd[whichpid]) exit if (father[whichpid]) prefix =print_parents(father[whichpid]) else prefix = print_children(whichpid, prefix) }' whichpid=$1
Re: The great perl rewrite - progress report
On Tue, 11 Jun 2002, Andrew Boothman wrote: Will Andrews wrote: On Thu, Jun 06, 2002 at 05:31:12PM +0100, Mark Murray wrote: /usr/sbin/sysinstall* - fix - * What part of this uses perl?? Perhaps it was just a general comment ;-) Please don't send guesses to the list. Definitely do not send guesses to the list when the correct answer was given a long time ago. -- We have known freedom's price. We have shown freedom's power. And in this great conflict, ... we will see freedom's victory. - George W. Bush, President of the United States State of the Union, January 28, 2002 Do YOU Yahoo!? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
pax fix (was Re: WARNING! New GNU Tar in 5-CURRENT could erroneouslycreate world writeable dirs)
On Jun 7, 2002 01:27:31 pm +0200, Cyrille Lefevre wrote: On Fri, Jun 07, 2002 at 02:15:09AM -0400, Trevor Johnson wrote: Dan Nelson wrote: [snip] According to Mr. Schilling's testing, GNU tar 1.13.25 has a bug: ftp://ftp.fokus.gmd.de/pub/unix/star/testscripts/README.gtarfail . I guess it qualifies as a non-trivial program. :-) FYI, the current pax implementation is able to handle the following archives from ftp://ftp.fokus.gmd.de/pub/unix/star/testscripts/ : 100char_longlink.tar gtarfail.tar gtarfail2.tar but miserably fail on this one : long.ustar.gz $ uname -a FreeBSD gits 4.6-RC FreeBSD 4.6-RC #7: Sun Jun 2 16:33:05 CEST 2002 root@gits:/disk2/4.x-stable/src/sys/compile/CUSTOM i386 $ pax -zvf -rw-r--r-- 1 486 cvs4 Apr 19 2000 ___ ___D_099 /___ __100644 746 0003720 004 07077317140 0055507 0 $ star -zvtf 4 -rw-r--r-- jes/cats Apr 19 13:54 2000 __ D_099/__ ___100 I'll try to fix this... done, here is the patch which may be integrated to 4.6 -release ? Index: /tmp/src/bin/pax/tar.c === RCS file: /home/ncvs/src/bin/pax/tar.c,v retrieving revision 1.19 diff -u -r1.19 tar.c --- /tmp/src/bin/pax/tar.c 16 May 2002 01:57:13 - 1.19 +++ /tmp/src/bin/pax/tar.c 11 Jun 2002 23:39:16 - @@ -758,7 +758,7 @@ *dest++ = '/'; cnt++; } - arcn-nlen = cnt + l_strncpy(dest, hd-name, sizeof(arcn-name) - cnt); + arcn-nlen = cnt + l_strncpy(dest, hd-name, MIN(TNMSZ + 1, sizeof(arcn-name) +- cnt) - 1); arcn-name[arcn-nlen] = '\0'; /* PS : I've finished to merge diffs from OpenBSD last week, but diffs w/ NetBSD are really big... so, be patient :P Cyrille. -- Cyrille Lefevre mailto:[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: The great perl rewrite - progress report
On Tuesday 11 June 2002 06:10 pm, Doug Barton wrote: On Tue, 11 Jun 2002, Andrew Boothman wrote: Will Andrews wrote: On Thu, Jun 06, 2002 at 05:31:12PM +0100, Mark Murray wrote: /usr/sbin/sysinstall * - fix - * What part of this uses perl?? Perhaps it was just a general comment ;-) Please don't send guesses to the list. Definitely do not send guesses to the list when the correct answer was given a long time ago. I think it was a joke, not a guess. Just saying we should all be doing our part to support the libh project :) -David -- Everyone who believes in telekinesis, raise my hand... Astronomy and Astrophysics Center The University of Chicago To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: pax fix (was Re: WARNING! New GNU Tar in 5-CURRENT could erroneously create world writeable dirs)
PS : I've finished to merge diffs from OpenBSD last week, but diffs w/ NetBSD are really big... so, be patient :P What about bin/35886? Björn To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: pax fix (was Re: WARNING! New GNU Tar in 5-CURRENT could erroneously create world writeable dirs)
On Wed, Jun 12, 2002 at 03:07:45AM +0200, Bjoern Fischer wrote: PS : I've finished to merge diffs from OpenBSD last week, but diffs w/ NetBSD are really big... so, be patient :P What about bin/35886? already done using the NetBSD way. the problem is that they use LC_TIME (hugh!) to pass the format string to strftime while LC_TIME isn't suppose to contain any format strings but a locale name. so, I don't know yet how to handle this case. whatever, I'm not sure that adding a yet another non portable option would be good. how about using env var PAX_TIMEFMT instead ? something is missing in the SUSV3 standard. -o can't be use for reading (not extracting -- aka no -r nor -w) archive. in other way, I would like to say something like this : pax -o freebsd.timefmt=... -f archive but I can't w/o breaking the standard! grrr. search for the VENDOR keyword in the the following URL for details : http://www.opengroup.org/onlinepubs/007904975/utilities/pax.html Cyrille. -- Cyrille Lefevre mailto:[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: pax fix (was Re: WARNING! New GNU Tar in 5-CURRENT could erroneously create world writeable dirs)
On Wed, Jun 12, 2002 at 04:27:19AM +0200, Cyrille Lefevre wrote: [...] already done using the NetBSD way. the problem is that they use LC_TIME (hugh!) to pass the format string to strftime while LC_TIME isn't suppose to contain any format strings but a locale name. Ew! That won't work for my needs. I'm not sure that adding a yet another non portable option would be good. how about using env var PAX_TIMEFMT instead ? PAX_TIMEFMT would be fine. Does it already exist? Björn To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: Crash after world/kernel upgrade
typo in unlocking (causing recursive lock instead) Fixed. Thanks. lack of inet6 support for inpcb locking, e.g. no handling of locks in in6_pcbdetach. attempts to destroy held lock in in_pcbdetach Gurg, IPv6 isn't locked up yet! These must be the result of inadvertent interactions with the shared IPv4 code. I'll see what can be done to either mitigate the effects for IPv6 or quickly lock up v6. Jeffrey To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
C++ problems
I cleaned up my /usr/lib and /usr/include file of stale headers/libs left after the libstdc++ upgrade (maybe this should be in src/UPDATING??), and now any port that uses C++ autoconf fails to configure... checking if STL implementation is SGI like... no checking if STL implementation is HP like... no configure: error: no known STL type found - did you forget to install libstdc++-devel ? However, the configure script WILL succeed if I manually run configure with the same options (grabbed from ps). Weird... Anyone have some thoughts on this? It's a little annoying :) -- _ __ ___ ___ ___ ___ Wesley N Morgan _ __ ___ | _ ) __| \ [EMAIL PROTECTED] _ __ | _ \._ \ |) | FreeBSD: The Power To Serve _ |___/___/___/ Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Cannot boot with ACPI enabled..
Attached are the dmesg from a kernel that worked (I was away from my 'puter for a few months so I wasn't able to try -current between mid Feb and now) and my kernel config. However, now it'll hang after detecting: acpi_tz0: thermal zone on acpi0 unless I disable the acpi thermal stuff with the debug.acpi.disable/avoid kernel variables. - alex /* RSD PTR: Checksum=156, OEMID=Award, RsdtAddress=0x07ff3000 */ /* RSDT: Length=44, Revision=1, Checksum=172, OEMID=Award, OEM Table ID=AWRDACPI, OEM Revision=0x42302e31, Creator ID=AWRD, Creator Revision=0x0 */ /* Entries={ 0x07ff3040, 0x07ff55c0 } */ /* DSDT=0x7ff30c0 INT_MODEL=PIC SCI_INT=9 SMI_CMD=0xb2, ACPI_ENABLE=0xa1, ACPI_DISABLE=0xa0, S4BIOS_REQ=0x0 PM1a_EVT_BLK=0x4000-0x4003 PM1a_CNT_BLK=0x4040-0x4041 PM2_TMR_BLK=0x4008-0x400b PM2_GPE0_BLK=0x400c-0x400f P_LVL2_LAT=90ms, P_LVL3_LAT=900ms FLUSH_SIZE=0, FLUSH_STRIDE=0 DUTY_OFFSET=1, DUTY_WIDTH=1 DAY_ALRM=13, MON_ALRM=0, CENTURY=0 Flags={WBINVD,PROC_C1,SLP_BUTTON,RTC_S4} */ /* DSDT: Length=9466, Revision=1, Checksum=18, OEMID=AWARD, OEM Table ID=AWRDACPI, OEM Revision=0x1000, Creator ID=MSFT, Creator Revision=0x10c */ DefinitionBlock ( acpi_dsdt.aml,//Output filename DSDT, //Signature 0x1,//DSDT Revision AWARD,//OEMID AWRDACPI, //TABLE ID 0x1000 //OEM Revision ) { Scope(\_PR_) { Processor(\_PR_.CPU_, 0, 0x0, 0x0) { } Processor(\_PR_.CPU1, 1, 0x0, 0x0) { } } OperationRegion(CM70, SystemIO, 0x70, 0x2) Field(CM70, ByteAcc, NoLock, Preserve) { CI70, 8, CO71, 8 } IndexField(CI70, CO71, ByteAcc, NoLock, Preserve) { Offset(0x5d), SUSF, 8 } Name(STAT, 0x0) Name(\_S0_, Package(0x4) { 0x5, 0x5, 0x5, 0x5, }) Name(\_S1_, Package(0x4) { 0x4, 0x4, 0x4, 0x4, }) Name(\_S5_, Package(0x4) { Zero, Zero, Zero, Zero, }) OperationRegion(\DEBG, SystemIO, 0x80, 0x1) Field(\DEBG, ByteAcc, NoLock, Preserve) { DBG1, 8 } OperationRegion(EXTM, SystemMemory, 0x000ff830, 0x10) Field(EXTM, WordAcc, NoLock, Preserve) { ROM1, 16, RMS1, 16, ROM2, 16, RMS2, 16, ROM3, 16, RMS3, 16, AMEM, 32 } OperationRegion(\SMIC, SystemIO, 0xb2, 0x1) Field(\SMIC, ByteAcc, NoLock, Preserve) { SCP_, 8 } OperationRegion(\TRAP, SystemIO, 0x402f, 0x1) Field(\TRAP, ByteAcc, NoLock, Preserve) { , 1, TR13, 1 } OperationRegion(\GBLE, SystemIO, 0x4021, 0x1) Field(\GBLE, ByteAcc, NoLock, Preserve) { ESMI, 8 } Name(CMDB, Buffer(0x8) { }) CreateByteField(CMDB, 0x0, BYT0) CreateByteField(CMDB, 0x1, BYT1) CreateByteField(CMDB, 0x2, BYT2) CreateByteField(CMDB, 0x3, BYT3) CreateByteField(CMDB, 0x4, BYT4) CreateByteField(CMDB, 0x5, BYT5) CreateByteField(CMDB, 0x6, BYT6) CreateByteField(CMDB, 0x7, BYT7) Name(IDEB, Buffer(0x38) { }) CreateField(IDEB, 0x0, 0x38, CMD0) CreateField(IDEB, 0x38, 0x38, CMD1) CreateField(IDEB, 0x70, 0x38, CMD2) CreateField(IDEB, 0xa8, 0x38, CMD3) CreateField(IDEB, 0xe0, 0x38, CMD4) CreateField(IDEB, 0x0118, 0x38, CMD5) CreateField(IDEB, 0x0150, 0x38, CMD6) CreateField(IDEB, 0x0188, 0x38, CMD7) OperationRegion(APMP, SystemIO, 0xb2, 0x2) Field(APMP, ByteAcc, NoLock, Preserve) { APMC, 8, APMD, 8 } OperationRegion(ELCR, SystemIO, 0x04d0, 0x2) Field(ELCR, ByteAcc, NoLock, Preserve) { ELC1, 8, ELC2, 8 } OperationRegion(GPOB, SystemIO, 0x4034, 0x4) Field(GPOB, ByteAcc, NoLock, Preserve) { GP00, 1, GP01, 1, GP02, 1, GP03, 1, GP04, 1, GP05, 1, GP06, 1, GP07, 1, GP08, 1, GP09, 1, GP0A, 1, GP0B, 1, GP0C, 1, GP0D, 1, GP0E, 1, GP0F, 1, GP10, 1, GP11, 1, GP12, 1, GP13, 1, GP14, 1, GP15, 1, GP16, 1, GP17, 1, GP18, 1, GP19, 1, GP1A, 1, GP1B, 1, GP1C, 1, GP1D, 1, GP1E, 1, GP1F, 1 } Name(OSFL, 0x1) Method(STRC, 2) { If(LNot(LEqual(SizeOf(Arg0), SizeOf(Arg1 { Return(0x0) } Add(SizeOf(Arg0), 0x1, Local0) Name(BUF0, Buffer(Local0) { }) Name(BUF1, Buffer(Local0) { }) Store(Arg0, BUF0) Store(Arg1, BUF1) While(Local0) { Decrement(Local0) If(LNot(LEqual(DerefOf(Index(BUF0, Local0, )), DerefOf(Index(BUF1, Local0, ) { Return(Zero) } } Return(One) } OperationRegion(RTCM, SystemIO, 0x70, 0x2) Field(RTCM, ByteAcc, NoLock, Preserve) { CMIN, 8, CMDA, 8 } IndexField(CMIN, CMDA, ByteAcc, NoLock, Preserve) { Offset(0xf), SHUT, 8 } OperationRegion(\GRAM,
Perl Location pseudo-hardcoded for ports
The perl location for OSVERSION = 500036 is 'hardcoded' to be ${LOCALBASE}/bin/perl in bsd.port.mk. Effectively /usr/local/bin/perl Shouldn't it use the perl wrapper in /usr/bin/perl ? I thought I'd check here first before harassing the -ports people. -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | M:+61 416 022 411 | ACN: 082 081 472 ABN: 83 082 081 472 |[EMAIL PROTECTED]| Carpe Daemon To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message