unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Build failure for Emacs master
Date: Thu, 14 Apr 2016 19:40:47 +0100	[thread overview]
Message-ID: <vz1fuuo6nkg.fsf@gmail.com> (raw)
In-Reply-To: 83k2k0dqtg.fsf@gnu.org

On Thu 14 Apr 2016, Eli Zaretskii wrote:

>> From: Andy Moreton <andrewjmoreton@gmail.com>
>> Date: Thu, 14 Apr 2016 18:06:02 +0100
>> 
>> > Also, can you look in GDB at the buffer text, before it is written to
>> > disk, and tell how far, in bytes, is the first null from the beginning
>> > of buffer text?  (Let me know if you need advice for how to do that
>> > with GDB commands.)
>> 
>> Please give precise instructions as I have no idea how to do that.
>
> Put  breakpoint in Fwrite_region, and when it breaks, type these
> commands:
>
>  (gdb) p/x &current_buffer->text->beg[0]
>  (gdb) find /b9 current_buffer->text->beg,current_buffer->text->beg+GPT_BYTE-1,0
>
> The first one should display the address of the beginning of buffer
> text.  The second one should display up to 9 places where there are
> nulls in the buffer, I expect them to be consecutive addresses.  The
> first one of those is the address I'm looking for.

Starting from a tree without a loaddefs.el file, the breakpoint is hit
twice. The first time is when the skeleton loaddefs.el is written, that
contains just the comemnt header and the trailer with the local
variable settings. The second time is when it writes the completed
autoloads buffer:

