Consistent 15-second hang with no window painting at launch

Bug #52722 reported by Gabriel Bauman
16
Affects Status Importance Assigned to Milestone
Epiphany Browser
Won't Fix
Medium
gnome-vfs (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

With an up-to-date Dapper, Epiphany starts up, shows its window, then freezes for 10 to 15 seconds. During that time, window contents are not painted and I can see the desktop through the window frame. Dragging the window makes psychadelic patterns in it. After the delay, Epiphany works normally and is quite snappy. CPU usage during the delay is a little high, but not pegged.

This started sometime last week on two machines. Firefox, in comparison, works fine.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for your bug report. Can you start epiphany from the terminal and see if there's any output?

Changed in epiphany-browser:
assignee: nobody → desktop-bugs
importance: Untriaged → Medium
status: Unconfirmed → Needs Info
Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

Nothing is output to the console at all during or after the hang. I've also tried deleting ~/.gnome2/epiphany and restarting - same hang.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Can you check the list of 'about:plugins' once it has started up? Can you additionally do an strace of epiphany and attach it?

 strace epiphany 2&> epiphany.strace

should do.

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

Contents of about:plugins

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

Opened epiphany, waited through the hang, closed epiphany.

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

I noticed that both instances of epiphany had both the mplayer and totem video plugins, thought maybe they were fighting. I removed the totem plugin on one machine and the mplayer plugin on the other with no effect on the problem.

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

I'm noticing that sometimes the window actually manages to be painted before the hang occurs, as well.

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

Running 'sudo invoke-rc.d networking restart' seems to trigger this. The hang starts just after DHCP successfully binds to an IP address.

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

After running 'sudo invoke-rc.d networking stop', I can open epiphany without the hang. So to summarize, Epiphany hangs in the following situations:

 o The network is up and epiphany is started
 o Epiphany is running and the network is started

Again, CPU usage is normal during the hang.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Does this remove the 'lo' interface?

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

Nope, just 'eth0', but that line of inquiry is dead; read on.

I got to thinking that this is a network problem, since this is obviously not a widespread bug. I figured maybe epiphany was doing a network request that was taking a long time. Bingo!

During the hang, `sudo netstat -a4p | grep epiphany` shows epiphany with an established UDP connection to the domain socket on my gateway, a linksys router.

So, I fired up Ethereal and watched packets. A cursory analysis:

 o Hang seems to be originating from some Avahi/MDNS queries related to discovering 'Local Sites' bookmarks.
 o There turned out to be a (misconfigured) Avahi server on another machine on the LAN. It serves up some MDNS web site pointers for devices on the LAN that don't have the capability to do that for themselves.
 o Those devices had been removed from the LAN, but the rogue Avahi server was serving _http._tcp.local TXT records for them still.
 o epiphany on my machine gets the SRV records from MDNS, then queries MDNS for A records for the advertised services, which it never receives. It then tries to query the DNS service on the router to find the records, which fails. This happens a few times. Finally it stops trying and the hang ends.
 o ephy starts up. The dummy, invalid 'Local Sites' appear in the menu. Selecting one of them sends ephy into the same query fits, but does not hang the UI, and the request eventually times out normally.

 That narrows it down some. I'm attaching a dump of network traffic during the hang.

I'm not familiar with the code, but a simple fix would seem to be making epiphany avoid querying for A records from MDNS until the user actually clicks one of the Local Sites bookmarks.

I can't imagine spurious SRV are all that rare, be nice if this kind of thing were handled more gracefully. Sorry this took so long to figure out.

Revision history for this message
Dean Sas (dsas) wrote :

I've reported this bug upstream at http://bugzilla.gnome.org/show_bug.cgi?id=349776

Changed in epiphany-browser:
status: Needs Info → Unconfirmed
Changed in epiphany-browser:
status: Unknown → Unconfirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for tracking that, that would not have been easy to have an idea on the issue without that since that's probably few people are working with a misconfigured avahi on they server ;)

Upstream has reassigned to gnome-vfs with that comment:
"Epiphany uses the async gnome-vfs functions for this, which shouldn't ever
block our UI. So this is either a gnome-vfs problem or an avahi problem."

I'm updating the package according to that

Changed in epiphany-browser:
importance: Medium → Low
status: Unconfirmed → Confirmed
Revision history for this message
Ronald van Engelen (ronalde) wrote :

More than a year later, we suddendly are experiencing the same problem using epiphany on gutsy.

The statement "probably few people are working with a misconfigured avahi" might be true, but our avahi-dameon was automatically installed and configured as a dependency for edubuntu-desktop. After stopping the avahi-daemon proces, epiphany starts just fine.

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

Essentially, if there's an SRV record being published on the LAN for a local web site, and the SRV record points to a hostname that doesn't have a published A record to resolve it, you'll get this problem.

1. Epiphany goes "Hi there local network, any web sites out there?"
2. Avahi says "Yes! One on joe.local, and another on frank.local!"
3. Epiphany adds joe.local to the "Local Sites" bookmark folder, asks "What is joe.local's IP?"
4. Epiphany hangs if joe.local has no A record in MDNS.
5. Eventually, Epiphany realizes it's not getting an answer and continues.

The whole app blocks on MDNS queries for some reason.

Good luck.

Changed in gnome-vfs:
status: Confirmed → Triaged
Revision history for this message
Jonathan Harker (jonathanharker) wrote :

I'm using Hardy and epiphany works fine. Can someone still running Gutsy or Dapper confirm whether this has been fixed, otherwise we should close this bug.

Revision history for this message
Jonathan Harker (jonathanharker) wrote :

(...I mean, close it if it has been fixed!)

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

Jonathan - this bug happens only in very specific situations, so "Epiphany works fine in Hardy" isn't an indication of anything. Most users will never see this problem; nevertheless, it still needs to be addressed.

I'll try to recreate this in Intrepid. Since GnomeVFS has been deprecated in favour of the new GVFS stuff, this might be a non-issue in recent builds of Epiphany.

I'd love to see this closed. Let me do the work before we close this bug.

Revision history for this message
Jonathan Harker (jonathanharker) wrote :

Cool - just that I had this problem in Gutsy, where the only solution was to /etc/init.d/avahi-daemon stop before launching epiphany (see attached dup 159141). The problem disappeared when I apt-get dist-upgraded to hardy.

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

I can't duplicate this in Intrepid after recreating the situation that exposed the original problem. Since we don't have any reports of this post-Hardy, I think we can safely assume that the problem has been fixed by the move to GIO/GVFS. I'm marking this 'Fixed Released'.

If anyone experiences this problem in Hardy or later, please comment here and we'll re-open the issue. Thanks to everyone who looked at this.

Changed in gnome-vfs:
status: Triaged → Fix Released
Revision history for this message
LandRacer (nick-sutton) wrote :

Well this problem still exists... Without proper resolution we cannot go to assume that this problem just disappeared, post HArdy.... I have to gather some more information, but this problem still does exist. and asking to close an unsolved BUG is a bad idea. Especially this particular BUG!

ANY hang in Ubuntu is unacceptable, permanent resolution should attained before this type of bug is closed.

Changed in epiphany-browser:
importance: Unknown → Medium
Changed in epiphany-browser:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.