GNU bug report logs - #34252
27.0.50; rmail-get-new-mail fails

Previous Next

Package: emacs;

Reported by: John <jpff <at> codemist.co.uk>

Date: Tue, 29 Jan 2019 21:24:02 UTC

Severity: normal

Found in version 27.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34252 in the body.
You can then email your comments to 34252 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34252; Package emacs. (Tue, 29 Jan 2019 21:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to John <jpff <at> codemist.co.uk>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 29 Jan 2019 21:24:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: John <jpff <at> codemist.co.uk>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; rmail-get-new-mail fails
Date: Tue, 29 Jan 2019 20:57:19 +0000
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34252; Package emacs. (Wed, 30 Jan 2019 00:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 34252 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: John <jpff <at> codemist.co.uk>
Cc: 34252 <at> debbugs.gnu.org
Subject: Re: bug#34252: 27.0.50; rmail-get-new-mail fails
Date: Tue, 29 Jan 2019 19:34:46 -0500
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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34252; Package emacs. (Wed, 30 Jan 2019 18:11:01 GMT) Full text and rfc822 format available.

Message #11 received at 34252 <at> debbugs.gnu.org (full text, mbox):

From: john <jpff <at> codemist.co.uk>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 34252 <at> debbugs.gnu.org
Subject: Re: bug#34252: 27.0.50; rmail-get-new-mail fails
Date: Wed, 30 Jan 2019 18:10:29 +0000 (GMT)
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.
>
>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34252; Package emacs. (Wed, 30 Jan 2019 18:58:02 GMT) Full text and rfc822 format available.

Message #14 received at 34252 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: john <jpff <at> codemist.co.uk>
Cc: rgm <at> gnu.org, 34252 <at> debbugs.gnu.org
Subject: Re: bug#34252: 27.0.50; rmail-get-new-mail fails
Date: Wed, 30 Jan 2019 20:57:14 +0200
> Date: Wed, 30 Jan 2019 18:10:29 +0000 (GMT)
> From: john <jpff <at> codemist.co.uk>
> Cc: 34252 <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34252; Package emacs. (Wed, 30 Jan 2019 19:36:01 GMT) Full text and rfc822 format available.

Message #17 received at 34252 <at> debbugs.gnu.org (full text, mbox):

From: John ff <jpff <at> codemist.co.uk>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rgm <at> gnu.org, 34252 <at> debbugs.gnu.org, john <jpff <at> codemist.co.uk>
Subject: Re: bug#34252: 27.0.50; rmail-get-new-mail fails
Date: Wed, 30 Jan 2019 19:34:44 +0000
[Message part 1 (text/plain, inline)]
Will try soon

⁣Sent from TypeApp ​

On 30 Jan 2019, 18:58, at 18:58, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> Date: Wed, 30 Jan 2019 18:10:29 +0000 (GMT)
>> From: john <jpff <at> codemist.co.uk>
>> Cc: 34252 <at> 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.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34252; Package emacs. (Wed, 30 Jan 2019 20:31:02 GMT) Full text and rfc822 format available.

Message #20 received at 34252 <at> debbugs.gnu.org (full text, mbox):

From: john <jpff <at> codemist.co.uk>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rgm <at> gnu.org, 34252 <at> debbugs.gnu.org
Subject: Re: bug#34252: 27.0.50; rmail-get-new-mail fails
Date: Wed, 30 Jan 2019 20:29:29 +0000 (GMT)
[Message part 1 (text/plain, inline)]
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 <at> codemist.co.uk>
>> Cc: 34252 <at> 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.
>

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34252; Package emacs. (Thu, 31 Jan 2019 03:33:02 GMT) Full text and rfc822 format available.

Message #23 received at 34252 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: john <jpff <at> codemist.co.uk>
Cc: rgm <at> gnu.org, 34252 <at> debbugs.gnu.org
Subject: Re: bug#34252: 27.0.50; rmail-get-new-mail fails
Date: Thu, 31 Jan 2019 05:32:12 +0200
> Date: Wed, 30 Jan 2019 20:29:29 +0000 (GMT)
> From: john <jpff <at> codemist.co.uk>
> cc: rgm <at> gnu.org, 34252 <at> 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.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 01 Feb 2019 09:19:02 GMT) Full text and rfc822 format available.

Notification sent to John <jpff <at> codemist.co.uk>:
bug acknowledged by developer. (Fri, 01 Feb 2019 09:19:02 GMT) Full text and rfc822 format available.

Message #28 received at 34252-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: jpff <at> codemist.co.uk
Cc: rgm <at> gnu.org, 34252-done <at> debbugs.gnu.org
Subject: Re: bug#34252: 27.0.50; rmail-get-new-mail fails
Date: Fri, 01 Feb 2019 11:18:14 +0200
> Date: Thu, 31 Jan 2019 05:32:12 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 34252 <at> debbugs.gnu.org
> 
> > Date: Wed, 30 Jan 2019 20:29:29 +0000 (GMT)
> > From: john <jpff <at> codemist.co.uk>
> > cc: rgm <at> gnu.org, 34252 <at> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 01 Mar 2019 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.