bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

open-network-stream bug


From: Alex Schroeder
Subject: open-network-stream bug
Date: Thu, 05 Jul 2001 21:29:31 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

In GNU Emacs 20.7.3 (i686-pc-linux-gnu, X toolkit)
 of Tue Jun 26 2001 on snail
configured using `configure  --with-x-toolkit=yes'

In recent weeks I noticed a remarkable thing: After running for a few
minutes, my Emacs will no longer succeed when it tries to
open-network-stream!  It just hangs there until I send a C-g.

In these last weeks I started to use desktop.el, w3m.el (which runs
the text-browser w3m in the background), erc.el (an IRC client written
in elisp support).  Furthermore, I use oGnus (from CVS, usually), and
sometimes w3.el (a web browser written in elisp).  But I haven't been
able to pin it down.

What I did now, is wait for another such open-network-stream hang.  I
then opened an xterm, switched to the Emacs source directory, started
gdb and attached to the running Emacs process.

Here's what I did.  If you have any ideas, speak up.  :)

(gdb) bt
#0  0x402db71e in select () from /lib/libc.so.6
#1  0x38 in ?? ()
#2  0x8050f92 in Fsleep_for (seconds=1, milliseconds=404767908)
    at dispnew.c:2384
#3  0x812480e in Fopen_network_stream (name=946782928, buffer=1214959536, 
    host=946780872, service=6667) at process.c:1866
#4  0x80f4d20 in Feval (form=1482627180) at eval.c:1835
#5  0x80f2a6e in Fsetq (args=1482627228) at eval.c:465
#6  0x80f4ae7 in Feval (form=1482627276) at eval.c:1772
#7  0x80f287b in Fprogn (args=1482616340) at eval.c:365
...
(gdb) l
611     #ifdef LINUX_SBRK_BUG
612       __sbrk (1);
613     #endif
614     
615     #ifdef RUN_TIME_REMAP
616       if (initialized)
617         run_time_remap (argv[0]);
618     #endif
619     
620       sort_args (argc, argv);
(gdb) n
Single stepping until exit from function select, 
which has no line number information.
wait_reading_process_input (time_limit=1, microsecs=0, read_kbd=0, 
    do_display=0) at process.c:2486
2486          xerrno = errno;
(gdb) p errno
$1 = 4

I then hit "n" lots of times.  As you can see, it seems Emacs is
trapped in lines 1856 to 1867.  Does that help at all?

(I flushed all the lines with the gdb prompt.)

2489          clear_waiting_for_input ();
2492          do_pending_window_change ();
2494          if (time_limit && nfds == 0 && ! timeout_reduced_for_timers)
2497          if (nfds < 0)
2499              if (xerrno == EINTR)
2500                FD_ZERO (&Available);
2566          if (XINT (read_kbd) != 0
2588              swallow_events (do_display);
2593            }
2596          if (wait_for_cell && ! NILP (*wait_for_cell))
2605          if (XINT (read_kbd) && interrupt_input
2610          if (! wait_proc)
2611            got_some_input |= nfds > 0;
2615          if (XINT (read_kbd) || wait_for_cell)
2621          for (channel = 0; channel <= max_process_desc; channel++)
2623              if (FD_ISSET (channel, &Available)
2709                }
2623              if (FD_ISSET (channel, &Available)
2709                }
2623              if (FD_ISSET (channel, &Available)
2709                }
2623              if (FD_ISSET (channel, &Available)
2709                }
2711        }                           /* end while exit conditions not met */
2319          int timeout_reduced_for_timers = 0;
2324          if (XINT (read_kbd) >= 0)
2325            QUIT;
2328          if (wait_for_cell && ! NILP (*wait_for_cell))
2333          if (time_limit == -1)
2341          else if (time_limit || microsecs)
2343              EMACS_GET_TIME (timeout);
2344              EMACS_SUB_TIME (timeout, end_time, timeout);
2345              if (EMACS_TIME_NEG_P (timeout))
2713      waiting_for_user_input_p = 0;
2718      if (XINT (read_kbd) >= 0)
2721          clear_input_pending ();
2722          QUIT;
2733      return got_some_input;
Fsleep_for (seconds=1, milliseconds=404767908) at dispnew.c:2421
2421      return Qnil;
Fopen_network_stream (name=946782928, buffer=1214959536, host=946780872, 
    service=6667) at process.c:1867
1867        }
1856          h_errno = 0;
1858          immediate_quit = 1;
1859          QUIT;
1860          host_info_ptr = gethostbyname (XSTRING (host)->data);
1861          immediate_quit = 0;
1863          if (! (host_info_ptr == 0 && h_errno == TRY_AGAIN))
1866          Fsleep_for (make_number (1), Qnil);
1867        }
1856          h_errno = 0;
1858          immediate_quit = 1;
1859          QUIT;
1860          host_info_ptr = gethostbyname (XSTRING (host)->data);
1861          immediate_quit = 0;
1863          if (! (host_info_ptr == 0 && h_errno == TRY_AGAIN))
1866          Fsleep_for (make_number (1), Qnil);
1867        }
1856          h_errno = 0;
1858          immediate_quit = 1;
1859          QUIT;
1860          host_info_ptr = gethostbyname (XSTRING (host)->data);
1861          immediate_quit = 0;
1863          if (! (host_info_ptr == 0 && h_errno == TRY_AGAIN))
1866          Fsleep_for (make_number (1), Qnil);
1867        }
1856          h_errno = 0;
1858          immediate_quit = 1;
1859          QUIT;
1860          host_info_ptr = gethostbyname (XSTRING (host)->data);
1861          immediate_quit = 0;
1863          if (! (host_info_ptr == 0 && h_errno == TRY_AGAIN))
1866          Fsleep_for (make_number (1), Qnil);
1867        }
1856          h_errno = 0;
1858          immediate_quit = 1;
1859          QUIT;
1860          host_info_ptr = gethostbyname (XSTRING (host)->data);
1861          immediate_quit = 0;
1863          if (! (host_info_ptr == 0 && h_errno == TRY_AGAIN))
1866          Fsleep_for (make_number (1), Qnil);
1867        }


Alex.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]