After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658743 - "Too many open files" error in GWakeup
"Too many open files" error in GWakeup
Status: RESOLVED DUPLICATE of bug 668508
Product: libsoup
Classification: Core
Component: HTTP Transport
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2011-09-11 12:40 UTC by Xan Lopez
Modified: 2012-01-27 14:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
/proc/$PID/fd snapshot (65.52 KB, text/plain)
2011-09-13 11:40 UTC, Xan Lopez
Details

Description Xan Lopez 2011-09-11 12:40:47 UTC
I'm getting this error using glib from master and libsoup. Opening it in network component, but the error might be either lower level or libsoup's, not sure:


GLib-ERROR **: Creating pipes for GWakeup: Too many open files


Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff5b33751 in g_logv (log_domain=0x7ffff5c03670 "GLib", 
    log_level=G_LOG_LEVEL_ERROR, 
    format=0x7ffff5c03650 "Creating pipes for GWakeup: %s\n", 
    args1=0x7fffffffb1f8) at gmessages.c:570
570			G_BREAKPOINT ();
(gdb) bt
  • #0 g_logv
    at gmessages.c line 570
  • #1 g_log
    at gmessages.c line 591
  • #2 g_wakeup_new
    at gwakeup.c line 163
  • #3 g_cancellable_make_pollfd
    at gcancellable.c line 409
  • #4 socket_source_new
    at gsocket.c line 2595
  • #5 g_socket_create_source
    at gsocket.c line 2660
  • #6 g_socket_input_stream_pollable_create_source
    at gsocketinputstream.c line 229
  • #7 g_pollable_input_stream_create_source
    at gpollableinputstream.c line 140
  • #8 soup_socket_create_watch
    at soup-socket.c line 767
  • #9 read_from_network
  • #10 soup_socket_read
    at soup-socket.c line 1357
  • #11 read_body_chunk
    at soup-message-io.c line 463
  • #12 io_read
    at soup-message-io.c line 960
  • #13 io_unpause_internal
    at soup-message-io.c line 1209
  • #14 g_idle_dispatch
    at gmain.c line 4495
  • #15 g_main_dispatch
    at gmain.c line 2372
  • #16 g_main_context_dispatch
    at gmain.c line 2910
  • #17 g_main_context_iterate
    at gmain.c line 2984
  • #18 g_main_loop_run
    at gmain.c line 3181
  • #19 gtk_main
    at gtkmain.c line 1362
  • #20 gtk_application_run_mainloop
    at gtkapplication.c line 112
  • #21 g_application_run
    at gapplication.c line 1323
  • #22 main
    at ../../src/ephy-main.c line 480

Comment 1 Allison Karlitskaya (desrt) 2011-09-11 16:25:12 UTC
hi Xan

Can you tell me what your use case is doing, generally?  (Lots of open network sockets, lots of creation/destruction of main contexts, etc?)

Also: can you get me a snapshot of /proc/[pid]/fd at the time that the bug happens?
Comment 2 Allison Karlitskaya (desrt) 2011-09-11 20:38:53 UTC
btw: I suspect that the problem is that epiphany is leaking GCancellables.
Comment 3 Xan Lopez 2011-09-13 11:40:31 UTC
Created attachment 196357 [details]
/proc/$PID/fd snapshot

fd directory at the moment of the crash.
Comment 4 Xan Lopez 2011-09-13 11:41:52 UTC
This seems to be reasonably easy to reproduce by loading planet gnome a bunch of times, FWIW.
Comment 5 Allison Karlitskaya (desrt) 2011-09-13 12:25:55 UTC
sockets!!

If this was a problem related to GWakeup, GCancellable or GMainContext I'd expect to see a lot of eventfd or pipe handles there...

Maybe you're failing to close some network sockets?  Take a peek at netstat at the same time?
Comment 6 Dan Winship 2011-09-13 14:03:10 UTC
xan: i'm rebuilding webkit now, but with latest glib, glib-networking, and libsoup, I can load 5 copies of pgo at once and not go above 64 sockets (webkit/ephy sets max-conns to 60. the other 4 are presumably unix domain sockets for dbus or whatever).

hm. are you using a proxy?
Comment 7 Xan Lopez 2011-09-13 16:21:29 UTC
(In reply to comment #6)
> xan: i'm rebuilding webkit now, but with latest glib, glib-networking, and
> libsoup, I can load 5 copies of pgo at once and not go above 64 sockets
> (webkit/ephy sets max-conns to 60. the other 4 are presumably unix domain
> sockets for dbus or whatever).

The best way to trigger the bug I've found is to load pgo (and a bunch of other sites) in ephy, kill it, then restore all the tabs at once. I get the error that way sometimes, but not always.

> 
> hm. are you using a proxy?

Nope.
Comment 8 Dan Winship 2011-09-18 14:34:15 UTC
(In reply to comment #7)
> The best way to trigger the bug I've found is to load pgo (and a bunch of other
> sites) in ephy, kill it, then restore all the tabs at once. I get the error
> that way sometimes, but not always.

Still have not seen this. It always seems to obey the max-connections limit for me. Are you using any extensions or some non-master branch of webkit or something?

If you see this again, try running lsof on epiphany, which should give a little more info about the sockets...
Comment 9 Dan Winship 2011-11-18 00:15:45 UTC
Xan, still seeing this?
Comment 10 Akhil Laddha 2012-01-02 09:45:42 UTC
Xan, ping
Comment 11 Xan Lopez 2012-01-02 11:11:00 UTC
I've seen this from time to time (I think I mentioned this in another bug, Dan?), but I cannot really reproduce it at will so it's a bit hard to investigate. The only thing I can say is that when it happens it does because ephy/soup are requesting a ton of data at the same time (ie, planet gnome, a ton of tabs being loaded, etc).
Comment 12 Yves-Alexis Perez 2012-01-27 14:43:36 UTC
I just had a bug report from a Debian user which reproduced this with Midori (GTK+ webkit based browser) when loading http://anime-ultime.net/series-0-1/anime/0#principal

Downstream bug is at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657618
Comment 13 Dan Winship 2012-01-27 14:54:28 UTC
oops, I should have remembered this bug already existed. Fixed a few days ago in libsoup master: http://git.gnome.org/browse/libsoup/commit/?id=856df33301221711789f0db744fce951eb70ba76

*** This bug has been marked as a duplicate of bug 668508 ***