Re: [Patch] handle glib signals coming from different thread

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] [Patch] handle glib signals coming from
different threads” on Tue, 23 May 2006 02:00:10 +0900,
Masao M. [email protected] wrote:

Ok, after some valgrinding it seems that the gc was messing with the created
thread for some reason… Fixed in this patch.

In my environment, it seems this patch fixes this problem.

Could you tell me more detail about your environment?

I’m sorry, I should show detail about my environment. Here
is my environment:

% pkg-config --modversion gstreamer-0.8
0.8.12
% pkg-config --modversion glib-2.0
2.10.2
% ruby -v
ruby 1.8.4 (2005-12-24) [i486-linux]

I’m using Debian/GNU Linux unstable.

Thanks,

kou


Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

Hi,

On Tue, 23 May 2006 00:20:31 +0200
[email protected] (Sjoerd S.) wrote:

Then i’m out of ideas. I’ve attached a version with various printf’s for
debugging. If possible could you also provide a valgrind log and a gdb
``thread apply all bt full’’ traceback ?

OK, here is a gdb log.

Ah, i think i know what’s going wrong… The output shows you get a normal
callback, while the traceback indicates that it comes from another thread…
This probably means that your ruby isn’t configured with --enable-pthread. Can
you check that?

Sure. I don’t use any options when I configured ruby.
I tried latest ruby in CVS (1.9.0) with --enable-pthread, your patch
works.

If --enable-pthread isn’t enabled then is_ruby_native_thread() will always
return true, causing the normal codepath to be used (which is basically the
same as what happens to an unpatched version)…

AFAIK, --enable-pthread is option(not standard) now, isn’t it?

So, if your patch doesn’t influence ruby with --disable-pthread option,
I’ll apply your patch to CVS.

What do you think?


.:% Masao M.[email protected]


Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

On Wed, May 24, 2006 at 12:42:09AM +0900, Masao M. wrote:

I tried latest ruby in CVS (1.9.0) with --enable-pthread, your patch works.
What do you think?
Sounds great. Very nice to have this mystery solved :slight_smile: I’ve attached a
version
of the patch that only enables the code when HAVE_NATIVETHREAD is
defined (thus
when ruby is compiled with --enable-pthread).

I’ll add a note to my ruby gst 0.10 bindings that people should really
use a
ruby version compiled with --enable-pthread. You might want to do that
for ruby
gstreamer 0.8 (as that should improve stability a lot).

For the record, Debian’s ruby is compiled with --enable-pthread by
default
while Fedora’s ruby uses --disable-pthread.

Sjoerd

Hi Sjoerd,

OK. Applied it, too.

On Tue, 23 May 2006 19:12:26 +0200
[email protected] (Sjoerd S.) wrote:

Sure. I don’t use any options when I configured ruby.

For the record, Debian’s ruby is compiled with --enable-pthread by default
while Fedora’s ruby uses --disable-pthread.

Sjoerd

If they can make penicillin out of moldy bread, they can sure make
something out of you.
– Muhammad Ali

.:% Masao M.[email protected]


All the advantages of Linux Managed Hosting–Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications
in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642