Gnus development mailing list
 help / color / mirror / Atom feed
* Loss of ticks and marks
@ 1999-03-21  7:59 Alexandre Oliva
  1999-03-28 16:41 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: Alexandre Oliva @ 1999-03-21  7:59 UTC (permalink / raw)


Hi there!

Once in a while, it happens to me to lose all the ticks and dormant
marks in a nnml group.  This is very unfortunate because I use
auto-expire, so old bug reports I had archived end up being removed
almost without notice :-(

It had happened to me once about a month ago, and it has just happened 
again.  It took me some time to notice the problem the first time, but 
this time it was immediate, because I lost information for a huge
group that had hundreds of dormant messages, and I was always asked
for confirmation before entering the group.

Unfortunately, I don't have precise information about what might have
triggered the problem, and my only two guesses are:

1) I had just had to `kill -TERM XEmacs' (*).  I restarted it and told
gnus to load the auto-saved file (unfortunately, I no longer have that
auto-save file nor the previous .newsrc.eld~ :-(

2) I sometimes type C-g when I change my mind about entering such huge 
groups; could this leave internal data in inconsistent state?


Any ideas about what might be causing the problem and how to fix it?
(I've been always running the latest releases of pgnus, with a delay
of one or two days after releases)


(*) I had to kill it because of another bug: in a forwarded message
buffer (i.e., after C-c C-f), if I type `C-c C-k', gnus enters an
endless loop printing the error message `symbolp: ###', where ### is a
number.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,egcs.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



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

* Re: Loss of ticks and marks
  1999-03-21  7:59 Loss of ticks and marks Alexandre Oliva
@ 1999-03-28 16:41 ` Lars Magne Ingebrigtsen
  1999-03-29  0:56   ` Alexandre Oliva
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-03-28 16:41 UTC (permalink / raw)


Alexandre Oliva <oliva@dcc.unicamp.br> writes:

> 2) I sometimes type C-g when I change my mind about entering such huge 
> groups; could this leave internal data in inconsistent state?

Not if you `C-g' at the prompt.

> Any ideas about what might be causing the problem and how to fix it?

Nope.  Could you try to reproduce the bug?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Loss of ticks and marks
  1999-03-28 16:41 ` Lars Magne Ingebrigtsen
@ 1999-03-29  0:56   ` Alexandre Oliva
  1999-04-02 13:53     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 14+ messages in thread
From: Alexandre Oliva @ 1999-03-29  0:56 UTC (permalink / raw)


On Mar 28, 1999, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

> Alexandre Oliva <oliva@dcc.unicamp.br> writes:
>> 2) I sometimes type C-g when I change my mind about entering such huge 
>> groups; could this leave internal data in inconsistent state?

> Not if you `C-g' at the prompt.

But what if I `C-g' while it says `Scoring articles' or `Generating
summary'?  The problem has never occurred with `C-g' at the prompt.

>> Any ideas about what might be causing the problem and how to fix it?

> Nope.  Could you try to reproduce the bug?

Yep, I'm keeping my eyes wide open for new occurrences of it.  I was
just hoping this would ring a bell on someone :-(

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,egcs.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



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

* Re: Loss of ticks and marks
  1999-03-29  0:56   ` Alexandre Oliva
@ 1999-04-02 13:53     ` Lars Magne Ingebrigtsen
  1999-04-04 10:57       ` Alexandre Oliva
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-04-02 13:53 UTC (permalink / raw)


Alexandre Oliva <oliva@dcc.unicamp.br> writes:

> >> 2) I sometimes type C-g when I change my mind about entering such huge 
> >> groups; could this leave internal data in inconsistent state?
> 
> > Not if you `C-g' at the prompt.
> 
> But what if I `C-g' while it says `Scoring articles' or `Generating
> summary'?  The problem has never occurred with `C-g' at the prompt.

Breaking lisp code while it is running is liable to, er, break stuff.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Loss of ticks and marks
  1999-04-02 13:53     ` Lars Magne Ingebrigtsen
@ 1999-04-04 10:57       ` Alexandre Oliva
  1999-04-05 15:28         ` Justin Sheehy
  1999-04-17  6:20         ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 14+ messages in thread
From: Alexandre Oliva @ 1999-04-04 10:57 UTC (permalink / raw)


On Apr  2, 1999, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

> Alexandre Oliva <oliva@dcc.unicamp.br> writes:
>> >> 2) I sometimes type C-g when I change my mind about entering such huge 
>> >> groups; could this leave internal data in inconsistent state?
>> 
>> > Not if you `C-g' at the prompt.
>> 
>> But what if I `C-g' while it says `Scoring articles' or `Generating
>> summary'?  The problem has never occurred with `C-g' at the prompt.

> Breaking lisp code while it is running is liable to, er, break stuff.

I thought code that must not be interrupted would be protected against
C-g, so that I couldn't screw things up with the keyboard even if I
wanted :-)

