unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* SIGABRT from guile-2.0.11 using sxml-match
@ 2016-04-05  2:14 Matt Wette
  2016-04-05 12:43 ` Matt Wette
  2016-06-20 11:09 ` Andy Wingo
  0 siblings, 2 replies; 3+ messages in thread
From: Matt Wette @ 2016-04-05  2:14 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 4850 bytes --]

The attached file generates a SIGABRT for me in guile-2.0.11 on my Mac.  It looks like a stack overflow.  The program is a  sxml-match case with ~ 100 rules.   I can work around by splitting the match into two cases of 50 rules.  I am not sure this qualifies as a bug, but may be of interest.

mwette$ uname -a
Darwin nautilus.local 14.5.0 Darwin Kernel Version 14.5.0: Mon Jan 11 18:48:35 PST 2016; root:xnu-2782.50.2~1/RELEASE_X86_64 x86_64

mwette$ guile sxml-match-stress.scm 
;;; note: source file /Users/mwette/sxml-match-stress.scm
;;;       newer than compiled /Users/mwette/.cache/guile/ccache/2.0-LE-8-2.0/Users/mwette/sxml-match-stress.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /Users/mwette/sxml-match-stress.scm
Abort trap: 6

mwette$ ggdb /opt/local/bin/guile
…
(gdb) run
...
scheme@(guile-user)> (load "sxml-match-stress.scm")
;;; note: source file /Users/mwette/sxml-match-stress.scm
;;;       newer than compiled /Users/mwette/.cache/guile/ccache/2.0-LE-8-2.0/Users/mwette/sxml-match-stress.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /Users/mwette/sxml-match-stress.scm
[New Thread 0x140b of process 36705]

Program received signal SIGABRT, Aborted.
0x00007fff93ca5286 in __pthread_kill ()
   from /usr/lib/system/libsystem_kernel.dylib
(gdb) info stack
#0  0x00007fff93ca5286 in __pthread_kill ()
   from /usr/lib/system/libsystem_kernel.dylib
#1  0x00007fff944e79f9 in pthread_kill ()
   from /usr/lib/system/libsystem_pthread.dylib
#2  0x00007fff8b75b9ab in abort () from /usr/lib/system/libsystem_c.dylib
#3  0x00000001000a81b8 in vm_error_stack_overflow ()
   from /opt/local/lib/libguile-2.0.22.dylib
#4  0x00000001000a7688 in vm_debug_engine ()
   from /opt/local/lib/libguile-2.0.22.dylib
#5  0x00000001000917e6 in scm_c_vm_run ()
   from /opt/local/lib/libguile-2.0.22.dylib
#6  0x0000000100091f70 in scm_call_with_vm ()
   from /opt/local/lib/libguile-2.0.22.dylib
#7  0x00000001000a8219 in vm_error () from /opt/local/lib/libguile-2.0.22.dylib
#8  0x00000001000a81b3 in vm_error_stack_overflow ()
   from /opt/local/lib/libguile-2.0.22.dylib
#9  0x00000001000a7688 in vm_debug_engine ()
   from /opt/local/lib/libguile-2.0.22.dylib
#10 0x00000001000917e6 in scm_c_vm_run ()
   from /opt/local/lib/libguile-2.0.22.dylib
#11 0x000000010001a651 in scm_i_dowinds ()
   from /opt/local/lib/libguile-2.0.22.dylib
#12 0x000000010001460b in scm_c_abort ()
   from /opt/local/lib/libguile-2.0.22.dylib
#13 0x00000001000a807c in vm_abort () from /opt/local/lib/libguile-2.0.22.dylib
#14 0x00000001000a6c16 in vm_debug_engine ()
   from /opt/local/lib/libguile-2.0.22.dylib
#15 0x00000001000917e6 in scm_c_vm_run ()
   from /opt/local/lib/libguile-2.0.22.dylib
#16 0x0000000100091f70 in scm_call_with_vm ()
   from /opt/local/lib/libguile-2.0.22.dylib
#17 0x000000010001af70 in scm_error_scm ()
   from /opt/local/lib/libguile-2.0.22.dylib
#18 0x000000010001af46 in scm_error ()
   from /opt/local/lib/libguile-2.0.22.dylib
#19 0x000000010001b067 in scm_syserror ()
   from /opt/local/lib/libguile-2.0.22.dylib
