* bug#26854: guile-2.2.2/libguile/.libs/guile crashes during build on PowerPC Macintoshes @ 2017-05-09 15:11 Peter Dyballa 2017-05-20 21:39 ` Peter Dyballa 2019-12-11 23:34 ` bug#26854: guile 2.2.x has broken prebuilt/32-bit-big-endian George Koehler 0 siblings, 2 replies; 3+ messages in thread From: Peter Dyballa @ 2017-05-09 15:11 UTC (permalink / raw) To: 26854 Hello! On Mac OS X versions 10.4.11 (Tiger) and 10.5.8 (Leopard) with PowerPC hardware this failure happens *every time*, i.e. it can be reproduced: ./guile-snarf-docs -o regex-posix.doc regex-posix.c -- - DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/ opt/local/lib/libffi-3.2.1/include -I/opt/local/var/macports/build/ _opt_local_var_macports_sources_lil .fr.rsync.macports.org_release_tarballs_ports_lang_guile/guile/work/ guile-2.2.2 -I/opt/local/include -pipe -Os -m32 cat alist.doc array-handle.doc array-map.doc arrays.doc async.doc atomic.doc backtrace.doc boolean.doc bitvectors.doc bytevectors.doc chars.doc control.doc continuations.doc debug.doc deprecated.doc deprecation.doc dynl.doc dynwind.doc eq.doc error.doc eval.doc evalext.doc expand.doc extensions.doc fdes-finalizers.doc feature.doc filesys.doc fluids.doc foreign.doc fports.doc gc-malloc.doc gc.doc gettext.doc generalized-arrays.doc generalized-vectors.doc goops.doc gsubr.doc guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc list.doc load.doc macros.doc mallocs.doc memoize.doc modules.doc numbers.doc objprop.doc options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc promises.doc r6rs-ports.doc random.doc rdelim.doc read.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc srfi-1.doc srfi-4.doc srfi-13.doc srfi-14.doc srfi-60.doc stackchk.doc stacks.doc stime.doc strings.doc strorder.doc strports.doc struct.doc symbols.doc syntax.doc threads.doc throw.doc trees.doc unicode.doc uniform.doc values.doc variable.doc vectors.doc version.doc vports.doc weak-set.doc weak-table.doc weak-vector.doc dynl.doc posix.doc net_db.doc socket.doc regex-posix.doc | GUILE_AUTO_COMPILE=0 ../meta/ build-env guild snarf-check-and-output-texi > guile- procedures.texi || { rm guile-procedures.texi; false; } cat: stdout: Broken pipe make[3]: *** [guile-procedures.texi] Error 1 make[3]: Leaving directory `/opt/local/var/macports/build/ _opt_local_var_macports_sources_lil .fr.rsync.macports.org_release_tarballs_ports_lang_guile/guile/work/ guile-2.2.2/libguile' The pipe breaks because the bootstrapped guile crashes. This can be shown manually, and this also tells gdb by reading the resulting core file. https://trac.macports.org/ticket/54124 has a discussion on this bug plus much more information than this eMail. There another bug is described: configure only checks for Guile version 2.0 and 1.8. Is there anything more I can do to retrieve more details of the failing guile? -- Mit friedvollen Grüßen Pete There are very few jobs that actually require a penis or vagina. All other jobs should be open to everybody. – Florynce Kennedy ^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#26854: guile-2.2.2/libguile/.libs/guile crashes during build on PowerPC Macintoshes 2017-05-09 15:11 bug#26854: guile-2.2.2/libguile/.libs/guile crashes during build on PowerPC Macintoshes Peter Dyballa @ 2017-05-20 21:39 ` Peter Dyballa 2019-12-11 23:34 ` bug#26854: guile 2.2.x has broken prebuilt/32-bit-big-endian George Koehler 1 sibling, 0 replies; 3+ messages in thread From: Peter Dyballa @ 2017-05-20 21:39 UTC (permalink / raw) To: 26854 On PPC Mac OS X 10.4.11 the failure happens with both GCC 5 and GCC 6. -- Greetings Pete Basic, n.: A programming language. Related to certain social diseases in that those who have it will not admit it in polite company. ^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#26854: guile 2.2.x has broken prebuilt/32-bit-big-endian 2017-05-09 15:11 bug#26854: guile-2.2.2/libguile/.libs/guile crashes during build on PowerPC Macintoshes Peter Dyballa 2017-05-20 21:39 ` Peter Dyballa @ 2019-12-11 23:34 ` George Koehler 1 sibling, 0 replies; 3+ messages in thread From: George Koehler @ 2019-12-11 23:34 UTC (permalink / raw) To: 26854; +Cc: Matthew Hull Hello, GNU Guile community. I believe that the files in guile-2.2.x/prebuilt/32-bit-big-endian are broken. This causes a reproducible crash when a 32-bit-big-endian system tries to build guile 2.2.x from source code. Because of this crash, OpenBSD powerpc has no guile2 package. Matthew Hull started a discussion on the OpenBSD ports list: https://marc.info/?l=openbsd-ports&m=157550856819188&w=2 We have PowerPC Macintosh hardware running OpenBSD. This seems to be the same bug as #26854, which had PowerPC hardware running Mac OS X. I worked around the problem in Guile 2.2.6 by moving away prebuilt/32-bit-big-endian so the build doesn't use the prebuilt files; but the "bootstrap" part of the build is slow. I suspect that a little-endian system wrote the prebuilt files, but modules/system/vm/assembler.scm is missing a byte-swap. The crash is in guile-2.2.6/libguile/vm-engine.c "call": =lines 566 to 573 if (SCM_LIKELY (SCM_PROGRAM_P (FP_REF (0)))) ip = SCM_PROGRAM_CODE (FP_REF (0)); else ip = (scm_t_uint32 *) vm_apply_non_program_code; APPLY_HOOK (); NEXT (0); =end `ip` gets a bad pointer to unmapped memory from SCM_PROGRAM_CODE, then "NEXT (0);" tries to read ip[0] and crashes with SIGSEGV. I found code that puts a bad pointer in the program object, in vm-engine.c "make-closure": =lines 1652 to 1654 closure = scm_inline_words (thread, scm_tc7_program | (nfree << 16), nfree + 2); SCM_SET_CELL_WORD_1 (closure, ip + offset); =end I had modified the code to read *(ip + offset), so it crashed. Then I loaded the core dump in GDB. `ip` was (scm_t_uint32 *) 0xcf1ea3b8 and `offset` was -1005191168. GDB can't access *0xcf1ea3b8 because it was in an mmap(2) file, and the core dump didn't include this mapping. In ktrace(1), the file was somewhere under prebuilt/32-bit-big-endian. `offset` -1005191168 is 0xc4160000. This looks like the wrong byte order. The correct value might be 0x000016c4 = 5828. This would make more sense, if ip + offset should be inside the file! modules/system/vm/assembler.scm can byte-swap values when it emits bytecode for a different-endian machine. If a little-endian machine wrote the prebuilt/32-bit-big-endian files, and assembler.scm forgot to swap `offset`, then it would cause this bug. I moved away the prebuilt/32-bit-big-endian files and started a new build without these prebuilt files. The build ran some slow "bootstrap" commands on my 666 MHz cpu. The first bootstrap command took more than 100 minutes. The second command took just over 4 hours. The next commands continued overnight, and the whole build might have taken almost 24 hours. The build passes most tests: SKIP: test-pthread-create-secondary FAIL: test-stack-overflow FAIL: test-out-of-memory ================================== 2 of 38 tests failed (1 test was not run) Because the bootstrap is so slow, I would like future versions of Guile to include correct prebuilt/32-bit-big-endian files, but I don't know how to make such files. -- George Koehler <kernigh@gmail.com> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-11 23:34 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-05-09 15:11 bug#26854: guile-2.2.2/libguile/.libs/guile crashes during build on PowerPC Macintoshes Peter Dyballa 2017-05-20 21:39 ` Peter Dyballa 2019-12-11 23:34 ` bug#26854: guile 2.2.x has broken prebuilt/32-bit-big-endian George Koehler
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).