No hope, then? :-(

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



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

* Re: Loss of ticks and marks
  1999-04-04 10:57       ` Alexandre Oliva
@ 1999-04-05 15:28         ` Justin Sheehy
  1999-04-05 21:24           ` Alexandre Oliva
  1999-04-13  7:08           ` Hrvoje Niksic
  1999-04-17  6:20         ` Lars Magne Ingebrigtsen
  1 sibling, 2 replies; 14+ messages in thread
From: Justin Sheehy @ 1999-04-05 15:28 UTC (permalink / raw)


Alexandre Oliva <oliva@dcc.unicamp.br> writes:

> I thought code that must not be interrupted would be protected against
> C-g, so that I couldn't screw things up with the keyboard even if I
> wanted :-)

It's not code that _must_ not be interrupted, it is code that _should_ 
not be interrupted.  It's not a good idea in general, but could be
necessary in some cases.  If you send a break signal, you should plan
on dealing with the consequences.

Protecting all sorts of code from C-g would make it very difficult for 
users to deal with a situation that actually hung their emacs.

No one prevents you from pulling your computer's plug out of the wall, 
but that doesn't make it a good idea...

-- 
Justin Sheehy

In a cloud bones of steel.
  




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

* Re: Loss of ticks and marks
  1999-04-05 15:28         ` Justin Sheehy
@ 1999-04-05 21:24           ` Alexandre Oliva
  1999-04-05 21:34             ` Justin Sheehy
  1999-04-13  7:08           ` Hrvoje Niksic
  1 sibling, 1 reply; 14+ messages in thread
From: Alexandre Oliva @ 1999-04-05 21:24 UTC (permalink / raw)
  Cc: ding

On Apr  5, 1999, Justin Sheehy <justin@linus.mitre.org> wrote:

> Alexandre Oliva <oliva@dcc.unicamp.br> writes:
>> I thought code that must not be interrupted would be protected against
>> C-g, so that I couldn't screw things up with the keyboard even if I
>> wanted :-)

> It's not code that _must_ not be interrupted, it is code that _should_ 
> not be interrupted.  It's not a good idea in general, but could be
> necessary in some cases.  If you send a break signal, you should plan
> on dealing with the consequences.

But functions that may take a long time to run, such as entering a
large group, should have well-defined interrupt points or be safe to
interrupt, otherwise people may lose e-mail like I have :-(

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



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

* Re: Loss of ticks and marks
  1999-04-05 21:24           ` Alexandre Oliva
@ 1999-04-05 21:34             ` Justin Sheehy
  1999-04-05 22:08               ` Dmitry Yaitskov
  1999-04-06 21:35               ` Alexandre Oliva
  0 siblings, 2 replies; 14+ messages in thread
From: Justin Sheehy @ 1999-04-05 21:34 UTC (permalink / raw)


Alexandre Oliva <oliva@dcc.unicamp.br> writes:

> But functions that may take a long time to run, such as entering a
> large group, should have well-defined interrupt points or be safe to
> interrupt, otherwise people may lose e-mail like I have :-(

Entering a large group does in fact have a well-defined interrupt
point.  You just explained the exact reason why Gnus asks you for
confirmation when selecting a large group.

If you confirm this, or set gnus-large-newsgroup to nil, then you are
intentionally allowing the very well defined interrupt-safe time to
pass.  If you do that, then you should let the subsequent code finish
nicely.

-- 
Justin Sheehy

In a cloud bones of steel.
  




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

* Re: Loss of ticks and marks
  1999-04-05 21:34             ` Justin Sheehy
@ 1999-04-05 22:08               ` Dmitry Yaitskov
  1999-04-06 21:35               ` Alexandre Oliva
  1 sibling, 0 replies; 14+ messages in thread
From: Dmitry Yaitskov @ 1999-04-05 22:08 UTC (permalink / raw)


Justin Sheehy <justin@linus.mitre.org> wrote:

> Alexandre Oliva <oliva@dcc.unicamp.br> writes:
> 
> > But functions that may take a long time to run, such as entering a
> > large group, should have well-defined interrupt points or be safe to
> > interrupt, otherwise people may lose e-mail like I have :-(
> 
> Entering a large group does in fact have a well-defined interrupt
> point.  You just explained the exact reason why Gnus asks you for
> confirmation when selecting a large group.
> 
> If you confirm this, or set gnus-large-newsgroup to nil, then you are
> intentionally allowing the very well defined interrupt-safe time to
> pass.  If you do that, then you should let the subsequent code finish
> nicely.

BTW. Wouldn't it be nice to be able to set gnus-large-newsgroup per
group? Or is it already possible? (I once tried to set it in group
parameters, but it didn't work.)

-- 
Cheers,
-Dima.



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

* Re: Loss of ticks and marks
  1999-04-05 21:34             ` Justin Sheehy
  1999-04-05 22:08               ` Dmitry Yaitskov
@ 1999-04-06 21:35               ` Alexandre Oliva
  1999-04-06 22:02                 ` Alan Shutko
  1 sibling, 1 reply; 14+ messages in thread
From: Alexandre Oliva @ 1999-04-06 21:35 UTC (permalink / raw)
  Cc: ding

On Apr  5, 1999, Justin Sheehy <justin@linus.mitre.org> wrote:

> Alexandre Oliva <oliva@dcc.unicamp.br> writes:
>> But functions that may take a long time to run, such as entering a
>> large group, should have well-defined interrupt points or be safe to
>> interrupt, otherwise people may lose e-mail like I have :-(

> Entering a large group does in fact have a well-defined interrupt
> point.

When I still don't have the faintest idea about how long it will take
to enter the group.  But IMO it's not very reasonable that I can't
safely interrupt a function that could take minutes or even hours to
finish.

Is there any way to poll for C-g in emacs-lisp?  When entering groups, 
gnus could block C-g and poll for it once every `n' messages, so that
this could be interrupted safely.

I don't think this is a very important issue in general, but the fact
that it has caused me to lose e-mail twice, without warning, makes it
a very important feature, at least for me :-)

I'm going to give it a try.  Any suggestions for a variable name to
configure the poll count?  Any hints on where I should start looking
into this problem (I haven't hacked gnus much before :-(

Thanks in advance

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



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

* Re: Loss of ticks and marks
  1999-04-06 21:35               ` Alexandre Oliva
@ 1999-04-06 22:02                 ` Alan Shutko
  0 siblings, 0 replies; 14+ messages in thread
From: Alan Shutko @ 1999-04-06 22:02 UTC (permalink / raw)
  Cc: Justin Sheehy, ding

Alexandre Oliva <oliva@dcc.unicamp.br> writes:

> On Apr  5, 1999, Justin Sheehy <justin@linus.mitre.org> wrote:
> 
> > Entering a large group does in fact have a well-defined interrupt
> > point.
> 
> When I still don't have the faintest idea about how long it will take
> to enter the group.

Especially since the number given at that prompt may have little
relation to the actual number of articles there.

What are the actual problems involved making this operation
interruptable?  (Maybe I just missed an explanation in previous
messages... I'll look.)  It sure seems like a feature people would
like, and I'd say it's worth some effort.

-- 
Alan Shutko <ats@acm.org> - By consent of the corrupted
Memory fault - where am I?


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

* Re: Loss of ticks and marks
  1999-04-05 15:28         ` Justin Sheehy
  1999-04-05 21:24           ` Alexandre Oliva
@ 1999-04-13  7:08           ` Hrvoje Niksic
  1 sibling, 0 replies; 14+ messages in thread
From: Hrvoje Niksic @ 1999-04-13  7:08 UTC (permalink / raw)


Justin Sheehy <justin@linus.mitre.org> writes:

> Protecting all sorts of code from C-g would make it very difficult
> for users to deal with a situation that actually hung their emacs.

The right thing would be not to disable C-g in critical sections, but
to use unwind-protects to perform the correct cleanup.

(For those who didn't get it: the above paragraph is a joke.  It would 
be near impossible to trap everything that might possibly be screwed
up with a C-g with the correct unwind-protect, not to mention testing
all of that.)


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

* Re: Loss of ticks and marks
  1999-04-04 10:57       ` Alexandre Oliva
  1999-04-05 15:28         ` Justin Sheehy
@ 1999-04-17  6:20         ` Lars Magne Ingebrigtsen
  1999-04-17 20:27           ` Alexandre Oliva
  1 sibling, 1 reply; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-04-17  6:20 UTC (permalink / raw)


Alexandre Oliva <oliva@dcc.unicamp.br> writes:

> I thought code that must not be interrupted would be protected against
> C-g, so that I couldn't screw things up with the keyboard even if I
> wanted :-)

Nope.  One could identify critical regions and use `gnus-atomic-progn' 
around them, but 1) identifying those regions would be a bitch and 2)
if there actually is an infloop in that region, then the user would
have to kill Emacs to get out of the situation.

The moral is that `C-g' should be used sparsely.  If you `C-g' while
Elisp code is actually running, you should expect something to break.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Loss of ticks and marks
  1999-04-17  6:20         ` Lars Magne Ingebrigtsen
@ 1999-04-17 20:27           ` Alexandre Oliva
  0 siblings, 0 replies; 14+ messages in thread
From: Alexandre Oliva @ 1999-04-17 20:27 UTC (permalink / raw)


On Apr 17, 1999, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

> The moral is that `C-g' should be used sparsely.  If you `C-g' while
> Elisp code is actually running, you should expect something to break.

Ok, thanks for the explanation.  I'll try to remember not to use it,
and pray whenever I forget it :-D

Cheers,

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists



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

end of thread, other threads:[~1999-04-17 20:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-21  7:59 Loss of ticks and marks Alexandre Oliva
1999-03-28 16:41 ` Lars Magne Ingebrigtsen
1999-03-29  0:56   ` Alexandre Oliva
1999-04-02 13:53     ` Lars Magne Ingebrigtsen
1999-04-04 10:57       ` Alexandre Oliva
1999-04-05 15:28         ` Justin Sheehy
1999-04-05 21:24           ` Alexandre Oliva
1999-04-05 21:34             ` Justin Sheehy
1999-04-05 22:08               ` Dmitry Yaitskov
1999-04-06 21:35               ` Alexandre Oliva
1999-04-06 22:02                 ` Alan Shutko
1999-04-13  7:08           ` Hrvoje Niksic
1999-04-17  6:20         ` Lars Magne Ingebrigtsen
1999-04-17 20:27           ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).