Hi All,
Long time back there was issue related HP Apache 2.0.43. in which a method calls
another method & hangs the execution. In resolution to that there was a suggestion
that this could be a known issue with hpapache2 (JAGae57148) where it gets a thread
stack overflow. It was also told that this bug was fixed on HP Apache 2.0.45 which
indeed was fixed on HP Apache 2.0.45. This issue was faced on HP 11i m/c.
I am facing the similar issue with IBM IHS 2.0.42.2 on HP 11i. The IBM IHS 2.0.42.2
webserver is core apache 2.0.46 based. The behaviour is same as what was mentioned
with HP Apache 2.0.43. The behaviour is as below.
In my code there Method A tries to call method B but the flow hangs at this stage.
In my method B there is call to method FurnishJob() which looks like as below:
int result=FurnishJob(job,block);
job is nothing but a pointer type to a structure. This job is coming as parameter to
method A(const void * pjob,..)
we just type cast it before calling FurnishJob(). The call scenerio is as below:
int methodB
{
.
.
methodA(.,.);
.
.
}
int methodA(const void * pjob,....)
{
.
.
StructA * job = (Struct A *) pJob;
classB block;
FurnishJob(job,block);
.
.
.
.
}
We comment all the code after FurnishJob(), and return(return 1;) just after calling
the method. Then if we print any thing before FurnishJOb it gets printed. If we try to
print anything after FurnishJob & before return 1;, statements before FurnishJob are
printed but statements after FurnishJob are not printed. Ideally all statement before
return 1; statement should have been printed.This scenerio is happening for IBMIHS
2.0.42.2 on HP 11i. Same case is passing for apache 2.0.46(IHS 2.0.42.2 is based on
apache 2.0.46) and many other webservers. A
If code after FurnishJob() is also uncommented, then not even a single print statement
is displayed. It behaves as if methodB was not called.
I have to tried to explain with some sample programs:
I tried to debug the application. I found that
There is class C with two huge methods A and B (and other methods)
Method A tries to call method B and it hangs. I put some
print statements inside method B, with one print statement at the begining of
B. I found that no print statement is getting printed. (flush etc is taken care of).
1. I tried putting a return after the first print statements,
it works.
void B()
{
printf("Inside B");
return 0;
.
.
.
.
.
}
This doesn't works fine and "Inside B" is not getting printed.
3. If i comment rest of the code after "return 0;", B again works fine.
void B()
{
printf("Inside B");
return 0;
/*
.
.
.
.
.
*/
}
"Inside B" is getting printed.
I cannot make any sense out of this behaviour. Any how the
code after "return 0" is not getting executed, how can it make any difference?
The same application works fine with core apache 2.0.46, and with many other
webservers.
Can this stack overflow also occur on IBM IHS 2.0.42.2(apache 2.0.46 based). Is this
entirely web server specific or something can be done specific to my application to
get rid of this issue.
Regards,
Gagan