From bcf2de4a2862c89b2846ff05b828850faeda2626 Mon Sep 17 00:00:00 2001 From: Jim Rees Date: Tue, 8 Jan 2008 17:32:12 +0000 Subject: [PATCH] STABLE14-obsd-more-stack-20080108 make stack bigger in volserver and fileserver eliminates overflow in k5 library (cherry picked from commit a731801899b5f81314e4f4bf49aa55703d7a4ef4) --- src/viced/viced.c | 6 +++++- src/volser/volmain.c | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/viced/viced.c b/src/viced/viced.c index 024e88444..7b837cf81 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -1819,12 +1819,16 @@ main(int argc, char *argv[]) rx_SetBusyThreshold(busy_threshold, VBUSY); rx_SetCallAbortThreshold(abort_threshold); rx_SetConnAbortThreshold(abort_threshold); +#ifdef AFS_XBSD_ENV + stackSize = 128 * 1024; +#else stackSize = lwps * 4000; if (stackSize < 32000) stackSize = 32000; else if (stackSize > 44000) stackSize = 44000; -#if defined(AFS_HPUX_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SGI51_ENV) +#endif +#if defined(AFS_HPUX_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SGI51_ENV) || defined(AFS_XBSD_ENV) rx_SetStackSize(1, stackSize); #endif if (udpBufSize) diff --git a/src/volser/volmain.c b/src/volser/volmain.c index 356b28d17..5432c26ee 100644 --- a/src/volser/volmain.c +++ b/src/volser/volmain.c @@ -512,10 +512,12 @@ main(int argc, char **argv) if (lwps < 4) lwps = 4; rx_SetMaxProcs(service, lwps); -#ifdef AFS_SGI_ENV - rx_SetStackSize(service, 49152); +#if defined(AFS_XBSD_ENV) + rx_SetStackSize(service, (128 * 1024)); +#elif defined(AFS_SGI_ENV) + rx_SetStackSize(service, (48 * 1024)); #else - rx_SetStackSize(service, 32768); + rx_SetStackSize(service, (32 * 1024)); #endif service = -- 2.39.5