all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#34206: Pdumper giving a segfault
@ 2019-01-26  6:33 Compro Prasad
  2019-01-26  8:06 ` Eli Zaretskii
  2019-01-27  3:52 ` Daniel Colascione
  0 siblings, 2 replies; 10+ messages in thread
From: Compro Prasad @ 2019-01-26  6:33 UTC (permalink / raw)
  To: 34206

Emacs source: official master branch (commit: 7960951d5d)
Emacs config: https://github.com/Compro-Prasad/spacemacs/tree/pdumper-is-in-master
(commit: f5eef2127ad4d)
Spacemacs config: https://github.com/Compro-Prasad/.spacemacs.d
(commit: 8a1eebc65f9a)

Build command: ./configure --enable-checking='yes,glyphs'
--enable-check-lisp-object-type CFLAGS='-O0 -g3' --with-xwidgets &&
make -j2

GDB log: https://pastebin.com/2uMPHCRV

OS: Antergos(Arch Linux)
Compiler: gcc version 8.2.1 20181127 (GCC)

Can't provide further information because Emacs segfaults before it
can load any elisp packages while loading the dump file.

I might be doing something wrong here. Can you please guide me how to
use the pdumper in Emacs or what info topic is it under?

Regards,
Abhishek(Compro) Prasad





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

* bug#34206: Pdumper giving a segfault
  2019-01-26  6:33 bug#34206: Pdumper giving a segfault Compro Prasad
@ 2019-01-26  8:06 ` Eli Zaretskii
  2019-01-26  8:22   ` Eli Zaretskii
  2019-01-26  9:03   ` Compro Prasad
  2019-01-27  3:52 ` Daniel Colascione
  1 sibling, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2019-01-26  8:06 UTC (permalink / raw)
  To: Compro Prasad; +Cc: 34206

> From: Compro Prasad <comproprasad@gmail.com>
> Date: Sat, 26 Jan 2019 12:03:59 +0530
> 
> Emacs source: official master branch (commit: 7960951d5d)
> Emacs config: https://github.com/Compro-Prasad/spacemacs/tree/pdumper-is-in-master
> (commit: f5eef2127ad4d)
> Spacemacs config: https://github.com/Compro-Prasad/.spacemacs.d
> (commit: 8a1eebc65f9a)
> 
> Build command: ./configure --enable-checking='yes,glyphs'
> --enable-check-lisp-object-type CFLAGS='-O0 -g3' --with-xwidgets &&
> make -j2
> 
> GDB log: https://pastebin.com/2uMPHCRV

This seems to indicate your configuration is quite complex, and I
cannot easily understand what are you doing that is different from
the normal build and "emacs -Q" to start Emacs.  In particular, this:

  $ gdb ./src/emacs-27.0.50.11
  Reading symbols from ./src/emacs-27.0.50.11...done.
  (gdb) r --dump-file="/home/compro/.emacs.d/.cache/dumps/spacemacs.pdmp"
  Starting program: /home/compro/Downloads/git.savannah.gnu.org/git/emacs/src/emacs-27.0.50.11 --dump-file="/home/compro/.emacs.d/.cache/dumps/spacemacs.pdmp"

indicates that your pdump file is spacemacs.pdmp, but I don't know how
that file was produced, and I cannot easily understand what is
different in your build procedure from the normal upstream build of
Emacs.

Maybe you should first take this up with then maintainers of the
Compro-Prasad/spacemacs package.

> OS: Antergos(Arch Linux)
> Compiler: gcc version 8.2.1 20181127 (GCC)
> 
> Can't provide further information because Emacs segfaults before it
> can load any elisp packages while loading the dump file.

The backtrace indicates that it segfaults _after_ loading the dump
file, inside the call to init_buffer.

> I might be doing something wrong here. Can you please guide me how to
> use the pdumper in Emacs or what info topic is it under?

There's no difference in how pdump'ed Emacs should be used, it's the
same as you'd use an unexec'ed Emacs.

I suggest to file an issue with the maintainers of
Compro-Prasad/spacemacs.





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

