Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* stack overflow problem
@ 1996-06-24  4:00 Bill Hibbard
  1996-06-24  4:00 ` Tony Quan
  1996-06-25  4:00 ` Patrick O'Rourke USG
  0 siblings, 2 replies; 3+ messages in thread
From: Bill Hibbard @ 1996-06-24  4:00 UTC (permalink / raw)



I have found a mysterious bug with our Vis5D system running
on DEC Alpha systems running OSF1 [specifically Digital
UNIX V3.2C Worksystem Software (Rev. 148)].

Vis5D gets a segmentation fault on entry to a function with
large local arrays.  After the crash dbx says that some
local variables have bad addresses, and these bad addresses
are growing downward in sequence and undoubtedly on the stack.
If I modify the Vis5D source to shorten the large local arrays,
then it gets no segmentation fault.

First I did a 'man cc' and 'man ld' and could not find any
options for controlling stack size.  Then I did 'man -k stack'
and looked at all the pages that mentioned the stack.  The most
useful was 'pthread_attr_setstacksize' which controls stack
size on thread creation (not what I need, since Vis5D uses only
one thread on Alpha and it is created before Vis5D starts running).
However, 'man pthread_attr_setstacksize' says that 'Most compilers
do not check for stack overflow.'  Vis5D is written in C and
presumably the C compiler does not check for stack overflow.

So here is my question: do you know of anything I can do to
control stack size for running Vis5D?  I need a larger stack.

Thank you.

Bill Hibbard
whibbard@macc.wisc.edu
http://www.ssec.wisc.edu/~billh/vis5d.html




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

* Re: stack overflow problem
  1996-06-24  4:00 stack overflow problem Bill Hibbard
@ 1996-06-24  4:00 ` Tony Quan
  1996-06-25  4:00 ` Patrick O'Rourke USG
  1 sibling, 0 replies; 3+ messages in thread
From: Tony Quan @ 1996-06-24  4:00 UTC (permalink / raw)



In article <4qm7f8$sm3@spool.cs.wisc.edu>, billh@ssec.wisc.edu (Bill
Hibbard) wrote:

> I have found a mysterious bug with our Vis5D system running
> on DEC Alpha systems running OSF1 [specifically Digital
> UNIX V3.2C Worksystem Software (Rev. 148)].
> 
> Vis5D gets a segmentation fault on entry to a function with
> large local arrays.  After the crash dbx says that some
> local variables have bad addresses, and these bad addresses
> are growing downward in sequence and undoubtedly on the stack.
> If I modify the Vis5D source to shorten the large local arrays,
> then it gets no segmentation fault.
> 
> First I did a 'man cc' and 'man ld' and could not find any
> options for controlling stack size.  Then I did 'man -k stack'
> and looked at all the pages that mentioned the stack.  The most
> useful was 'pthread_attr_setstacksize' which controls stack
> size on thread creation (not what I need, since Vis5D uses only
> one thread on Alpha and it is created before Vis5D starts running).
> However, 'man pthread_attr_setstacksize' says that 'Most compilers
> do not check for stack overflow.'  Vis5D is written in C and
> presumably the C compiler does not check for stack overflow.
> 
> So here is my question: do you know of anything I can do to
> control stack size for running Vis5D?  I need a larger stack.
> 

How about trying the "limit" or "ulimit" command, depending on which shell
you're using?

--Tony
tquan@pacbell.net



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

* Re: stack overflow problem
  1996-06-24  4:00 stack overflow problem Bill Hibbard
  1996-06-24  4:00 ` Tony Quan
@ 1996-06-25  4:00 ` Patrick O'Rourke USG
  1 sibling, 0 replies; 3+ messages in thread
From: Patrick O'Rourke USG @ 1996-06-25  4:00 UTC (permalink / raw)
  Cc: whibbard


Bill Hibbard wrote:
> So here is my question: do you know of anything I can do to
> control stack size for running Vis5D?  I need a larger stack.

You can control the size of the stack with the following tuneables in
/etc/sysconfigtab:

proc:
per-proc-stack-size
max-per-proc-stack-size

See the man page (section 4) on the sysconfigtab file.  To see what the
current values are, run the command: sysconfig -q proc.

This will increase the stacks on all processes, so it may have some side
effects (e.g. require more swap space if the system is in eager swap mode).

Pat

-- 
Patrick O'Rourke                                                 (603) 881-0124
orourke@zk3.dec.com                                            Office: ZK3/3S05



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

end of thread, other threads:[~1996-06-25  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-06-24  4:00 stack overflow problem Bill Hibbard
1996-06-24  4:00 ` Tony Quan
1996-06-25  4:00 ` Patrick O'Rourke USG

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox