Re: Setting memory allocators for library functions.

2001-02-27 Thread Julian Elischer
Wes Peters wrote: > > Julian Elischer wrote: > > > > Arun Sharma wrote: > > > > > > On 26 Feb 2001 18:56:18 +0100, Matt Dillon <[EMAIL PROTECTED]> wrote: > > > > Ha. Right. Go through any piece of significant code and just see how > > > > much goes flying out the window because the code

Re: Setting memory allocators for library functions.

2001-02-27 Thread Wes Peters
Julian Elischer wrote: > > Arun Sharma wrote: > > > > On 26 Feb 2001 18:56:18 +0100, Matt Dillon <[EMAIL PROTECTED]> wrote: > > > Ha. Right. Go through any piece of significant code and just see how > > > much goes flying out the window because the code wants to simply assume > > >

Re: ThinkNIC booting FreeBSD? [WAS: Re: Silent FreeBSD]

2001-02-27 Thread Stefan Molnar
Just turn on network boot in the bios, and setup the server for a PXE Client. No hardware to add. On Tue, 27 Feb 2001, Wes Peters wrote: > Stefan Molnar wrote: > > > > Wes, you do not even need the flash to netboot, since it supports > > PXE. And it boots very nicely > > Oh, cool. Is the b

Re: ThinkNIC booting FreeBSD? [WAS: Re: Silent FreeBSD]

2001-02-27 Thread Wes Peters
Stefan Molnar wrote: > > Wes, you do not even need the flash to netboot, since it supports > PXE. And it boots very nicely Oh, cool. Is the boot rom on the machine, or is there a socket there somewhere? Where can I get a ROM image? Netbooting FreeBSD on our several NICs at work would probab

Generating Core Dump Programmatically

2001-02-27 Thread Marc W
I'm trying to ensure robust shutdown on my machine. Thus, I've installed signal handlers for a bunch of nasty looking signals. In my new handler, after all critical state is saved, I then call abort(3), and all seems to work well. EXCEPT -- some signals generate core files when le

Re: character device driver

2001-02-27 Thread Brian Somers
[.] > In my mind, it is important that (in the general case) we provide a struct > file state hook rather than having per-process state, to allow things like > threads, process teams, aio, file descriptor passing, etc, to work > properly. One advantage to tying VFS statefulness to device stat

Re: rootdev problems with /boot/loader.

2001-02-27 Thread Paul Saab
Oops. make that vfs.root.mountrootfrom="ufs:/dev/ad0s1a" Paul Saab ([EMAIL PROTECTED]) wrote: > root.vfs.mountrootfrom="ufs:/dev/ad0s1a" > > paul > > Josef Karthauser ([EMAIL PROTECTED]) wrote: > > On Tue, Feb 27, 2001 at 02:44:04PM -0800, John Baldwin wrote: > > > > > > On 27-Feb-01 Josef Kar

Re: rootdev problems with /boot/loader.

2001-02-27 Thread Paul Saab
root.vfs.mountrootfrom="ufs:/dev/ad0s1a" paul Josef Karthauser ([EMAIL PROTECTED]) wrote: > On Tue, Feb 27, 2001 at 02:44:04PM -0800, John Baldwin wrote: > > > > On 27-Feb-01 Josef Karthauser wrote: > > > > > > p.s. This image is being booted via /dev/md0 in vmware. What I'm > > > trying to

Re: rootdev problems with /boot/loader.

2001-02-27 Thread Josef Karthauser
On Tue, Feb 27, 2001 at 02:44:04PM -0800, John Baldwin wrote: > > On 27-Feb-01 Josef Karthauser wrote: > > > > p.s. This image is being booted via /dev/md0 in vmware. What I'm > > trying to work out is whether it's a bug in either of these parts. > > What does 'lsdev' show. That's probably i

Re: talk(1) patch to allow 8bits characters

2001-02-27 Thread Maxime Henrion
Matt Dillon wrote: >This is an extremely dangerous patch. A number of terminal protocols >have a 'talkback' escape sequence that allow you to write data >that the terminal then copies back as if someone typed it. I remember >using this feature quite a lot while at Berkeley to, a

Re: talk(1) patch to allow 8bits characters

