actual debian ruby packages are unuseable with tk

F

Ferenc Engard

Dear debian ruby package maintainers,

I just tell here, that both the 1.6.8-6 and the 1.8.0-2 ruby packages
are break on this simple script:

-----------------------
require 'tk.rb'

begin
raise "blah"
rescue
puts "rescued"
end
-----------------------

This script will never return with both versions of ruby. I am waiting
on the new versions. (I hope the bugfix was backported to 1.6.8; if not,
then I wait for the 1.8.0 version of DBI, too...)

Regards,
Circum
 
D

Dmitry Borodaenko

Dear debian ruby package maintainers,

I just tell here, that both the 1.6.8-6 and the 1.8.0-2 ruby packages
are break on this simple script:

-----------------------
require 'tk.rb'

begin
raise "blah"
rescue
puts "rescued"
end
-----------------------

Hm, hangs for me with 1.6.8-7, too. Ruby/Tk experts around?
This script will never return with both versions of ruby. I am waiting
on the new versions. (I hope the bugfix was backported to 1.6.8; if
not, then I wait for the 1.8.0 version of DBI, too...)

Debian packages of DBI for Ruby 1.8.0 are already waiting in queue to
Debian/unstable. I will also put it up on people.d.o soon, as I think it
will take a couple more weeks to finish with Ruby 1.6 -> 1.8 transition.
 
T

ts

D> Hm, hangs for me with 1.6.8-7, too. Ruby/Tk experts around?

Not expert but apparently there is a dead-lock : not really sure if the
problem is in tcl


Guy Decoux
 
T

ts

F> I just tell here, that both the 1.6.8-6 and the 1.8.0-2 ruby packages
F> are break on this simple script:

What is your version of tcl/tk : if it's 8.4 try to downgrade to 8.3

pigeon% cat b.rb
require 'tk.rb'

begin
raise "blah"
rescue
puts "rescued"
end
pigeon%

pigeon% ruby b.rb
rescued
pigeon%

Guy Decoux
 
F

Ferenc Engard

Dmitry said:
Hm, hangs for me with 1.6.8-7, too. Ruby/Tk experts around?

I have the strong feeling that it is the same problem which Hidetoshi
explained in <[email protected]>. (8.
Sep, "2 questions about TkVariable and ruby/tk" thread).

Circum
 
T

ts

F> I have the strong feeling that it is the same problem which Hidetoshi
F> explained in <[email protected]>. (8.
F> Sep, "2 questions about TkVariable and ruby/tk" thread).

Well, run your script under gdb, i.e.

gdb ruby
(gdb) r name_of_your_script.rb

when it hang, send it ^C (control-C) and run the command `bt' to see what
it do

(gdb) bt

and send all output (specifically if it create POSIX thread)


Guy Decoux
 
F

Ferenc Engard

ts said:
F> I just tell here, that both the 1.6.8-6 and the 1.8.0-2 ruby packages
F> are break on this simple script:

What is your version of tcl/tk : if it's 8.4 try to downgrade to 8.3

I think it is quite impossible if I want to work with debian binaries.
ruby/tk depends on libtcltk-ruby debian package, and in this package
tcltklib.so links with libtk8.4.so.0. I do not want to recompile
libtcltk-ruby.

Ferenc
 
F

Ferenc Engard

Well, run your script under gdb, i.e.

(gdb) r ../test/test2.rb
Starting program: /usr/local/bin/ruby ../test/test2.rb
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...[New Thread
16384 (LWP 15626)]
[New Thread 32769 (LWP 15627)]
[New Thread 16386 (LWP 15628)]

(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...rescued
valami

Program received signal SIGINT, Interrupt.
[Switching to Thread 16384 (LWP 15626)]
0x404e7b88 in __pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) bt
#0 0x404e7b88 in __pthread_sigsuspend () from /lib/libpthread.so.0
#1 0x404e7999 in __pthread_wait_for_restart_signal () from
/lib/libpthread.so.0
#2 0x404e7650 in pthread_onexit_process () from /lib/libpthread.so.0
#3 0x40138bb0 in exit () from /lib/libc.so.6
#4 0x40038ffb in ruby_stop () from /usr/lib/libruby1.6.so.1.6
#5 0x4003910f in ruby_run () from /usr/lib/libruby1.6.so.1.6
#6 0x080486ad in main ()
(gdb)


Ferenc

PS: I never debugged multi-threaded programs, but here is some more gdb
output:

0x404e7b88 in __pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) info threads
3 Thread 16386 (LWP 15659) Couldn't get registers: No such process.
(gdb) info threads
Couldn't get registers: No such process.
Couldn't get registers: No such process.
(gdb) info threads
* 3 Thread 16386 (LWP 15659) Couldn't get registers: No such process.
2 Thread 32769 (LWP 15658) Couldn't get registers: No such process.
(gdb) info threads
Couldn't get registers: No such process.
Couldn't get registers: No such process.

After this it repeats this same pattern, and 'bt' returns the same error
message.
 
T

ts

F> #0 0x404e7b88 in __pthread_sigsuspend () from /lib/libpthread.so.0
F> #1 0x404e7999 in __pthread_wait_for_restart_signal () from

Can you try : needless to say that it's just a "bricolage" before waiting
the correction :-(((

require 'tk.rb'
trap 0, proc { sleep 0.1 }

begin
raise "blah"
rescue
puts "rescued"
end



Guy Decoux
 
F

Ferenc Engard

ts wrote:
[...]
trap 0, proc { sleep 0.1 }

It solves this bug. Great. :)))) Also, it seems to solve my primary
problem that errors in tcl made the tk eventloop halt.

Now one ruby program creates 3 ruby processes, and eats up 100% CPU, but
at least now it works. :)

Circum
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top