GithubHelp home page GithubHelp logo

Comments (22)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
I tried the scenario you described on XP first, then started to think this 
somehow
could be related to 2003 only, but I've not managed to reproduce the freeze 
either on
XP or 2003.
Thus, I wonder whether the freeze is one to one reproducible on your end.
And as the next step, I'd suggest to put a breakpoint on mrcp_client_shutdown() 
call
and run the scenario again under Visual Studio debugger. As soon as debugger 
reaches
the breakpoint check number of threads running by that time (Debug -> Windows ->
Threads). Then step over the breakpoint and check running threads again.
Actually apr_thread_join() blocks executing context and releases it, when client
stack has been finally terminated.
I suspect that apr_thread_join() blocks infinitely in your case, however it 
shouldn't.

Original comment by [email protected] on 15 Jun 2009 at 7:18

  • Added labels: Priority-Medium, Type-Defect, OpSys-Windows, Component-Client

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
  Hi,

  I analysed this a but deeper and it seems that it makes all the difference if I
create a bunch of sessions beforehand. In the destruction process I can see 
that you
have some code that works asynchronously and somewhat it doesn't complete the
termination loop (some state machine transition that is missing upon the finish 
of
all the task child terminations) as it leaves some child pending tasks yet to
terminate. I tried to modify the code on apt_task_child_terminate (line 364) as
follows and all worked fine, don't know if it has some side effect tough:

  1. Modified the apt_task_terminate second param to wait synchronously for child
termination.
  2. Commented out the pending_term so that at the end we have 0 child tasks pending.

        if(child_task) {
            if(apt_task_terminate(child_task,TRUE) == TRUE) {
                ; //task->pending_term++;
            }
        }

  I could live with this modification if it doesn't pose side-effects, please advice.
  Thanks in advance.

Regards.

Original comment by [email protected] on 22 Jun 2009 at 5:25

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Hi,
I'm a bit anxious on how a bunch of session creation and destruction could alter
client stack termination. As I said, I tried to replicate the exact behavior 
with no
result.
Your modification should be safe, the only drawback is it slows down overall 
client
stack termination a bit.
Anyway, I'd prefer to understand what is going on first.
Try to apply the following one line change and see if it helps

Index: unimrcp/trunk/libs/apr-toolkit/src/apt_task.c
===================================================================
--- unimrcp/trunk/libs/apr-toolkit/src/apt_task.c   (revision 1001)
+++ unimrcp/trunk/libs/apr-toolkit/src/apt_task.c   (working copy)
@@ -413,5 +413,7 @@
    if(task->vtable.on_post_run) {
        task->vtable.on_post_run(task);
    }
+
+   apr_thread_exit(thread_handle,APR_SUCCESS);
    return NULL;
 }

Original comment by [email protected] on 23 Jun 2009 at 5:31

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
  Hi,

  Applying the patch you suggest the problem remains. After analysing a bit further
the code, I see CORE_TASK_MSG_TERMINATE_COMPLETE message to be sent only on
apt_task_child_terminate when all the tasks could successfuly be terminated on 
that
calling context and nowhere else. The program should receive as many
CORE_TASK_MSG_TERMINATE_COMPLETE messages as the tasks it tryed to stop in
apt_core_task_msg_process so that the running flag goes to FALSE and all is 
freed.
  By the way, in my case the task names that are listed to terminate upon the
CORE_TASK_MSG_TERMINATE_REQUEST received on apt_core_task_msg_process are: 
"SofiaSIP
Agent", "TCP/MRCPv2 Connection Agent" and "Media Processing Engine". The ones 
that
send the event CORE_TASK_MSG_TERMINATE_COMPLETE are: "MRCP Client" and "MRCP 
Client"
(strange, two tasks with the same name and no task from the previous list).
Nevertheless the reference counter task->pending_term remains with value 1, and
running flag remains TRUE.

  Regards.

Original comment by [email protected] on 23 Jun 2009 at 11:00

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Hi,
Something really strange goes there. I'm just guessing what can be the reason.
Another option to try is to enable #define OWN_ALLOCATOR_PER_POOL

