Re: [racket-dev] Unlucky with Racket 6.0 (1/2)

2014-03-13 Thread Matthew Flatt
I've pushed a repair for the crash.

The crash was due to a hack that extracts a private child from a Gtk
widget that implements a `choice%`. The child is extracted so that
callbacks can be attached to the child widget. The reference count on
the extracted child wasn't managed correctly, and so an implementation
or configuration of the widget that changes the child (as appears to be
the case on Kubuntu) could cause a crash.

Although the repair should avoid crashes, it is not complete. The
intended signals are not caught if the child is changed, so some GUI
elements do not work correctly. For example, the font menu is not
populated in the DrRacket preferences dialog. I'll continue to work on
that, but it will take more time.

At Wed, 12 Mar 2014 22:45:42 +, Paulo Matos wrote:
 On 12/03/14 22:38, Sam Tobin-Hochstadt wrote:
  On Wed, Mar 12, 2014 at 6:35 PM, Paulo Matos pa...@matos-sorge.com wrote:
 
  So, I decide to run the gracket command under gdb but now it segfaults
  immediately without displaying drracket window.
  $ gdb --args /home/pmatos/local-install/racket-6.0/bin/../lib/gracket -N
  local-install/racket-6.0/bin/drracket -J DrRacket -l- drracket/drracket.rkt
 
 
  Racket uses page faults to manage memory, so you need to do:
 
   (gdb) handle SIGSEGV nostop noprint
 
  and then continue, and if there's an error, it will halt in `abort()`.
 
 
 Thanks, you're right. Got there when entered the Preferences screen:
 Program received signal SIGABRT, Aborted.
 0x77323f77 in __GI_raise (sig=sig@entry=6)
  at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
 56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
 (gdb) bt
 #0  0x77323f77 in __GI_raise (sig=sig@entry=6)
  at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
 #1  0x773275e8 in __GI_abort () at abort.c:90
 #2  0x0068927e in fault_handler ()
 #3  signal handler called
 #4  0x72e595b9 in g_type_check_instance ()
 from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 #5  0x72e4e3f7 in g_signal_connect_data ()
 from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 #6  0x00687548 in ffi_call_unix64 ()
 #7  0x00686e8d in ffi_call ()
 #8  0x0067896c in ?? ()
 
 Not very useful. Need to setup drracket with debugging to understand this.
 
 -- 
 PMatos
 
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Unlucky with Racket 6.0 (1/2)

2014-03-12 Thread Paulo Matos

Hello,

I have downloaded the Ubuntu precise script, installed it on a Kubuntu 
precise machine and ran it. Everything went smoothly.


If I try to run DrRacket it starts, when I go to Preferences it SEGFAULTS.

To obtain more information I go to drracket script and try to execute it 
under bash -x:

$ bash -x local-install/racket-6.0/bin/drracket
+ 
saveP=/home/pmatos/.rvm/gems/ruby-1.9.3-p286/bin:/home/pmatos/.rvm/gems/ruby-1.9.3-p286@global/bin:/home/pmatos/.rvm/rubies/ruby-1.9.3-p286/bin:/home/pmatos/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/pmatos/.rvm/bin

+ PATH=/usr/bin:/bin
++ pwd
+ saveD=/home/pmatos
++ dirname local-install/racket-6.0/bin/drracket
+ D=local-install/racket-6.0/bin
++ basename local-install/racket-6.0/bin/drracket
+ F=drracket
+ cd local-install/racket-6.0/bin
+ test -L drracket
++ pwd
+ D=/home/pmatos/local-install/racket-6.0/bin
+ cd /home/pmatos
+ bindir=/home/pmatos/local-install/racket-6.0/bin
+ 
PATH=/home/pmatos/.rvm/gems/ruby-1.9.3-p286/bin:/home/pmatos/.rvm/gems/ruby-1.9.3-p286@global/bin:/home/pmatos/.rvm/rubies/ruby-1.9.3-p286/bin:/home/pmatos/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/pmatos/.rvm/bin

+ librktdir=/home/pmatos/local-install/racket-6.0/bin/../lib
+ findxend
+ oneargflag=
+ case $1 in
+ exec /home/pmatos/local-install/racket-6.0/bin/../lib/gracket -N 
local-install/racket-6.0/bin/drracket -J DrRacket -l- drracket/drracket.rkt


(drracket:14735): GLib-GObject-CRITICAL **: g_signal_connect_data: 
assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed


... [A few more pages of this]

(drracket:14735): GLib-GObject-CRITICAL **: g_signal_connect_data: 
assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

SIGSEGV MAPERR si_code 1 fault on addr 0x3e00
Aborted (core dumped)

So, I decide to run the gracket command under gdb but now it segfaults 
immediately without displaying drracket window.
$ gdb --args /home/pmatos/local-install/racket-6.0/bin/../lib/gracket -N 
local-install/racket-6.0/bin/drracket -J DrRacket -l- drracket/drracket.rkt

