🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Mike Pelletier Wed, 11 Dec 1996 00:00
Problem with INN 1.5 msync() on BSD/OS 2.1
#13216
Author: Mike Pelletier
Date: Wed, 11 Dec 1996 00:00
16 lines
1009 bytes
I was encouraged to see the addition of msync() to INN 1.5, but when
I enabled it using the two-argument version on my BSD/OS 2.1 news
server, I got the following fatal error:

Dec 11 16:30:07 inet-prime innd: SERVER msync failed
	/usr/news/etc/active Invalid argument

Any idea why this might be happening, what's invalid about the arguments?
Do I need to put in a cast for the "0" or something like that?

Thanks for any suggestions you can offer...

	-Mike Pelletier.

Re: Problem with INN 1.5 msync() on BSD/OS 2.1
#13222
Author: The Caretaker
Date: Thu, 12 Dec 1996 00:00
51 lines
1975 bytes
Mike Pelletier (mikep@comshare.com) chatted away...
: I was encouraged to see the addition of msync() to INN 1.5, but when
: I enabled it using the two-argument version on my BSD/OS 2.1 news
: server, I got the following fatal error:

: Dec 11 16:30:07 inet-prime innd: SERVER msync failed
: 	/usr/news/etc/active Invalid argument

: Any idea why this might be happening, what's invalid about the arguments?
: Do I need to put in a cast for the "0" or something like that?

: Thanks for any suggestions you can offer...

: 	-Mike Pelletier.

For BSD/OS, someone earlier suggested that in config.data set:

MSYNC_3_ARG             DO


...which I guess would work, but what I did instead in innd/icd.c change:


	if (msync(ICDactpointer, 0) < 0) { 
to:

	if (msync(ICDactpointer, ICDactsize) < 0) { 


And of course in config.data set: 

ACT_STYLE               MMAP 
MMAP_PTR                caddr_t
MMAP_SYNC               DO
MSYNC_3_ARG             DONT


Using MMAP for active will dramatically speedup INND over not using it.  Almost
astounding, actually. This one code change will do the trick. 

g'luck!


//del//

=============================================================================
 Flex Information Network 808.539.3790 HAWAII    Email: postmaster@aloha.com 
  >>> Hawaii's Very First Public Access Internet Provider, July 19, 1994 <<<

Re: Problem with INN 1.5 msync() on BSD/OS 2.1
#13224
Author: Evan Champion
Date: Thu, 12 Dec 1996 00:00
45 lines
2201 bytes
The Caretaker wrote:
> For BSD/OS, someone earlier suggested that in config.data set:
> 
> MSYNC_3_ARG             DO
> 
> ...which I guess would work, but what I did instead in innd/icd.c change:
> 
>         if (msync(ICDactpointer, 0) < 0) {
> to:
> 
>         if (msync(ICDactpointer, ICDactsize) < 0) {

The real problem is that the BSD/OS 2.1 msync() is broken for the case
when the second argument is 0.

A fix from BSDI follows.  This will let you use INN 1.5 as shipped. 
Note: this would make a good entry into the FAQ since BSDI did not want
to make up a separate patch for it, but they did give me permission to
distribute it on my own.  This patch has already been made to the BSD/OS
3.0 source tree.

Evan

*** sys/vm/vm_mmap.c    1996/07/30 09:54:41     2.9
--- sys/vm/vm_mmap.c    1996/10/21 20:52:55
***************
*** 387,393 ****
                vm_map_lock_read(map);
                rv = vm_map_lookup_entry(map, addr, &entry);
                vm_map_unlock_read(map);
!               if (rv)
                        return (EINVAL);
                addr = entry->start;
                size = entry->end - entry->start;
--- 387,393 ----
                vm_map_lock_read(map);
                rv = vm_map_lookup_entry(map, addr, &entry);
                vm_map_unlock_read(map);
!               if (rv == FALSE)
                        return (EINVAL);
                addr = entry->start;
                size = entry->end - entry->start;

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads