all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs hangs when changing network while sleeping
@ 2011-01-22 12:05 Rémi Letot
  2011-01-22 23:46 ` joakim
  0 siblings, 1 reply; 13+ messages in thread
From: Rémi Letot @ 2011-01-22 12:05 UTC (permalink / raw)
  To: emacs-devel

Hello,

when I change network with my laptop sleeping (typical when I commute
between work and home), my whole emacs session often freezes if gnus is
there (which is always).

Not so long ago I just had to kill the openssl processes, which abruptly
interrupted the connections, and gave me back my emacs.

Now that ssl is handled by emacs itself, I have no external process to
kill. And C-g doesn't help, all keystrokes I do seem to accumulate in
some buffer and are all processed when emacs resurfaces. And it can stay
frozen quite some time.

Besides quitting gnus before I commute (which I almost always forget)
and killing emacs (which is "Not Good"), is there a way to stop this
from happening ? Shouldn't C-g always work ?

Thanks,
-- 
Rémi




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-22 12:05 emacs hangs when changing network while sleeping Rémi Letot
@ 2011-01-22 23:46 ` joakim
  2011-01-24  2:34   ` Stefan Monnier
  0 siblings, 1 reply; 13+ messages in thread
From: joakim @ 2011-01-22 23:46 UTC (permalink / raw)
  To: Rémi Letot; +Cc: emacs-devel

hobbes@poukram.net (Rémi Letot) writes:

> Hello,
>
> when I change network with my laptop sleeping (typical when I commute
> between work and home), my whole emacs session often freezes if gnus is
> there (which is always).
>
> Not so long ago I just had to kill the openssl processes, which abruptly
> interrupted the connections, and gave me back my emacs.
>
> Now that ssl is handled by emacs itself, I have no external process to
> kill. And C-g doesn't help, all keystrokes I do seem to accumulate in
> some buffer and are all processed when emacs resurfaces. And it can stay
> frozen quite some time.
>
> Besides quitting gnus before I commute (which I almost always forget)
> and killing emacs (which is "Not Good"), is there a way to stop this
> from happening ? Shouldn't C-g always work ?
>
> Thanks,

This happens for me too. I have the following workaround script.
Basically it finds the ip of an open nntp session that is hanging due to
local interface change, and makes a dummy lookalike interface on the
loopback interface. Emacs is then able to determine that the interface
is dead and can recover. 

#/bin/sh
`lsof -n|grep emacs|grep nntp|sed "s/.*TCP\ \\([^:]*\\):.*->\\([^:].*\\):.*/  export a=\\1 export b=\\2/"`
echo $a $b
ifconfig lo:1 $a
ifconfig lo:2 $b
echo press enter when emacs is alive
read
ifconfig lo:1 down
ifconfig lo:2 down


-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-22 23:46 ` joakim
@ 2011-01-24  2:34   ` Stefan Monnier
  2011-01-24 12:42     ` joakim
  2011-01-24 16:27     ` Rémi Letot
  0 siblings, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2011-01-24  2:34 UTC (permalink / raw)
  To: joakim; +Cc: emacs-devel, Rémi Letot

> This happens for me too. I have the following workaround script.
> Basically it finds the ip of an open nntp session that is hanging due to
> local interface change, and makes a dummy lookalike interface on the
> loopback interface. Emacs is then able to determine that the interface
> is dead and can recover. 

> #/bin/sh
> `lsof -n|grep emacs|grep nntp|sed "s/.*TCP\ \\([^:]*\\):.*->\\([^:].*\\):.*/
> export a=\\1 export b=\\2/"`
> echo $a $b
> ifconfig lo:1 $a
> ifconfig lo:2 $b
> echo press enter when emacs is alive
> read
> ifconfig lo:1 down
> ifconfig lo:2 down

Could someone take it up to the gnutls guys to try and figure out what's
going on?


        Stefan



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-24  2:34   ` Stefan Monnier
@ 2011-01-24 12:42     ` joakim
  2011-01-24 16:34       ` Stefan Monnier
  2011-01-24 18:15       ` Ted Zlatanov
  2011-01-24 16:27     ` Rémi Letot
  1 sibling, 2 replies; 13+ messages in thread
From: joakim @ 2011-01-24 12:42 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, Rémi Letot

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> This happens for me too. I have the following workaround script.
>> Basically it finds the ip of an open nntp session that is hanging due to
>> local interface change, and makes a dummy lookalike interface on the
>> loopback interface. Emacs is then able to determine that the interface
>> is dead and can recover. 
>
>> #/bin/sh
>> `lsof -n|grep emacs|grep nntp|sed "s/.*TCP\ \\([^:]*\\):.*->\\([^:].*\\):.*/
>> export a=\\1 export b=\\2/"`
>> echo $a $b
>> ifconfig lo:1 $a
>> ifconfig lo:2 $b
>> echo press enter when emacs is alive
>> read
>> ifconfig lo:1 down
>> ifconfig lo:2 down
>
> Could someone take it up to the gnutls guys to try and figure out what's
> going on?

In my case I dont think gnutls is involved since I only have an
unencrypted connection to gmane.

>
>         Stefan

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-24  2:34   ` Stefan Monnier
  2011-01-24 12:42     ` joakim
@ 2011-01-24 16:27     ` Rémi Letot
  1 sibling, 0 replies; 13+ messages in thread
From: Rémi Letot @ 2011-01-24 16:27 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> This happens for me too. I have the following workaround script.
>> Basically it finds the ip of an open nntp session that is hanging due to
>> local interface change, and makes a dummy lookalike interface on the
>> loopback interface. Emacs is then able to determine that the interface
>> is dead and can recover. 
>
>> #/bin/sh
>> `lsof -n|grep emacs|grep nntp|sed "s/.*TCP\ \\([^:]*\\):.*->\\([^:].*\\):.*/
>> export a=\\1 export b=\\2/"`
>> echo $a $b
>> ifconfig lo:1 $a
>> ifconfig lo:2 $b
>> echo press enter when emacs is alive
>> read
>> ifconfig lo:1 down
>> ifconfig lo:2 down
>
> Could someone take it up to the gnutls guys to try and figure out what's
> going on?

emacs is now handling encryption itself, I don't think any external
process is involved anymore. On an older emacs openssl or gnutls was
used, which allowed me to kill that process and get emacs back. This is
not possible anymore.

Furthermore, this is not necessarily related to encryption, I have no
way to know where emacs is stuck since C-g doesn't work.

Thanks,
-- 
Rémi




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-24 12:42     ` joakim
@ 2011-01-24 16:34       ` Stefan Monnier
  2011-01-24 18:37         ` joakim
  2011-01-24 18:15       ` Ted Zlatanov
  1 sibling, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2011-01-24 16:34 UTC (permalink / raw)
  To: joakim; +Cc: emacs-devel, Rémi Letot

> In my case I dont think gnutls is involved since I only have an
> unencrypted connection to gmane.

In that case C-g should get Emacs back alive.


        Stefan



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-24 12:42     ` joakim
  2011-01-24 16:34       ` Stefan Monnier
@ 2011-01-24 18:15       ` Ted Zlatanov
  2011-01-24 20:44         ` joakim
  1 sibling, 1 reply; 13+ messages in thread
From: Ted Zlatanov @ 2011-01-24 18:15 UTC (permalink / raw)
  To: emacs-devel

On Mon, 24 Jan 2011 13:42:29 +0100 joakim@verona.se wrote: 

j> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> This happens for me too. I have the following workaround script.
>>> Basically it finds the ip of an open nntp session that is hanging due to
>>> local interface change, and makes a dummy lookalike interface on the
>>> loopback interface. Emacs is then able to determine that the interface
>>> is dead and can recover. 
>> 
>>> #/bin/sh
>>> `lsof -n|grep emacs|grep nntp|sed "s/.*TCP\ \\([^:]*\\):.*->\\([^:].*\\):.*/
>>> export a=\\1 export b=\\2/"`
>>> echo $a $b
>>> ifconfig lo:1 $a
>>> ifconfig lo:2 $b
>>> echo press enter when emacs is alive
>>> read
>>> ifconfig lo:1 down
>>> ifconfig lo:2 down
>> 
>> Could someone take it up to the gnutls guys to try and figure out what's
>> going on?

j> In my case I dont think gnutls is involved since I only have an
j> unencrypted connection to gmane.

Is there a way to test this without a laptop?

I'd rather not make it a GnuTLS issue if it happens with unencrypted
connections as well.

Ted




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-24 16:34       ` Stefan Monnier
@ 2011-01-24 18:37         ` joakim
  2011-01-27 12:01           ` Rémi Letot
  0 siblings, 1 reply; 13+ messages in thread
From: joakim @ 2011-01-24 18:37 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, Rémi Letot

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> In my case I dont think gnutls is involved since I only have an
>> unencrypted connection to gmane.
>
> In that case C-g should get Emacs back alive.

Yes it should, shouldn't it?

Anyway this is an old bug, there is more information in the report. I
can't remember the id now.

>
>
>         Stefan

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-24 18:15       ` Ted Zlatanov
@ 2011-01-24 20:44         ` joakim
  2011-01-24 21:29           ` Chad Brown
  0 siblings, 1 reply; 13+ messages in thread
