unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#37827: Segfault in guile build on mac os 10.15 / xcode 11?
@ 2019-10-19 23:17 Dan Kegel
  2019-10-19 23:35 ` Dan Kegel
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Kegel @ 2019-10-19 23:17 UTC (permalink / raw)
  To: 37827

I build guile and a few other things (including libgc, libffi,
libintl, libunistring, libgmp, and libltdl) locally using a
reproducible script.
I've been using it on linux and mac since the days of ubuntu 12.04 and
osx 10.8, and have kept it updated to work up through ubuntu 18.04 and
os 10.15 beta (as of 3 months ago).

Today I tried running it on final mac os 10.15 and more up to date xcode 11.
It explodes repeatably while building guile; the log shows

      4880 Segmentation fault: 11  | GUILE_AUTO_COMPILE=0
../meta/build-env guild snarf-check-and-output-texi >
guile-procedures.texi
make[3]: *** [guile-procedures.texi] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

This is with either guile-2.2.3 or 2.2.6.

~/Library/Logs/DiagnosticReports/guile_2019-10-19-154334_rbb-osx1015-2.crash
shows a backtrace:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libguile-2.2.1.dylib                0x0000000101e23e14
scm_i_symbol_chars + 4 (strings.c:818)
1   libguile-2.2.1.dylib                0x0000000101e2a1da
scm_i_struct_inherit_vtable_magic + 42 (struct.c:204)
2   libguile-2.2.1.dylib                0x0000000101e2a7f9
scm_c_make_structv + 329 (struct.c:507)
3   libguile-2.2.1.dylib                0x0000000101e2ab7c
scm_c_make_struct + 236
4   libguile-2.2.1.dylib                0x0000000101e2bc9b
scm_init_struct + 219 (struct.c:1088)
5   libguile-2.2.1.dylib                0x0000000101dc3a71
scm_i_init_guile + 129 (init.c:413)
6   libguile-2.2.1.dylib                0x0000000101e2cf08
scm_i_init_thread_for_guile + 120 (threads.c:590)
7   libguile-2.2.1.dylib                0x0000000101e2f1b9 with_guile
+ 25 (threads.c:654)
8   libgc.1.dylib                       0x0000000101f441bb
GC_call_with_stack_base + 27
9   libguile-2.2.1.dylib                0x0000000101e2cf6b
scm_with_guile + 43 (threads.c:710)
10  libguile-2.2.1.dylib                0x0000000101dc3995
scm_boot_guile + 69 (init.c:329)
11  guile                               0x0000000101d88e9f main + 191
(guile.c:102)
12  libdyld.dylib                       0x00007fff64dd6405 start + 1
...

 812 const char *
 813 scm_i_symbol_chars (SCM sym)
 814 {
 815   SCM buf;
 816
 817   buf = SYMBOL_STRINGBUF (sym);
 818   if (!STRINGBUF_WIDE (buf))
 819     return (const char *) STRINGBUF_CHARS (buf);

I tried to get the OS to generate a full core dump, but apple's
instructions to make sure /cores is
writable fail on os 10.15.  Maybe if I turn off SIP, but I can't do
that until Monday.

I can reproduce the problem by running just

GUILE_AUTO_COMPILE=0 meta/build-env guild

in the top level of the source tree, but I haven't figured out how to
reproduce it in lldb yet.

I tried unwinding all the wrappers, e.g.

tail +5 meta/guild > guild.txt
# do what meta-env would do:
export GUILE=/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/libguile/guile
export GUILE_LOAD_COMPILED_PATH=/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/module:/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/bootstrap:/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/prebuilt/64-bit-little-endian:/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/guile-readline
export GUILE_LOAD_PATH=/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/module:/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/guile-readline
export GUILE_SYSTEM_COMPILED_PATH=
export GUILE_SYSTEM_EXTENSIONS_PATH=
export GUILE_SYSTEM_PATH=
export LTDL_LIBRARY_PATH=/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/libguile:/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/guile-readline
export PATH=/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/meta:/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/libguile:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/opt/X11/bin:/Users/buildbot/Library/Python/3.7/bin
export PKG_CONFIG_PATH=/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/meta
export XDG_CACHE_HOME=/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/cache
export GUILE_AUTO_COMPILE=0
$GUILE  -e '(@@ (guild) main)' guild.txt

That still crashes, and so does replacing the last line with

/Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/libguile/.libs/guile
-e '(@@ (guild) main)' guild.txt

but alas replacing the last line with

lldb /Users/buildbot/src/yobuild/recipes/guile/btmp/guile-2.2.6/libguile/.libs/guile
-- -e '(@@ (guild) main)' guild.txt

and running it just exits with status -1.





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

* bug#37827: Segfault in guile build on mac os 10.15 / xcode 11?
  2019-10-19 23:17 bug#37827: Segfault in guile build on mac os 10.15 / xcode 11? Dan Kegel
@ 2019-10-19 23:35 ` Dan Kegel
  2019-10-20  4:48   ` Dan Kegel
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Kegel @ 2019-10-19 23:35 UTC (permalink / raw)
  To: 37827

Simpler way to reproduce:

$ brew install -s guile

:-)

So it's not just me!





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

* bug#37827: Segfault in guile build on mac os 10.15 / xcode 11?
  2019-10-19 23:35 ` Dan Kegel
@ 2019-10-20  4:48   ` Dan Kegel
  2019-10-21  0:30     ` Dan Kegel
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Kegel @ 2019-10-20  4:48 UTC (permalink / raw)
  To: 37827

Verified that the problem happens even with xcode 11.1.  Filed a bug
with the brew folks,
https://github.com/Homebrew/homebrew-core/issues/45602
in case they have any bright ideas.





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

* bug#37827: Segfault in guile build on mac os 10.15 / xcode 11?
  2019-10-20  4:48   ` Dan Kegel
@ 2019-10-21  0:30     ` Dan Kegel
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Kegel @ 2019-10-21  0:30 UTC (permalink / raw)
  To: 37827

They did.  See
https://forums.developer.apple.com/thread/121887
https://github.com/jedisct1/libsodium/issues/848
https://bitbucket.org/multicoreware/x265/issues/514/wrong-code-generated-on-macos-1015
https://github.com/Homebrew/homebrew-core/issues/45602
Evidently Apple turns -fstack-check on by default on mac os 10.15,
which exposed this bug.
One workaround is to add -fno-stack-check when compiling anything on
Mac OS 10.15.
Hopefully it'll be fixed in xcode 11.2.

On Sat, Oct 19, 2019 at 9:48 PM Dan Kegel <dank@kegel.com> wrote:
>
> Verified that the problem happens even with xcode 11.1.  Filed a bug
> with the brew folks,
> https://github.com/Homebrew/homebrew-core/issues/45602
> in case they have any bright ideas.





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

end of thread, other threads:[~2019-10-21  0:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-19 23:17 bug#37827: Segfault in guile build on mac os 10.15 / xcode 11? Dan Kegel
2019-10-19 23:35 ` Dan Kegel
2019-10-20  4:48   ` Dan Kegel
2019-10-21  0:30     ` Dan Kegel

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