2001-02-27 Thread Matt Dillon
This is an extremely dangerous patch. A number of terminal protocols have a 'talkback' escape sequence that allow you to write data that the terminal then copies back as if someone typed it. I remember using this feature quite a lot while at Berkeley to, ah, break into people's a

Re: talk(1) patch to allow 8bits characters

2001-02-27 Thread Maxime Henrion
Michael C . Wu wrote: > On Tue, Feb 27, 2001 at 08:53:09PM +0100, Maxime Henrion scribbled: > isprint() has been broken for a long long time. Clive Lin > <[EMAIL PROTECTED]> was about to fix it. I know that > we have been slacking, but please give us some time. Of course, this was only meant as

RE: rootdev problems with /boot/loader.

2001-02-27 Thread John Baldwin
On 27-Feb-01 Josef Karthauser wrote: > I've got a bootable filesystem that although it's installed in the first > slice on a disk the kernel/bootloader tries to mount /dev/ad0s2a as the > root filesystem. I'm scratching my head as to why. Any ideas? > It should be mounting /dev/ad0s1a automatic

Re: talk(1) patch to allow 8bits characters

2001-02-27 Thread Michael C . Wu
On Tue, Feb 27, 2001 at 08:53:09PM +0100, Maxime Henrion scribbled: | talk(1) uses the isprint() function to determine if a character is | printable. If it's not, it outputs '^' followed by the character without | his 8th bit. However, isprint() and friends are broken currently on | FreeBSD (at l

Re: [hackers] Re: Setting memory allocators for library functions.

2001-02-27 Thread Tony Finch
Maxime Henrion <[EMAIL PROTECTED]> wrote: >Tony Finch wrote: >> >> If it's available at all, mprotect() is often limited to memory >> obtained with mmap(), i.e. not malloc(). Not great for portability. > >FreeBSD malloc() calls mmap() as AFAIK many (if not all) malloc() >implementations. FreeBSD

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread Dave Smith
Well, my understand (limited) of *BSD's threading systems is that they are not truly pre-emptive -- they use a scheme similar to PTH for forcing a single process to jump around its process space. Given this, it doesn't suprise me that a few system calls don't yield; possibly because they aren't w

rootdev problems with /boot/loader.

2001-02-27 Thread Josef Karthauser
I've got a bootable filesystem that although it's installed in the first slice on a disk the kernel/bootloader tries to mount /dev/ad0s2a as the root filesystem. I'm scratching my head as to why. Any ideas? It should be mounting /dev/ad0s1a automatically. The following are set by /boot/loader:

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread Marc W
just did some more testing -- the problem does appear to be FreeBSD specific. Solaris 8 and all the Linuxes I've got handy run this no probs. Don't have any openbsd or netbsd to test those out ... I'll just #ifdef in some code for FreeBSD. anybody know what #ifdef I should use before

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread Peter Dufault
> it gets worse -- when i change my loop to be: > > while (1) { > > fifo = open(fifoPath, O_RDONLY | O_NONBLOCK); > cread = read(fifo, buf, sizeof(buf)); > if (cread > 0) do_something(); > close(fifo); > usleep(10); > }

Re: [hackers] Re: Setting memory allocators for library functions.

2001-02-27 Thread Maxime Henrion
Tony Finch wrote: > Drew Eckhardt <[EMAIL PROTECTED]> wrote: > >In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes: > >>In most cases it is impossible to declare the data read-only because > >>it originally had to be read-write and you can't change its attributes > >>later. > > > >mprotect(

Re: ThinkNIC booting FreeBSD? [WAS: Re: Silent FreeBSD]

2001-02-27 Thread Stefan Molnar
Wes, you do not even need the flash to netboot, since it supports PXE. And it boots very nicely On Tue, 27 Feb 2001, Wes Peters wrote: > Chris Shenton wrote: > > > > In message <[EMAIL PROTECTED]> Wes Peters writes: > > > > > We have several NIC's around here (the New Internet Computer, see >

Re: [hackers] Re: Setting memory allocators for library functions.

