* bug#22859: 25.0.91; Errors in auto-revert-notify-handler
@ 2016-02-29 20:27 John Wiegley
2016-03-02 10:34 ` Michael Albinus
0 siblings, 1 reply; 7+ messages in thread
From: John Wiegley @ 2016-02-29 20:27 UTC (permalink / raw
To: 22859
While doing general editing and saving of files with emacs-25, I'm getting the
following backtrace somewhat often:
--8<---------------cut here---------------start------------->8---
Debugger entered: ((cl-assertion-failed (stringp file1) nil))
cl--assertion-failed((stringp file1))
auto-revert-notify-handler((29 renamed "/Users/johnw/bae/rings/vignettes/simple_parser_fiat/Main.hs"))
file-notify-callback((29 (rename) "/Users/johnw/bae/rings/vignettes/simple_parser_fiat/Main.hs"))
file-notify-handle-event((file-notify (29 (rename) "/Users/johnw/bae/rings/vignettes/simple_parser_fiat/Main.hs") file-notify-callback))
funcall-interactively(file-notify-handle-event (file-notify (29 (rename) "/Users/johnw/bae/rings/vignettes/simple_parser_fiat/Main.hs") file-notify-callback))
call-interactively(file-notify-handle-event nil [(file-notify (29 (rename) "/Users/johnw/bae/rings/vignettes/simple_parser_fiat/Main.hs") file-notify-callback)])
command-execute(file-notify-handle-event nil [(file-notify (29 (rename) "/Users/johnw/bae/rings/vignettes/simple_parser_fiat/Main.hs") file-notify-callback)] t)
--8<---------------cut here---------------end--------------->8---
The responsible code, in autorevert.el:
--8<---------------cut here---------------start------------->8---
(defun auto-revert-notify-handler (event)
"Handle an EVENT returned from file notification."
(with-demoted-errors
(let* ((descriptor (car event))
(action (nth 1 event))
(file (nth 2 event))
(file1 (nth 3 event)) ;; Target of `renamed'.
(buffers (gethash descriptor
auto-revert-notify-watch-descriptor-hash-list)))
;; Check, that event is meant for us.
(cl-assert descriptor)
;; Since we watch a directory, a file name must be returned.
(cl-assert (stringp file))
(when (eq action 'renamed) (cl-assert (stringp file1)))
--8<---------------cut here---------------end--------------->8---
However, I'm not performing any file renames. Perhaps this is due to the
renaming of files used when creating backups? What code might be raising a
rename enough without a rename target? From a cursory inspection, it looks
like it might be the file notification logic?
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22859: 25.0.91; Errors in auto-revert-notify-handler
2016-02-29 20:27 bug#22859: 25.0.91; Errors in auto-revert-notify-handler John Wiegley
@ 2016-03-02 10:34 ` Michael Albinus
2016-03-02 22:30 ` John Wiegley
2016-04-10 8:19 ` Michael Albinus
0 siblings, 2 replies; 7+ messages in thread
From: Michael Albinus @ 2016-03-02 10:34 UTC (permalink / raw
To: 22859
John Wiegley <jwiegley@gmail.com> writes:
Hi John,
> However, I'm not performing any file renames. Perhaps this is due to the
> renaming of files used when creating backups?
Yes.
> What code might be raising a rename enough without a rename target?
> From a cursory inspection, it looks like it might be the file
> notification logic?
Yes, it is file notification. The kqueue backend is inferior compared to
the other backends. In case of a file rename, it reports only the source
file name. The other backends report also the target file name.
I've fixed this by propagating a `deleted' event upwards in such
cases. autorevert falls back to the polling mode, as it should. If you
want to avoid this effect, you might set `backup-by-copying' to t.
Could you, pls, check whether the patch works for you? I've pushed it to
the emacs-25 branch.
Best regards, Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22859: 25.0.91; Errors in auto-revert-notify-handler
2016-03-02 10:34 ` Michael Albinus
@ 2016-03-02 22:30 ` John Wiegley
2016-03-03 17:31 ` Michael Albinus
2016-04-10 8:19 ` Michael Albinus
1 sibling, 1 reply; 7+ messages in thread
From: John Wiegley @ 2016-03-02 22:30 UTC (permalink / raw
To: Michael Albinus; +Cc: 22859
>>>>> Michael Albinus <michael.albinus@gmx.de> writes:
> I've fixed this by propagating a `deleted' event upwards in such cases.
> autorevert falls back to the polling mode, as it should. If you want to
> avoid this effect, you might set `backup-by-copying' to t.
But no matter what backup-by-copying is set to, we won't see the failing
rename event, right?
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22859: 25.0.91; Errors in auto-revert-notify-handler
2016-03-02 22:30 ` John Wiegley
@ 2016-03-03 17:31 ` Michael Albinus
0 siblings, 0 replies; 7+ messages in thread
From: Michael Albinus @ 2016-03-03 17:31 UTC (permalink / raw
To: John Wiegley; +Cc: John Wiegley, 22859
John Wiegley <jwiegley@gmail.com> writes:
>> I've fixed this by propagating a `deleted' event upwards in such cases.
>> autorevert falls back to the polling mode, as it should. If you want to
>> avoid this effect, you might set `backup-by-copying' to t.
>
> But no matter what backup-by-copying is set to, we won't see the failing
> rename event, right?
Yes.
Best regards, Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22859: 25.0.91; Errors in auto-revert-notify-handler
2016-03-02 10:34 ` Michael Albinus
2016-03-02 22:30 ` John Wiegley
@ 2016-04-10 8:19 ` Michael Albinus
2016-04-11 18:44 ` John Wiegley
1 sibling, 1 reply; 7+ messages in thread
From: Michael Albinus @ 2016-04-10 8:19 UTC (permalink / raw
To: John Wiegley; +Cc: 22859
Michael Albinus <michael.albinus@gmx.de> writes:
Hi John,
> I've fixed this by propagating a `deleted' event upwards in such
> cases. autorevert falls back to the polling mode, as it should. If you
> want to avoid this effect, you might set `backup-by-copying' to t.
>
> Could you, pls, check whether the patch works for you? I've pushed it to
> the emacs-25 branch.
Do you still want to crosscheck the fix, or could I close the bug?
Best regards, Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22859: 25.0.91; Errors in auto-revert-notify-handler
2016-04-10 8:19 ` Michael Albinus
@ 2016-04-11 18:44 ` John Wiegley
2016-04-12 7:40 ` Michael Albinus
0 siblings, 1 reply; 7+ messages in thread
From: John Wiegley @ 2016-04-11 18:44 UTC (permalink / raw
To: Michael Albinus; +Cc: 22859
>>>>> Michael Albinus <michael.albinus@gmx.de> writes:
> Do you still want to crosscheck the fix, or could I close the bug?
I haven't noticed the problem since you pushed that fix, so it appears
resolved to me.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22859: 25.0.91; Errors in auto-revert-notify-handler
2016-04-11 18:44 ` John Wiegley
@ 2016-04-12 7:40 ` Michael Albinus
0 siblings, 0 replies; 7+ messages in thread
From: Michael Albinus @ 2016-04-12 7:40 UTC (permalink / raw
To: John Wiegley; +Cc: 22859-done
Version: 25.1
John Wiegley <jwiegley@gmail.com> writes:
>> Do you still want to crosscheck the fix, or could I close the bug?
>
> I haven't noticed the problem since you pushed that fix, so it appears
> resolved to me.
Thanks for confirmation, I'm closing the bug.
Best regards, Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-04-12 7:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 20:27 bug#22859: 25.0.91; Errors in auto-revert-notify-handler John Wiegley
2016-03-02 10:34 ` Michael Albinus
2016-03-02 22:30 ` John Wiegley
2016-03-03 17:31 ` Michael Albinus
2016-04-10 8:19 ` Michael Albinus
2016-04-11 18:44 ` John Wiegley
2016-04-12 7:40 ` Michael Albinus
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.