unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* guile-2.0.0 crash when started on MacOS X 10.6.0
@ 2011-03-05 17:27 Steven Wu
  2011-03-05 19:41 ` Hans Aberg
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Steven Wu @ 2011-03-05 17:27 UTC (permalink / raw)
  To: bug-guile

I built guile-2.0.0 from the tarball, and when I started it, it crashed.

The config option:
$./config.status --config '--enable-error-on-warning' '--disable-deprecated'
'--prefix=/usr'
---
here is the bt from running guile
$ gdb /usr/bin/guile
run

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000001a17070
0x00007fff83bec7f0 in strncmp ()
(gdb) bt
#0  0x00007fff83bec7f0 in strncmp ()
#1  0x00000001019e9684 in init_bouncing_parens [inlined] () at /Users/wus/local/src/gnu/guile-2.0.0/guile-readline/readline.c:445
#2  0x00000001019e9684 in scm_init_readline () at readline.c:575
#3  0x00000001000aba13 in scm_dynamic_call (func=<value temporarily unavailable, due to optimizations>, dobj=<value temporarily unavailable, due to optimizations>) at dynl.c:350
#4  0x00000001000239b9 in scm_load_extension (lib=<value temporarily unavailable, due to optimizations>, init=<value temporarily unavailable, due to optimizations>) at extensions.c:161
#5  0x000000010009d884 in vm_debug_engine (vm=0x10069be70, program=0x10069e670, argv=0x1000239b0, nargs=861928) at vm-i-system.c:877
#6  0x00000001000957b5 in scm_c_vm_run (vm=0x10069be70, program=0x101663440, argv=0x0, nargs=0) at vm.c:565
#7  0x000000010009d894 in vm_debug_engine (vm=0x10069be70, program=0x10069e5f8, argv=0x10003f580, nargs=23475616) at vm-i-system.c:874
#8  0x00000001000957b5 in scm_c_vm_run (vm=0x10069be70, program=0x1012593e0, argv=0x7fff5fbff158, nargs=1) at vm.c:565
#9  0x000000010001dac9 in scm_call_1 (proc=0x1012593e0, arg1=0x10154f4b0) at eval.c:455
#10 0x000000010001fa4f in scm_map (proc=0x1012593e0, arg1=0x10154f250, args=0x304) at eval.c:620
#11 0x000000010009d870 in vm_debug_engine (vm=0x10069be70, program=0x10069e3e8, argv=0x10001f7b0, nargs=862504) at vm-i-system.c:880
#12 0x00000001000957b5 in scm_c_vm_run (vm=0x10069be70, program=0x1007216e0, argv=0x7fff5fbff398, nargs=1) at vm.c:565
#13 0x000000010001dbd5 in scm_primitive_eval (exp=0x101544520) at eval.c:738
#14 0x000000010003ee7b in scm_primitive_load (filename=0x101661160) at load.c:127
#15 0x000000010009d894 in vm_debug_engine (vm=0x10069be70, program=0x10069e1a8, argv=0x10003eda0, nargs=861736) at vm-i-system.c:874
#16 0x00000001000957b5 in scm_c_vm_run (vm=0x10069be70, program=0x1007216e0, argv=0x7fff5fbff578, nargs=1) at vm.c:565
#17 0x000000010001dbd5 in scm_primitive_eval (exp=0x1012ef7c0) at eval.c:738
#18 0x000000010001dc68 in scm_eval (exp=0x1012ef7c0, module_or_state=0x101159000) at eval.c:772
#19 0x000000010006c313 in scm_shell (argc=1, argv=0x7fff5fbff958) at script.c:837
#20 0x0000000100038977 in invoke_main_func (body_data=0x7fff5fbff900) at init.c:346
#21 0x00000001000162c2 in c_body (d=0x7fff5fbff870) at continuations.c:473
#22 0x00000001000a8fad in vm_regular_engine (vm=0x10069be70, program=0x10069e0a8, argv=0x1, nargs=19845248) at vm-i-system.c:942
#23 0x00000001000957b5 in scm_c_vm_run (vm=0x10069be70, program=0x100651ab0, argv=0x7fff5fbff7b0, nargs=4) at vm.c:565
#24 0x000000010001da15 in scm_call_4 (proc=0x100651ab0, arg1=<value temporarily unavailable, due to optimizations>, arg2=<value temporarily unavailable, due to optimizations>, arg3=<value temporarily unavailable, due to optimizations>, arg4=<value temporarily unavailable, due to optimizations>) at eval.c:476
#25 0x0000000100016441 in scm_i_with_continuation_barrier (body=0x1000162b0 <c_body>, body_data=0x7fff5fbff870, handler=0x1000162e0 <c_handler>, handler_data=0x7fff5fbff870, pre_unwind_handler=0x100091bb0 <scm_handle_by_message_noexit>, pre_unwind_handler_data=0x0) at continuations.c:450
#26 0x00000001000164e4 in scm_c_with_continuation_barrier (func=<value temporarily unavailable, due to optimizations>, data=<value temporarily unavailable, due to optimizations>) at continuations.c:491
#27 0x0000000100091322 in scm_i_with_guile_and_parent (func=0x100038950 <invoke_main_func>, data=0x7fff5fbff900, parent=<value temporarily unavailable, due to optimizations>) at threads.c:794
#28 0x0000000100038937 in scm_boot_guile (argc=<value temporarily unavailable, due to optimizations>, argv=<value temporarily unavailable, due to optimizations>, main_func=<value temporarily unavailable, due to optimizations>, closure=<value temporarily unavailable, due to optimizations>) at init.c:329
#29 0x0000000100000ed2 in main (argc=<value temporarily unavailable, due to optimizations>, argv=<value temporarily unavailable, due to optimizations>) at guile.c:70
---

Thanks

steve


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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-05 17:27 guile-2.0.0 crash when started on MacOS X 10.6.0 Steven Wu
@ 2011-03-05 19:41 ` Hans Aberg
  2011-03-05 20:14   ` Steven Wu
  2011-03-05 19:52 ` Michael Ellis
  2011-03-05 21:25 ` Andy Wingo
  2 siblings, 1 reply; 14+ messages in thread
From: Hans Aberg @ 2011-03-05 19:41 UTC (permalink / raw)
  To: Steven Wu; +Cc: bug-guile

On 5 Mar 2011, at 18:27, Steven Wu wrote:

> I built guile-2.0.0 from the tarball, and when I started it, it crashed.
> 
> The config option:
> $./config.status --config '--enable-error-on-warning' '--disable-deprecated'
> '--prefix=/usr'

Note that on BSD systems (as Mac OS X), /usr/ without /usr/local/ is reserved for the system installation. It won't, for example, be restored from backup.

Guile worked on Mac OS X 10.6.6 using Xcode 3.2.5.




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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-05 17:27 guile-2.0.0 crash when started on MacOS X 10.6.0 Steven Wu
  2011-03-05 19:41 ` Hans Aberg
