Hi guys,
The CSS hack above worked for me also.
#guide-subscriptions-container {display: none;}
Before finding this, I did a lot of digging with strace and made a little headway, so I'd like to add some more details that might help the Opera devs solve it on their side more cleanly.
But first some general observations.
Problem
- Any youtube page I tried would freeze for period of time.
- The freeze begins say 3-5 seconds after the video/pre-roll-ad has begun playing and lasts between 5-30 seconds.
Scope
- I've tested a few versions of opera. All have the problem.
- I have not successfully reproduced the problem in any other browser. I have tested Opera, Firefox, Chrome, Rekonq.
- I've noted both Windows and Linux users reporting this problem. I haven't seen and mac reports, but I haven't been looking for them.
- On brief inspection, Opera mini on android does not appear to have this problem, though it appears video playback may be provided by another application. The home page did not cause the problem. Note that opera mini goes to m.youtube.com which will be using a substantially cut back code base.
- Changing the useragent to IE, firefox etc does not alter the result. eg maybe browser specific javascript/css was being delivered.
My setup
- I have a large number of youtube subscriptions (163), and a long history of activity (2008).
- Low end laptop
- Opera 12.16
- 16GB RAM
- Kubuntu 12.10
- Linux 3.5.0-22-generic
- x86_64
- Intel(R) Celeron(R) CPU B820 @ 1.70GHz
- Desktop
- Opera 12.16
- 32GB RAM
- Kubuntu 13.04
- Linux 3.8.0-30-generic
- x86_64
- AMD FX(tm)-8120 Eight-Core Processor
Debug observations
- While running strace and then loading a youtube page, there are two freezes in close succession. The first one is the longest, and the second is over pretty quickly.
- When running opera on two wildly differntly spec'd machines I get very similar freeze times, however the low-end machine sometimes takes long enough for the flash plugin to crash. This suggests to me that a timeout is forming a large part of the problem, and raw processing power as a much smaller part.
- As already established, this is not a plugin causing this problem. Disabling all plugins and browsing youtube using the HTML5 player still yeilds the freeze.
- v1vil suggests that this problem is caused by new javascript on youtube. I agree, although I don't have an conclusive proof.
- Using strace I'm seeing a huge number of "Resource temporarily unavailable", which I originally thought was part of the problem since it happens on the line before the epoll_wait before the freeze, but later came to the conclusion that it was irrelevant since it happens when the browser is running fine. The full line looks like this:
"recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)" - If I'm reading that right, the "Resource temporarily unavailable" is related to this:
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 - In each case, the line immediately before the freeze is:
epoll_wait(8, {}, 16, 0) = 0 - If I reading it right, that relates to the following line which happens fairly early in the output: "epoll_create(20) = 8". However I haven't yet established what is actually being polled.
- Here is the epoll_create documentation: http://linux.die.net/man/2/epoll_create
- Here is the epoll_wait documentation: http://linux.die.net/man/2/epoll_wait
strace output
Producing the strace output
The strace output is huuuuge. So rather than pasting it all here, here is how I produced it:
- Closed all tabs in opera, then closed opera.
- I set my terminal (konsole) to unlimited scroll back, so I could see all output from the start.
- Ran
strace opera 2>&1 | tee /tmp/opera-debug
. That gave me output on the terminal, and saved it to /tmp/opera-debug. - Loaded the youtube home page.
- When ever there was a freeze, I'd hold enter in the terminal so I had an effective bookmark to see where it was.
- Closed opera.
The strace output around the first freeze
writev(3, [{"H\2\4\357\24\0`\4\31\0`\4\316\0)\1\r\0\246\1\0\30\2\0", 24}, {"\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377"..., 244728}, {"", 0}], 3) = 208832
poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"..., 35920}, {"", 0}], 2) = 35920
epoll_wait(8, {}, 16, 0) = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f222687c000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2226864000
recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(8, {}, 16, 0) = 0
recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(8, {}, 16, 0) = 0
recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(8, {}, 16, 0) = 0
The freeze happens here.
recvfrom(3, "\2$\352\4\360\240{\1\355\0\0\0\t\0`\4\0\0\0\0\327\6\353\4\330\6\263\1\20\0\1\0"..., 4096, 0, NULL, NULL) = 128
recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"H\0029\377\24\0`\4\31\0`\4e\1\267\0\0\0\230\0\0\30\2\0", 24}, {"\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377"..., 261324}, {"", 0}], 3) = 208832
poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}])
The strace output around the second freeze
write(66, "0\n1394236194\n-1\nSuper Hot Pizza "..., 4096) = 4096
write(66, "rceid=opera&ie=utf-8&oe=utf-8&ch"..., 2423) = 2423
close(66) = 0
munmap(0x7f2226892000, 4096) = 0
recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(8, {}, 16, 0) = 0
*The freeze happens here.8
recvfrom(3, 0x333cb14, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"H\2\243\373\24\0`\4\31\0`\4\357\0043\0\0\0\230\0\0\30\6\202", 24}, {"\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377"..., 257652}, {"", 0}], 3) = 257676
poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"H\2\243\373\24\0`\4\31\0`\4\357\0043\0\0\0\313\0\0\30\6\202", 24}, {"\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377\31\27\17\377"..., 257652}, {"", 0}], 3) = 257676
I hope this is useful.
- Kevin