GNU gdb (GDB) 7.6.1-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from 
/home/pmatos/local-install/racket-6.0/lib/gracket...(no debugging 
symbols found)...done.

(gdb) r
Starting program: 
/home/pmatos/local-install/racket-6.0/bin/../lib/gracket -N 
local-install/racket-6.0/bin/drracket -J DrRacket -l- drracket/drracket.rkt

[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
[New Thread 0x76503700 (LWP 14760)]

Program received signal SIGSEGV, Segmentation fault.
0x006824fa in scheme_gmp_tls_unload ()
(gdb) bt
#0  0x006824fa in scheme_gmp_tls_unload ()
#1  0x0064c6f3 in ?? ()
#2  0x0068e95f in ?? ()
#3  0x0068f01f in ?? ()
#4  0x0069313a in GC_malloc_atomic ()
#5  0x0060fbe1 in scheme_make_sized_offset_byte_string ()
#6  0x004658c3 in scheme_make_sized_offset_kind_path ()
#7  0x0046e3c1 in ?? ()
#8  0x0046965f in ?? ()
#9  0x0046f0b0 in scheme_simplify_path ()
#10 0x77fecb0e in ?? ()
#11 0x in ?? ()
#12 0x77e31a46 in ?? ()
#13 0x in ?? ()
#14 0x0005 in ?? ()
#15 0x7fffc230 in ?? ()
#16 0x76866798 in ?? ()
#17 0x0005 in ?? ()
#18 0x76505dd8 in ?? ()
#19 0x00ae in ?? ()
#20 0xf420 in ?? ()
#21 0x0001 in ?? ()
#22 0x00460fad in scheme_do_eval ()
#23 0x0047f5f7 in ?? ()
#24 0x77fe27af in ?? ()
#25 0x7fffc400 in ?? ()
#26 0x77e3b583 in ?? ()
#27 0x in ?? ()
(gdb) disass
Dump of assembler code for function scheme_gmp_tls_unload:
   0x006824d0 +0: mov(%rdi),%rdx
   0x006824d3 +3: mov0x2b5afe(%rip),%rax# 
0x937fd8

   0x006824da +10:mov%rdx,%fs:0x960(%rax)
   0x006824e2 +18:mov0x8(%rdi),%rdx
   0x006824e6 +22:mov%rdx,%fs:0x958(%rax)
   0x006824ee +30:mov0x10(%rdi),%rdx
   0x006824f2 +34:mov%rdx,%fs:0x980(%rax)
= 0x006824fa +42:movq   $0x0,(%rdi)
   0x00682501 +49:mov%rsi,%fs:0x950(%rax)
   0x00682509 +57:retq
End of assembler dump.
(gdb) info regs
Undefined info command: regs.  Try help info.
(gdb) info reg
rax0xf420   -3040
rbx

Re: [racket-dev] Unlucky with Racket 6.0 (1/2)

2014-03-12 Thread Sam Tobin-Hochstadt
On Wed, Mar 12, 2014 at 6:35 PM, Paulo Matos pa...@matos-sorge.com wrote:

 So, I decide to run the gracket command under gdb but now it segfaults
 immediately without displaying drracket window.
 $ gdb --args /home/pmatos/local-install/racket-6.0/bin/../lib/gracket -N
 local-install/racket-6.0/bin/drracket -J DrRacket -l- drracket/drracket.rkt


Racket uses page faults to manage memory, so you need to do:

(gdb) handle SIGSEGV nostop noprint

and then continue, and if there's an error, it will halt in `abort()`.

Sam
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Unlucky with Racket 6.0 (1/2)

2014-03-12 Thread Paulo Matos

On 12/03/14 22:38, Sam Tobin-Hochstadt wrote:

On Wed, Mar 12, 2014 at 6:35 PM, Paulo Matos pa...@matos-sorge.com wrote:


So, I decide to run the gracket command under gdb but now it segfaults
immediately without displaying drracket window.
$ gdb --args /home/pmatos/local-install/racket-6.0/bin/../lib/gracket -N
local-install/racket-6.0/bin/drracket -J DrRacket -l- drracket/drracket.rkt



Racket uses page faults to manage memory, so you need to do:

 (gdb) handle SIGSEGV nostop noprint

and then continue, and if there's an error, it will halt in `abort()`.



Thanks, you're right. Got there when entered the Preferences screen:
Program received signal SIGABRT, Aborted.
0x77323f77 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x77323f77 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x773275e8 in __GI_abort () at abort.c:90
#2  0x0068927e in fault_handler ()
#3  signal handler called
#4  0x72e595b9 in g_type_check_instance ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5  0x72e4e3f7 in g_signal_connect_data ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#6  0x00687548 in ffi_call_unix64 ()
#7  0x00686e8d in ffi_call ()
#8  0x0067896c in ?? ()

Not very useful. Need to setup drracket with debugging to understand this.

--
PMatos

_
 Racket Developers list:
 http://lists.racket-lang.org/dev