@ 2011-03-05 19:52 ` Michael Ellis
  2011-03-05 20:14   ` Steven Wu
  2011-03-05 21:25 ` Andy Wingo
  2 siblings, 1 reply; 14+ messages in thread
From: Michael Ellis @ 2011-03-05 19:52 UTC (permalink / raw)
  To: Steven Wu; +Cc: bug-guile

On Sat, Mar 5, 2011 at 12:27 PM, Steven Wu <wus@qwest.net> wrote:
> I built guile-2.0.0 from the tarball, and when I started it, it crashed.
>

> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000001a17070
> 0x00007fff83bec7f0 in strncmp ()
> (gdb) bt
> #0  0x00007fff83bec7f0 in strncmp ()
> #1  0x00000001019e9684 in init_bouncing_parens [inlined] () at /Users/wus/local/src/gnu/guile-2.0.0/guile-readline/readline.c:445
> #2  0x00000001019e9684 in scm_init_readline () at readline.c:575

Steve, this seems to be a readline issue on OS X.  I ran into the same
problem recently and never did get it sorted out.  See this thread for
details.

http://osdir.com/ml/bug-guile-gnu/2011-02/msg00140.html

As noted in the thread, my workaround was to remove readline from my
.guile file and use emacs+paredit+geiser when I need an interactive
session.  That works pretty well, but, still, it would be nice to be
able to invoke guile from a terminal and have readline support.

Cheers,
Mike



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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-05 19:41 ` Hans Aberg
@ 2011-03-05 20:14   ` Steven Wu
  2011-03-05 20:28     ` Hans Aberg
  0 siblings, 1 reply; 14+ messages in thread
From: Steven Wu @ 2011-03-05 20:14 UTC (permalink / raw)
  To: Hans Aberg; +Cc: bug-guile

My is also MacOS X 10.6.6, the kernel version is 10.6.0 which is what uname will gives. It seems like readline issue. and I am debugging it now.

steve

On Mar 5, 2011, at 12:41 PM, Hans Aberg wrote:

> On 5 Mar 2011, at 18:27, Steven Wu wrote:
> 
>> I built guile-2.0.0 from the tarball, and when I started it, it crashed.
>> 
>> The config option:
>> $./config.status --config '--enable-error-on-warning' '--disable-deprecated'
>> '--prefix=/usr'
> 
> Note that on BSD systems (as Mac OS X), /usr/ without /usr/local/ is reserved for the system installation. It won't, for example, be restored from backup.
> 
> Guile worked on Mac OS X 10.6.6 using Xcode 3.2.5.
> 




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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-05 19:52 ` Michael Ellis
@ 2011-03-05 20:14   ` Steven Wu
  0 siblings, 0 replies; 14+ messages in thread
From: Steven Wu @ 2011-03-05 20:14 UTC (permalink / raw)
  To: Michael Ellis; +Cc: bug-guile

Thanks, I'll give it a try.

steve
On Mar 5, 2011, at 12:52 PM, Michael Ellis wrote:

> On Sat, Mar 5, 2011 at 12:27 PM, Steven Wu <wus@qwest.net> wrote:
>> I built guile-2.0.0 from the tarball, and when I started it, it crashed.
>> 
> 
>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>> Reason: KERN_INVALID_ADDRESS at address: 0x0000000001a17070
>> 0x00007fff83bec7f0 in strncmp ()
>> (gdb) bt
>> #0  0x00007fff83bec7f0 in strncmp ()
>> #1  0x00000001019e9684 in init_bouncing_parens [inlined] () at /Users/wus/local/src/gnu/guile-2.0.0/guile-readline/readline.c:445
>> #2  0x00000001019e9684 in scm_init_readline () at readline.c:575
> 
> Steve, this seems to be a readline issue on OS X.  I ran into the same
> problem recently and never did get it sorted out.  See this thread for
> details.
> 
> http://osdir.com/ml/bug-guile-gnu/2011-02/msg00140.html
> 
> As noted in the thread, my workaround was to remove readline from my
> .guile file and use emacs+paredit+geiser when I need an interactive
> session.  That works pretty well, but, still, it would be nice to be
> able to invoke guile from a terminal and have readline support.
> 
> Cheers,
> Mike




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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-05 20:14   ` Steven Wu
@ 2011-03-05 20:28     ` Hans Aberg
  0 siblings, 0 replies; 14+ messages in thread
From: Hans Aberg @ 2011-03-05 20:28 UTC (permalink / raw)
  To: Steven Wu; +Cc: bug-guile

On 5 Mar 2011, at 21:14, Steven Wu wrote:

> My is also MacOS X 10.6.6, the kernel version is 10.6.0 which is what uname will gives. It seems like readline issue. and I am debugging it now.

Some seem to have problems with that, but readline-6.1 works for me. I just did ./configure && make.

Hans





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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-05 17:27 guile-2.0.0 crash when started on MacOS X 10.6.0 Steven Wu
  2011-03-05 19:41 ` Hans Aberg
  2011-03-05 19:52 ` Michael Ellis
@ 2011-03-05 21:25 ` Andy Wingo
  2011-03-05 21:41   ` Hans Aberg
  2011-03-06  1:03   ` Steven Wu
  2 siblings, 2 replies; 14+ messages in thread
From: Andy Wingo @ 2011-03-05 21:25 UTC (permalink / raw)
  To: Steven Wu; +Cc: bug-guile

On Sat 05 Mar 2011 18:27, Steven Wu <wus@qwest.net> writes:

> #0  0x00007fff83bec7f0 in strncmp ()
> #1  0x00000001019e9684 in init_bouncing_parens [inlined] () at /Users/wus/local/src/gnu/guile-2.0.0/guile-readline/readline.c:445

This function is defined as follows:

   static void
   init_bouncing_parens ()
   {
     if (strncmp (rl_get_keymap_name (rl_get_keymap ()), "vi", 2))
       {
         rl_bind_key (')', match_paren);
         rl_bind_key (']', match_paren);
         rl_bind_key ('}', match_paren);
       }
   }

This would seem to indicate that rl_get_keymap_name is returning NULL or
some other invalid value.

Are you certain you are using GNU readline and not some sort of wrapper?

Regards,

Andy
-- 
http://wingolog.org/



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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-05 21:25 ` Andy Wingo
@ 2011-03-05 21:41   ` Hans Aberg
  2011-03-06  1:03   ` Steven Wu
  1 sibling, 0 replies; 14+ messages in thread