* bug#34206: Pdumper giving a segfault
  2019-01-26  8:06 ` Eli Zaretskii
@ 2019-01-26  8:22   ` Eli Zaretskii
  2019-01-26  9:03   ` Compro Prasad
  1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2019-01-26  8:22 UTC (permalink / raw)
  To: comproprasad; +Cc: 34206

> Date: Sat, 26 Jan 2019 10:06:26 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 34206@debbugs.gnu.org
> 
> I suggest to file an issue with the maintainers of
> Compro-Prasad/spacemacs.

Or maybe report this to the maintainers of syl20bnr/spacemacs from
where you forked yours.





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

* bug#34206: Pdumper giving a segfault
  2019-01-26  8:06 ` Eli Zaretskii
  2019-01-26  8:22   ` Eli Zaretskii
@ 2019-01-26  9:03   ` Compro Prasad
  2019-01-26 10:49     ` Eli Zaretskii
  1 sibling, 1 reply; 10+ messages in thread
From: Compro Prasad @ 2019-01-26  9:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34206

On Sat, Jan 26, 2019 at 1:36 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Compro Prasad <comproprasad@gmail.com>
> > Date: Sat, 26 Jan 2019 12:03:59 +0530
> >
> > Emacs source: official master branch (commit: 7960951d5d)
> > Emacs config: https://github.com/Compro-Prasad/spacemacs/tree/pdumper-is-in-master
> > (commit: f5eef2127ad4d)
> > Spacemacs config: https://github.com/Compro-Prasad/.spacemacs.d
> > (commit: 8a1eebc65f9a)
> >
> > Build command: ./configure --enable-checking='yes,glyphs'
> > --enable-check-lisp-object-type CFLAGS='-O0 -g3' --with-xwidgets &&
> > make -j2
> >
> > GDB log: https://pastebin.com/2uMPHCRV
>
> This seems to indicate your configuration is quite complex, and I
> cannot easily understand what are you doing that is different from
> the normal build and "emacs -Q" to start Emacs.  In particular, this:
>
>   $ gdb ./src/emacs-27.0.50.11
>   Reading symbols from ./src/emacs-27.0.50.11...done.
>   (gdb) r --dump-file="/home/compro/.emacs.d/.cache/dumps/spacemacs.pdmp"
>   Starting program: /home/compro/Downloads/git.savannah.gnu.org/git/emacs/src/emacs-27.0.50.11 --dump-file="/home/compro/.emacs.d/.cache/dumps/spacemacs.pdmp"
>
> indicates that your pdump file is spacemacs.pdmp, but I don't know how
> that file was produced, and I cannot easily understand what is
> different in your build procedure from the normal upstream build of
> Emacs.
I don't know if you can help me but I have some more information on
how the dump might be produced.

https://github.com/Compro-Prasad/spacemacs/blob/pdumper-is-in-master/core/core-dumper.el#L68

I went a bit further and tried executing the following using `C-x C-e`
while running spacemacs:

   (dump-emacs-portable "~/test.pdmp")

It gave me: eval: unsupported object type in dump: window configuration

Is this a bug or I am supposed to run Emacs in batch mode while dumping?





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

* bug#34206: Pdumper giving a segfault
  2019-01-26  9:03   ` Compro Prasad
@ 2019-01-26 10:49     ` Eli Zaretskii
  2019-01-26 15:05       ` Compro Prasad
  2019-01-27  3:50       ` Daniel Colascione
  0 siblings, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2019-01-26 10:49 UTC (permalink / raw)
  To: Compro Prasad; +Cc: 34206

> From: Compro Prasad <comproprasad@gmail.com>
> Date: Sat, 26 Jan 2019 14:33:57 +0530
> Cc: 34206@debbugs.gnu.org
> 
> > > GDB log: https://pastebin.com/2uMPHCRV
> >
> > This seems to indicate your configuration is quite complex, and I
> > cannot easily understand what are you doing that is different from
> > the normal build and "emacs -Q" to start Emacs.  In particular, this:
> >
> >   $ gdb ./src/emacs-27.0.50.11
> >   Reading symbols from ./src/emacs-27.0.50.11...done.
> >   (gdb) r --dump-file="/home/compro/.emacs.d/.cache/dumps/spacemacs.pdmp"
> >   Starting program: /home/compro/Downloads/git.savannah.gnu.org/git/emacs/src/emacs-27.0.50.11 --dump-file="/home/compro/.emacs.d/.cache/dumps/spacemacs.pdmp"
> >
> > indicates that your pdump file is spacemacs.pdmp, but I don't know how
> > that file was produced, and I cannot easily understand what is
> > different in your build procedure from the normal upstream build of
> > Emacs.
> I don't know if you can help me but I have some more information on
> how the dump might be produced.
> 
> https://github.com/Compro-Prasad/spacemacs/blob/pdumper-is-in-master/core/core-dumper.el#L68

I don't think this helps much, as I don't really know anything about
spacemacs and its build procedures.

> I went a bit further and tried executing the following using `C-x C-e`
> while running spacemacs:
> 
>    (dump-emacs-portable "~/test.pdmp")
> 
> It gave me: eval: unsupported object type in dump: window configuration
> 
> Is this a bug or I am supposed to run Emacs in batch mode while dumping?

Yes, dump-emacs-portable can only be invoked in batch mode.





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

* bug#34206: Pdumper giving a segfault
  2019-01-26 10:49     ` Eli Zaretskii
