[plug] crashing server

Rob Dunne Rob.Dunne at csiro.au
Wed Sep 15 09:32:51 WST 2004


Hi James,

James Devenish writes:
 > Hi,
 > 
 > You are right that this should not bring down the machine. However:
 > 

 > 
 > printf( "%d -- a: %p; b: %p;\n", __LINE__, a, b );
 > 
 > Then, check that a and b are stable throughout the programme.

it appears that a and b are not stable! b gets clobbered
I will send you the code. I worry that some changes have been introduced,
making it different to the version that you googled.

                                                   bye
						   rob

                                   
% gcc  -g -pthread dotprod_mutex_debug.c  -o crash-it
% ./crash-it
121 -- a: 0x2a959c4010; b: 0x2a97849010;
a is stored at 0x7fbff64360
b is stored at 0x7fbff64358
 i is stored at 0x7fbff64368
140 -- a: 0x2a959c4010; b: 0x2a97849010;
147 -- dotstr.a: 0x2a959c4010; dotstr.b: 0x2a97849010;
Thread 0 running
72 -- dotstr.a: 0x2a959c4010; dotstr.b: 0x2a97849010;
Thread 1 running
72 -- dotstr.a: 0x2a959c4010; dotstr.b: 0x2a97849010;
Thread 2 running
72 -- dotstr.a: 0x2a959c4010; dotstr.b: 0x2a97849010;
Thread 3 running
72 -- dotstr.a: 0x2a959c4010; dotstr.b: 0x2a97849010;
Thread 0 complete
94 -- dotstr.a: 0x2a959c4010; dotstr.b: 0x2a97849010;
Thread 1 complete
94 -- dotstr.a: 0x2a959c4010; dotstr.b: 0x2a97849010;
Thread 2 complete
94 -- dotstr.a: 0x2a959c4010; dotstr.b: 0x2a97849010;
Thread 3 complete
94 -- dotstr.a: 0x2a959c4010; dotstr.b: 0x2a97849010;
174 -- a: 0x2a959c4010; b: 0x2a00000000;
Sum =  4000000.000000
Freeing vector a - Success!
Freeing vector b - Segmentation fault

-- 
Rob Dunne         Fax: +61 2 9325 3200     Tel: +61 2 9325 3263
CSIRO Mathematical and Information Sciences     +61 2 9325 3100
Locked Bag 17, North Ryde, New South Wales, Australia, 1670         
http://www.bioinformatics.csiro.au Email: Rob.Dunne at csiro.au

        Java has certainly revolutionized marketing and litigation.



More information about the plug mailing list