Index: unimrcp/trunk/libs/apr-toolkit/src/apt_pool.c
===================================================================
--- unimrcp/trunk/libs/apr-toolkit/src/apt_pool.c   (revision 1004)
+++ unimrcp/trunk/libs/apr-toolkit/src/apt_pool.c   (working copy)
@@ -16,7 +16,7 @@

 #include "apt_pool.h"

-//#define OWN_ALLOCATOR_PER_POOL
+#define OWN_ALLOCATOR_PER_POOL

Please give it a try.

Original comment by [email protected] on 23 Jun 2009 at 11:45

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
  Hi Arsen,

  Still the problem remains. For my case the patch I provided in one of the last
comments is good enough as I only create an unimrcp "application" in the 
beginning of
my application and end the unimrcp "application" at the end of my application.
Meanwhile, I do all sorts of ASR and TTS requests in the context of that unimrcp
application. I can live with this patch if during this "work" (consisting on a
chaotic set of TTS and ASR requests) it does not pose major impacts in terms of
performance.

  Regards.

Original comment by [email protected] on 2 Jul 2009 at 1:06

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Hi cpsoares,
The patch affects only the termination process of client stack and has no 
impact 
while stack is up and running.
I'm doubtful about issue itself. Eventually I'll apply your patch to the tree, 
if
anything is found.

Original comment by [email protected] on 2 Jul 2009 at 9:39

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Hi cpsoares,
The patch affects only the termination process of client stack and has no 
impact 
while stack is up and running.
I'm doubtful about issue itself. Eventually I'll apply your patch to the tree, 
if
anything is found.

Original comment by [email protected] on 2 Jul 2009 at 9:39

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
  Hi Arsen,

  As per your suggestion from Issue-29 I tried to reproduce this with the latest
patches from that issue and the problem remains. Please compare the traces for 
both
situations: without patch and with patch.

  Regards.

  Without Patch:
  --------------