#20 0x0000000100023140 in scm_delete_file ()
   from /opt/local/lib/libguile-2.0.22.dylib
#21 0x000000010009e559 in vm_debug_engine ()
   from /opt/local/lib/libguile-2.0.22.dylib
#22 0x00000001000917e6 in scm_c_vm_run ()
   from /opt/local/lib/libguile-2.0.22.dylib
#23 0x0000000100091f70 in scm_call_with_vm ()
   from /opt/local/lib/libguile-2.0.22.dylib
#24 0x00000001000a8219 in vm_error ()
   from /opt/local/lib/libguile-2.0.22.dylib
#25 0x00000001000a81b3 in vm_error_stack_overflow ()
   from /opt/local/lib/libguile-2.0.22.dylib
#26 0x00000001000a7688 in vm_debug_engine ()
   from /opt/local/lib/libguile-2.0.22.dylib
#27 0x00000001000917e6 in scm_c_vm_run ()
   from /opt/local/lib/libguile-2.0.22.dylib
#28 0x000000010001a651 in scm_i_dowinds ()
   from /opt/local/lib/libguile-2.0.22.dylib
#29 0x000000010001460b in scm_c_abort ()
   from /opt/local/lib/libguile-2.0.22.dylib
#30 0x00000001000a807c in vm_abort ()
   from /opt/local/lib/libguile-2.0.22.dylib
#31 0x00000001000a6c16 in vm_debug_engine ()
   from /opt/local/lib/libguile-2.0.22.dylib
#32 0x00000001000917e6 in scm_c_vm_run ()
   from /opt/local/lib/libguile-2.0.22.dylib
#33 0x0000000100091f70 in scm_call_with_vm ()
   from /opt/local/lib/libguile-2.0.22.dylib
#34 0x000000010001af70 in scm_error_scm ()
   from /opt/local/lib/libguile-2.0.22.dylib
#35 0x000000010001af46 in scm_error ()
   from /opt/local/lib/libguile-2.0.22.dylib
#36 0x000000010001b067 in scm_syserror ()
   from /opt/local/lib/libguile-2.0.22.dylib
...





