pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16067: Failed system call was semget
4+ messages / 4 participants
[nested] [flat]

* BUG #16067: Failed system call was semget
@ 2019-10-19 14:54  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 2 replies; 4+ messages in thread

From: PG Bug reporting form @ 2019-10-19 14:54 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: chelsealyu@gmail.com

The following bug has been logged on the website:

Bug reference:      16067
Logged by:          chelsea lyu
Email address:      chelsealyu@gmail.com
PostgreSQL version: 11.5
Operating system:   MacOS
Description:        

running bootstrap script ... 2019-10-19 23:25:15.095 JST [51410] FATAL: 
could not create semaphores: No space left on device
2019-10-19 23:25:15.095 JST [51410] DETAIL:  Failed system call was
semget(5432226, 17, 03600).

this is the code what I input, and then the problem is out.
MacBook-Pro:~ raye$ initdb /usr/local/var/postgres -E utf8


I also tried the code in the guide book of solving this question.
RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmmax
kern.sysv.shmmax: 4194304
RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmmin
kern.sysv.shmmin: 1
RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmmni
kern.sysv.shmmni: 32
RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmseg
kern.sysv.shmseg: 8
RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmall
kern.sysv.shmall: 1024

but nothing happened.
it still cannot work.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16067: Failed system call was semget
@ 2019-10-19 19:33  Tomas Vondra <tomas.vondra@2ndquadrant.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 0 replies; 4+ messages in thread

From: Tomas Vondra @ 2019-10-19 19:33 UTC (permalink / raw)
  To: chelsealyu@gmail.com; pgsql-bugs@lists.postgresql.org

On Sat, Oct 19, 2019 at 02:54:45PM +0000, PG Bug reporting form wrote:
>The following bug has been logged on the website:
>
>Bug reference:      16067
>Logged by:          chelsea lyu
>Email address:      chelsealyu@gmail.com
>PostgreSQL version: 11.5
>Operating system:   MacOS
>Description:
>
>running bootstrap script ... 2019-10-19 23:25:15.095 JST [51410] FATAL:
>could not create semaphores: No space left on device
>2019-10-19 23:25:15.095 JST [51410] DETAIL:  Failed system call was
>semget(5432226, 17, 03600).
>
>this is the code what I input, and then the problem is out.
>MacBook-Pro:~ raye$ initdb /usr/local/var/postgres -E utf8
>
>
>I also tried the code in the guide book of solving this question.
>RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmmax
>kern.sysv.shmmax: 4194304
>RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmmin
>kern.sysv.shmmin: 1
>RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmmni
>kern.sysv.shmmni: 32
>RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmseg
>kern.sysv.shmseg: 8
>RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmall
>kern.sysv.shmall: 1024
>
>but nothing happened.
>it still cannot work.
>

I think you need to tweak kernel.sem, not the options for sysv shared memory.

Also, not a PostgreSQL bug, but an OS configuration issue ...


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16067: Failed system call was semget
@ 2019-10-20 03:42  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 1 reply; 4+ messages in thread

From: Tom Lane @ 2019-10-20 03:42 UTC (permalink / raw)
  To: chelsealyu@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> Operating system:   MacOS

> running bootstrap script ... 2019-10-19 23:25:15.095 JST [51410] FATAL: 
> could not create semaphores: No space left on device
> 2019-10-19 23:25:15.095 JST [51410] DETAIL:  Failed system call was
> semget(5432226, 17, 03600).

That's a bit odd.  macOS is known to have low default limits for
SysV shared memory, but not for semaphores.  Which macOS version
are you running, exactly?  What do you get from
	sysctl -a | grep sysv.sem
?  I get

kern.sysv.semmni: 87381
kern.sysv.semmns: 87381
kern.sysv.semmnu: 87381
kern.sysv.semmsl: 87381
kern.sysv.semume: 10

(and not only in Catalina, but very ancient mac versions)

Is it possible that something else is chewing up semaphores?
Looking at "sudo ipcs -s" output would reveal that.

> I also tried the code in the guide book of solving this question.
> RAYEdeMacBook-Pro:~ raye$ sysctl -w kern.sysv.shmmax
> kern.sysv.shmmax: 4194304

That is not about this problem.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16067: Failed system call was semget
@ 2019-10-26 01:48  Thomas Munro <thomas.munro@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Thomas Munro @ 2019-10-26 01:48 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: chelsealyu@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

On Sun, Oct 20, 2019 at 4:43 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> PG Bug reporting form <noreply@postgresql.org> writes:
> > Operating system:   MacOS
>
> > running bootstrap script ... 2019-10-19 23:25:15.095 JST [51410] FATAL:
> > could not create semaphores: No space left on device
> > 2019-10-19 23:25:15.095 JST [51410] DETAIL:  Failed system call was
> > semget(5432226, 17, 03600).
>
> That's a bit odd.  macOS is known to have low default limits for
> SysV shared memory, but not for semaphores.  Which macOS version
> are you running, exactly?  What do you get from
>         sysctl -a | grep sysv.sem
> ?  I get
>
> kern.sysv.semmni: 87381
> kern.sysv.semmns: 87381
> kern.sysv.semmnu: 87381
> kern.sysv.semmsl: 87381
> kern.sysv.semume: 10
>
> (and not only in Catalina, but very ancient mac versions)
>
> Is it possible that something else is chewing up semaphores?
> Looking at "sudo ipcs -s" output would reveal that.

I have seen a Mac get into that state a couple of times after much
uptime and much hacking and testing, and had to clean them up manually
with ipcrm.   Perhaps the occasional kill -9 (don't try this at home)
or postmaster crash, with some bad luck I guess IpcSemaphoreCreate()
could be fooled by a PID that has been recycled, and decide not to
recycle the sema?  I don't think it's anything to do with macOS
really, just the fact that we don't use SysV flavoured semaphores
elsewhere and even then most people don't do weird things to their
PostgreSQL clusters like pgsql-hackers denizens...





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-10-26 01:48 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-19 14:54 BUG #16067: Failed system call was semget PG Bug reporting form <noreply@postgresql.org>
2019-10-19 19:33 ` Tomas Vondra <tomas.vondra@2ndquadrant.com>
2019-10-20 03:42 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-10-26 01:48   ` Thomas Munro <thomas.munro@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox