edgar017 / webrtc2sip

Automatically exported from code.google.com/p/webrtc2sip
0 stars 0 forks source link

CPU 100% used when webrtc2sip run #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.run webrtc2sip
2.top
3.

What is the expected output? What do you see instead?
need a sleep(1) @ mp_mediaproxy.cc

        while(true)
        {
                if((quit[i & 3] = getchar()) == 't'){
                        if(quit[(i + 1) & 3] == 'q' && quit[(i + 2) & 3] == 'u' && quit[(i + 3) & 3] == 'i'){
                                break;
                        }
                }

                ++i;
                sleep(1);
        }

What version of the product are you using? On what operating system?
revision 89.

Please provide any additional information below.
top message:

top - 10:54:40 up 5 days, 19:32,  3 users,  load average: 0.96, 0.85, 0.91
Tasks: 155 total,   2 running, 153 sleeping,   0 stopped,   0 zombie
Cpu(s): 11.0%us, 14.1%sy,  0.0%ni, 74.7%id,  0.2%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3821316k total,   531424k used,  3289892k free,   166112k buffers
Swap:  3964920k total,        0k used,  3964920k free,   186772k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                                                         
 1848 root      20   0 1262m  16m 5040 R 99.6  0.4   8338:29 webrtc2sip                                                                                                                                                                      
    1 root      20   0 19360 1608 1296 S  0.0  0.0   0:00.91 init

Original issue reported on code.google.com by anjingsa...@gmail.com on 27 May 2013 at 2:59

GoogleCodeExporter commented 9 years ago
Very strange. What's your OS?
getchar() is a blocking function

Original comment by boss...@yahoo.fr on 27 May 2013 at 6:46

GoogleCodeExporter commented 9 years ago
Fixed by 2.5.1: https://code.google.com/p/webrtc2sip/wiki/ReleaseNotes#2.5.1

Original comment by boss...@yahoo.fr on 3 Jun 2013 at 9:05