[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: assertion botched
From: |
Dennis Williamson |
Subject: |
Re: assertion botched |
Date: |
Sat, 1 Jan 2011 14:00:56 -0600 |
On Mon, Dec 27, 2010 at 6:17 AM, chloe <chloe@desoutter.org> wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i486
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
> -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -g -O2
> -Wall
> uname output: Linux rama 2.6.32.14tigrerouge-dom0 #1 SMP Sun May 30 23:23:49
> CEST 2010 i686 GNU/Linux
> Machine Type: i486-pc-linux-gnu
>
> Bash Version: 3.2
> Patch Level: 39
> Release Status: release
>
> Description:
> After running a script which waits for a long while, bash exits with
> the following message:
> malloc: ../bash/dispose_cmd.c:241: assertion botched
> free: underflow detected; mh_nbytes out of range
> Aborting...Abandon
>
> Repeat-By:
> Run the following piece of code (my code is a repetition of the
> following sequence)
> for i in
> /var/www/boris/wordpress/wp-content/generated-factory/montan/Textures/*.png;
> do
> # there we replace all textures with the one we want
> FILENAME=$(basename $i)
> mkdir -p
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/Textures"
> ln -sf
> "/var/www/boris/wordpress/wp-content/generated-factory/textures/000DEF.png"
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/Textures/$FILENAME";
> done
> ln -sf
> "/var/www/boris/wordpress/wp-content/generated-factory/textures/000DEF.png"
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/Textures/ModelTexture.png";
> echo Triggering render;
> mkdir -p
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/CameraFront/neckborder";
> chmod 777
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/CameraFront/neckborder";
> echo 'if not exist C:\3Dboris\montan\neckborder.max goto output' >
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> echo 'C:' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> echo 'cd \3DBoris' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> echo 'copy /Y H:\montan\Textures\ModelTexture.png C:\3Dboris\Texture.png' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> echo 'C:\ImageMagick\montage.exe C:\3Dboris\Texture.png
> C:\3Dboris\Texture.png C:\3Dboris\Texture.png C:\3Dboris\Texture.png -mode
> Concatenate -tile 2x2 C:\3Dboris\BiggerTexture.png' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> #echo 'C:\ImageMagick\montage.exe C:\3Dboris\BigTexture.png
> C:\3Dboris\BigTexture.png C:\3Dboris\BigTexture.png C:\3Dboris\BigTexture.png
> -mode Concatenate -tile 2x2 C:\3Dboris\BiggerTexture.png' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> echo 'for %%i In (C:\3Dboris\montan\Textures\*.png) DO copy /Y
> C:\3Dboris\BiggerTexture.png "%%i"' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> echo 'C:\Autodesk\3DS\3dsmaxcmd.exe C:\3Dboris\montan\neckborder.max
> -o=H:\montan\CameraFront\neckborder\000DEF.png -w 800 -h 600
> -camera:CameraFront' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> echo 'H:' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> echo 'cd H:\montan\CameraFront\neckborder' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> echo 'rename H:\montan\CameraFront\neckborder\000DEF0000.png 000DEF.png' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat";
> echo ':output' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> echo 'echo "Got out"' >>
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> unix2dos
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/action.bat"
> touch
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/LetsGo.txt"
> chmod 777
> "/var/www/boris/wordpress/wp-content/generated-factory/montan/LetsGo.txt";
> echo Triggered render montan CameraFront 000DEF.png;
> while [ ! -f
> /var/www/boris/wordpress/wp-content/generated-factory/montan/LetsGo.txt ]; do
> echo -n '.' ; sleep 1; done;
> while [ -f
> /var/www/boris/wordpress/wp-content/generated-factory/montan/LetsGo.txt ] ;
> do sleep 1; echo -n '.'; done; # rendering
>
> with file
> /var/www/boris/wordpress/wp-content/generated-factory/montan/LetsGo.txt
> existing.
>
> After a long while (I let it run overnight so that counts for several
> thousands seconds) it will die with the message i quoted.
>
> FWIW this script is not run by a regular user but by www-data.
>
>
tl;dr
Seriously, use a variable and cut out all that repetition:
base="/var/www/boris/wordpress/wp-content/generated-factory/montan"
for i in "$base/Textures/"*.png; do
# there we replace all textures with the one we want
FILENAME=$(basename $i)
mkdir -p "$base/Textures"
etc.
By the way, why do you want to make that same directory repeatedly in
a for loop?
To help solve your problem, use "set -x" to turn on tracing (and you
can selectively turn it on and off - "set +x" turns it off - for
sections of your code) and log what is output to stderr. The only long
running processes are the while loops at the end. The error probably
shouldn't happen, but it seems that it's probably being caused by
something outside the scope of your script.