all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#34252: 27.0.50; rmail-get-new-mail fails
@ 2019-01-29 20:57 John
  2019-01-30  0:34 ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: John @ 2019-01-29 20:57 UTC (permalink / raw)
  To: 34252

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 6028 bytes --]


in case of reading a mail box on a nfs-mounted disk

There are two problems;  first there are a number of calls to
string-match and the like with argument proto which is nil.  This
crashes
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
   string-match("^\\(imap\\|pop\\)s?$" nil nil)
   rmail-remote-proto-p(nil)
   rmail-insert-inbox-text(("/var/spool/mail/jpff" "/mnt/snout/home/jpff/mbox") t)
   rmail-get-new-mail-1(nil ("/var/spool/mail/jpff" "/mnt/snout/home/jpff/mbox") nil)
   rmail-get-new-mail(nil)
   funcall-interactively(rmail-get-new-mail nil)
   call-interactively(rmail-get-new-mail nil nil)
   command-execute(rmail-get-new-mail)

The patch below improves things

--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1902,7 +1902,7 @@ rmail-parse-url
            (host  (substring file (or (match-end 2)
                                       (+ 3 (match-end 1))))))
 
-       (if (rmail-remote-proto-p proto)
+       (if (and proto (rmail-remote-proto-p proto))
            (if (not pass)
                (when rmail-remote-password-required
                  (setq got-password (not (rmail-have-password)))
@@ -1913,7 +1913,7 @@ rmail-parse-url
              ;; does not really like it, in spite of the movemail spec.
              (setq file (concat proto "://" user "@" host))))
 
-       (if (rmail-movemail-variant-p 'emacs)
+       (if (and proto (rmail-movemail-variant-p 'emacs))
            (if (string-equal proto "pop")
                (list (concat "po:" user ":" host)
                      proto
@@ -2072,7 +2072,7 @@ rmail-insert-inbox-text
                   ;; If we just read the password, most likely it is
                   ;; wrong.  Otherwise, see if there is a specific
                   ;; reason to think that the problem is a wrong passwd.
-                  (if (and (rmail-remote-proto-p proto)
+                  (if (and proto (rmail-remote-proto-p proto)
                            (or got-password
                                (re-search-forward rmail-remote-password-error
                                                   nil t)))

but still fails.  It reports it is reading the mailbox and there is a
long delay before it returns with a blank buffer looking at RMAIL file
and not reading the mail



In GNU Emacs 27.0.50 (build 77, x86_64-pc-linux-gnu, GTK+ Version 2.24.32)
 of 2019-01-29 built on xenakis
Repository revision: 7a10db87a1ff9a36ff09fcda15cd32f3e719e1b3
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: openSUSE Leap 15.0

Recent messages:
File RMAIL is large (86.8M), really open? (y)es or (n)o or (l)iterally y
Loading dired-add...done
Counting messages...done
Getting mail from /mnt/snout/home/jpff/mbox...
movemail: No locks available for /mnt/snout/home/jpff/mbox
(No new mail has arrived)
0 new messages read
You can run the command ‘rmail-get-new-mail’ with g
0 new messages read
Making completion list...

Configured using:
 'configure --without-gnutls'

Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS GLIB NOTIFY INOTIFY LIBXML2
FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 XDBE XIM THREADS
CANNOT_DUMP GMP

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix

Major mode: RMAIL

Minor modes in effect:
  auto-image-file-mode: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow emacsbug mime-compose mail-alias-menu url-util url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs json map
url-vars shr-color color shr text-property-search svg xml dom
browse-url qp rmailmm message rmc puny seq byte-opt gv bytecomp
byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec
password-cache epa derived epg epg-config gnus-util time-date
mm-decode mm-bodies mm-encode gmm-utils mailheader cl-loaddefs cl-lib
mail-parse rfc2231 rmail rmail-loaddefs mailabbrev flyspell mailalias
mailcrypt mail-extr comint ansi-color ring ispell sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils find-file misearch
multi-isearch elec-pair cal-julian delsel cus-start cus-load
image-file crypt crypt++ crypt+pgp-pub paren view cal-china cal-bahai
cal-islam cal-hebrew lunar solar cal-dst appt diary-lib diary-loaddefs
holidays hol-loaddefs cal-menu easymenu calendar cal-loaddefs time
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
minibuffer cl-preloaded nadvice loaddefs button faces cus-face
macroexp files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
threads inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 117963 9850)
 (symbols 48 10775 1)
 (strings 32 31121 1305)
 (string-bytes 1 1014103)
 (vectors 16 34578)
 (vector-slots 8 400927 23720)
 (floats 8 737 382)
 (intervals 56 841 0)
 (buffers 992 17))

==John ffitch





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

* bug#34252: 27.0.50; rmail-get-new-mail fails
  2019-01-29 20:57 bug#34252: 27.0.50; rmail-get-new-mail fails John
@ 2019-01-30  0:34 ` Glenn Morris
  2019-01-30 18:10   ` john
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2019-01-30  0:34 UTC (permalink / raw)
  To: John; +Cc: 34252

John wrote:

> in case of reading a mail box on a nfs-mounted disk

It's hard to see how that could make a difference to Rmail.

> --- a/lisp/mail/rmail.el
> +++ b/lisp/mail/rmail.el
> @@ -1902,7 +1902,7 @@ rmail-parse-url
>             (host  (substring file (or (match-end 2)
>                                        (+ 3 (match-end 1))))))
>  
> -       (if (rmail-remote-proto-p proto)
> +       (if (and proto (rmail-remote-proto-p proto))

It's not possible for proto to be nil here.

>             (if (not pass)
>                 (when rmail-remote-password-required
>                   (setq got-password (not (rmail-have-password)))
> @@ -1913,7 +1913,7 @@ rmail-parse-url
>               ;; does not really like it, in spite of the movemail spec.
>               (setq file (concat proto "://" user "@" host))))
>  
> -       (if (rmail-movemail-variant-p 'emacs)
> +       (if (and proto (rmail-movemail-variant-p 'emacs))

Or here.

>             (if (string-equal proto "pop")
>                 (list (concat "po:" user ":" host)
>                       proto
> @@ -2072,7 +2072,7 @@ rmail-insert-inbox-text
>                    ;; If we just read the password, most likely it is
>                    ;; wrong.  Otherwise, see if there is a specific
>                    ;; reason to think that the problem is a wrong passwd.
> -                  (if (and (rmail-remote-proto-p proto)
> +                  (if (and proto (rmail-remote-proto-p proto)

Here I think you may be correct.






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

* bug#34252: 27.0.50; rmail-get-new-mail fails
  2019-01-30  0:34 ` Glenn Morris
@ 2019-01-30 18:10   ` john
  2019-01-30 18:57     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: john @ 2019-01-30 18:10 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 34252

This could be due to a kernel/NFS problem but te effect on using rmail for 
my user-base is a real problem.  The problems with proto being nil in
rmail-remote-proto-p is clearly wrong and despite your statement it does 
happen to me on two diffrent computers/users attempting to read mail in 
emacs via rmail.

This backtrace was before I changed anything

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
    string-match("^\\(imap\\|pop\\)s?$" nil nil)
    rmail-remote-proto-p(nil)
    rmail-insert-inbox-text(("/var/spool/mail/jpff" 
"/mnt/snout/home/jpff/mbox")
t)
    rmail-get-new-mail-1(nil ("/var/spool/mail/jpff"
"/mnt/snout/home/jpff/mbox") nil)
    rmail-get-new-mail(nil)
    funcall-interactively(rmail-get-new-mail nil)
    call-interactively(rmail-get-new-mail nil nil)
    command-execute(rmail-get-new-mail)

Note argument to rmail-remote-proto-p is nil.  "/var/spool/mail/jpff"
is a local file and is always zero length.  "/mnt/snout/home/jpff/mbox" is 
mounted from a Debian system using NFS version 3


The NFS issue is described in 
https://utcc.utoronto.ca/~cks/space/blog/linux/KernelNFSPageBug
which someone pointed me at....

Thank you for your attention

==John ffitch


  On Tue, 29 Jan 2019, Glenn Morris wrote:

> John wrote:
>
>> in case of reading a mail box on a nfs-mounted disk
>
> It's hard to see how that could make a difference to Rmail.
>
>> --- a/lisp/mail/rmail.el
>> +++ b/lisp/mail/rmail.el
>> @@ -1902,7 +1902,7 @@ rmail-parse-url
>>             (host  (substring file (or (match-end 2)
>>                                        (+ 3 (match-end 1))))))
>>
>> -       (if (rmail-remote-proto-p proto)
>> +       (if (and proto (rmail-remote-proto-p proto))
>
> It's not possible for proto to be nil here.
>
>>             (if (not pass)
>>                 (when rmail-remote-password-required
>>                   (setq got-password (not (rmail-have-password)))
>> @@ -1913,7 +1913,7 @@ rmail-parse-url
>>               ;; does not really like it, in spite of the movemail spec.
>>               (setq file (concat proto "://" user "@" host))))
>>
>> -       (if (rmail-movemail-variant-p 'emacs)
>> +       (if (and proto (rmail-movemail-variant-p 'emacs))
>
> Or here.
>
>>             (if (string-equal proto "pop")
>>                 (list (concat "po:" user ":" host)
>>                       proto
>> @@ -2072,7 +2072,7 @@ rmail-insert-inbox-text
>>                    ;; If we just read the password, most likely it is
>>                    ;; wrong.  Otherwise, see if there is a specific
>>                    ;; reason to think that the problem is a wrong passwd.
>> -                  (if (and (rmail-remote-proto-p proto)
>> +                  (if (and proto (rmail-remote-proto-p proto)
>
> Here I think you may be correct.
>
>





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

* bug#34252: 27.0.50; rmail-get-new-mail fails
  2019-01-30 18:10   ` john
@ 2019-01-30 18:57     ` Eli Zaretskii
  2019-01-30 19:34       ` John ff
  2019-01-30 20:29       ` john
  0 siblings, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2019-01-30 18:57 UTC (permalink / raw)
  To: john; +Cc: 34252

> Date: Wed, 30 Jan 2019 18:10:29 +0000 (GMT)
> From: john <jpff@codemist.co.uk>
> Cc: 34252@debbugs.gnu.org
> 
> This could be due to a kernel/NFS problem but te effect on using rmail for 
> my user-base is a real problem.  The problems with proto being nil in
> rmail-remote-proto-p is clearly wrong and despite your statement it does 
> happen to me on two diffrent computers/users attempting to read mail in 
> emacs via rmail.

If you leave only the one change in the place where Glenn said proto
could be nil, and revert the changes in the other two places, does the
problem still happen to you?

Thanks.





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

* bug#34252: 27.0.50; rmail-get-new-mail fails
  2019-01-30 18:57     ` Eli Zaretskii
@ 2019-01-30 19:34       ` John ff
  2019-01-30 20:29       ` john
  1 sibling, 0 replies; 8+ messages in thread
From: John ff @ 2019-01-30 19:34 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34252, john

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

Will try soon

⁣Sent from TypeApp ​

On 30 Jan 2019, 18:58, at 18:58, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Wed, 30 Jan 2019 18:10:29 +0000 (GMT)
>> From: john <jpff@codemist.co.uk>
>> Cc: 34252@debbugs.gnu.org
>>
>> This could be due to a kernel/NFS problem but te effect on using
>rmail for
>> my user-base is a real problem.  The problems with proto being nil in
>> rmail-remote-proto-p is clearly wrong and despite your statement it
>does
>> happen to me on two diffrent computers/users attempting to read mail
>in
>> emacs via rmail.
>
>If you leave only the one change in the place where Glenn said proto
>could be nil, and revert the changes in the other two places, does the
>problem still happen to you?
>
>Thanks.

[-- Attachment #2: Type: text/html, Size: 1406 bytes --]

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

* bug#34252: 27.0.50; rmail-get-new-mail fails
  2019-01-30 18:57     ` Eli Zaretskii
  2019-01-30 19:34       ` John ff
@ 2019-01-30 20:29       ` john
  2019-01-31  3:32         ` Eli Zaretskii
  1 sibling, 1 reply; 8+ messages in thread
From: john @ 2019-01-30 20:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34252

[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]

Just changing lin 2075 it does not crash but after quite a time it says

Getting mail from /mnt/snout/home/jpff/mbox...
movemail: No locks available for /mnt/snout/home/jpff/mbox
(No new mail has arrived)
0 new messages read
You can run the command ‘rmail-get-new-mail’ with g
0 new messages read

and no mail is read

If I understand the message the problem relates to fie locking somewhee.

I tried earlier o explain this used to work but after a hardware/software 
uorade on the server it failed.

==John ff

On Wed, 30 Jan 2019, Eli Zaretskii wrote:

>> Date: Wed, 30 Jan 2019 18:10:29 +0000 (GMT)
>> From: john <jpff@codemist.co.uk>
>> Cc: 34252@debbugs.gnu.org
>>
>> This could be due to a kernel/NFS problem but te effect on using rmail for
>> my user-base is a real problem.  The problems with proto being nil in
>> rmail-remote-proto-p is clearly wrong and despite your statement it does
>> happen to me on two diffrent computers/users attempting to read mail in
>> emacs via rmail.
>
> If you leave only the one change in the place where Glenn said proto
> could be nil, and revert the changes in the other two places, does the
> problem still happen to you?
>
> Thanks.
>

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

* bug#34252: 27.0.50; rmail-get-new-mail fails
  2019-01-30 20:29       ` john
@ 2019-01-31  3:32         ` Eli Zaretskii
  2019-02-01  9:18           ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2019-01-31  3:32 UTC (permalink / raw)
  To: john; +Cc: 34252

> Date: Wed, 30 Jan 2019 20:29:29 +0000 (GMT)
> From: john <jpff@codemist.co.uk>
> cc: rgm@gnu.org, 34252@debbugs.gnu.org
> 
> Just changing lin 2075 it does not crash but after quite a time it says
> 
> Getting mail from /mnt/snout/home/jpff/mbox...
> movemail: No locks available for /mnt/snout/home/jpff/mbox
> (No new mail has arrived)
> 0 new messages read
> You can run the command ‘rmail-get-new-mail’ with g
> 0 new messages read
> 
> and no mail is read
> 
> If I understand the message the problem relates to fie locking somewhee.

Maybe so, but that's an entirely different problem, I think.





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

* bug#34252: 27.0.50; rmail-get-new-mail fails
  2019-01-31  3:32         ` Eli Zaretskii
@ 2019-02-01  9:18           ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2019-02-01  9:18 UTC (permalink / raw)
  To: jpff; +Cc: 34252-done

> Date: Thu, 31 Jan 2019 05:32:12 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 34252@debbugs.gnu.org
> 
> > Date: Wed, 30 Jan 2019 20:29:29 +0000 (GMT)
> > From: john <jpff@codemist.co.uk>
> > cc: rgm@gnu.org, 34252@debbugs.gnu.org
> > 
> > Just changing lin 2075 it does not crash but after quite a time it says
> > 
> > Getting mail from /mnt/snout/home/jpff/mbox...
> > movemail: No locks available for /mnt/snout/home/jpff/mbox
> > (No new mail has arrived)
> > 0 new messages read
> > You can run the command ‘rmail-get-new-mail’ with g
> > 0 new messages read
> > 
> > and no mail is read
> > 
> > If I understand the message the problem relates to fie locking somewhee.
> 
> Maybe so, but that's an entirely different problem, I think.

I've now installed the change around line 2075, and I'm closing the
bug.

Thanks.





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

end of thread, other threads:[~2019-02-01  9:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-29 20:57 bug#34252: 27.0.50; rmail-get-new-mail fails John
2019-01-30  0:34 ` Glenn Morris
2019-01-30 18:10   ` john
2019-01-30 18:57     ` Eli Zaretskii
2019-01-30 19:34       ` John ff
2019-01-30 20:29       ` john
2019-01-31  3:32         ` Eli Zaretskii
2019-02-01  9:18           ` Eli Zaretskii

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.