[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::decc

Title:DECC
Notice:General DEC C discussions
Moderator:TLE::D_SMITHNTE
Created:Fri Nov 13 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2212
Total number of notes:11045

2117.0. "Digital UNIX V4.0B and Malloc(valloc) " by DEKVC::JUNMOKSONG () Tue Mar 11 1997 21:32



	Hi,

	My customer have thread program which ran O.K on DU V3.* but
	after upgrading DU to V4.0B, the following error happened.
        It is same error regardless of using malloc or valloc.

	1. I applied all patch file for DU V4.0B up to FEB 22 '97.
	2. The compile option 
	   $cc -g -c -pthread -I../inc -I/data2/tmroutine/inc -I -I
            -O2 -Olimit 4500 -std1 -DOSF1 -DA_OSF -Wf -readonly_strings 
            -D_INTRINSICS -I/data1/oracle/app/oracle/product/7.3.2/ddbms/demo
	3. The link option
	   $cc -g -Olimit 4500 -o ../bin/convoy ..... -L/data1/oracle/product/
            7.3.2/precomp/lib -L ..... -lmach -lexc -lc -lpthread 
            -L/usr/lib/usr/lib/libc.a -lm -lC
	 4. The trace of dbx 

	  dbx>
	 >0 (unknown)() [0x3ff80193110]
	  1 (unknown)() [0x3ff80194534]
	  2 _valloc(0x3ffc008ae28,0x3ffc008a21b,0x12007c79c,0x1400241d8,
                    0x140a7228e)[0x3ff801930ac]
          3 ut_combat_system_point(.......)
	  4 ut_COMBAT_SYSTEMS_POINTER(......)  
	  5 integerize_Unit_Combat_Arrays(......)
 	  6 Balance_TOE_Vs_On_Hand(......)
	  7 Update_Unit_Vehicles(......)
	  8 Assemble_Vehicles_At_Home_Unit_State(......)
 	  9 Supply_Run_Mission(......)
	 10 Craete_And_Assign_SRM_Attributes(......)

	 My question is 

	 What is the "unknown" function? and how can I debug thread program?
	 Can anyone tell me the clue about this program?

         In advance, thank you so much.
	 Best Regards,
 	 Jun-Mok Song 	
	
	  
T.RTitleUserPersonal
Name
DateLines
2117.1Library order?WIBBIN::NOYCEPulling weeds, pickin' stonesWed Mar 12 1997 09:4313
>            7.3.2/precomp/lib -L ..... -lmach -lexc -lc -lpthread 
 
It's important to get these libraries listed in the proper order.
If I say "cc -v -pthread x.o", the cc driver generates:
	/usr/lib/cmplrs/cc/ld -g0 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o x.o
	-lpthread -lmach -lexc -lc

I suspect your trouble is caused by putting libpthread after libc, instead
of before libmach.

ladebug tends to be somewhat more useful for debugging thread programs.

For more help using threads, try the CLT::CMA conference.
2117.2more info.DEKVC::JUNMOKSONGThu Mar 13 1997 21:020