Re: semaphores options
> > This should now be fixed in -current > > Pullups for netbsd-8 and -8-0 have been submitted. > Pullups are completed, so if you rebuild your -8 or -8-0 kernel you > should pick up the fix. > Sorry for making a mess. Thank you. There were no problem, that was quite easy to survive. -- Sincerely yours, Dima Veselov Physics R Establishment of Saint-Petersburg University
Re: semaphores options
On Wed, 10 Apr 2019, Paul Goyette wrote: This should now be fixed in -current Pullups for netbsd-8 and -8-0 have been submitted. Pullups are completed, so if you rebuild your -8 or -8-0 kernel you should pick up the fix. Sorry for making a mess. On Tue, 9 Apr 2019, Paul Goyette wrote: On Mon, 8 Apr 2019, Greg A. Woods wrote: Indeed, something seems to have changed, and the problem continues with -current as of late January (8.99.32). I think the culprit was this change, which somehow didn't have an accompanying change to any documentation (most notably options(4) still documents all the removed settings): RCS file: /cvs/master/m-NetBSD/main/src/sys/conf/param.c,v revision 1.65 date: 2015-05-12 19:06:25 -0700; author: pgoyette; state: Exp; lines: +4 -2; commitid: G8nWAd1qbrsX8ely; Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and SYSVMSG options. Move associated variables out of param.c and into the module's source file. This commit adds a great big ugly "#if XXX_PRG" around all the related SysV IPC settings in sys/conf/param.c, i.e. it entirely removes all support for "options SEMMNI=NNN" and related. That entire block of code should have been removed, not just #ifdef'd My bad, I will fix. Unfortunately I have some personal business to attend to tonight and tomorrow, so it might be a couple of days before I can get to it. The real underlying problem may be that none of the SysV IPC options from options(4) where ever properly set up with "defflag" or "defparam" in the appropriate "files" file (sys/kern/files.kern probably), or as we used to say, they were never "defopt'ed" for config. See config(5). Having "options FOO=1234" worked without "defparam" if the use was in sys/conf/param.c, but it doesn't seem to work with the new regime. Maybe it would work again if "defparam" lines were added to the right place. Yeah, all of these params should have been defparam'd into opt_sysv.h Again, I will fix as soon as I can get to it, within the next couple of days. I will also request pullups to -8 Thanks, Greg, for the detailed analysis and suggestions! ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+ !DSPAM:5cac70af63254569456455! ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+ ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+
Re: semaphores options
This should now be fixed in -current Pullups for netbsd-8 and -8-0 have been submitted. On Tue, 9 Apr 2019, Paul Goyette wrote: On Mon, 8 Apr 2019, Greg A. Woods wrote: Indeed, something seems to have changed, and the problem continues with -current as of late January (8.99.32). I think the culprit was this change, which somehow didn't have an accompanying change to any documentation (most notably options(4) still documents all the removed settings): RCS file: /cvs/master/m-NetBSD/main/src/sys/conf/param.c,v revision 1.65 date: 2015-05-12 19:06:25 -0700; author: pgoyette; state: Exp; lines: +4 -2; commitid: G8nWAd1qbrsX8ely; Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and SYSVMSG options. Move associated variables out of param.c and into the module's source file. This commit adds a great big ugly "#if XXX_PRG" around all the related SysV IPC settings in sys/conf/param.c, i.e. it entirely removes all support for "options SEMMNI=NNN" and related. That entire block of code should have been removed, not just #ifdef'd My bad, I will fix. Unfortunately I have some personal business to attend to tonight and tomorrow, so it might be a couple of days before I can get to it. The real underlying problem may be that none of the SysV IPC options from options(4) where ever properly set up with "defflag" or "defparam" in the appropriate "files" file (sys/kern/files.kern probably), or as we used to say, they were never "defopt'ed" for config. See config(5). Having "options FOO=1234" worked without "defparam" if the use was in sys/conf/param.c, but it doesn't seem to work with the new regime. Maybe it would work again if "defparam" lines were added to the right place. Yeah, all of these params should have been defparam'd into opt_sysv.h Again, I will fix as soon as I can get to it, within the next couple of days. I will also request pullups to -8 Thanks, Greg, for the detailed analysis and suggestions! ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+ !DSPAM:5cac70af63254569456455! ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+
Re: semaphores options
On Mon, 8 Apr 2019, Greg A. Woods wrote: Indeed, something seems to have changed, and the problem continues with -current as of late January (8.99.32). I think the culprit was this change, which somehow didn't have an accompanying change to any documentation (most notably options(4) still documents all the removed settings): RCS file: /cvs/master/m-NetBSD/main/src/sys/conf/param.c,v revision 1.65 date: 2015-05-12 19:06:25 -0700; author: pgoyette; state: Exp; lines: +4 -2; commitid: G8nWAd1qbrsX8ely; Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and SYSVMSG options. Move associated variables out of param.c and into the module's source file. This commit adds a great big ugly "#if XXX_PRG" around all the related SysV IPC settings in sys/conf/param.c, i.e. it entirely removes all support for "options SEMMNI=NNN" and related. That entire block of code should have been removed, not just #ifdef'd My bad, I will fix. Unfortunately I have some personal business to attend to tonight and tomorrow, so it might be a couple of days before I can get to it. The real underlying problem may be that none of the SysV IPC options from options(4) where ever properly set up with "defflag" or "defparam" in the appropriate "files" file (sys/kern/files.kern probably), or as we used to say, they were never "defopt'ed" for config. See config(5). Having "options FOO=1234" worked without "defparam" if the use was in sys/conf/param.c, but it doesn't seem to work with the new regime. Maybe it would work again if "defparam" lines were added to the right place. Yeah, all of these params should have been defparam'd into opt_sysv.h Again, I will fix as soon as I can get to it, within the next couple of days. I will also request pullups to -8 Thanks, Greg, for the detailed analysis and suggestions! ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+
Re: semaphores options
At Mon, 08 Apr 2019 20:37:39 -0700, "Greg A. Woods" wrote: Subject: Re: semaphores options > > RCS file: /cvs/master/m-NetBSD/main/src/sys/conf/param.c,v > > revision 1.65 > date: 2015-05-12 19:06:25 -0700; author: pgoyette; state: Exp; lines: +4 > -2; commitid: G8nWAd1qbrsX8ely; > Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and > SYSVMSG options. Move associated variables out of param.c and into > the module's source file. > > > This commit adds a great big ugly "#if XXX_PRG" around all the related > SysV IPC settings in sys/conf/param.c, i.e. it entirely removes all > support for "options SEMMNI=NNN" and related. Note also this change only appears in NetBSD-8.0 in terms of releases. The netbsd-7 branch and all its releases preserve the original behaviour where these "options" worked -- or at least that's what I understand from CVS. I haven't tested this -- my only currently running 7.x kernel didn't have my custom config edits. -- Greg A. Woods +1 250 762-7675 RoboHack Planix, Inc. Avoncote Farms pgpPmvsEu7Au3.pgp Description: OpenPGP Digital Signature
Re: semaphores options
At Mon, 8 Apr 2019 21:19:32 +0300, Dima Veselov wrote: Subject: semaphores options > > Greetings! > Sorry for posting so many questions recently, but my production > server failed to start PostgreSQL after system upgrade (8-STABLE). > > This was caused by semaphores, which I like to set in kernel options, > which now are not working. Better say some are working, some are > not. > > I solved the problem setting them via sysctl but I wonder what happened > with options(4)? > It seems that SEMMNI, SEMMNS, SEMMNU, NOFILE and CHILD_MAX do not > work anymore, but SHMSEG and NMBCLUSTERS are good. I beleive they > were always working because the system worked long time and had > sysctl.conf empty. Any recent changes? Indeed, something seems to have changed, and the problem continues with -current as of late January (8.99.32). I think the culprit was this change, which somehow didn't have an accompanying change to any documentation (most notably options(4) still documents all the removed settings): RCS file: /cvs/master/m-NetBSD/main/src/sys/conf/param.c,v revision 1.65 date: 2015-05-12 19:06:25 -0700; author: pgoyette; state: Exp; lines: +4 -2; commitid: G8nWAd1qbrsX8ely; Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and SYSVMSG options. Move associated variables out of param.c and into the module's source file. This commit adds a great big ugly "#if XXX_PRG" around all the related SysV IPC settings in sys/conf/param.c, i.e. it entirely removes all support for "options SEMMNI=NNN" and related. Perhaps this only affects kernels which have the SysV IPC code baked in, though I've no idea how the so-called modular world is supposed to work for pre-set definitions -- I guess it doesn't, though perhaps there's still some hook for config(1)?. The real underlying problem may be that none of the SysV IPC options from options(4) where ever properly set up with "defflag" or "defparam" in the appropriate "files" file (sys/kern/files.kern probably), or as we used to say, they were never "defopt'ed" for config. See config(5). Having "options FOO=1234" worked without "defparam" if the use was in sys/conf/param.c, but it doesn't seem to work with the new regime. Maybe it would work again if "defparam" lines were added to the right place. FYI, I have had the following in my kernel configs (in this particular case edited into XEN3_DOMU) since a very long time ago (before 1.6), and they continued to work up to and including 5.2_STABLE: # System V compatible IPC subsystem. (msgctl(2), semctl(2), and shmctl(2)) # # Note: SysV IPC parameters could be changed dynamically, see sysctl(8). # options SYSVMSG # System V-like message queues # options MSGMNI=200 # max number of message queue identifiers (default 40) options MSGMNB=32768# max size of a message queue (default 2048) options MSGTQL=512 # max number of messages in the system (default 40) options MSGSSZ=128 # size of a message segment (must be 2^n, n>4) (default 8) options MSGSEG=16384# max number of message segments in the system # (must be less than 32767) (default 2048) # options SYSVSEM # System V-like semaphores options SEMMNI=200 # max number of semaphore identifiers in system (def=10) options SEMMNS=600 # max number of semaphores in system (def=60) options SEMMNU=300 # number of undo structures in system (def=30) options SEMUME=100 # max number of undo entries per process (def=10) # options SYSVSHM # System V-like memory sharing options SHMMAXPGS=16384 # Size of shared memory map (def=2048) But on my 8.99.32 XEN3_DOMU kernel these only give me: # sysctl kern.ipc kern.ipc.sysvmsg = 1 kern.ipc.sysvsem = 1 kern.ipc.sysvshm = 1 kern.ipc.shmmax = 2097152000 kern.ipc.shmmni = 128 kern.ipc.shmseg = 128 kern.ipc.shmmaxpgs = 512000 kern.ipc.shm_use_phys = 0 kern.ipc.msgmni = 200 kern.ipc.msgseg = 16384 kern.ipc.semmni = 10 kern.ipc.semmns = 60 kern.ipc.semmnu = 30 FYI, to show it did/does work on an older system: 23:02 [0.185] # uname -a NetBSD central 5.2_STABLE NetBSD 5.2_STABLE (XEN3_DOMU) #0: Sun Jun 5 16:33:15 PDT 2016 woods@building:/build/woods/building/netbsd-5-amd64-amd64-obj/work/woods/m-NetBSD-5/sys/arch/amd64/compile/XEN3_DOMU amd64 23:02 [0.186] # sysctl kern.ipc kern.ipc.sysvmsg = 1 kern.ipc.sysvsem = 1 kern.ipc.sysvshm = 1 kern.ipc.shmmax = 67108864 kern.ipc.shmmni = 128 kern.ipc.shmseg = 128 kern.ipc.shmmaxpgs = 16384 kern.ipc.shm_use_phys = 0 kern.ipc.msgmni = 200 kern.ipc.msgseg = 16384 kern.ipc.semmni = 200 kern.ipc.semmns = 600 kern.ipc.semmnu = 300 -- Greg A. Woods +1 250 762-7675 RoboHack Planix, Inc. Avoncote Farms pgphcHNkIPNT0.pgp Description: OpenPGP Digital Signature