tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

setting ulimit defaults... and result of hitting them?



What is the criteria for setting the default ulimit in
the distribution? And what should happen when reached?

One of the R project (v2.7.0) tests invokes an infinite
recursion loop.  The result on netbsd-4 amd64 is about
30 messages:  "Error: C stack usage is too close to
the limit" before the process enters unresponsive loop
(won't crtl-c/d); adding 1 to the load and recording
nothing more to ktrace. A TERM signal is required to
exit the process.

 18672      1 R        RET   write 47/0x2f
 18672      1 R        CALL  write(2,0x7a5c40,0x2f)
 18672      1 R        GIO   fd 2 wrote 47 bytes
       "Error: C stack usage is too close to the limit
       "
 18672      1 R        RET   write 47/0x2f
 18672      1 R        CALL  write(2,0x79b2a0,0x2f)
 18672      1 R        GIO   fd 2 wrote 47 bytes
       "Error: C stack usage is too close to the limit
       "
 18672      1 R        RET   write 47/0x2f
 18672      1 R        CALL  write(2,0x790900,0x2f)
 18672      1 R        GIO   fd 2 wrote 47 bytes
       "Error: C stack usage is too close to the limit
       "
 18672      1 R        RET   write 47/0x2f
 18672      1 R        CALL  write(2,0x785f60,0x2f)
 18672      1 R        GIO   fd 2 wrote 47 bytes
       "Error: C stack usage is too close to the limit
       "
 18672      1 R        RET   write 47/0x2f
 18672      1 R        PSIG  SIGTERM SIG_DFL

When I up the stack softlimit to 3072 (2048 default),
the test exits as expected:

Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Execution halted

So, I'm wondering what should happen in the 2048 case?
Is it fault of R, ksh or the kernel that the process
loops and does not fail/exit when the stack ulimit is
hit?

The not so important question is should the default
stack ulimit be adjusted and I suppose the answer is no,
R is a special case that needs more stack?

// George

-- 
George Georgalis, information system scientist <IXOYE><


Home | Main Index | Thread Index | Old Index