- From: "Marjan Bozinovski" <marjanb AT cpk.auc.dk>
 
- To: "Thomas Dreibholz" <dreibh AT exp-math.uni-essen.de>,	<rsplib-discussion AT sctp.de>
 
- Subject: Re: [RSPlib-Discusssion] fail-over problems
 
- Date: Wed Oct  9 16:17:01 2002
 
- List-id: RSPlib Discussions <rsplib-discussion.sctp.de>
 
 
Hi Thomas,
I'm sorry but I can't reproduce the problem on Linux since I don't have a
Linux machine available.
I am completely sure that the thread settings (-D_REENTRANT -pthread) for
the compiler are set. Please have a look at the MakeFile that is attached to
this e-mail to make sure that I've set everything fine.
After your last instructions, here is the debug output:
--------------------
Constructor: Condition 0xbfbfb28c (Condition)
Constructor: Condition 0xbfbfb3a8 (Condition)
Constructor: Condition 0xbfbfb4c4 (Condition)
Constructor: Condition 0xbfbfb5e0 (Condition)
adding parent 0xbfbfb28c (ext_select::GlobalCondition) to 0xbfbfb3a8
(ext_select::ReadCondition)adding parent 0xbfbfb28c
(ext_select::GlobalCondition) to 0xbfbfb4c4
(ext_select::WriteCondition)adding parent 0xbfbfb28c
(ext_select::GlobalCondition) to 0xbfbfb5e0
(ext_select::ExceptCondition)select: adding FD 0 (0) with mask $0003
Constructor: Condition 0x80ef208 (Condition)
select: registering user callback for socket 0...
adding parent 0xbfbfb3a8 (ext_select::ReadCondition) to 0x80ef208
(Condition)Sending Break via break pipe...
F0008: User Callback, mask=$1
Break via break pipe received
Break Pipe: 1 calls
select: adding FD 1020 for read
Condition for FD 1020, type 0 is 0x8491480
adding parent 0xbfbfb3a8 (ext_select::ReadCondition) to 0x8491480
(SCTPAssociation::ReadUpdateCondition)select: adding FD 1020 for except
Condition for FD 1020, type 2 is 0x84916b8
adding parent 0xbfbfb5e0 (ext_select::ExceptCondition) to 0x84916b8
(SCTPAssociation::ExceptUpdateCondition)select: adding FD 1021 for read
Condition for FD 1021, type 0 is 0x8479480
adding parent 0xbfbfb3a8 (ext_select::ReadCondition) to 0x8479480
(SCTPAssociation::ReadUpdateCondition)select: waiting...
TimeWait1...
A0003 S00: Data Arrive Notification, Length = 392
broadcast for 0x8479010 (SCTPAssociation::InQueue)
broadcast: SCTPAssociation::InQueue
broadcast for 0x8479480 (SCTPAssociation::ReadUpdateCondition)
broadcast: SCTPAssociation::ReadUpdateCondition
No parents!
TimeWait1 ok
select: wake-up
Condition 0 (Type 1020, FD 134882011) not fired
removing parent 0xbfbfb3a8 (ext_select::ReadCondition) to 0x8491480
(SCTPAssociation::ReadUpdateCondition)Condition 2 (Type 1020, FD 134882011)
not fired
removing parent 0xbfbfb5e0 (ext_select::ExceptCondition) to 0x84916b8
(SCTPAssociation::ExceptUpdateCondition)Condition 0 (Type 1021, FD
134882011) not fired
removing parent 0xbfbfb3a8 (ext_select::ReadCondition) to 0x8479480
(SCTPAssociation::ReadUpdateCondition)Destructor: Condition 0x80ef208
(Condition)
Destructor: Condition 0xbfbfb5e0 (ext_select::ExceptCondition)
Destructor: Condition 0xbfbfb4c4 (ext_select::WriteCondition)
Destructor: Condition 0xbfbfb3a8 (ext_select::ReadCondition)
Destructor: Condition 0xbfbfb28c (ext_select::GlobalCondition)
-------------------
I hope this helps.
Best regards,
Marjan
----- Original Message -----
From: "Thomas Dreibholz" 
<dreibh AT exp-math.uni-essen.de>
To: "Marjan Bozinovski" 
<marjanb AT cpk.auc.dk>;
 
<rsplib-discussion AT sctp.de>
Sent: Wednesday, October 09, 2002 12:53 PM
Subject: Re: [RSPlib-Discusssion] fail-over problems
>
 Add the following line to Condition::Condition() in condition.cc:
>
 printf("Constructor: Condition %p (%s)\n",(void*)this,this->getName());
>
 Add the following line to Condition::~Condition() in condition.cc:
>
 printf("Destructor: Condition %p (%s)\n",(void*)this,this->getName());
>
 Go to condition.cc, Condition::timedWait() and change the first line
"result =
>
 pthread_cond_timedwait(&ConditionVariable,&Mutex,&timeout);"
>
 to:
>
 puts("TimeWait1...");
>
 result = pthread_cond_timedwait(&ConditionVariable,&Mutex,&timeout);
>
 puts("TimeWait1 ok");
>
 . Change the second line of "result =
>
 pthread_cond_timedwait(&ConditionVariable,&Mutex,&timeout)" to:
>
 puts("TimeWait2...");
>
 result = pthread_cond_timedwait(&ConditionVariable,&Mutex,&timeout);
>
 puts("TimeWait2 ok");
>
 Add "printf("Fired set to false for condition %p
>
 (%s)\n",(void*)this,this->getName());" after "Fired = false;".
>
>
 Now, recompile the sources and send me the output. Are you absolutely sure
>
 that the thread settings (-D_REENTRANT -pthread) for the compiler are set
for
>
 all your files? What are your optimization options (e.g. -O2). Try to set
>
 them to "-O0".
>
>
 Can you reproduce the problem under Linux? If yes, go to
>
 http://developer.kde.org/~sewardj/ and download the memory debugger
Valgrind.
>
 Then, check your program with the options "-v --leak-check=yes
>
 --show-reachable=no --leak-resolution=high --num-callers=40" to ensure
that
>
 your program does not destroy structures of the sctplib, socket API or
>
 rsplib.
>
>
>
 Best regards
>
 --
>
 =======================================================================
>
  Dipl.-Inform. Thomas Dreibholz
>
>
  University of Essen,                            Room ES210
>
  Inst. for Experimental Mathematics              Ellernstraße 29
>
  Computer Networking Technology Group            D-45326 Essen/Germany
>
 -----------------------------------------------------------------------
>
  E-Mail:     
>
 dreibh AT exp-math.uni-essen.de
>
  Homepage:   http://www.exp-math.uni-essen.de/~dreibh
>
 =======================================================================
>
>
 _______________________________________________
>
 rsplib-discussion mailing list
>
 rsplib-discussion AT sctp.de
>
 http://www.sctp.de/mailman/listinfo/rsplib-discussion
>
NAME      = sipclient
LIBS      =
INCLUDE1  = /usr/local/include 
INCLUDE2  = /usr/local/rsplib-0.1.0/rsplib
INCLUDE3  = /usr/local/rsplib-0.1.0/
INCLUDE4  = /usr/local/include/glib12
LDFLAGS   = -L/usr/local/lib -Llib $(LIBS) -lrsplib -lsctpsocket -lsctp 
-lglib12
CFLAGS   += -O0 -g -Wall -D_PTHREADS -D_REENTRANT -D_THREAD_SAFE -pthread 
-I$(INCLUDE1) -I$(INCLUDE2) -I$(INCLUDE3) -I$(INCLUDE4)
CXXFLAGS += $(CFLAGS)
CC        = g++
CPP       = g++
OBJS      = tstudpcli.o tstudpserv.o tstfile.o common.o tstsgn.o client.o 
tstcmprec.o
all: $(NAME)
$(NAME): $(OBJS)
        $(CPP) -o $(NAME) $(CXXFLAGS) $(OBJS) $(LDFLAGS)
        -@ echo
        -@ echo ! $(NAME) compiled !
        -@ echo
tstudpserv.o: tstudpserv.cpp *.h
        $(CC) -c tstudpserv.cpp $(CXXFLAGS)
tstsgn.o:  tstsgn.cpp  *.h
        $(CC) -c tstsgn.cpp $(CXXFLAGS)
tstfile.o:  tstfile.cpp  *.h
        $(CC) -c tstfile.cpp $(CXXFLAGS)
common.o:  common.cpp *.h 
        $(CC) -c common.cpp $(CXXFLAGS)
client.o: client.cpp *.h 
        $(CC) -c client.cpp $(CXXFLAGS)
tstcmprec.o: tstcmprec.cpp *.h
        $(CC) -c tstcmprec.cpp $(CXXFLAGS)
clean:
        -@ rm *.o > /dev/null 2>&1
RE: [RSPlib-Discusssion] fail-over problems, Tuexen Michael, 10/14/2002
 
Archive powered by MHonArc 2.6.19+.