Re: Unixware 2.1.2/Informix Online 7.23: Online won't boot: ulimit '-s': mystery error
Posted in 1998
Cosmo Lee wrote:
>
> We're running Online 7.23 on Unixware 2.1.2 on a SuperMicro dual- 180MHz
> Pentuim Pro machine.
>
> We just upgraded from Unixware 2.1.1 to 2.1.2. Immediately we had a
> problem, Online would not boot. Double-checked all the kernel
> parameters in the release notes - everything fine.
>
> To make a long story short, the solution was to run `ulimit -s 8192`.
> This enabled Online to boot. But there are several mysteries that
> remain unsolved.
>
> 1) I didn't even know that the "-s" option existed. It sets stack size
> - (stack size of what? the shell, I guess?).
>
> 2) The "-s" option is not indicated in the ulimit man page, and there's
> no entry for it in the online docs. You have to go to the ksh93 man
> page to find info on the ulimit "-s" option. (Make it hard to find, why
> don't you SCO!)
You are barking up the wrong tree here and exposing your own ignorance.
SCO is NOT responsible for the failure of shell builtins to be visible
at the man command level. As a bit of an aside, Sun is the only vendor
I know of ever to have documented the shell builtins in separate
manual pages ... and built a wrapper around source code control system
which I personally detest, but that's another issue. If you read the
plain ksh man page you will note that the underlying C language call
is not ulimit (though there is such a thing) but rather getrlimit()
and the matching setrlimit(); to my way of thinking these system calls
supercede the older ulimit(). SVR4 is FAR more complicated than earlier
releases in terms of providing control over this kind of thing.
> 3) So, the magic solution was to run `ulimit -s 8192`, then Online would
> boot. But what is strange about this is that the default on our system
> - when we run simply `ulimit -s` - is 16384 - twice 8192.
>
> Why would Online not boot with a stack limit set at 16384, but be OK
> with 8192?
What happens every time a shell forks a new process? Among other things
it consumes ARG_MAX bytes for the environment. And it consumes space
for the stack. And a few other resources.
How many processes does 'Online' want to start? If each new process
consumes XXX + 16384 bytes in the default case but XXX + 8192 bytes
after running ulimit, can you start more or fewer processes before
running out of memory when you use XXX + 8192 bytes for each new
process? You may be running dangerously close to disaster now ...
you may need more physical RAM.
I can't keep awake any longer, so I'll cut the reply off here.
> 4) Does anybody know if there is an equivalent Kernel Parameter to set,
> or a more permanent fix?
>
> 5) Here are the error messages which were written to the Online log file
> with the default 16384 stack size,which will send you on a wild goose
> chase looking for a shared memory problem:
>
> 15:29:21 shmat: [ENOMEM][12]: out of available data space, check system> MAXMEM
>
> 15:29:21 mt_shm_init: can't create virtual segment>
> HTH someone in the future.
>
> Cosmo Lee
>
> --
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> ADDRESS ALTERED TO FOIL SPAMMERS: Remove "*NO-SPAM*" to reply.
>
> Cosmo Lee Multi-User Computer Systems Brooklyn, NY
>
> "JUST SAY 'NO' TO SPAM"
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
--
Jerry Sutton jerrys@airmail.net
and of course, I don't speak on behalf of my employer