(03 16:14:10.316) 180 - Create Application
(03 16:14:10.347) 180 - Register Application [SAUniMRCP]
(---------------) 180 - Start MRCP Client
(---------------) 5304 - Start SofiaSIP Agent
(---------------) 5304 - Start TCP/MRCPv2 Connection Agent
(---------------) 5304 - Start Media Processing Engine
(---------------) 1424 - Receive SIP Event [nua_r_set_params] Status 200 OK
(---------------) 5304 - MRCP Client Started
(---------------) 2492 - Create MRCP Handle 0x2858558 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x285a560 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x285c568 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x285e570 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2860578 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2862580 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2864588 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2866590 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2868598 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x286a5a0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x286c5a8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x286e5b0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28705b8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28725c0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28745c8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28765d0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28785d8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x287a5e0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x287c5e8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x287e5f0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28805f8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2882600 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2884678 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28866f0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2888768 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x288a7e0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x288c858 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x288e8d0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2890948 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28929c0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2894a38 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2896ab0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x2898b28 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x289aba0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x289cc18 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x289ec90 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28a0d08 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28a2d80 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28a4df8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28a6e70 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28a8ee8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28aaf60 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28acfd8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28af050 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28b10c8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28b3140 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28b51b8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28b7230 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28b92a8 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28bb320 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28bd398 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28bf410 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28c1488 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28c3500 [MRCPv2-Default]
(03 16:14:10.363) 2492 - Create MRCP Handle 0x28c5578 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28c75f0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28c9668 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28cb6e0 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28cd758 [MRCPv2-Default]
(---------------) 2492 - Create MRCP Handle 0x28cf7d0 [MRCPv2-Default]
(03 16:14:23.582) 180 - Destroy MRCP Handle 0x2894a38
(---------------) 180 - Destroy MRCP Handle 0x2896ab0
(---------------) 180 - Destroy MRCP Handle 0x2898b28
(---------------) 180 - Destroy MRCP Handle 0x289aba0
(---------------) 180 - Destroy MRCP Handle 0x289cc18
(---------------) 180 - Destroy MRCP Handle 0x289ec90
(---------------) 180 - Destroy MRCP Handle 0x28a0d08
(---------------) 180 - Destroy MRCP Handle 0x28a2d80
(---------------) 180 - Destroy MRCP Handle 0x28a4df8
(---------------) 180 - Destroy MRCP Handle 0x28a6e70
(---------------) 180 - Destroy MRCP Handle 0x28a8ee8
(---------------) 180 - Destroy MRCP Handle 0x28aaf60
(---------------) 180 - Destroy MRCP Handle 0x28acfd8
(---------------) 180 - Destroy MRCP Handle 0x28af050
(---------------) 180 - Destroy MRCP Handle 0x28b10c8
(---------------) 180 - Destroy MRCP Handle 0x28b3140
(---------------) 180 - Destroy MRCP Handle 0x28b51b8
(---------------) 180 - Destroy MRCP Handle 0x28b7230
(---------------) 180 - Destroy MRCP Handle 0x28b92a8
(---------------) 180 - Destroy MRCP Handle 0x28bb320
(---------------) 180 - Destroy MRCP Handle 0x28bd398
(---------------) 180 - Destroy MRCP Handle 0x28bf410
(---------------) 180 - Destroy MRCP Handle 0x28c1488
(---------------) 180 - Destroy MRCP Handle 0x28c3500
(---------------) 180 - Destroy MRCP Handle 0x28c5578
(---------------) 180 - Destroy MRCP Handle 0x28c75f0
(---------------) 180 - Destroy MRCP Handle 0x28c9668
(---------------) 180 - Destroy MRCP Handle 0x28cb6e0
(---------------) 180 - Destroy MRCP Handle 0x28cd758
(---------------) 180 - Destroy MRCP Handle 0x28cf7d0
(---------------) 180 - Destroy MRCP Handle 0x2858558
(---------------) 180 - Destroy MRCP Handle 0x285a560
(---------------) 180 - Destroy MRCP Handle 0x285c568
(---------------) 180 - Destroy MRCP Handle 0x285e570
(---------------) 180 - Destroy MRCP Handle 0x2860578
(---------------) 180 - Destroy MRCP Handle 0x2862580
(---------------) 180 - Destroy MRCP Handle 0x2864588
(---------------) 180 - Destroy MRCP Handle 0x2866590
(---------------) 180 - Destroy MRCP Handle 0x2868598
(---------------) 180 - Destroy MRCP Handle 0x286a5a0
(---------------) 180 - Destroy MRCP Handle 0x286c5a8
(---------------) 180 - Destroy MRCP Handle 0x286e5b0
(---------------) 180 - Destroy MRCP Handle 0x28705b8
(03 16:14:23.598) 180 - Destroy MRCP Handle 0x28725c0
(---------------) 180 - Destroy MRCP Handle 0x28745c8
(---------------) 180 - Destroy MRCP Handle 0x28765d0
(---------------) 180 - Destroy MRCP Handle 0x28785d8
(---------------) 180 - Destroy MRCP Handle 0x287a5e0
(---------------) 180 - Destroy MRCP Handle 0x287c5e8
(---------------) 180 - Destroy MRCP Handle 0x287e5f0
(---------------) 180 - Destroy MRCP Handle 0x28805f8
(---------------) 180 - Destroy MRCP Handle 0x2882600
(---------------) 180 - Destroy MRCP Handle 0x2884678
(---------------) 180 - Destroy MRCP Handle 0x28866f0
(---------------) 180 - Destroy MRCP Handle 0x2888768
(---------------) 180 - Destroy MRCP Handle 0x288a7e0
(---------------) 180 - Destroy MRCP Handle 0x288c858
(---------------) 180 - Destroy MRCP Handle 0x288e8d0
(---------------) 180 - Destroy MRCP Handle 0x2890948
(---------------) 180 - Destroy MRCP Handle 0x28929c0
(---------------) 180 - Destroy Application
(---------------) 180 - Terminate MRCP Client
(---------------) 5304 - Terminate SofiaSIP Agent
(---------------) 5304 - Send Shutdown Signal to NUA
(---------------) 5304 - Terminate TCP/MRCPv2 Connection Agent
(---------------) 5304 - Terminate Media Processing Engine
(---------------) 3428 - Process Control Message
(---------------) 1424 - Receive SIP Event [nua_r_shutdown] Status 200 Shutdown
successful
(----STALLED----)

  With Patch:
  -----------

(03 16:16:16.069) 6004 - Create Application
(03 16:16:16.100) 6004 - Register Application [SAUniMRCP]
(---------------) 6004 - Start MRCP Client
(---------------) 1596 - Start SofiaSIP Agent
(---------------) 1596 - Start TCP/MRCPv2 Connection Agent
(---------------) 1596 - Start Media Processing Engine
(---------------) 1596 - MRCP Client Started
(---------------) 6084 - Receive SIP Event [nua_r_set_params] Status 200 OK
(03 16:16:16.131) 1760 - Create MRCP Handle 0x2858558 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x285a560 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x285c568 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x285e570 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2860578 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2862580 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2864588 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2866590 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2868598 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x286a5a0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x286c5a8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x286e5b0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28705b8 [MRCPv2-Default]
(03 16:16:16.147) 1760 - Create MRCP Handle 0x28725c0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28745c8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28765d0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28785d8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x287a5e0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x287c5e8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x287e5f0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28805f8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2882600 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2884678 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28866f0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2888768 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x288a7e0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x288c858 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x288e8d0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2890948 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28929c0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2894a38 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2896ab0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x2898b28 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x289aba0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x289cc18 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x289ec90 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28a0d08 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28a2d80 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28a4df8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28a6e70 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28a8ee8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28aaf60 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28acfd8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28af050 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28b10c8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28b3140 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28b51b8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28b7230 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28b92a8 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28bb320 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28bd398 [MRCPv2-Default]
(03 16:16:16.162) 1760 - Create MRCP Handle 0x28bf410 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28c1488 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28c3500 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28c5578 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28c75f0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28c9668 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28cb6e0 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28cd758 [MRCPv2-Default]
(---------------) 1760 - Create MRCP Handle 0x28cf7d0 [MRCPv2-Default]
(03 16:16:23.991) 6004 - Destroy MRCP Handle 0x2894a38
(---------------) 6004 - Destroy MRCP Handle 0x2896ab0
(---------------) 6004 - Destroy MRCP Handle 0x2898b28
(---------------) 6004 - Destroy MRCP Handle 0x289aba0
(---------------) 6004 - Destroy MRCP Handle 0x289cc18
(---------------) 6004 - Destroy MRCP Handle 0x289ec90
(---------------) 6004 - Destroy MRCP Handle 0x28a0d08
(---------------) 6004 - Destroy MRCP Handle 0x28a2d80
(---------------) 6004 - Destroy MRCP Handle 0x28a4df8
(---------------) 6004 - Destroy MRCP Handle 0x28a6e70
(---------------) 6004 - Destroy MRCP Handle 0x28a8ee8
(---------------) 6004 - Destroy MRCP Handle 0x28aaf60
(---------------) 6004 - Destroy MRCP Handle 0x28acfd8
(---------------) 6004 - Destroy MRCP Handle 0x28af050
(---------------) 6004 - Destroy MRCP Handle 0x28b10c8
(---------------) 6004 - Destroy MRCP Handle 0x28b3140
(---------------) 6004 - Destroy MRCP Handle 0x28b51b8
(---------------) 6004 - Destroy MRCP Handle 0x28b7230
(---------------) 6004 - Destroy MRCP Handle 0x28b92a8
(---------------) 6004 - Destroy MRCP Handle 0x28bb320
(---------------) 6004 - Destroy MRCP Handle 0x28bd398
(---------------) 6004 - Destroy MRCP Handle 0x28bf410
(---------------) 6004 - Destroy MRCP Handle 0x28c1488
(---------------) 6004 - Destroy MRCP Handle 0x28c3500
(---------------) 6004 - Destroy MRCP Handle 0x28c5578
(---------------) 6004 - Destroy MRCP Handle 0x28c75f0
(---------------) 6004 - Destroy MRCP Handle 0x28c9668
(---------------) 6004 - Destroy MRCP Handle 0x28cb6e0
(---------------) 6004 - Destroy MRCP Handle 0x28cd758
(---------------) 6004 - Destroy MRCP Handle 0x28cf7d0
(---------------) 6004 - Destroy MRCP Handle 0x2858558
(03 16:16:24.006) 6004 - Destroy MRCP Handle 0x285a560
(---------------) 6004 - Destroy MRCP Handle 0x285c568
(---------------) 6004 - Destroy MRCP Handle 0x285e570
(---------------) 6004 - Destroy MRCP Handle 0x2860578
(---------------) 6004 - Destroy MRCP Handle 0x2862580
(---------------) 6004 - Destroy MRCP Handle 0x2864588
(---------------) 6004 - Destroy MRCP Handle 0x2866590
(---------------) 6004 - Destroy MRCP Handle 0x2868598
(---------------) 6004 - Destroy MRCP Handle 0x286a5a0
(---------------) 6004 - Destroy MRCP Handle 0x286c5a8
(---------------) 6004 - Destroy MRCP Handle 0x286e5b0
(---------------) 6004 - Destroy MRCP Handle 0x28705b8
(---------------) 6004 - Destroy MRCP Handle 0x28725c0
(---------------) 6004 - Destroy MRCP Handle 0x28745c8
(---------------) 6004 - Destroy MRCP Handle 0x28765d0
(---------------) 6004 - Destroy MRCP Handle 0x28785d8
(---------------) 6004 - Destroy MRCP Handle 0x287a5e0
(---------------) 6004 - Destroy MRCP Handle 0x287c5e8
(---------------) 6004 - Destroy MRCP Handle 0x287e5f0
(---------------) 6004 - Destroy MRCP Handle 0x28805f8
(---------------) 6004 - Destroy MRCP Handle 0x2882600
(---------------) 6004 - Destroy MRCP Handle 0x2884678
(---------------) 6004 - Destroy MRCP Handle 0x28866f0
(---------------) 6004 - Destroy MRCP Handle 0x2888768
(---------------) 6004 - Destroy MRCP Handle 0x288a7e0
(---------------) 6004 - Destroy MRCP Handle 0x288c858
(---------------) 6004 - Destroy MRCP Handle 0x288e8d0
(---------------) 6004 - Destroy MRCP Handle 0x2890948
(---------------) 6004 - Destroy MRCP Handle 0x28929c0
(---------------) 6004 - Destroy Application
(---------------) 6004 - Terminate MRCP Client
(---------------) 1596 - Terminate SofiaSIP Agent
(---------------) 1596 - Send Shutdown Signal to NUA
(---------------) 6084 - Receive SIP Event [nua_r_shutdown] Status 200 Shutdown
successful
(---------------) 1596 - Terminate TCP/MRCPv2 Connection Agent
(---------------) 4064 - Process Control Message
(---------------) 1596 - Terminate Media Processing Engine
(---------------) 1596 - MRCP Client Terminated


