unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33709: Hang when compiled with --coverage and gcc 7.3
@ 2018-12-11 18:59 Glenn Morris
  2018-12-11 19:27 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Glenn Morris @ 2018-12-11 18:59 UTC (permalink / raw)
  To: 33709

Package: emacs
Version: 27.0.50

The Emacs hydra jobset at https://hydra.nixos.org/jobset/gnu/emacs-trunk
was recently updated to a more recent version of the Nix package
collection. Ever since then, the "coverage" job (which is the one that
runs "make check") has timed out after spending hours failing to
compiled the first test .el file.

I have reproduced the problem on RHEL 7.6 as follows:

bootstrap as normal
./make-dist --snapshot --no-check --no-changelog --no-compress
tar xvf ../emacs-27.0.50.tar
cd emacs-27.0.50

scl enable devtoolset-7  # this enables gcc 7.3.1 as the default compiler
export CFLAGS=--coverage
./configure --without-all --without-x --without-libgmp
make -j8

The build completes fine, but now eg:

./src/emacs --help

never exits. It prints the usage message, then hangs.





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

* bug#33709: Hang when compiled with --coverage and gcc 7.3
  2018-12-11 18:59 bug#33709: Hang when compiled with --coverage and gcc 7.3 Glenn Morris
@ 2018-12-11 19:27 ` Eli Zaretskii
  2018-12-11 19:46   ` Glenn Morris
  2018-12-28  4:06 ` Paul Eggert
  2022-01-29 15:18 ` Lars Ingebrigtsen
  2 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2018-12-11 19:27 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 33709

> From: Glenn Morris <rgm@gnu.org>
> Date: Tue, 11 Dec 2018 13:59:34 -0500
> 
> The Emacs hydra jobset at https://hydra.nixos.org/jobset/gnu/emacs-trunk
> was recently updated to a more recent version of the Nix package
> collection. Ever since then, the "coverage" job (which is the one that
> runs "make check") has timed out after spending hours failing to
> compiled the first test .el file.

Why do we use --coverage when running the test suite?

> bootstrap as normal
> ./make-dist --snapshot --no-check --no-changelog --no-compress
> tar xvf ../emacs-27.0.50.tar
> cd emacs-27.0.50
> 
> scl enable devtoolset-7  # this enables gcc 7.3.1 as the default compiler
> export CFLAGS=--coverage
> ./configure --without-all --without-x --without-libgmp
> make -j8
> 
> The build completes fine, but now eg:
> 
> ./src/emacs --help
> 
> never exits. It prints the usage message, then hangs.

"Hangs" as in "infloops"?  If so, where does it infloop?
Or does "hangs" mean something else here?

Thanks.





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

* bug#33709: Hang when compiled with --coverage and gcc 7.3
  2018-12-11 19:27 ` Eli Zaretskii
@ 2018-12-11 19:46   ` Glenn Morris
  2018-12-11 20:37     ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2018-12-11 19:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 33709

Eli Zaretskii wrote:

> Why do we use --coverage when running the test suite?

I used the pre-existing, standard hydra "coverage" job for make check.
It goes on to make this kind of report.

https://hydra.nixos.org/build/85820625/download/2/coverage/

>> never exits. It prints the usage message, then hangs.
>
> "Hangs" as in "infloops"?  If so, where does it infloop?
> Or does "hangs" mean something else here?

I do give a recipe in the hope that others can investigate the issue.
Anyway, the Emacs process uses 100% CPU, apparently doing nothing.
strace shows nothing. I managed to get the following from gdb.
The only relevant link I found was
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83074
This is all above my pay grade.

#0  0x00000000007bd1b2 in gcov_do_dump ()
No symbol table info available.
#1  0x00000000007be562 in __gcov_exit ()
No symbol table info available.
#2  0x00000000007bc42c in _GLOBAL__sub_D_00100_1_set_permissions.c ()
    at set-permissions.c:847
No locals.
#3  0x00007ffff7de73b7 in _dl_fini ()
   from /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/ld-linux-x86-64.so.2
No symbol table info available.
#4  0x00007ffff6e2c351 in __run_exit_handlers ()
   from /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6
No symbol table info available.
#5  0x00007ffff6e2c43a in exit ()
   from /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6
No symbol table info available.
#6  0x00000000005768a7 in main (argc=2, argv=0x7fffffff3c58) at emacs.c:992
        i = 12
        stack_bottom_variable = 0xb01045 <pure+742821>
        do_initial_setlocale = true
        dumping = false
        skip_args = 1
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = 0x0
        rlim = {rlim_cur = 33554432, rlim_max = 18446744073709551615}
        sockfd = 0





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

* bug#33709: Hang when compiled with --coverage and gcc 7.3
  2018-12-11 19:46   ` Glenn Morris
@ 2018-12-11 20:37     ` Glenn Morris
  2018-12-13 19:40       ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2018-12-11 20:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 33709


No such issue with gcc 6.3.1.
Perhaps/probably it is a gcc bug.
I'm hoping Paul will stop by and work one of his "Port to gcc XXX"
wonders as a work around... :)





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

* bug#33709: Hang when compiled with --coverage and gcc 7.3
  2018-12-11 20:37     ` Glenn Morris
@ 2018-12-13 19:40       ` Glenn Morris
  2018-12-13 19:54         ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2018-12-13 19:40 UTC (permalink / raw)
  To: 33709


