unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: John David Anglin <dave.anglin@bell.net>
To: glaubitz@physik.fu-berlin.de, 45214@debbugs.gnu.org
Cc: Helge Deller <deller@gmx.de>,
	Michael Karcher <debian@mkarcher.dialup.fu-berlin.de>,
	Andreas Schwab <schwab@linux-m68k.org>
Subject: bug#45214: guile segfaults on 32-bit big-endian targets
Date: Sat, 12 Dec 2020 17:00:32 -0500	[thread overview]
Message-ID: <1c389d72-cbb7-888f-f1c1-d33fa2a1248b@bell.net> (raw)
In-Reply-To: <56553e87-ec27-d287-9e5b-fc501bc4b2dc@physik.fu-berlin.de>

Hi,

I created this debian PR earlier today:
Bug#977223: Acknowledgement (guile-3.0: FTBFS on hppa - segmentation faults)

In the above, the segmentation fault occurs during exception handling on hppa.  The exception is more
or less handled on powerpc:

../meta/build-env                \
guild compile --target="powerpc-unknown-linux-gnu"                \
          -W0 -O1              \
  -L "/<<PKGBUILDDIR>>/module"                         \
  -L "/<<PKGBUILDDIR>>/guile-readline"            \
  -o "language/tree-il/compile-cps.go" "../module/language/tree-il/compile-cps.scm"
