Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 613986 - dev-scheme/guile-2.0.14 on ia64 - Segmentation fault in "GUILE_INSTALL_LOCALE=1 GUILE_AUTO_COMPILE=0 ../meta/build-env guild snarf-check-and-output-texi" while building guile-procedures.texi
Summary: dev-scheme/guile-2.0.14 on ia64 - Segmentation fault in "GUILE_INSTALL_LOCALE...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Scheme Project
URL: https://lists.gnu.org/archive/html/gu...
Whiteboard:
Keywords: PATCH
: 539254 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-03-27 05:36 UTC by Matt Turner
Modified: 2019-12-03 07:47 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,343.46 KB, text/plain)
2017-03-27 05:36 UTC, Matt Turner
Details
gdb backtrace (gdb-bt,12.85 KB, text/plain)
2017-03-27 05:37 UTC, Matt Turner
Details
guile-2.0.14-threads-ia64.patch (guile-2.0.14-threads-ia64.patch,1.66 KB, patch)
2017-11-04 23:44 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2017-03-27 05:36:24 UTC
Created attachment 468398 [details]
build.log

cat alist.doc arbiters.doc array-handle.doc array-map.doc arrays.doc async.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 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 root.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 threads.doc throw.doc trees.doc unicode.doc uniform.doc values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc dynl.doc posix.doc net_db.doc socket.doc regex-posix.doc | GUILE_INSTALL_LOCALE=1 GUILE_AUTO_COMPILE=0 ../meta/build-env guild snarf-check-and-output-texi          > guile-procedures.texi || { rm guile-procedures.texi; false; }
/bin/sh: line 1: 30758 Broken pipe             cat alist.doc arbiters.doc array-handle.doc array-map.doc arrays.doc async.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 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 root.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 threads.doc throw.doc trees.doc unicode.doc uniform.doc values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc dynl.doc posix.doc net_db.doc socket.doc regex-posix.doc
     30759 Segmentation fault      (core dumped) | GUILE_INSTALL_LOCALE=1 GUILE_AUTO_COMPILE=0 ../meta/build-env guild snarf-check-and-output-texi > guile-procedures.texi
Comment 1 Matt Turner gentoo-dev 2017-03-27 05:37:11 UTC
Created attachment 468400 [details]
gdb backtrace

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x20000000001465b0 in scm_ia64_longjmp (JB=0x6000000000825020, VAL=1) at continuations.c:372
372                   t->pending_rbs_continuation->backing_store,
[...]
(gdb) l
367       scm_i_thread *t = SCM_I_CURRENT_THREAD;
368
369       if (t->pending_rbs_continuation)
370         {
371           memcpy (t->register_backing_store_base,
372                   t->pending_rbs_continuation->backing_store,
373                   t->pending_rbs_continuation->backing_store_size);
374           t->pending_rbs_continuation = NULL;
375         }
376       setcontext (&JB->ctx);
(gdb) p t
$1 = (scm_i_thread *) 0x6000000000068000
(gdb) p t->pending_rbs_continuation
$2 = (scm_t_contregs *) 0xffeb
Comment 2 Matt Turner gentoo-dev 2017-03-27 06:04:47 UTC
Looks like this is a known issue for more than three years.

Probably should give Mark H Weaver access to guppy to debug, or Neil Jerram (who added the function in https://lists.gnu.org/archive/html/guile-devel/2008-05/msg00017.html)
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2017-11-04 23:44:52 UTC
Created attachment 502572 [details, diff]
guile-2.0.14-threads-ia64.patch

Had another look at this crash today. The cause is simple: pending_rbs_continuation is an uninitialized on-stack value!

The fix is one-liner.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2017-11-05 09:38:09 UTC
Proposed patch upstream as:
    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29151
Comment 5 Amy Liffey gentoo-dev 2017-11-05 09:39:40 UTC
Thank you I will look at it :)
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2017-11-11 11:48:22 UTC
*** Bug 539254 has been marked as a duplicate of this bug. ***
Comment 8 Larry the Git Cow gentoo-dev 2017-11-27 12:47:38 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=182b1b496f7535bee46bba54544fa3e567be2beb

commit 182b1b496f7535bee46bba54544fa3e567be2beb
Author:     Amy Liffey <amynka@gentoo.org>
AuthorDate: 2017-11-27 12:44:50 +0000
Commit:     Amy Liffey <amynka@gentoo.org>
CommitDate: 2017-11-27 12:47:13 +0000

    dev-scheme/guile: fix ia64 segmentation fault
    
    Closes: https://bugs.gentoo.org/613986
    Package-Manager: Portage-2.3.13, Repoman-2.3.3

 dev-scheme/guile/Manifest                          |  2 +-
 ...0.14-ia64-fix-crash-thread-context-switch.patch | 63 ++++++++++++++++++++++
 ...ile-2.0.14-r2.ebuild => guile-2.0.14-r3.ebuild} |  1 +
 3 files changed, 65 insertions(+), 1 deletion(-)