bug-bash
[Top][All Lists]
Advanced

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

Resource limitation causing erractic behaviour?


From: William L. Maltby
Subject: Resource limitation causing erractic behaviour?
Date: Fri, 8 Mar 2002 16:57:04 -0500 (EST)

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: Linux
Compiler: gcc
Compilation CFLAGS:   -DHAVE_VFPRINTF -DHAVE_UNISTD_H -DHAVE_STDLIB_H 
-DHAVE_LIMITS_H        -DHAVE_GETGROUPS -DHAVE_RESOURCE -DHAVE_SYS_PARAM 
-DVOID_SIGHANDLER -DHAVE_GETDTABLESIZE -DHAVE_BCOPY -DHAVE_GETPW_DECLS 
-DHAVE_GETHOSTNAME -DHAVE_WAIT_H         -DHAVE_DUP2 -DHAVE_STRERROR  
-DHAVE_DIRENT_H -DHAVE_STRING_H        -DHAVE_VARARGS_H -DHAVE_STRCHR  
-DHAVE_DEV_FD        -Di386 -DLinux -DSHELL -DHAVE_ALLOCA -DHAVE_ALLOCA_H       
-O2 -m486 -fno-strength-reduce
uname output: Linux wlmcs.wlmcs.com 2.2.14-5.0 #6 Sat Aug 25 10:38:46 EDT 2001 
i586 unknown

Bash Version: 1.14
Patch Level: 7

Description: Sort of complex. Have a controlling script that near its end
does chroot `pwd` ... /bin/bash -c "another shell" that nearits end does a
/bin/bash --login -c "another shell" that near its end does another
/bin/bash --login -c "another shell". This in attempting to fully script
LFS installs. Now I had used all my old "efficiency" tricks from the
old days - sourcing code, exporting a few (50?) variables, etc. Each shell
other than the first does for loops processing a list of packages through
configs and makes. I'm on an 200MHz MMX w/only 64MB RAM. Running X, sawmill,
etc. With all "efficiency" tricks applied, erratic fails in various make
steps, including phoney C syntax errors occurring in different files. When I
start "unsourcing" code and just calling it normally, things begin to improve.
Ultimately all worked except the config/make/install of glibc. For that one I
had to "un-loop" the whole process and lay all the code inline.

Symptoms: Erratic fails in various config/make/install steps, including non-
repeatable C syntax errors on various Linux and GNU packages.
The really ghoulish thing is that I can run all of the failing code from the
console with no failures whatsoever. This was my second clue that I might be
bumping some kind of resource limitation. Initially I had 129M p1 swap and
another 132M p2 swap. I removed the latter, suspecting a broken SCSI 
driver. Got the updated SCSI driver and it didn't help.

Tried on LFS built system - same symptoms (bash-205a). _That_ surprised
me. But it was the same hardware, so there's a commonality. I have similar
symptoms on a 166MHz AMD w/only 33MB RAM. RH 6.0. Am I the first to use
sophisticated shell programming on small resource hardware with bash?

I have no idea if this prob is bash, make, install, RH 6.2. But I also have
no idea where else to begin the digging. I only know that by coding in a way
that is less resource intensive in memory, I have been able to slowly step by
appx 8 specific fail points, several with inconsistent failure modes.

If it's just a matter of "My god - no one's going to code like that!", I can
live with it. I just need to know some guidlines. I pride myself on being
reasonably skilled, considering I haven't studied the book in toto for about
20 years. But, I do browse and slowly try to augment my skills.

Repeat-By: The only way I know, if my suspicions are correct, is to get a
resource-limited machine like mine and run my scripts (in their original form
of course - that is with complete abondonment with regard to heap management,
etc.)
      Would it be better if i sent my code to you. It's only several hundred
itsy-bitsy teeny-weeny little components held together by gluons ;) and a
few for loops.

Fix: In all but one case, change ". $WLD/source-shell" to "$WLD/source-shell".
In the extreme glibc case, had to remove the whole for loop and replace by
inline code.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]