[-- Attachment #2.1: Type: text/html, Size: 12757 bytes --]

[-- Attachment #2.2: sxml-match-stress.scm --]
[-- Type: application/octet-stream, Size: 5509 bytes --]

(define-module (sxml-match-stress)
  #:export (stress-case)
  #:use-module (sxml match)
  )

(define (stress-case tree)
  (sxml-match tree

    ((abc01 ,rst) (stress-case rst))
    ((abc01 ,rst ,uvw) (stress-case rst))
    ((def01 ,rst) (stress-case rst))
    ((def01 ,rst ,uvw) (stress-case rst))
    ((ghi01 ,rst) (stress-case rst))
    ((ghi01 ,rst ,uvw) (stress-case rst))
    ((jkl01 ,rst) (stress-case rst))
    ((jkl01 ,rst ,uvw) (stress-case rst))
    ((mno01 ,rst) (stress-case rst))
    ((mno01 ,rst ,uvw) (stress-case rst))

    ((abc02 ,rst) (stress-case rst))
    ((abc02 ,rst ,uvw) (stress-case rst))
    ((def02 ,rst) (stress-case rst))
    ((def02 ,rst ,uvw) (stress-case rst))
    ((ghi02 ,rst) (stress-case rst))
    ((ghi02 ,rst ,uvw) (stress-case rst))
    ((jkl02 ,rst) (stress-case rst))
    ((jkl02 ,rst ,uvw) (stress-case rst))
    ((mno02 ,rst) (stress-case rst))
    ((mno02 ,rst ,uvw) (stress-case rst))

    ((abc03 ,rst) (stress-case rst))
    ((abc03 ,rst ,uvw) (stress-case rst))
    ((def03 ,rst) (stress-case rst))
    ((def03 ,rst ,uvw) (stress-case rst))
    ((ghi03 ,rst) (stress-case rst))
    ((ghi03 ,rst ,uvw) (stress-case rst))
    ((jkl03 ,rst) (stress-case rst))
    ((jkl03 ,rst ,uvw) (stress-case rst))
    ((mno03 ,rst) (stress-case rst))
    ((mno03 ,rst ,uvw) (stress-case rst))

    ((abc04 ,rst) (stress-case rst))
    ((abc04 ,rst ,uvw) (stress-case rst))
    ((def04 ,rst) (stress-case rst))
    ((def04 ,rst ,uvw) (stress-case rst))
    ((ghi04 ,rst) (stress-case rst))
    ((ghi04 ,rst ,uvw) (stress-case rst))
    ((jkl04 ,rst) (stress-case rst))
    ((jkl04 ,rst ,uvw) (stress-case rst))
    ((mno04 ,rst) (stress-case rst))
    ((mno04 ,rst ,uvw) (stress-case rst))

    ((abc05 ,rst) (stress-case rst))
    ((abc05 ,rst ,uvw) (stress-case rst))
    ((def05 ,rst) (stress-case rst))
    ((def05 ,rst ,uvw) (stress-case rst))
    ((ghi05 ,rst) (stress-case rst))
    ((ghi05 ,rst ,uvw) (stress-case rst))
    ((jkl05 ,rst) (stress-case rst))
    ((jkl05 ,rst ,uvw) (stress-case rst))
    ((mno05 ,rst) (stress-case rst))
    ((mno05 ,rst ,uvw) (stress-case rst))

    #|
    ;; This workaround avoids SIGABRT
    (,otherwise
     (stress-case-2 tree))))

(define (stress-case-2 tree)
  (sxml-match tree
    ;; end of workaround
    |#

    ((abc06 ,rst) (stress-case rst))
    ((abc06 ,rst ,uvw) (stress-case rst))
    ((def06 ,rst) (stress-case rst))
    ((def06 ,rst ,uvw) (stress-case rst))
    ((ghi06 ,rst) (stress-case rst))
    ((ghi06 ,rst ,uvw) (stress-case rst))
    ((jkl06 ,rst) (stress-case rst))
    ((jkl06 ,rst ,uvw) (stress-case rst))
    ((mno06 ,rst) (stress-case rst))
    ((mno06 ,rst ,uvw) (stress-case rst))

    ((abc07 ,rst) (stress-case rst))
    ((abc07 ,rst ,uvw) (stress-case rst))
    ((def07 ,rst) (stress-case rst))
    ((def07 ,rst ,uvw) (stress-case rst))
    ((ghi07 ,rst) (stress-case rst))
    ((ghi07 ,rst ,uvw) (stress-case rst))
    ((jkl07 ,rst) (stress-case rst))
    ((jkl07 ,rst ,uvw) (stress-case rst))
    ((mno07 ,rst) (stress-case rst))
    ((mno07 ,rst ,uvw) (stress-case rst))

    ((abc08 ,rst) (stress-case rst))
    ((abc08 ,rst ,uvw) (stress-case rst))
    ((def08 ,rst) (stress-case rst))
    ((def08 ,rst ,uvw) (stress-case rst))
    ((ghi08 ,rst) (stress-case rst))
    ((ghi08 ,rst ,uvw) (stress-case rst))
    ((jkl08 ,rst) (stress-case rst))
    ((jkl08 ,rst ,uvw) (stress-case rst))
    ((mno08 ,rst) (stress-case rst))
    ((mno08 ,rst ,uvw) (stress-case rst))

    ((abc09 ,rst) (stress-case rst))
    ((abc09 ,rst ,uvw) (stress-case rst))
    ((def09 ,rst) (stress-case rst))
    ((def09 ,rst ,uvw) (stress-case rst))
    ((ghi09 ,rst) (stress-case rst))
    ((ghi09 ,rst ,uvw) (stress-case rst))
    ((jkl09 ,rst) (stress-case rst))
    ((jkl09 ,rst ,uvw) (stress-case rst))
    ((mno09 ,rst) (stress-case rst))
    ((mno09 ,rst ,uvw) (stress-case rst))

    ((abc10 ,rst) (stress-case rst))
    ((abc10 ,rst ,uvw) (stress-case rst))
    ((def10 ,rst) (stress-case rst))
    ((def10 ,rst ,uvw) (stress-case rst))
    ((ghi10 ,rst) (stress-case rst))
    ((ghi10 ,rst ,uvw) (stress-case rst))
    ((jkl10 ,rst) (stress-case rst))
    ((jkl10 ,rst ,uvw) (stress-case rst))
    ((mno10 ,rst) (stress-case rst))
    ((mno10 ,rst ,uvw) (stress-case rst))

    ((abc11 ,rst) (stress-case rst))
    ((abc11 ,rst ,uvw) (stress-case rst))
    ((def11 ,rst) (stress-case rst))
    ((def11 ,rst ,uvw) (stress-case rst))
    ((ghi11 ,rst) (stress-case rst))
    ((ghi11 ,rst ,uvw) (stress-case rst))
    ((jkl11 ,rst) (stress-case rst))
    ((jkl11 ,rst ,uvw) (stress-case rst))
    ((mno11 ,rst) (stress-case rst))
    ((mno11 ,rst ,uvw) (stress-case rst))

    ((abc12 ,rst) (stress-case rst))
    ((abc12 ,rst ,uvw) (stress-case rst))
    ((def12 ,rst) (stress-case rst))
    ((def12 ,rst ,uvw) (stress-case rst))
    ((ghi12 ,rst) (stress-case rst))
    ((ghi12 ,rst ,uvw) (stress-case rst))
    ((jkl12 ,rst) (stress-case rst))
    ((jkl12 ,rst ,uvw) (stress-case rst))
    ((mno12 ,rst) (stress-case rst))
    ((mno12 ,rst ,uvw) (stress-case rst))

    ((abc13 ,rst) (stress-case rst))
    ((abc13 ,rst ,uvw) (stress-case rst))
    ((def13 ,rst) (stress-case rst))
    ((def13 ,rst ,uvw) (stress-case rst))
    ((ghi13 ,rst) (stress-case rst))
    ((ghi13 ,rst ,uvw) (stress-case rst))
    ((jkl13 ,rst) (stress-case rst))
    ((jkl13 ,rst ,uvw) (stress-case rst))
    ((mno13 ,rst) (stress-case rst))
    ((mno13 ,rst ,uvw) (stress-case rst))

    (,otherwise
     #f)))

;; --- last line ---

[-- Attachment #2.3: Type: text/html, Size: 266 bytes --]

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

* Re: SIGABRT from guile-2.0.11 using sxml-match
  2016-04-05  2:14 SIGABRT from guile-2.0.11 using sxml-match Matt Wette
@ 2016-04-05 12:43 ` Matt Wette
  2016-06-20 11:09 ` Andy Wingo
  1 sibling, 0 replies; 3+ messages in thread
From: Matt Wette @ 2016-04-05 12:43 UTC (permalink / raw)
  To: guile-devel

I forgot to mention that the SIGABRT occurs during the compile process.

> On Apr 4, 2016, at 7:14 PM, Matt Wette <matt.wette@gmail.com> wrote:
> 
> The attached file generates a SIGABRT for me in guile-2.0.11 on my Mac.  It looks like a stack overflow.  The program is a  sxml-match case with ~ 100 rules.   I can work around by splitting the match into two cases of 50 rules.  I am not sure this qualifies as a bug, but may be of interest.
> 




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

* Re: SIGABRT from guile-2.0.11 using sxml-match
  2016-04-05  2:14 SIGABRT from guile-2.0.11 using sxml-match Matt Wette
  2016-04-05 12:43 ` Matt Wette
@ 2016-06-20 11:09 ` Andy Wingo
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2016-06-20 11:09 UTC (permalink / raw)
  To: Matt Wette; +Cc: guile-devel

Hi,

Sadly this means that Guile's compiler ran out of stack space, and then
ran out of stack space handling the error :/ This is fixed in Guile
2.1.x, which doesn't have a stack limit.  Otherwise, set the
GUILE_STACK_SIZE environment variable for version 2.0.x; see the manual.

Andy

On Tue 05 Apr 2016 04:14, Matt Wette <matt.wette@gmail.com> writes:

> The attached file generates a SIGABRT for me in guile-2.0.11 on my
> Mac. It looks like a stack overflow. The program is a sxml-match case
> with ~ 100 rules. I can work around by splitting the match into two
> cases of 50 rules. I am not sure this qualifies as a bug, but may be
> of interest.
>
> mwette$ uname -a
>
> Darwin nautilus.local 14.5.0 Darwin Kernel Version 14.5.0: Mon Jan 11
> 18:48:35 PST 2016; root:xnu-2782.50.2~1/RELEASE_X86_64 x86_64
>
> mwette$ guile sxml-match-stress.scm 
>
> ;;; note: source file /Users/mwette/sxml-match-stress.scm
>
> ;;; newer than compiled
> /Users/mwette/.cache/guile/ccache/2.0-LE-8-2.0/Users/mwette/sxml-match-stress.scm.go
>
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
>
> ;;; or pass the --no-auto-compile argument to disable.
>
> ;;; compiling /Users/mwette/sxml-match-stress.scm
>
> Abort trap: 6
>
> mwette$ ggdb /opt/local/bin/guile
> …
> (gdb) run
> ...
>
> scheme@(guile-user)> (load "sxml-match-stress.scm")
>
> ;;; note: source file /Users/mwette/sxml-match-stress.scm
>
> ;;; newer than compiled
> /Users/mwette/.cache/guile/ccache/2.0-LE-8-2.0/Users/mwette/sxml-match-stress.scm.go
>
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
>
> ;;; or pass the --no-auto-compile argument to disable.
>
> ;;; compiling /Users/mwette/sxml-match-stress.scm
>
> [New Thread 0x140b of process 36705]
>
> Program received signal SIGABRT, Aborted.
>
> 0x00007fff93ca5286 in __pthread_kill ()
>
> from /usr/lib/system/libsystem_kernel.dylib
>
> (gdb) info stack
>
> #0 0x00007fff93ca5286 in __pthread_kill ()
>
> from /usr/lib/system/libsystem_kernel.dylib
>
> #1 0x00007fff944e79f9 in pthread_kill ()
>
> from /usr/lib/system/libsystem_pthread.dylib
>
> #2 0x00007fff8b75b9ab in abort () from
> /usr/lib/system/libsystem_c.dylib
>
> #3 0x00000001000a81b8 in vm_error_stack_overflow ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #4 0x00000001000a7688 in vm_debug_engine ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #5 0x00000001000917e6 in scm_c_vm_run ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #6 0x0000000100091f70 in scm_call_with_vm ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #7 0x00000001000a8219 in vm_error () from
> /opt/local/lib/libguile-2.0.22.dylib
>
> #8 0x00000001000a81b3 in vm_error_stack_overflow ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #9 0x00000001000a7688 in vm_debug_engine ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #10 0x00000001000917e6 in scm_c_vm_run ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #11 0x000000010001a651 in scm_i_dowinds ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #12 0x000000010001460b in scm_c_abort ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #13 0x00000001000a807c in vm_abort () from
> /opt/local/lib/libguile-2.0.22.dylib
>
> #14 0x00000001000a6c16 in vm_debug_engine ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #15 0x00000001000917e6 in scm_c_vm_run ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #16 0x0000000100091f70 in scm_call_with_vm ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #17 0x000000010001af70 in scm_error_scm ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #18 0x000000010001af46 in scm_error ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #19 0x000000010001b067 in scm_syserror ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #20 0x0000000100023140 in scm_delete_file ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #21 0x000000010009e559 in vm_debug_engine ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #22 0x00000001000917e6 in scm_c_vm_run ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #23 0x0000000100091f70 in scm_call_with_vm ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #24 0x00000001000a8219 in vm_error ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #25 0x00000001000a81b3 in vm_error_stack_overflow ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #26 0x00000001000a7688 in vm_debug_engine ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #27 0x00000001000917e6 in scm_c_vm_run ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #28 0x000000010001a651 in scm_i_dowinds ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #29 0x000000010001460b in scm_c_abort ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #30 0x00000001000a807c in vm_abort ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #31 0x00000001000a6c16 in vm_debug_engine ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #32 0x00000001000917e6 in scm_c_vm_run ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #33 0x0000000100091f70 in scm_call_with_vm ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #34 0x000000010001af70 in scm_error_scm ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #35 0x000000010001af46 in scm_error ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> #36 0x000000010001b067 in scm_syserror ()
>
> from /opt/local/lib/libguile-2.0.22.dylib
>
> ...



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

end of thread, other threads:[~2016-06-20 11:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-05  2:14 SIGABRT from guile-2.0.11 using sxml-match Matt Wette
2016-04-05 12:43 ` Matt Wette
2016-06-20 11:09 ` Andy Wingo

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