[Dpcl-develop] Re: some DPCL questions
Brought to you by:
dpcl-admin,
dwootton
|
From: Steve C. <sl...@sg...> - 2004-03-02 17:49:05
|
Once again many thanks to DaveW for his continued support. He
has solved the 'soft .vs. hard' external puzzle and I have a
rather hefty clue as to why the supposed 'limit of 45' problem
exists. See below.
Thanks to all - SteveC
Original 3 DPCL questions:
1. Why does there seem to be a 'limit of 45 callbacks' in my
'sleep mutator' testcase?
Analysis:
The following code in ~dpcl/src/daemon_RT/src/os/linux/ShmManger.C,
routine shmFObjectAllocV, is shutting things down after 45 callbacks:
if ((*free_object_tail != FREE_OBJECT_MAGIC_PATTERN) ||
(p_free_object [i]->mask != FREE_OBJECT_MAGIC_PATTERN)) {
.....
*rc = MEM_BAD_FREE_LIST;
return NULL;
}
I inserted a printf as follows:
if ((*free_object_tail != FREE_OBJECT_MAGIC_PATTERN) ) {
printf("MEM_BAD_FREE_object tail bad 0x%16x 0x%16x\n",
*free_object_tail, FREE_OBJECT_MAGIC_PATTERN);
}
and got the following result:
MEM_BAD_FREE_object tail bad 0x 0 0x deadbeaf
It is not clear if the preceding pointer arithmetic is bad or the mask
is bad or just what is going wrong.
2. Code in the DPCL Library is causing 'unaligned access' errors.
Analysis:
An example of the code occurs in ~dpcl/src/lib/src/ModuleId.C
in routine 'ModuleId unpack_ModuleId(char **buffer)', to wit:
ModuleId
unpack_ModuleId(char **buffer)
{
char *data = *buffer;
char *uniqstr = data;
data = data + 1 + strlen(uniqstr); // don't forget the NULL character
int *uint_p = (int *) data;
data = data + sizeof(int);
ModuleId new_mid = ModuleId(uniqstr, *uint_p);
.....
This last statement which derefernces from an 'int' alignment (*uint_p)
seems to upset the ia64 hardware and I get something like this:
mutator(16567): unaligned access to 0x600000000000aa36, ip=0x2000000000277bb0
Resolution of this problem appears to require finding all the dubious code
which might cause such 'unaligned access' errors and rewriting it. Future
project for now since this is just a performance issue, not a functionality
issue.
3. Why can Dyninst find 'sleep' (the soft external) but DPCL cannot?
Answer: (DaveW's analysis)
The Hybrid uses a version of Dyninst that can find symbols in
dynamically shared/linked objects. DPCL has no such ability.
Mystery solved. Extending DPCL to handle dynamic/shared objects
has been on the 'list' from the beginning. Future project I
guess.
|