From: joakim @ 2011-01-24 20:44 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: emacs-devel

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Mon, 24 Jan 2011 13:42:29 +0100 joakim@verona.se wrote: 
>
> j> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>> This happens for me too. I have the following workaround script.
>>>> Basically it finds the ip of an open nntp session that is hanging due to
>>>> local interface change, and makes a dummy lookalike interface on the
>>>> loopback interface. Emacs is then able to determine that the interface
>>>> is dead and can recover. 
>>> 
>>>> #/bin/sh
>>>> `lsof -n|grep emacs|grep nntp|sed "s/.*TCP\ \\([^:]*\\):.*->\\([^:].*\\):.*/
>>>> export a=\\1 export b=\\2/"`
>>>> echo $a $b
>>>> ifconfig lo:1 $a
>>>> ifconfig lo:2 $b
>>>> echo press enter when emacs is alive
>>>> read
>>>> ifconfig lo:1 down
>>>> ifconfig lo:2 down
>>> 
>>> Could someone take it up to the gnutls guys to try and figure out what's
>>> going on?
>
> j> In my case I dont think gnutls is involved since I only have an
> j> unencrypted connection to gmane.
>
> Is there a way to test this without a laptop?

There is nothing laptop specific about the bug.

Its not gnus specific either. Its just that gnus keeps a connection
open. To recreate, keep a connection open, bring down the interface and
try to read something from the connection. Emacs will hang.

>
> I'd rather not make it a GnuTLS issue if it happens with unencrypted
> connections as well.
>
> Ted
>

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-24 20:44         ` joakim
@ 2011-01-24 21:29           ` Chad Brown
  2011-01-24 22:07             ` joakim
  0 siblings, 1 reply; 13+ messages in thread
From: Chad Brown @ 2011-01-24 21:29 UTC (permalink / raw)
  To: joakim; +Cc: Ted Zlatanov, emacs-devel

Because I recall that Joakim might be one of the people
using the nextstep port, I'll ask if this is platform-specific?

I ask because I wouldn't be surprised to see problems
specific to macosx in this area.

Hope that helps,
*Chad




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-24 21:29           ` Chad Brown
@ 2011-01-24 22:07             ` joakim
  2011-01-25  0:15               ` Rémi Letot
  0 siblings, 1 reply; 13+ messages in thread
From: joakim @ 2011-01-24 22:07 UTC (permalink / raw)
  To: Chad Brown; +Cc: Ted Zlatanov, emacs-devel

Chad Brown <yandros@mit.edu> writes:

> Because I recall that Joakim might be one of the people
> using the nextstep port, I'll ask if this is platform-specific?

It might be platform specific. My platform is Fedora gnu/linux though.


>
> Hope that helps,
> *Chad

-- 
Joakim Verona



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-24 22:07             ` joakim
@ 2011-01-25  0:15               ` Rémi Letot
  0 siblings, 0 replies; 13+ messages in thread
From: Rémi Letot @ 2011-01-25  0:15 UTC (permalink / raw)
  To: emacs-devel

joakim@verona.se writes:

> Chad Brown <yandros@mit.edu> writes:
>
>> Because I recall that Joakim might be one of the people
>> using the nextstep port, I'll ask if this is platform-specific?
>
> It might be platform specific. My platform is Fedora gnu/linux though.

debian sid here, with emacs-snapshot from Julien Danjou

-- 
Rémi




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: emacs hangs when changing network while sleeping
  2011-01-24 18:37         ` joakim
@ 2011-01-27 12:01           ` Rémi Letot
  0 siblings, 0 replies; 13+ messages in thread
From: Rémi Letot @ 2011-01-27 12:01 UTC (permalink / raw)
  To: emacs-devel

joakim@verona.se writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> In my case I dont think gnutls is involved since I only have an
>>> unencrypted connection to gmane.
>>
>> In that case C-g should get Emacs back alive.
>
> Yes it should, shouldn't it?
>
> Anyway this is an old bug, there is more information in the report. I
> can't remember the id now.

Hi,

I have searched the bugs db, and couldn't find a related report. There
is http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5650 but it seems erc
specific (at least the proposed solution is erc specific)

Should I report a more generic bug ?

Thanks,
-- 
Rémi




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-01-27 12:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-22 12:05 emacs hangs when changing network while sleeping Rémi Letot
2011-01-22 23:46 ` joakim
2011-01-24  2:34   ` Stefan Monnier
2011-01-24 12:42     ` joakim
2011-01-24 16:34       ` Stefan Monnier
2011-01-24 18:37         ` joakim
2011-01-27 12:01           ` Rémi Letot
2011-01-24 18:15       ` Ted Zlatanov
2011-01-24 20:44         ` joakim
2011-01-24 21:29           ` Chad Brown
2011-01-24 22:07             ` joakim
2011-01-25  0:15               ` Rémi Letot
2011-01-24 16:27     ` Rémi Letot

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.