2001-02-27 Thread Tony Finch
Drew Eckhardt <[EMAIL PROTECTED]> wrote: >In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes: >>In most cases it is impossible to declare the data read-only because >>it originally had to be read-write and you can't change its attributes >>later. > >mprotect(2). If it's available at all, m

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread Peter Dufault
> I have tried this, but it gets even weirder then: > > - the call to open always succeeds right away (even when there are > no threads on the write end of the fifo) > - the immediately following call to read() also succeeds, returning > 0 bytes as the number of bytes read. > > >

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread mouss
It seems ther's a problem here:) the manpage of open states " disables thread rescheduling...". Is this the explanation? As far as I can tell, Posix requires that some function should not block the process, and lists open(), fcntl(), ... Are there any pthread gurus who could give us the re

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread Marc W
> > I think the FreeBSD behavior is wrong, the spec says that when > opening a FIFO with O_NONBLOCK clear that: > > > An open() for reading-only shall block the calling thread until a > > thread opens the file for writing. An open() for writing-only > > shall block the calling thread until a th

Re: [hackers] Re: Setting memory allocators for library functions.

2001-02-27 Thread Drew Eckhardt
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes: >In most cases it is impossible to declare the data read-only because >it originally had to be read-write and you can't change its attributes >later. mprotect(2). To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-

Re: [hackers] Re: Setting memory allocators for library functions.

2001-02-27 Thread Tony Finch
Lyndon Nerenberg <[EMAIL PROTECTED]> wrote: > >If the information in the data segment is going to be updated then >you have to have writable backing store. If, however, that data >is never going to be changed, it should be declared in the program >as read-only data. The kernel VM system should not

Re: Setting memory allocators for library functions.

2001-02-27 Thread Daniel C. Sobral
Tony Finch wrote: > > >It doesn't trash. The memory is filled with backtracking information. > >Memory in active use at any time is rather small. > > I've read articles about programs which use GC which have a small > working set, although it is constantly changing (I've heard of > programs allo

talk(1) patch to allow 8bits characters

2001-02-27 Thread Maxime Henrion
Hello, talk(1) uses the isprint() function to determine if a character is printable. If it's not, it outputs '^' followed by the character without his 8th bit. However, isprint() and friends are broken currently on FreeBSD (at least on -STABLE), so it will never recognize an accentued ch

Re: Setting memory allocators for library functions.

2001-02-27 Thread Tony Finch
"Daniel C. Sobral" <[EMAIL PROTECTED]> wrote: >Matt Dillon wrote: >> >> What is the point of running a scientific calculation if the >> machine turns into a sludge pile and would otherwise cause the >> calculation to take years to complete instead of days? > >It doesn't trash. The memo

Re: dummynet as modules

2001-02-27 Thread Michael Solan
Julian Elischer wrote: > Patrick O'Reilly wrote: > > > > Michael, > > > > I hope I am not barking up the wrong tree here, but my understanding is that > > ipfw selects packets to forward to dummynet. This would make it illogical > > (and hence probably impossible) to run dummynet without having

Re: [hackers] Re: Setting memory allocators for library functions.

2001-02-27 Thread Lyndon Nerenberg
> "Tony" == Tony Finch <[EMAIL PROTECTED]> writes: >> Well, to some extent, I have to wonder why all these pages are >> being requested if they aren't being used... Tony> fork() with big data segments that cause swap to be reserved Tony> in case of a copy-on-write. The 2GB o

Re: [hackers] Re: Setting memory allocators for library functions.

2001-02-27 Thread Tony Finch
Peter Seebach <[EMAIL PROTECTED]> wrote: >David Gilbert writes: >> >>Due to the bloat of the OS and Motif and other such things, they >>required simply amazing amounts of swap just to run. > >Well, to some extent, I have to wonder why all these pages are being >requested if they aren't being used.

Re: Setting memory allocators for library functions.

2001-02-27 Thread Tony Finch
Dag-Erling Smorgrav <[EMAIL PROTECTED]> wrote: > >This is all academic since FreeBSD does memory overcommit, so unless >you run out of address space for your process before you run out of >actual memory and/or swap (not likely, but quite possible) malloc() >will never return NULL and you won't kno

Re: Setting memory allocators for library functions.

2001-02-27 Thread Jonas Bulow
Peter Seebach wrote: ... > Imagine a word processor with this behavior. No attempt to save your > file, no nothing, it just suddenly closes all windows and dies. I think most people can think of at least one widely used commerical word processor with exactly this behaviour. :-) To Unsubscribe:

Re: Setting memory allocators for library functions.

2001-02-27 Thread Matt Dillon
Daniel, you don't have to believe me, I really don't care. I hear this argument once or twice a year and those of who actually have experience (except for Terry, who always likes to argue theory) already know what the reality is. Come back in a year or two after you've wasted a t

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread E.B. Dreger
> Date: Tue, 27 Feb 2001 15:15:33 + (GMT) > From: E.B. Dreger <[EMAIL PROTECTED]> > > Is this a library issue in libc_r? > > I just wrote a quick test program using rfork(RFMEM|RFPROC) to > create a child thread. Correction: RFTHREAD|RFPROC Sorry... I have RFMEM on the brain. The

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread E.B. Dreger
Is this a library issue in libc_r? I just wrote a quick test program using rfork(RFMEM|RFPROC) to create a child thread. I then had both the parent and the child attempt to open the pre-existing file /tmp/blah with O_EXLOCK set. When I specify O_NONBLOCK, the child open() fails immediately. Wh

Re: dummynet as modules

2001-02-27 Thread Julian Elischer
Patrick O'Reilly wrote: > > Michael, > > I hope I am not barking up the wrong tree here, but my understanding is that > ipfw selects packets to forward to dummynet. This would make it illogical > (and hence probably impossible) to run dummynet without having ipfw running > correctly. > > The m

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread Peter Dufault
> can you provided a small piece of code that shows this behaviour? Here's one without error checking. Be sure to use -pthread. Peter -- Peter Dufault ([EMAIL PROTECTED]) Realtime development, Machine control, HD Associates, Inc. Fail-Safe systems, Agency approval #include

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread mouss
At 17:21 26/02/01 -0800, Marc W wrote: >hello! > > I'm running into a problem with some threading using pthreads in an >application i'm writing for FreeBSD. > > The application basically > > 1. initializes some UI goo (but doesn't start any of it UP) using a >GUI framework (Qt) > 2

Re: Setting memory allocators for library functions.

2001-02-27 Thread Julian Elischer
Arun Sharma wrote: > > On 26 Feb 2001 18:56:18 +0100, Matt Dillon <[EMAIL PROTECTED]> wrote: > > Ha. Right. Go through any piece of significant code and just see how > > much goes flying out the window because the code wants to simply assume > > things work. Then try coding conditi

unexplained strangness with cucipop pop3 daemon

2001-02-27 Thread Nathan Vidican
For some (yet to be unexplained reason), cucipop has (twice now), somehow locked the /var/mail/ files, and is apparently not erasing the message and exiting. Therefore the next time a user checks email (every two minutes from Outlook) they get another copy of the same message(s). The problem does

RE: dummynet as modules

2001-02-27 Thread Patrick O'Reilly
Michael, I hope I am not barking up the wrong tree here, but my understanding is that ipfw selects packets to forward to dummynet. This would make it illogical (and hence probably impossible) to run dummynet without having ipfw running correctly. The man page for 'dummynet' says: In its cu

Re: Where can I find out rules on blocking in threads?

2001-02-27 Thread Peter Dufault
> 1. initializes some UI goo (but doesn't start any of it UP) using a > GUI framework (Qt) > 2. creates a FIFO, and then spawns a thread > 3. this new thread then does: > > fifo = open(fifoPath, O_RDONLY); ... > > Now, the problem is that when step 3 above blocks on

Re: Setting memory allocators for library functions.

2001-02-27 Thread Daniel C. Sobral
Matt Dillon wrote: > > Said application was poorly written, then. Even on solaris if you The only reason the application was "poorly written" is the overcommit architecture. > actually run the system out of memory you can blow up other unrelated > processes. To depend on that sort

Re: Setting memory allocators for library functions.

2001-02-27 Thread Matt Dillon
:> things work. Then try coding conditionals all the way through to fix :> it... and don't forget you need to propogate the error condition back :> up the procedure chain too so the original caller knows why it failed. : :So, it all comes down to reimplementing the UNIX kernel in a l