@ 2019-01-26 15:05       ` Compro Prasad
  2019-01-26 15:18         ` Eli Zaretskii
  2019-01-27  3:50       ` Daniel Colascione
  1 sibling, 1 reply; 10+ messages in thread
From: Compro Prasad @ 2019-01-26 15:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34206

On Sat, Jan 26, 2019 at 4:19 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Compro Prasad <comproprasad@gmail.com>
> > Date: Sat, 26 Jan 2019 14:33:57 +0530
> > Cc: 34206@debbugs.gnu.org
> >
> > > > GDB log: https://pastebin.com/2uMPHCRV
> > >
> > > This seems to indicate your configuration is quite complex, and I
> > > cannot easily understand what are you doing that is different from
> > > the normal build and "emacs -Q" to start Emacs.  In particular, this:
> > >
> > >   $ gdb ./src/emacs-27.0.50.11
> > >   Reading symbols from ./src/emacs-27.0.50.11...done.
> > >   (gdb) r --dump-file="/home/compro/.emacs.d/.cache/dumps/spacemacs.pdmp"
> > >   Starting program: /home/compro/Downloads/git.savannah.gnu.org/git/emacs/src/emacs-27.0.50.11 --dump-file="/home/compro/.emacs.d/.cache/dumps/spacemacs.pdmp"
> > >
> > > indicates that your pdump file is spacemacs.pdmp, but I don't know how
> > > that file was produced, and I cannot easily understand what is
> > > different in your build procedure from the normal upstream build of
> > > Emacs.
> > I don't know if you can help me but I have some more information on
> > how the dump might be produced.
> >
> > https://github.com/Compro-Prasad/spacemacs/blob/pdumper-is-in-master/core/core-dumper.el#L68
>
> I don't think this helps much, as I don't really know anything about
> spacemacs and its build procedures.
Spacemacs is just another Emacs configuration. It doesn't mess with
the official Emacs source. This doesn't require any additional build
steps.
> > I went a bit further and tried executing the following using `C-x C-e`
> > while running spacemacs:
> >
> >    (dump-emacs-portable "~/test.pdmp")
> >
> > It gave me: eval: unsupported object type in dump: window configuration
> >
> > Is this a bug or I am supposed to run Emacs in batch mode while dumping?
>
> Yes, dump-emacs-portable can only be invoked in batch mode.
Thanks for the information.

Can you please give a simple example of the best way to dump Emacs and
reload the dump file? I would also appreciate any links to the Emacs
info manual.





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

* bug#34206: Pdumper giving a segfault
  2019-01-26 15:05       ` Compro Prasad
@ 2019-01-26 15:18         ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2019-01-26 15:18 UTC (permalink / raw)
  To: Compro Prasad; +Cc: 34206

> From: Compro Prasad <comproprasad@gmail.com>
> Date: Sat, 26 Jan 2019 20:35:41 +0530
> Cc: 34206@debbugs.gnu.org
> 
> > > https://github.com/Compro-Prasad/spacemacs/blob/pdumper-is-in-master/core/core-dumper.el#L68
> >
> > I don't think this helps much, as I don't really know anything about
> > spacemacs and its build procedures.
> Spacemacs is just another Emacs configuration. It doesn't mess with
> the official Emacs source. This doesn't require any additional build
> steps.