Original comment by [email protected] on 3 Jul 2009 at 4:21

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
  Hi Arsen,

  Just to clarify, when I say with and without patch, this patch is the one I
discussed a few messages ago. These tests however were both done with your 
patch for
issue-28 applied. :-D Sorry for the confusion.

  Regards.

Original comment by [email protected] on 3 Jul 2009 at 4:23

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Hi cpsoares,
It seems I understand what you meant. I hoped patch for issue-29 could help, 
but it
didn't...

You already described the scenario and I tried to replicate it on my side. Now
I'm thinking whether it's possible to provide an exact and minimal source code 
of
that application to me without proprietary stuff. Hopefully this will help 
finally
pinpoint the problem.

Original comment by [email protected] on 6 Jul 2009 at 11:50

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
  Hi Arsen,

  Just made a simple brute-force application re-incarnated over demorecog project.
Just overwrite some files and there you go. I send the readme and source on
attachment. Please don't look too much on the code quality because it was only 
made
to compile and link and last but not the least to illustrate the problem.
  Please tell me if you need anything else.

  Regards.

Original comment by [email protected] on 7 Jul 2009 at 2:00

Attachments:

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Hi cpsoares,
I expected that application should generate a bulk of sessions and destroy them
immediately, shouldn't it?

Currently it initializes client stack on startup
Create Application
Register Application [SAUniMRCP]
Start MRCP Client
MRCP Client Started