On hydra, I had to drop all the way back to gcc 4.8 for this issue to go
away. It still hung with gcc 5.5.0 (https://hydra.nixos.org/build/85827904)
and 6.4.0 (https://hydra.nixos.org/build/85827876).





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

* bug#33709: Hang when compiled with --coverage and gcc 7.3
  2018-12-13 19:40       ` Glenn Morris
@ 2018-12-13 19:54         ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2018-12-13 19:54 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 33709

> From: Glenn Morris <rgm@gnu.org>
> Date: Thu, 13 Dec 2018 14:40:33 -0500
> 
> On hydra, I had to drop all the way back to gcc 4.8 for this issue to go
> away. It still hung with gcc 5.5.0 (https://hydra.nixos.org/build/85827904)
> and 6.4.0 (https://hydra.nixos.org/build/85827876).

Was GCC 4.8 the version used on hydra before you upgraded to 7.4?

I hope Paul will look at this, but personally I'm very surprised that
"--coverage" at all works in a dumped Emacs, given the way it's
triggered (ctors and dtors).  It would be nice to have it working, of
course, if that's feasible.





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

* bug#33709: Hang when compiled with --coverage and gcc 7.3
  2018-12-11 18:59 bug#33709: Hang when compiled with --coverage and gcc 7.3 Glenn Morris
  2018-12-11 19:27 ` Eli Zaretskii
@ 2018-12-28  4:06 ` Paul Eggert
  2020-08-31 10:36   ` Stefan Kangas
  2022-01-29 15:18 ` Lars Ingebrigtsen
  2 siblings, 1 reply; 10+ messages in thread
From: Paul Eggert @ 2018-12-28  4:06 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 33709

I'm surprised that --coverage ever worked in a dumped emacs. I think libgcov 
uses the dynamic linker's malloc (so Emacs has *three* malloc implementations) 
and our trick for switching from the Emacs malloc in temacs to the system malloc 
in bootstrap-emacs won't work for memory allocated for --coverage. 
Unfortunately, the libgcov actions do not seem to be easy to disable in temacs 
and re-enable in bootstrap-emacs.

I suggest that we just say this combination isn't supported; if you want to 
build Emacs with gcc --coverage you can configure with CANNOT_DUMP=yes.

If the portable dumper ever gets working, --coverage should be easy to support, 
of course.





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

* bug#33709: Hang when compiled with --coverage and gcc 7.3
  2018-12-28  4:06 ` Paul Eggert
@ 2020-08-31 10:36   ` Stefan Kangas
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Kangas @ 2020-08-31 10:36 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Glenn Morris, 33709

Paul Eggert <paul.eggert@verizon.net> writes:

> I'm surprised that --coverage ever worked in a dumped emacs. I think libgcov
> uses the dynamic linker's malloc (so Emacs has *three* malloc implementations)
> and our trick for switching from the Emacs malloc in temacs to the system malloc
> in bootstrap-emacs won't work for memory allocated for
> --coverage. Unfortunately, the libgcov actions do not seem to be easy to disable
> in temacs and re-enable in bootstrap-emacs.
>
> I suggest that we just say this combination isn't supported; if you want to
> build Emacs with gcc --coverage you can configure with CANNOT_DUMP=yes.
>
> If the portable dumper ever gets working, --coverage should be easy to support,
> of course.

(That was 1.5 years ago.)

Any updates here now that we have the portable dumper?  Thanks.





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

* bug#33709: Hang when compiled with --coverage and gcc 7.3
  2018-12-11 18:59 bug#33709: Hang when compiled with --coverage and gcc 7.3 Glenn Morris
  2018-12-11 19:27 ` Eli Zaretskii
  2018-12-28  4:06 ` Paul Eggert
@ 2022-01-29 15:18 ` Lars Ingebrigtsen
  2022-01-29 19:18   ` Glenn Morris
  2 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-29 15:18 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 33709

Glenn Morris <rgm@gnu.org> writes:

> The Emacs hydra jobset at https://hydra.nixos.org/jobset/gnu/emacs-trunk
> was recently updated to a more recent version of the Nix package
> collection. Ever since then, the "coverage" job (which is the one that
> runs "make check") has timed out after spending hours failing to
> compiled the first test .el file.
>
> I have reproduced the problem on RHEL 7.6 as follows:

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Is this still a problem with the current Emacs/gcc versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#33709: Hang when compiled with --coverage and gcc 7.3
  2022-01-29 15:18 ` Lars Ingebrigtsen
@ 2022-01-29 19:18   ` Glenn Morris
  0 siblings, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2022-01-29 19:18 UTC (permalink / raw)
  To: 33709-done

Version: 29.0.50

In https://hydra.nixos.org/build/165911357 I stopped forcing gcc 4.8
in the coverage build. It worked ok with gcc 7.3.0.

Ref
http://git.savannah.gnu.org/cgit/hydra-recipes.git/diff/?id=f7344f0e8d56f57de28d4259db96e31f6a013812&id2=5686a5540572a2a6fbc2ba81a429ebdb36fcb631





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

end of thread, other threads:[~2022-01-29 19:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 18:59 bug#33709: Hang when compiled with --coverage and gcc 7.3 Glenn Morris
2018-12-11 19:27 ` Eli Zaretskii
2018-12-11 19:46   ` Glenn Morris
2018-12-11 20:37     ` Glenn Morris
2018-12-13 19:40       ` Glenn Morris
2018-12-13 19:54         ` Eli Zaretskii
2018-12-28  4:06 ` Paul Eggert
2020-08-31 10:36   ` Stefan Kangas
2022-01-29 15:18 ` Lars Ingebrigtsen
2022-01-29 19:18   ` Glenn Morris

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).