But AFAITCT, it dumps Emacs from a separate file, not from loadup.el,
right?  And that separate file does something before dumping in
addition to what loadup.el does, right?  These extras is what confuses
me.  Granted, when I build Emacs from the master branch, it doesn't
segfault on startup.

> > Yes, dump-emacs-portable can only be invoked in batch mode.
> Thanks for the information.
> 
> Can you please give a simple example of the best way to dump Emacs and
> reload the dump file?

The only way I know of is to clone the Emacs Git's master branch and
build it as described in INSTALL.REPO.

> I would also appreciate any links to the Emacs info manual.

The portable dumping is described in the ELisp manual in the master
branch, see the node "Building Emacs" there.  There's also some
information in the Emacs manual, where the command-line options are
described, and in NEWS.





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

* bug#34206: Pdumper giving a segfault
  2019-01-26 10:49     ` Eli Zaretskii
  2019-01-26 15:05       ` Compro Prasad
@ 2019-01-27  3:50       ` Daniel Colascione
  1 sibling, 0 replies; 10+ messages in thread
From: Daniel Colascione @ 2019-01-27  3:50 UTC (permalink / raw)
  To: Eli Zaretskii, Compro Prasad; +Cc: 34206

On 1/26/19 2:49 AM, Eli Zaretskii wrote:
>> From: Compro Prasad <comproprasad@gmail.com>
>> Date: Sat, 26 Jan 2019 14:33:57 +0530
>> Cc: 34206@debbugs.gnu.org
>>
>>>> GDB log: https://pastebin.com/2uMPHCRV
>>>
>>> This seems to indicate your configuration is quite complex, and I
>>> cannot easily understand what are you doing that is different from
>>> the normal build and "emacs -Q" to start Emacs.  In particular, this:
>>>
>>>    $ gdb ./src/emacs-27.0.50.11
>>>    Reading symbols from ./src/emacs-27.0.50.11...done.
>>>    (gdb) r --dump-file="/home/compro/.emacs.d/.cache/dumps/spacemacs.pdmp"
>>>    Starting program: /home/compro/Downloads/git.savannah.gnu.org/git/emacs/src/emacs-27.0.50.11 --dump-file="/home/compro/.emacs.d/.cache/dumps/spacemacs.pdmp"
>>>
>>> indicates that your pdump file is spacemacs.pdmp, but I don't know how
>>> that file was produced, and I cannot easily understand what is
>>> different in your build procedure from the normal upstream build of
>>> Emacs.
>> I don't know if you can help me but I have some more information on
>> how the dump might be produced.
>>
>> https://github.com/Compro-Prasad/spacemacs/blob/pdumper-is-in-master/core/core-dumper.el#L68
> 
> I don't think this helps much, as I don't really know anything about
> spacemacs and its build procedures.
> 
>> I went a bit further and tried executing the following using `C-x C-e`
>> while running spacemacs:
>>
>>     (dump-emacs-portable "~/test.pdmp")
>>
>> It gave me: eval: unsupported object type in dump: window configuration
>>
>> Is this a bug or I am supposed to run Emacs in batch mode while dumping?
> 
> Yes, dump-emacs-portable can only be invoked in batch mode.

That's not quite true. There's no particular reason it can't be invoked 
in any mode, but as the message indicates, there are some objects that 
pdumper doesn't know how to dump. Packages maintaining these objects 
should add-function to dump-emacs-portable to temporarily make these 
objects disappear while a dump is in progress.

In any case, neither the dump nor load should actually segfault. A 
segfault is a bug.





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

* bug#34206: Pdumper giving a segfault
  2019-01-26  6:33 bug#34206: Pdumper giving a segfault Compro Prasad
  2019-01-26  8:06 ` Eli Zaretskii
@ 2019-01-27  3:52 ` Daniel Colascione
  2019-01-28 12:19   ` Compro Prasad
  1 sibling, 1 reply; 10+ messages in thread
From: Daniel Colascione @ 2019-01-27  3:52 UTC (permalink / raw)
  To: Compro Prasad, 34206