From: Hans Aberg @ 2011-03-05 21:41 UTC (permalink / raw)
  To: Andy Wingo; +Cc: bug-guile, Steven Wu

On 5 Mar 2011, at 22:25, Andy Wingo wrote:

> On Sat 05 Mar 2011 18:27, Steven Wu <wus@qwest.net> writes:
> 
>> #0  0x00007fff83bec7f0 in strncmp ()
>> #1  0x00000001019e9684 in init_bouncing_parens [inlined] () at /Users/wus/local/src/gnu/guile-2.0.0/guile-readline/readline.c:445
...
> Are you certain you are using GNU readline and not some sort of wrapper?

There is one that comes with the system, that is such a wrapper (see below).

Hans


$ otool -L /usr/lib/libreadline.dylib 
/usr/lib/libreadline.dylib:
	/usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version 2.11.0)
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)

$ otool -L /usr/local/lib/libreadline.dylib 
/usr/local/lib/libreadline.dylib:
	/usr/local/lib/libreadline.6.1.dylib (compatibility version 6.0.0, current version 6.1.0)
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)




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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-05 21:25 ` Andy Wingo
  2011-03-05 21:41   ` Hans Aberg
@ 2011-03-06  1:03   ` Steven Wu
  2011-03-06 10:02     ` Andy Wingo
  1 sibling, 1 reply; 14+ messages in thread
From: Steven Wu @ 2011-03-06  1:03 UTC (permalink / raw)
  To: Andy Wingo; +Cc: bug-guile

I stopped in the function, and it seems to be correct. I checked to the map, and the value was right, it wasn't NULL. I tried to stop in strncmp and see what that parameters were. Wasn't very successful the first tried. I haven't used gdb for a while, and need to refresh it.

steve

On Mar 5, 2011, at 2:25 PM, Andy Wingo wrote:

> On Sat 05 Mar 2011 18:27, Steven Wu <wus@qwest.net> writes:
> 
>> #0  0x00007fff83bec7f0 in strncmp ()
>> #1  0x00000001019e9684 in init_bouncing_parens [inlined] () at /Users/wus/local/src/gnu/guile-2.0.0/guile-readline/readline.c:445
> 
> This function is defined as follows:
> 
>   static void
>   init_bouncing_parens ()
>   {
>     if (strncmp (rl_get_keymap_name (rl_get_keymap ()), "vi", 2))
>       {
>         rl_bind_key (')', match_paren);
>         rl_bind_key (']', match_paren);
>         rl_bind_key ('}', match_paren);
>       }
>   }
> 
> This would seem to indicate that rl_get_keymap_name is returning NULL or
> some other invalid value.
> 
> Are you certain you are using GNU readline and not some sort of wrapper?
> 
> Regards,
> 
> Andy
> -- 
> http://wingolog.org/




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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-06  1:03   ` Steven Wu
@ 2011-03-06 10:02     ` Andy Wingo
  2011-03-06 14:08       ` Hans Aberg
  2011-03-07 10:48       ` Hans Aberg
  0 siblings, 2 replies; 14+ messages in thread
From: Andy Wingo @ 2011-03-06 10:02 UTC (permalink / raw)
  To: Steven Wu; +Cc: bug-guile

On Sun 06 Mar 2011 02:03, Steven Wu <wus@qwest.net> writes:

> I stopped in the function, and it seems to be correct. I checked to the
> map, and the value was right, it wasn't NULL. I tried to stop in strncmp
> and see what that parameters were. Wasn't very successful the first
> tried. I haven't used gdb for a while, and need to refresh it.

The solution is to use GNU readline, not the editline-based thing that
Apple ships.

Andy
-- 
http://wingolog.org/



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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-06 10:02     ` Andy Wingo
@ 2011-03-06 14:08       ` Hans Aberg
  2011-03-07  1:30         ` Steven Wu
  2011-03-07 10:48       ` Hans Aberg
  1 sibling, 1 reply; 14+ messages in thread
From: Hans Aberg @ 2011-03-06 14:08 UTC (permalink / raw)
  To: Andy Wingo; +Cc: bug-guile, Steven Wu

On 6 Mar 2011, at 11:02, Andy Wingo wrote:

> The solution is to use GNU readline, not the editline-based thing that
> Apple ships.

This is a notorious problem - perhaps configure should check the different types. From what I could see, editline is a BSD fork of readline that no longer is compatible it seems. 

