Re: Upgrade from 9.4 -> 9.5, FreeBSD 10.2-STABLE, fails on initdb

From: Karl Denninger <karl(at)denninger(dot)net>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Re: Upgrade from 9.4 -> 9.5, FreeBSD 10.2-STABLE, fails on initdb
Date: 2016-02-04 19:02:13
Message-ID: 56B3A035.5070803@denninger.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/4/2016 12:47, Tom Lane wrote:
> I wrote:
>> Karl Denninger <karl(at)denninger(dot)net> writes:
>>> $ initdb -D data-default
>>> ...
>>> creating template1 database in data-default/base/1 ... FATAL: could not
>>> create semaphores: Invalid argument
>>> DETAIL: Failed system call was semget(2, 17, 03600).
>> Hmm. On my Linux box, "man semget" says EINVAL means
>> EINVAL nsems is less than 0 or greater than the limit on the number of
>> semaphores per semaphore set (SEMMSL), or a semaphore set corre-
>> sponding to key already exists, and nsems is larger than the
>> number of semaphores in that set.
>> which agrees with the POSIX spec. Is FreeBSD the same?
> BTW, looking at the code, I see that during initdb we would have tried
> semaphore key 1 before 2. So presumably, on key 1 we got an error code
> that we recognized as meaning "semaphore set already exists", but then on
> key 2 we got EINVAL instead. That makes this even more curious. I'd
> be interested to see what "ipcs -s" says, if you have that command.
> (You might need to run it as root to be sure it will show all sempaphores.)
>
> regards, tom lane
There was indeed a "2" key out by the web server process; I shut it down
and cleared it and the upgrade is now running....

Also filed a kernel bug with the FreeBSD folks against 10.2-STABLE as
the man page says you should have gotten back EEXIST.

--
Karl Denninger
karl(at)denninger(dot)net <mailto:karl(at)denninger(dot)net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug Kyle 2016-02-04 19:37:00 Recursive CTE in function problem
Previous Message Tom Lane 2016-02-04 18:47:31 Re: Upgrade from 9.4 -> 9.5, FreeBSD 10.2-STABLE, fails on initdb