Thread 1 hit Breakpoint 1, Fwrite_region (start=..., end=..., filename=..., append=..., visit=..., lockname=..., mustbenew=...) at ../../src/fileio.c:4678
4678	  return write_region (start, end, filename, append, visit, lockname, mustbenew,
(gdb) p/x &current_buffer->text->beg[0]
$4 = 0x65a0000
(gdb) find /b9 current_buffer->text->beg,current_buffer->text->beg+GPT_BYTE-1,0
0x66c36b4
1 pattern found.
(gdb) 

>> > The corruption is caused by inserting and deleting text into/from
>> > the buffer, as part as producing the autoload forms.
>> 
>> That wasn't at all obvious to me without some testing: it could easily
>> have been caused by problems serialising the buffer to disk.
>
> There's no serializing, buffer text is (almost) a linear array of
> bytes.  (Or do you mean encoding?)

I meant any of the processing to get from content in memory to bits on
spinning rust. That can include marshalling, encoding, flushing buffers
etc. (not all of which apply here).

>> If I start from a completely clean tree (after "git clean -Xdf") and
>> then copy the working loaddefs.el (produced above) to ldefs-boot.el,
>> then a full bootstrap succeeds, and the resulting loaddefs.el is good.
>
> Are you saying that loaddefs.el is corrupted because the previous
> loaddefs.el was already corrupted?  If so, the corruption is not
> really reproducible, is it?  What happens if you manually correct
> loaddefs.el (e.g., by bringing a copy from another build), and then
> try building without "git clean"?

The whole purpose of starting from a clean tree is to ensure that there
is no interference from a previous failed build. batch-update-autoloads
updates loaddefs.el in place if that file already exists, so if a
previous build has left a corrupted version then subsequent builds will
fail.

My point was that replacing ldefs-boot.el with an up to date copy of
loaddefs.el stopped the corruption. The bootstrap-emacs.exe built using
the udpated ldefs-boot.exe produced a working loaddefs.el.

    AndyM




  reply	other threads:[~2016-04-14 18:40 UTC|newest]

Thread overview: 119+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 22:11 Build failure for Emacs master Angelo Graziosi
2016-02-23 23:14 ` Paul Eggert
2016-02-24  0:23   ` Angelo Graziosi
2016-02-24  3:42 ` Eli Zaretskii
2016-02-24  9:36   ` Angelo Graziosi
2016-02-24 10:20     ` Angelo Graziosi
2016-02-24 17:37       ` Eli Zaretskii
2016-02-24 22:20         ` Angelo Graziosi
2016-02-25 16:43           ` Eli Zaretskii
2016-03-04 21:50             ` Angelo Graziosi
2016-03-05  7:25               ` Eli Zaretskii
2016-03-05 13:53                 ` Angelo Graziosi
2016-03-05 20:59                 ` Angelo Graziosi
2016-03-06  3:35                   ` Eli Zaretskii
2016-03-06 16:55                     ` Eli Zaretskii
2016-03-06 22:00                       ` Angelo Graziosi
2016-03-06 17:37                     ` Andy Moreton
2016-03-06 17:54                       ` Eli Zaretskii
2016-04-12  0:36                 ` Angelo Graziosi
2016-04-12 11:36                   ` Phillip Lord
2016-04-12 20:54                     ` Angelo Graziosi
2016-04-12 22:52                       ` MS-Windows warnings (was build failure) " Paul Eggert
2016-04-12 23:36                         ` Angelo Graziosi
2016-04-13  5:49                         ` Yuri Khan
2016-04-13 15:26                         ` Eli Zaretskii
2016-04-13 18:06                           ` Paul Eggert
2016-04-13 19:16                             ` Eli Zaretskii
2016-04-19 15:46                         ` Davis Herring
2016-04-19 16:04                           ` Eli Zaretskii
2016-04-19 19:19                             ` Davis Herring
2016-04-12 15:28                   ` Build failure " Eli Zaretskii
2016-04-12 21:00                     ` Angelo Graziosi
2016-04-12 21:49                     ` Andy Moreton
2016-04-13  2:37                       ` Eli Zaretskii
2016-04-13 23:11                         ` Andy Moreton
2016-04-14  7:32                           ` Phillip Lord
2016-04-14 16:06                             ` Paul Eggert
2016-04-14 16:19                               ` Eli Zaretskii
2016-04-14 16:50                                 ` O_BINARY and emacs_open (was: Build failure for Emacs master) Paul Eggert
2016-04-15 11:08                               ` Build failure for Emacs master Phillip Lord
2016-04-15 14:40                                 ` Eli Zaretskii
2016-04-18 19:08                                   ` Phillip Lord
2016-04-18 19:33                                     ` Eli Zaretskii
2016-04-18 20:05                                       ` Phillip Lord
2016-04-18 21:10                                         ` Paul Eggert
2016-04-20  8:18                                           ` Phillip Lord
2016-04-20 15:05                                             ` Eli Zaretskii
2016-04-20 16:55                                               ` Phillip Lord
2016-04-20 17:41                                                 ` Eli Zaretskii
2016-04-20 17:59                                                 ` Andy Moreton
2016-04-21 10:46                                                   ` Phillip Lord
2016-04-14 16:35                           ` Eli Zaretskii
2016-04-14 17:06                             ` Andy Moreton
2016-04-14 17:48                               ` Eli Zaretskii
2016-04-14 18:40                                 ` Andy Moreton [this message]
2016-04-14 19:31                                   ` Eli Zaretskii
2016-04-14 20:30                                     ` Andy Moreton
2016-04-15  7:29                                       ` Eli Zaretskii
2016-04-15  8:18                                         ` Andy Moreton
2016-04-15 14:38                                           ` Eli Zaretskii
2016-04-15 15:36                                             ` Andy Moreton
2016-04-18  8:31                                             ` Angelo Graziosi
2016-04-18 18:30                                               ` Eli Zaretskii
2016-04-18 23:48                                                 ` Andy Moreton
2016-04-19  9:58                                                 ` Angelo Graziosi
2016-04-19 14:39                                                   ` Eli Zaretskii
2016-04-19 21:15                                                     ` Angelo Graziosi
2016-04-19 21:18                                                     ` Angelo Graziosi
2016-04-19 21:20                                                     ` Angelo Graziosi
2016-04-20  0:26                                                       ` Paul Eggert
2016-04-20 14:25                                                         ` Angelo Graziosi
2016-04-12 22:42                     ` Angelo Graziosi
2016-04-13 20:12                     ` Angelo Graziosi
2016-04-13 21:32                       ` Paul Eggert
2016-04-13 22:00                         ` Angelo Graziosi
2016-04-14  1:31                           ` Paul Eggert
2016-04-14  8:03                             ` Angelo Graziosi
2016-04-14 15:30                               ` Eli Zaretskii
2016-04-14 15:58                                 ` Building Emacs on MSYS2 (was: Build failure for Emacs master) Óscar Fuentes
2016-04-14 16:09                                   ` Building Emacs on MSYS2 Paul Eggert
2016-04-14 16:13                                     ` Óscar Fuentes
2016-04-14 16:21                                       ` Eli Zaretskii
2016-04-14 16:46                                         ` Óscar Fuentes
2016-04-14 17:26                                           ` Eli Zaretskii
2016-04-14 20:09                                             ` Óscar Fuentes
2016-04-15 15:03                                               ` Paul Eggert
2016-04-15 15:37                                                 ` Óscar Fuentes
2016-04-15 17:30                                                   ` Paul Eggert
2016-04-15 17:58                                                     ` Óscar Fuentes
2016-04-15 19:15                                                       ` Paul Eggert
2016-04-15 19:40                                                         ` Óscar Fuentes
2016-04-15 20:03                                                           ` Eli Zaretskii
2016-04-15 20:20                                                             ` Óscar Fuentes
2016-04-15 20:49                                                               ` Eli Zaretskii
2016-04-15 21:37                                                               ` Stephen Leake
2016-04-15 22:11                                                                 ` Óscar Fuentes
2016-04-16  6:42                                                                   ` Eli Zaretskii
2016-04-17 21:46                                                                     ` Fixing imagemagick on W32 Stephen Leake
2016-04-18  2:28                                                                       ` Eli Zaretskii
2016-04-16  6:30                                                                 ` Building Emacs on MSYS2 Eli Zaretskii
2016-04-16 12:17                                                                   ` Stephen Leake
2016-04-16 12:40                                                                     ` Eli Zaretskii
2016-04-16 20:34                                                                       ` png in emacs 25 mingw64 Stephen Leake
2016-04-16 21:02                                                                         ` Stephen Leake
2016-04-17  2:46                                                                           ` Eli Zaretskii
2016-04-17  2:45                                                                         ` Eli Zaretskii
2016-04-18 12:32                                                                 ` Building Emacs on MSYS2 Phillip Lord
2016-04-15 19:42                                                       ` Stefan Monnier
2016-04-15 20:17                                                         ` Óscar Fuentes
2016-04-15 21:22                                                           ` Stefan Monnier
2016-04-14 16:15                                   ` Building Emacs on MSYS2 (was: Build failure for Emacs master) Eli Zaretskii
2016-04-14 16:43                                     ` Building Emacs on MSYS2 Óscar Fuentes
2016-04-14 17:35                                       ` Eli Zaretskii
2016-04-14 16:36                             ` Build failure for Emacs master Angelo Graziosi
2016-04-14 16:39                               ` Paul Eggert
2016-04-14  1:38                         ` Stefan Monnier
2016-04-14  2:04                           ` John Wiegley
2016-04-14 14:41                           ` Paul Eggert
2016-02-24 17:31     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vz1fuuo6nkg.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).