[OpenSER-Devel] [ openser-Bugs-1879555 ] Unexpected Termination

SourceForge.net noreply at sourceforge.net
Mon Jan 28 17:32:28 UTC 2008


Bugs item #1879555, was opened at 2008-01-25 12:09
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1879555&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver 1.3.x
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Salahuddin Ahmed (rubel001)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Unexpected Termination

Initial Comment:
Hello,
 I using BlackCat. When I try to run this then most of the time it stopped with some error message. I find that this error message occured because of the epoolfd and the fd which try to add in epoll is same. And I also find that when try to create TCP main process then(after creation TCP main process) there have two assignment of unixsocket in pt table(one for child one for parent). But Latter this(TCP main process) unixsocket is set to -1(file main.c L841) in child process but the parent process was not set this -1 any where. Now we don't know which process run first after creation TCP main if child run first and the parent process run after that then this kind of problem happened because of pt use shared memory this -1 is rewrite by parent process.   

 I have no enough knowledge of process management in openser after all I try to simulate this things it may be wrong. If this right then I think we need a check when we rewrite -1 in parent process before rewrite in file pt.c L187 or I know that you know the best solution.
	
Error Message:
./openser[15954]: ERROR:core:io_watch_add: epoll_ctl failed: Invalid argument [22]
./openser[15954]: CRITICAL:core:tcp_main_loop: failed to add process 11 (TCP main) unix socket to the fd list
./openser[15954]: CRITICAL:core:tcp_main_loop: exiting...
./openser[15943]: INFO:core:handle_sigs: child process 15954 exited normally, status=255

 Sorry for my poor english.

Regards,
Salahuddin Ahmed 

----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-01-28 19:32

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Perfect - thanks for the testing.
I will backport the fix to 1.3 also.

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Salahuddin Ahmed (rubel001)
Date: 2008-01-28 18:36

Message:
Logged In: YES 
user_id=1953307
Originator: YES

Hello Bogdan,
 I apply this patch and Now I can't get this error. Thank you.

Thanks and regards,
Salahuddin Ahmed

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-01-28 15:47

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Salahuddin,

I made so diggings on the topic, and indeed, there is a race between the
TCP main process and the process that fork it (when come to setting the
pt[process_no].unix_sock fd). I made a small fix (see attached).
Unfortunately I cannot reproduce the scenario, so please give it a try and
let me know if it fix the problem (as it should ;) ).

Thanks and regards,
Bogdan
File Added: tcp.patch

----------------------------------------------------------------------

Comment By: Salahuddin Ahmed (rubel001)
Date: 2008-01-27 12:59

Message:
Logged In: YES 
user_id=1953307
Originator: YES

Hello Bogdan,
 I remove the given patch because it will solve the problem but the IPC
between main process and the TCP main process will not work. I think it
requir spetial something like mutex lock or anything else, you know
better.

Thanks and best Regards,
Salahuddin Ahmed 

----------------------------------------------------------------------

Comment By: Salahuddin Ahmed (rubel001)
Date: 2008-01-27 07:08

Message:
Logged In: YES 
user_id=1953307
Originator: YES

File Added: pt.patch

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-01-25 12:23

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Salahuddin,

I will take a look on this.

Thanks and regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1879555&group_id=139143



More information about the Devel mailing list