This should be very easy to debug.

Just attach gdb to the relevant process (./run-gdb.sh attach PID --
you can find the pid by running adb shell b2g-ps), then break on
|read|, then you should quite quickly find out who's calling read in a
loop.

The real question will be why we get an infinite loop of EAGAIN's...

On Fri, May 24, 2013 at 5:57 AM, pancake <[email protected]> wrote:
> This is the firmware i built today (still reproducing the same problem)
>
> https://www.dropbox.com/s/hctwhgec9958e8m/gp-keon-b2g-20130524-bug100cpu.tar.gz
>
>
> On 05/24/13 11:37, pancake wrote:
>>
>> Yesterday I built b2g BRANCH=master for Keon, but the touch events was
>> mostly failing and the feeling was laggy.
>>
>> By checking adb shell top i noticed that b2g was taking 100% cpu all the
>> time. So I strace it... and got this infinite loop.
>>
>> The thing is that 'recv' on fd 1077949332 (wtf) is returning 0?? is this
>> an strace bug?
>>
>> also see this:
>>
>> read(35, 0xbeb9f680, 32)                = -1 EAGAIN (Try again)
>>
>> fd35 is a pipe (according to /proc/fd/35). So I guess it's a broken one,
>> but which one?
>>
>> Also, I tried to run b2g by hand and got this error:
>>
>> [TabChild] SHOW (w,h)= (0, 0)
>> loading app://communications.gaiamobile.org/ftu/index.html, 1
>> ###################################### forms.js loaded
>> ############################### browserElementPanning.js loaded
>> ######################## BrowserElementChildPreload.js loaded
>> [Child 836] ###!!! ABORT: constructor for actor failed: file
>> /home/pancake/prg/B2G/objdir-gecko/ipc/ipdl/PLayerTransactionChild.cpp,
>> line 228
>>
>>
>> (works fine if i do 'start b2g' instead of '/system/b2g/b2g')
>>
>> any idea?
>>
>>
>> -----8<-----[ strace log ]-------8<--------
>>
>> recv(1077949332, 0x81, 2147483647,
>>
>> MSG_DONTROUTE|MSG_PEEK|MSG_EOR|MSG_TRUNC|MSG_ERRQUEUE|MSG_DONTWAIT|MSG_CONFIRM|MSG_NOSIGNAL|0xfff20000)
>> = 0
>> gettimeofday({1369385114, 795038}, NULL) = 0
>> gettimeofday({1369385114, 795343}, NULL) = 0
>> gettimeofday({1369385114, 795526}, NULL) = 0
>> gettimeofday({1369385114, 795648}, NULL) = 0
>> msgget(0x1, 0xbeb9f7d0, 0, 0x1)         = 0
>> msgget(0x1, 0xbeb9f7e0, 0, 0x1)         = 0
>> gettimeofday({1369385114, 795953}, NULL) = 0
>> gettimeofday({1369385114, 796076}, NULL) = 0
>> gettimeofday({1369385114, 796533}, NULL) = 0
>> gettimeofday({1369385114, 797052}, NULL) = 0
>> gettimeofday({1369385114, 797174}, NULL) = 0
>> gettimeofday({1369385114, 797510}, NULL) = 0
>> gettimeofday({1369385114, 797632}, NULL) = 0
>> gettimeofday({1369385114, 797907}, NULL) = 0
>> gettimeofday({1369385114, 798090}, NULL) = 0
>> gettimeofday({1369385114, 798212}, NULL) = 0
>> recv(1077949332, 0x81, 2147483647,
>>
>> MSG_DONTROUTE|MSG_EOR|MSG_TRUNC|MSG_ERRQUEUE|MSG_DONTWAIT|MSG_CONFIRM|MSG_NOSIGNAL|0xfff20000)
>> = 0
>> gettimeofday({1369385114, 798914}, NULL) = 0
>> gettimeofday({1369385114, 799219}, NULL) = 0
>> gettimeofday({1369385114, 799402}, NULL) = 0
>> gettimeofday({1369385114, 799524}, NULL) = 0
>> msgget(0x1, 0xbeb9f7d0, 0, 0x1)         = 0
>> msgget(0x1, 0xbeb9f7e0, 0, 0x1)         = 0
>> gettimeofday({1369385114, 799829}, NULL) = 0
>> gettimeofday({1369385114, 799982}, NULL) = 0
>> gettimeofday({1369385114, 800409}, NULL) = 0
>> gettimeofday({1369385114, 800989}, NULL) = 0
>> gettimeofday({1369385114, 801141}, NULL) = 0
>> gettimeofday({1369385114, 801508}, NULL) = 0
>> gettimeofday({1369385114, 801630}, NULL) = 0
>> gettimeofday({1369385114, 801874}, NULL) = 0
>> gettimeofday({1369385114, 802087}, NULL) = 0
>> gettimeofday({1369385114, 802210}, NULL) = 0
>> recv(1077949332, 0x81, 2147483647,
>>
>> MSG_PEEK|MSG_EOR|MSG_TRUNC|MSG_ERRQUEUE|MSG_DONTWAIT|MSG_CONFIRM|MSG_NOSIGNAL|0xfff20000)
>> = 0
>> gettimeofday({1369385114, 802911}, NULL) = 0
>> gettimeofday({1369385114, 803217}, NULL) = 0
>> gettimeofday({1369385114, 803430}, NULL) = 0
>> gettimeofday({1369385114, 803552}, NULL) = 0
>> msgget(0x1, 0xbeb9f7d0, 0, 0x1)         = 0
>> msgget(0x1, 0xbeb9f7e0, 0, 0x1)         = 0
>> gettimeofday({1369385114, 803857}, NULL) = 0
>> gettimeofday({1369385114, 803980}, NULL) = 0
>> gettimeofday({1369385114, 804468}, NULL) = 0
>> gettimeofday({1369385114, 805017}, NULL) = 0
>> gettimeofday({1369385114, 805170}, NULL) = 0
>> gettimeofday({1369385114, 805505}, NULL) = 0
>> gettimeofday({1369385114, 805628}, NULL) = 0
>> gettimeofday({1369385114, 805902}, NULL) = 0
>> gettimeofday({1369385114, 806085}, NULL) = 0
>> gettimeofday({1369385114, 806207}, NULL) = 0
>> recv(1077949332, 0x81, 2147483647,
>>
>> MSG_EOR|MSG_TRUNC|MSG_ERRQUEUE|MSG_DONTWAIT|MSG_CONFIRM|MSG_NOSIGNAL|0xfff20000)
>> = 0
>> gettimeofday({1369385114, 806909}, NULL) = 0
>> gettimeofday({1369385114, 807214}, NULL) = 0
>> gettimeofday({1369385114, 807428}, NULL) = 0
>> gettimeofday({1369385114, 807550}, NULL) = 0
>> msgget(0x1, 0xbeb9f7d0, 0, 0x1)         = 0
>> semget(0x22, 0xbeb9f6b0, 0x10, 0)       = 1
>> read(35, "w", 32)                       = 1
>> read(35, 0xbeb9f680, 32)                = -1 EAGAIN (Try again)
>> msgget(0x1, 0xbeb9f7e0, 0, 0x1)         = 0
>> gettimeofday({1369385114, 808130}, NULL) = 0
>> gettimeofday({1369385114, 808283}, NULL) = 0
>> gettimeofday({1369385114, 808710}, NULL) = 0
>> gettimeofday({1369385114, 809229}, NULL) = 0
>> gettimeofday({1369385114, 809381}, NULL) = 0
>> gettimeofday({1369385114, 809717}, NULL) = 0
>> gettimeofday({1369385114, 809839}, NULL) = 0
>> gettimeofday({1369385114, 810114}, NULL) = 0
>> gettimeofday({1369385114, 810297}, NULL) = 0
>> gettimeofday({1369385114, 810419}, NULL) = 0
>> recv(1077949332, 0x81, 2147483647,
>>
>> MSG_DONTROUTE|MSG_PEEK|MSG_CTRUNC|MSG_EOR|MSG_ERRQUEUE|MSG_DONTWAIT|MSG_CONFIRM|MSG_PROBE|MSG_NOSIGNAL|0xfff20000)
>> = 0
>> write(36, "w", 1)                       = 1
>> _______________________________________________
>> dev-b2g mailing list
>> [email protected]
>> https://lists.mozilla.org/listinfo/dev-b2g
>>
>
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to