On 1/25/19 10:33 PM, Compro Prasad wrote:
> Emacs source: official master branch (commit: 7960951d5d)
> Emacs config: https://github.com/Compro-Prasad/spacemacs/tree/pdumper-is-in-master
> (commit: f5eef2127ad4d)
> Spacemacs config: https://github.com/Compro-Prasad/.spacemacs.d
> (commit: 8a1eebc65f9a)
> 
> Build command: ./configure --enable-checking='yes,glyphs'
> --enable-check-lisp-object-type CFLAGS='-O0 -g3' --with-xwidgets &&
> make -j2
> 
> GDB log: https://pastebin.com/2uMPHCRV
> 
> OS: Antergos(Arch Linux)
> Compiler: gcc version 8.2.1 20181127 (GCC)
> 
> Can't provide further information because Emacs segfaults before it
> can load any elisp packages while loading the dump file.
> 
> I might be doing something wrong here. Can you please guide me how to
> use the pdumper in Emacs or what info topic is it under?

That looks like a legitimate bug. I don't know anything about spacemacs. 
Can you provide a recipe for reproducing this crash starting from a 
stock master checkout? Thanks.





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

* bug#34206: Pdumper giving a segfault
  2019-01-27  3:52 ` Daniel Colascione
@ 2019-01-28 12:19   ` Compro Prasad
  0 siblings, 0 replies; 10+ messages in thread
From: Compro Prasad @ 2019-01-28 12:19 UTC (permalink / raw)
  To: Daniel Colascione; +Cc: 34206

On Sun, Jan 27, 2019 at 9:22 AM Daniel Colascione <dancol@dancol.org> wrote:
>
> On 1/25/19 10:33 PM, Compro Prasad wrote:
> > Emacs source: official master branch (commit: 7960951d5d)
> > Emacs config: https://github.com/Compro-Prasad/spacemacs/tree/pdumper-is-in-master
> > (commit: f5eef2127ad4d)
> > Spacemacs config: https://github.com/Compro-Prasad/.spacemacs.d
> > (commit: 8a1eebc65f9a)
> >
> > Build command: ./configure --enable-checking='yes,glyphs'
> > --enable-check-lisp-object-type CFLAGS='-O0 -g3' --with-xwidgets &&
> > make -j2
> >
> > GDB log: https://pastebin.com/2uMPHCRV
> >
> > OS: Antergos(Arch Linux)
> > Compiler: gcc version 8.2.1 20181127 (GCC)
> >
> > Can't provide further information because Emacs segfaults before it
> > can load any elisp packages while loading the dump file.
> >
> > I might be doing something wrong here. Can you please guide me how to
> > use the pdumper in Emacs or what info topic is it under?
>
> That looks like a legitimate bug. I don't know anything about spacemacs.
> Can you provide a recipe for reproducing this crash starting from a
> stock master checkout? Thanks.

I fixed it by setting dotspacemacs-editing-style to 'vim from 'hybrid
. You can see it here:
https://github.com/Compro-Prasad/.spacemacs.d/commit/70033fb6c429244d0a72663e8258fe05637f5cfd#diff-64ed6d0a7a4f2eaf33cacc2454a19cffL234

You can clone the repo in the above link to `~/.spacemacs.d` and clone
https://github.com/Compro-Prasad/spacemacs (branch:
pdumper-is-in-master) to `~/.emacs.d`. Then start Emacs(Packages will
be downloaded for the first time). It should work perfectly fine. You
can see the dumping status in `*spacemacs-dumper*` buffer. Then
specify the command:

emacs-27.0.50 --dump-file ~/.emacs.d/.cache/dumps/spacemacs.pdmp

to load the dump. This won't work(will crash) if the
dotspacemacs-editing-style is 'hybrid in `~/.spacemacs.d/init.el`

The emacs 27 executable used was by building from the official master branch.

If you are doubtful about any of the above steps then you can ask me
or ask spacemacs specific questions at
https://gitter.im/syl20bnr/spacemacs .





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

end of thread, other threads:[~2019-01-28 12:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-26  6:33 bug#34206: Pdumper giving a segfault Compro Prasad
2019-01-26  8:06 ` Eli Zaretskii
2019-01-26  8:22   ` Eli Zaretskii
2019-01-26  9:03   ` Compro Prasad
2019-01-26 10:49     ` Eli Zaretskii
2019-01-26 15:05       ` Compro Prasad
2019-01-26 15:18         ` Eli Zaretskii
2019-01-27  3:50       ` Daniel Colascione
2019-01-27  3:52 ` Daniel Colascione
2019-01-28 12:19   ` Compro Prasad

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.