and as soon as I press ENTER, application is terminated
Destroy Application
Terminate MRCP Client
MRCP Client Terminated

Is this enough to reproduce that issue? 

Original comment by [email protected] on 8 Jul 2009 at 5:23

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
  Hi Arsen,

  As for the sessions, I tried with no session creation and I could also reproduce
the problem, so I didn't bother to make the session logic in the sample program 
I
gave you.
  I can always reproduce the problem here on my machine that is a XP Professional 32
bit OS (with Intel Dual Core 6400@ 2.13 GHz CPU), also on a Windows 2003 Server
machine (which is also uses a Dual Core Intel CPU) I use for stress testing.
  Maybe this is some kind of race condition. Strange thing is that it always happens
here.

  Regards.

Original comment by [email protected] on 8 Jul 2009 at 8:55

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Hi cpsoares,
This seemed to be really strange, but hopefully I found out the reason.
Your demo application is definitely missing calls to apr_initialize() and
apr_terminate().
apr_initialize() must be very first call in the applications, which are using 
UniMRCP
and/or APR libraries.
I intentionally expose these functions out of client stack, because there are 
(could
be) applications, which have been already using APR.
More over, it's not necessary to call WSAStartup() and WSACleanup(), as
apr_initalize() and apr_terminate() do it internally.
Give it a try and let me know the results.

Original comment by [email protected] on 8 Jul 2009 at 11:08

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
  Hi Arsen,

  Looking at my application code on which the MRCP integration resides on a DLL, I
have apr_initialize and friends on the DllMain respectively on the process 
attach and
detach sections. So the problem may not still be in there. Nevertheless, I'll 
try
that in a few moments. I'll keep you posted.

  Regards.

Original comment by [email protected] on 8 Jul 2009 at 11:41

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
  OK, finish testing on the sample application with the apr_initialize and friends
and the same result. It stays stuck at the message "Terminate Media Processing
Engine". Are you using dual core CPUs? There are some races that can be better
explored when we have true multiprocessing.

  I'll post the output:

Create Application
Register Application [SAUniMRCP]
Start MRCP Client
Start SofiaSIP Agent
Start TCP/MRCPv2 Connection Agent
Start Media Processing Engine
Adding nameserver: 10.254.0.121
Adding nameserver: 10.254.0.122
nta_agent: received garbage from udp/10.10.0.103:13565/sip
MRCP Client Started
Receive SIP Event [nua_r_set_params] Status 200 OK
Destroy Application
Terminate MRCP Client
Terminate SofiaSIP Agent
Send Shutdown Signal to NUA
Terminate TCP/MRCPv2 Connection Agent
Receive SIP Event [nua_r_shutdown] Status 200 Shutdown successful
Process Control Message
Terminate Media Processing Engine


Original comment by [email protected] on 8 Jul 2009 at 2:31

Attachments:

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Well, I've got it, since I started to use your unimrcpclient.xml
With this config even my demo unimrcpclient application freezes on exit.
I don't know, what is going on exactly, but  ... more to come

BTW, my win dev environment is:
XP SP2 Core2Duo 32bit
Vista SP1 Core2Dua 32 bit
and recently I've installed 2003 on an old P4

Original comment by [email protected] on 8 Jul 2009 at 2:57

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Network client/server stacks generated double TERMINATE_COMPLETE event, while 
mpf
engine generated no TERMINATE_COMPLETE event at all.
This kept pending_term counter balanced, that's why it "worked" with the default
config, however caused problems in case there was no RTSP agent in config.
Wow...

Original comment by [email protected] on 8 Jul 2009 at 4:40

  • Changed state: Fixed
  • Added labels: OpSys-All, Component-Server
  • Removed labels: OpSys-Windows

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Hi Carlos,
I assume, this issue has indeed been fixed.
Have you verified it?

Original comment by [email protected] on 5 Oct 2009 at 4:19

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Yes, it was verified and working 100% on my side. Thanks once again Arsen.

Original comment by [email protected] on 6 Oct 2009 at 9:35

from unimrcp.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Thanks

Original comment by [email protected] on 6 Oct 2009 at 10:05

  • Changed state: Verified

from unimrcp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.