Hans




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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-06 14:08       ` Hans Aberg
@ 2011-03-07  1:30         ` Steven Wu
  2011-03-07  9:45           ` Hans Aberg
  0 siblings, 1 reply; 14+ messages in thread
From: Steven Wu @ 2011-03-07  1:30 UTC (permalink / raw)
  To: Hans Aberg; +Cc: bug-guile

I am using the gnu readline-6.1. I checked the dynamic lib in /usr/lib, and the symbolic link points to the right library. I guess I need to check if the header file is the right one. I'll dig a little deeper later tonight.

steve
On Mar 6, 2011, at 7:08 AM, Hans Aberg wrote:

> On 6 Mar 2011, at 11:02, Andy Wingo wrote:
> 
>> The solution is to use GNU readline, not the editline-based thing that
>> Apple ships.
> 
> This is a notorious problem - perhaps configure should check the different types. From what I could see, editline is a BSD fork of readline that no longer is compatible it seems. 
> 
> Hans
> 




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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-07  1:30         ` Steven Wu
@ 2011-03-07  9:45           ` Hans Aberg
  0 siblings, 0 replies; 14+ messages in thread
From: Hans Aberg @ 2011-03-07  9:45 UTC (permalink / raw)
  To: Steven Wu; +Cc: bug-guile


On 7 Mar 2011, at 02:30, Steven Wu wrote:

> I am using the gnu readline-6.1. I checked the dynamic lib in /usr/lib, and the symbolic link points to the right library. I guess I need to check if the header file is the right one. I'll dig a little deeper later tonight.

You might try not overwriting the system installation.


> steve
> On Mar 6, 2011, at 7:08 AM, Hans Aberg wrote:
> 
>> On 6 Mar 2011, at 11:02, Andy Wingo wrote:
>> 
>>> The solution is to use GNU readline, not the editline-based thing that
>>> Apple ships.
>> 
>> This is a notorious problem - perhaps configure should check the different types. From what I could see, editline is a BSD fork of readline that no longer is compatible it seems. 
>> 
>> Hans
>> 
> 




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

* Re: guile-2.0.0 crash when started on MacOS X 10.6.0
  2011-03-06 10:02     ` Andy Wingo
  2011-03-06 14:08       ` Hans Aberg
@ 2011-03-07 10:48       ` Hans Aberg
  1 sibling, 0 replies; 14+ messages in thread
From: Hans Aberg @ 2011-03-07 10:48 UTC (permalink / raw)
  To: Andy Wingo; +Cc: bug-guile, Steven Wu

On 6 Mar 2011, at 11:02, Andy Wingo wrote:

>> I stopped in the function, and it seems to be correct. I checked to the
>> map, and the value was right, it wasn't NULL. I tried to stop in strncmp
>> and see what that parameters were. Wasn't very successful the first
>> tried. I haven't used gdb for a while, and need to refresh it.
> 
> The solution is to use GNU readline, not the editline-based thing that
> Apple ships.

The funny thing, though, is that when readline installs in /usr/local/lib/, it seems it ends up at the end of the library search path; 'man ld' says:
  Search paths
   ld maintains a list of directories to search for a library or framework to use. The default library search path is /usr/lib then /usr/local/lib. The -L option will add a new library search path.

I am not sure how to interpret this: I think that -L actually adds the new directories at end of the search path, whereas -I adds them at the beginning. That seems anyway to be the case with /usr/local/lib/ searched after /usr/lib/.

I have though checked that on my system, guile-2.0.0 links dynamically to
  /usr/local/lib/libreadline.6.1.dylib
and not to libreadline.6.dylib or libreadline.6.dylib.

Hans





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

end of thread, other threads:[~2011-03-07 10:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-05 17:27 guile-2.0.0 crash when started on MacOS X 10.6.0 Steven Wu
2011-03-05 19:41 ` Hans Aberg
2011-03-05 20:14   ` Steven Wu
2011-03-05 20:28     ` Hans Aberg
2011-03-05 19:52 ` Michael Ellis
2011-03-05 20:14   ` Steven Wu
2011-03-05 21:25 ` Andy Wingo
2011-03-05 21:41   ` Hans Aberg
2011-03-06  1:03   ` Steven Wu
2011-03-06 10:02     ` Andy Wingo
2011-03-06 14:08       ` Hans Aberg
2011-03-07  1:30         ` Steven Wu
2011-03-07  9:45           ` Hans Aberg
2011-03-07 10:48       ` Hans Aberg

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