GNU bug report logs - #30738
Invalid timezone (tzalloc failure) treated as out-of-memory

Previous Next

Package: emacs;

Reported by: Valery Ushakov <uwe <at> stderr.spb.ru>

Date: Tue, 6 Mar 2018 23:34:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Valery Ushakov <uwe <at> stderr.spb.ru>
Subject: bug#30738: closed (Re: Invalid timezone (tzalloc failure) treated
 as out-of-memory)
Date: Sun, 11 Mar 2018 08:34:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#30738: Invalid timezone (tzalloc failure) treated as out-of-memory

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 30738 <at> debbugs.gnu.org.

-- 
30738: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30738
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Valery Ushakov <uwe <at> stderr.spb.ru>
Cc: 30738-done <at> debbugs.gnu.org
Subject: Re: Invalid timezone (tzalloc failure) treated as out-of-memory
Date: Sun, 11 Mar 2018 00:33:03 -0800
[Message part 3 (text/plain, inline)]
[resending, I hope to the right place this time]

Thanks for reporting the problem. I have installed the attached two patches,
which I think should fix the problem so I'm closing the bug report. Please give
them a try on NetBSD (as I typically don't use NetBSD).

[0001-Fix-minor-timezone-memory-leak.patch (text/x-patch, attachment)]
[0001-Port-to-NetBSD-tzalloc.patch (text/x-patch, attachment)]
[Message part 6 (message/rfc822, inline)]
From: Valery Ushakov <uwe <at> stderr.spb.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: Invalid timezone (tzalloc failure) treated as out-of-memory
Date: Wed, 7 Mar 2018 01:53:46 +0300
Emacs 25 treats tzalloc(3) failure as out-of-memory condition.
E.g. when an invalid timezone is specified, it fails to start with:

$ TZ=FOOBAR emacs -nw
emacs: Memory exhausted--use M-x save-some-buffers then exit and restart Emacs


The code in tzlookup() also assumes that tzalloc(3) understands the
direct zone specification in the name/offset format.  I haven't
checked tzcode history, but this support is only a few years old
(around 2014, I'd estimate).  E.g. NetBSD-6 has older tzcode(3) that
doesn't support this feature.  This leads to a lot of "Memory
exhausted" errors when trying to use e.g. vc.el

  "encode-time" (0xffffa2d4)
  "apply" (0xffffa3fc)
  "vc-cvs-parse-entry" (0xffffa718)
  "vc-cvs-registered" (0xffffa9b0)
  "progn" (0xffffab44)
  "if" (0xffffac24)
  "vc-cvs-registered" (0xffffae7c)
  "apply" (0xffffae78)
  "vc-call-backend" (0xffffb188)
  0x1c65360 PVEC_COMPILED
  "mapc" (0xffffb5c8)
  "vc-registered" (0xffffb8d8)
  "vc-backend" (0xffffbbe8)
  "vc-refresh-state" (0xffffbfa0)
  "run-hooks" (0xffffc08c)
  "after-find-file" (0xffffc3b4)
  ...

-uwe



This bug report was last modified 7 years and 68 days ago.

Previous Next


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