Backtrace:
          11 (_ #<procedure efa84650 at ice-9/eval.scm:330:13 ()> # #)
          10 (apply-smob/0 #<thunk efa7cba0>)
In ice-9/eval.scm:
    657:8  9 (_ #(#(#f) ("prompt") #<procedure efacfcb0 at ice-9/?> ?))
    619:8  8 (_ #(#(#<directory (guile-user) f00566e0>)))
    155:9  7 (_ #(#(#<directory (guild) efe0daa0> ("compile" # ?)) #))
    619:8  6 (_ #(#(#<directory (srfi srfi-1) efcc4780> #<proc?> ?) ?))
    163:9  5 (_ #(#(#<directory (scripts compile) ef13ae60> "p?" ?) ?))
In unknown file:
           4 (_ #<procedure eebf7cb0 at ice-9/eval.scm:330:13 ()> # #)
In system/base/target.scm:
     65:6  3 (with-target "powerpc-unknown-linux-gnu" #<procedure ee?>)
In system/base/compile.scm:
    187:6  2 (compile-file "../module/ice-9/rdelim.scm" #:output-file ?)
    56:12  1 (call-once #<procedure ee49af40 at system/base/compile.?>)
In unknown file:
           0 (_ #<procedure ee413dc0 at ice-9/eval.scm:330:13 ()> # #)

ERROR: thunk may only be entered once: ~a #<procedure ee49af40 at system/base/compile.scm:66:5 ()>
make[4]: *** [Makefile:1927: ice-9/rdelim.go] Error 1

Trying to bisect.

Regards,
Dave

On 2020-12-12 4:26 p.m., John Paul Adrian Glaubitz wrote:
> Hello!
>
> As reported in [1], guile segfaults on 32-bit big-endian targets with:
>
> guild compile --target="hppa-unknown-linux-gnu"                \
>           -W0 -O1              \
>   -L "/<<PKGBUILDDIR>>/module"                         \
>   -L "/<<PKGBUILDDIR>>/guile-readline"			\
>   -o "language/tree-il/eta-expand.go" "../module/language/tree-il/eta-expand.scm"
> make[4]: *** [Makefile:1927: language/tree-il/eta-expand.go] Segmentation fault
> make[4]: *** Waiting for unfinished jobs....
> make[4]: *** [Makefile:1927: language/tree-il/debug.go] Segmentation fault
> make[4]: *** [Makefile:1927: language/tree-il/analyze.go] Segmentation fault
> still going
> make[4]: *** [Makefile:1927: language/tree-il/effects.go] Segmentation fault
> make[4]: Leaving directory '/<<PKGBUILDDIR>>/bootstrap'
> make[3]: *** [Makefile:1851: all-recursive] Error 1
> make[3]: Leaving directory '/<<PKGBUILDDIR>>'
> make[2]: *** [Makefile:1737: all] Error 2
> make[2]: Leaving directory '/<<PKGBUILDDIR>>'
> make[1]: *** [debian/rules:192: override_dh_auto_build] Error 2
> make[1]: Leaving directory '/<<PKGBUILDDIR>>'
> make: *** [debian/rules:104: build-arch] Error 2
> dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2
>
> Full build log in [2]. This affects hppa, m68k and powerpc (32-bit).
>
> Backtrace:
>
> #0  0x006e3e9c in scm_sum (x=x@entry=0x0, y=0x6) at numbers.c:7569
> 7569      else if (SCM_BIGP (x))
> [Current thread is 1 (Thread 0xf7c34480 (LWP 529732))]
> (gdb) bt
> #0  0x006e3e9c in scm_sum (x=x@entry=0x0, y=0x6) at numbers.c:7569
> #1  0x006cd498 in add_immediate (a=0x0, b=<optimized out>) at intrinsics.c:80
> #2  0x00749818 in vm_regular_engine (thread=0xf7971e00) at vm-engine.c:1583
> #3  0x0074c2f4 in scm_call_n (proc=proc@entry=0xeffbf148, argv=argv@entry=0x0, 
> nargs=nargs@entry=0) at vm.c:1608
> #4  0x006a70fc in scm_call_0 (proc=proc@entry=0xeffbf148) at eval.c:490
> #5  0x006d39d8 in scm_primitive_load_path (args=<optimized out>) at load.c:1259
> #6  0x006d3f28 in scm_c_primitive_load_path (filename=filename@entry=0x776458 
> "ice-9/boot-9") at load.c:1275
> #7  0x006c9310 in scm_load_startup_files () at init.c:222
> #8  0x006c96a8 in scm_i_init_guile (base=base@entry=0xffecfb18) at init.c:505
> #9  0x0073b858 in scm_i_init_thread_for_guile (base=base@entry=0xffecfb18, 
> dynamic_state=dynamic_state@entry=0x0) at threads.c:570
> #10 0x0073ba1c in scm_i_init_thread_for_guile (dynamic_state=0x0, 
> base=0xffecfb18) at threads.c:677
> #11 with_guile (base=0xffecfb18, data=0xffecfb38) at threads.c:638
> #12 0x003e17e4 in GC_call_with_stack_base () from 
> /usr/lib/powerpc-linux-gnu/libgc.so.1
> #13 0x0073bfb8 in scm_i_with_guile (dynamic_state=<optimized out>, 
> data=0xffecfb28, func=0x6c90c0 <invoke_main_func>) at threads.c:688
> #14 scm_with_guile (func=func@entry=0x6c90c0 <invoke_main_func>, 
> data=data@entry=0xffecfb58) at threads.c:694
> #15 0x006c93c8 in scm_boot_guile (argc=argc@entry=16, 
> argv=argv@entry=0xffecfe14, main_func=main_func@entry=0x800950 <inner_main>, 
> closure=closure@entry=0x0) at init.c:290
> #16 0x00800754 in main (argc=16, argv=0xffecfe14) at guile.c:95
> (gdb)
>
> I assume the crash has got something to do how values are packed and unpacked
> into the SCM object type. I have not been able to find the problem yet myself,
> unfortunately which is why I am reporting this issue here.
>
> For anyone willing to debug this, access to a fast POWER machine running a
> big-endian Debian unstable can be obtained through the GCC compile farm [3].
>
> Thanks,
> Adrian
>
>> [1] https://lists.gnu.org/archive/html/guile-devel/2020-12/msg00003.html
>> [2] https://buildd.debian.org/status/fetch.php?pkg=guile-3.0&arch=hppa&ver=3.0.4-3&stamp=1607546304&raw=0
>> [3] https://gcc.gnu.org/wiki/CompileFarm


-- 
John David Anglin  dave.anglin@bell.net







  reply	other threads:[~2020-12-12 22:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-12 21:26 bug#45214: guile segfaults on 32-bit big-endian targets John Paul Adrian Glaubitz
2020-12-12 22:00 ` John David Anglin [this message]
2020-12-12 22:02   ` John Paul Adrian Glaubitz
2021-02-25 15:24     ` Efraim Flashner
2021-04-14 14:18       ` Efraim Flashner
2021-04-14 19:19         ` John Paul Adrian Glaubitz
2021-04-15 11:50           ` Efraim Flashner
2021-04-15 13:23             ` John Paul Adrian Glaubitz
2021-10-03  9:38         ` John Paul Adrian Glaubitz
2021-10-04 16:08           ` John David Anglin
2021-10-04 16:11             ` John Paul Adrian Glaubitz
2020-12-12 22:21 ` John David Anglin
2020-12-12 22:30   ` John David Anglin
2020-12-12 22:44     ` John David Anglin
2020-12-12 22:47       ` John Paul Adrian Glaubitz
2020-12-12 23:22         ` John David Anglin
2020-12-13 18:06         ` John David Anglin
2020-12-13 18:08           ` John Paul Adrian Glaubitz
2021-02-08 23:24   ` John David Anglin
2021-02-09 13:03     ` John David Anglin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c389d72-cbb7-888f-f1c1-d33fa2a1248b@bell.net \
    --to=dave.anglin@bell.net \
    --cc=45214@debbugs.gnu.org \
    --cc=debian@mkarcher.dialup.fu-berlin.de \
    --cc=deller@gmx.de \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).