# Segfaults on mandrake

**URL:** <https://rubytalk.org/t/segfaults-on-mandrake/9735>\
**Category:** ruby-talk\
**Created:** [18 January 2004 21:51 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735 "2004-01-18T21:51:04Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ferenc\_Engard1](https://avatars.discourse-cdn.com/v4/letter/f/c6cbf5/32.png) [@Ferenc\_Engard1](https://rubytalk.org/u/Ferenc_Engard1)\
**Post date:** [18 January 2004 21:51 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/1 "2004-01-18T21:51:04Z")

</div>

Hello,

I have reproducible, but not constant segfaults (sometimes hangups) on  
Mandrake 9.2 (download edition, or what – I do not use it  
frequently).

The packages:

ruby-tk-1.8.1-1mdk  
ruby-mysql-2.4.5-1  
ruby-dbi-0.0.21-1  
ruby-1.8.1-1mdk

Ruby version:  
ruby 1.8.1 (2003-12-25) [i586-linux-gnu]

Some segfault places:

/usr/lib/ruby/site\_ruby/1.8/DBD/Mysql/Mysql.rb:418: [BUG] Segmentation  
fault  
ruby 1.8.1 (2003-12-25) [i586-linux-gnu]

/usr/lib/ruby/site\_ruby/1.8/DBD/Mysql/Mysql.rb:425: [BUG] Segmentation  
fault  
ruby 1.8.1 (2003-12-25) [i586-linux-gnu]

/usr/lib/ruby/site\_ruby/1.8/dbi/row.rb:39: [BUG] Segmentation fault  
ruby 1.8.1 (2003-12-25) [i586-linux-gnu]

(eval):762: [BUG] Segmentation fault  
ruby 1.8.1 (2003-12-25) [i586-linux-gnu]

Sometimes also segfaults in my code. The program makes heavy  
DBI::StatementHandle using (and output to stdout) when the crash  
occurs.

This is a P4 celeron 2100MHz machine. On my home machine, which is a  
P233, which is a also a 1.8.1 (2003-11-11), the crash never occurs.

Any tips?

Ferenc

---

<div class="post-metadata">

**Author:** ![Nobuyoshi\_Nakada](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nobuyoshi\_Nakada](https://rubytalk.org/u/Nobuyoshi_Nakada)\
**Post date:** [18 January 2004 22:44 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/2 "2004-01-18T22:44:44Z")

</div>

Hi,

> **···**
>
> At Mon, 19 Jan 2004 06:51:04 +0900, Ferenc Engard wrote:
> 
> > This is a P4 celeron 2100MHz machine. On my home machine, which is a  
> > P233, which is a also a 1.8.1 (2003-11-11), the crash never occurs.
> 
> Sounds like concerning to pthread support. Try with CVS HEAD  
> version. And can’t you get stack trace from core?
> 
> –  
> Nobu Nakada

---

<div class="post-metadata">

**Author:** ![Ferenc\_Engard1](https://avatars.discourse-cdn.com/v4/letter/f/c6cbf5/32.png) [@Ferenc\_Engard1](https://rubytalk.org/u/Ferenc_Engard1)\
**Post date:** [19 January 2004 12:27 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/3 "2004-01-19T12:27:12Z")

</div>

I have tried on another debian with the actual ruby package  
(2003-12-27), and it didn’t segfaulted. So it is possible that the  
problem is not with ruby.

How can I core dump? Right now, I am not at the machine, so apologize  
if it dumps core automatically.

If it is possible, I wouldn’t try the CVS version, as I have a real  
tight deadline to deliver my program (hence this new distro-related  
problem).

I guess my glibc (pthreads) version is 2.3.2.

It is a real big problem to me, if I cannot install my script to these  
mdk boxes… :(((

Thanks,  
Ferenc

> **···**
>
> On Mon, 19 Jan 2004 [nobu.nokada@softhome.net](mailto:nobu.nokada@softhome.net) wrote:
> 
> > Hi,
> > 
> > At Mon, 19 Jan 2004 06:51:04 +0900, \>Ferenc Engard wrote:
> > 
> > > This is a P4 celeron 2100MHz machine. On my home machine, which is a  
> > > P233, which is a also a 1.8.1 (2003-11-11), the crash never occurs.
> > 
> > Sounds like concerning to pthread support. Try with CVS HEAD  
> > version. And can’t you get stack trace from core?

---

<div class="post-metadata">

**Author:** ![Ferenc\_Engard1](https://avatars.discourse-cdn.com/v4/letter/f/c6cbf5/32.png) [@Ferenc\_Engard1](https://rubytalk.org/u/Ferenc_Engard1)\
**Post date:** [19 January 2004 22:42 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/4 "2004-01-19T22:42:41Z")

</div>

Hello,

I still cannot know how to dump core, but running 3 times from gdb  
caused 3 segfaults in different places.

I am totally helpless. What can I do?

Ferenc

Here are the backtraces (sorry about the long mail):

(no debugging symbols found)…(no debugging symbols found)…  
Program received signal SIGSEGV, Segmentation fault.  
0x401aef9f in realloc () from /lib/i686/libc.so.6  
(gdb) bt  
#0 0x401aef9f in realloc () from /lib/i686/libc.so.6  
#1 0x40061e68 in ruby\_xrealloc () from /usr/lib/libruby.so.1.8  
#2 0x400ad33a in rb\_str\_update () from /usr/lib/libruby.so.1.8  
#3 0x400505a8 in rb\_frame\_last\_func () from /usr/lib/libruby.so.1.8  
#4 0x40045cb5 in rb\_eval\_string () from /usr/lib/libruby.so.1.8  
#5 0x4004ded9 in rb\_rescue2 () from /usr/lib/libruby.so.1.8  
#6 0x40018822 in lib\_watchdog\_ensure ()  
from /usr/lib/ruby/1.8/i586-linux-gnu/tcltklib.so  
#7 0x4004e11e in rb\_ensure () from /usr/lib/libruby.so.1.8  
#8 0x40018905 in lib\_watchdog\_ensure ()  
from /usr/lib/ruby/1.8/i586-linux-gnu/tcltklib.so  
(gdb)

(no debugging symbols found)…(no debugging symbols found)…  
Program received signal SIGSEGV, Segmentation fault.  
0x400a9fd0 in st\_free\_table () from /usr/lib/libruby.so.1.8  
(gdb) bt  
#0 0x400a9fd0 in st\_free\_table () from /usr/lib/libruby.so.1.8  
#1 0x4006342f in rb\_gc\_force\_recycle () from /usr/lib/libruby.so.1.8  
#2 0x40063188 in rb\_gc\_mark () from /usr/lib/libruby.so.1.8  
#3 0x400638b9 in rb\_gc () from /usr/lib/libruby.so.1.8  
#4 0x40062269 in rb\_newobj () from /usr/lib/libruby.so.1.8  
#5 0x4004ecf3 in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#6 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#7 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#8 0x4004adef in rb\_Array () from /usr/lib/libruby.so.1.8  
#9 0x4004cf0a in rb\_iterator\_p () from /usr/lib/libruby.so.1.8  
#10 0x4004d217 in rb\_yield\_values () from /usr/lib/libruby.so.1.8  
#11 0x400408e9 in rb\_each () from /usr/lib/libruby.so.1.8  
#12 0x4004ce97 in rb\_iterator\_p () from /usr/lib/libruby.so.1.8  
#13 0x4004d151 in rb\_yield () from /usr/lib/libruby.so.1.8  
#14 0x40033472 in rb\_ary\_each () from /usr/lib/libruby.so.1.8  
#15 0x4005c1fa in rb\_throw () from /usr/lib/libruby.so.1.8  
#16 0x4004f1fd in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#17 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#18 0x4004f903 in rb\_funcall () from /usr/lib/libruby.so.1.8  
#19 0x4003f957 in rb\_each () from /usr/lib/libruby.so.1.8  
#20 0x4004da29 in rb\_iterate () from /usr/lib/libruby.so.1.8  
#21 0x40040963 in rb\_each () from /usr/lib/libruby.so.1.8  
#22 0x4005c1fa in rb\_throw () from /usr/lib/libruby.so.1.8  
#23 0x4004f1fd in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#24 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#25 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#26 0x4004b523 in rb\_Array () from /usr/lib/libruby.so.1.8  
#27 0x4004ef97 in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#28 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#29 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#30 0x4004b4e5 in rb\_Array () from /usr/lib/libruby.so.1.8  
#31 0x4004ef97 in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#32 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#33 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#34 0x4004993f in rb\_Array () from /usr/lib/libruby.so.1.8  
#35 0x4004ef97 in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#36 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#37 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#38 0x4004870d in rb\_Array () from /usr/lib/libruby.so.1.8  
—Type to continue, or q to quit—  
#39 0x4004870d in rb\_Array () from /usr/lib/libruby.so.1.8  
#40 0x4004870d in rb\_Array () from /usr/lib/libruby.so.1.8  
#41 0x4004993f in rb\_Array () from /usr/lib/libruby.so.1.8  
#42 0x4004cf0a in rb\_iterator\_p () from /usr/lib/libruby.so.1.8  
#43 0x4004d151 in rb\_yield () from /usr/lib/libruby.so.1.8  
#44 0x40079204 in rb\_fix2str () from /usr/lib/libruby.so.1.8  
#45 0x4005c1fa in rb\_throw () from /usr/lib/libruby.so.1.8  
#46 0x4004f1fd in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#47 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#48 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#49 0x4004b523 in rb\_Array () from /usr/lib/libruby.so.1.8  
#50 0x4004ef97 in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#51 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#52 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#53 0x40048965 in rb\_Array () from /usr/lib/libruby.so.1.8  
#54 0x4004ef97 in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#55 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#56 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#57 0x4004cf0a in rb\_iterator\_p () from /usr/lib/libruby.so.1.8  
#58 0x400548a1 in rb\_f\_lambda () from /usr/lib/libruby.so.1.8  
#59 0x400549c8 in rb\_f\_lambda () from /usr/lib/libruby.so.1.8  
#60 0x4005c1c6 in rb\_throw () from /usr/lib/libruby.so.1.8  
#61 0x4004f1fd in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#62 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#63 0x4004f9ab in rb\_funcall2 () from /usr/lib/libruby.so.1.8  
#64 0x400462d0 in rb\_eval\_cmd () from /usr/lib/libruby.so.1.8  
#65 0x4001f966 in \_init () from /usr/lib/ruby/1.8/i586-linux-gnu/tkutil.so  
#66 0x4005c1e4 in rb\_throw () from /usr/lib/libruby.so.1.8  
#67 0x4004f1fd in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#68 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#69 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#70 0x4004cf0a in rb\_iterator\_p () from /usr/lib/libruby.so.1.8  
#71 0x400548a1 in rb\_f\_lambda () from /usr/lib/libruby.so.1.8  
#72 0x400549c8 in rb\_f\_lambda () from /usr/lib/libruby.so.1.8  
#73 0x4005c1c6 in rb\_throw () from /usr/lib/libruby.so.1.8  
#74 0x4004f1fd in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#75 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#76 0x4004f9ab in rb\_funcall2 () from /usr/lib/libruby.so.1.8  
#77 0x400462d0 in rb\_eval\_cmd () from /usr/lib/libruby.so.1.8  
—Type to continue, or q to quit—  
#78 0x4001f966 in \_init () from /usr/lib/ruby/1.8/i586-linux-gnu/tkutil.so  
#79 0x4005c1e4 in rb\_throw () from /usr/lib/libruby.so.1.8  
#80 0x4004f1fd in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#81 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#82 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#83 0x4004ae1b in rb\_Array () from /usr/lib/libruby.so.1.8  
#84 0x4004ef97 in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#85 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#86 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#87 0x4004ef97 in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#88 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#89 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#90 0x4004ef97 in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#91 0x4004f59f in rb\_with\_disable\_interrupt () from /usr/lib/libruby.so.1.8  
#92 0x400486bc in rb\_Array () from /usr/lib/libruby.so.1.8  
#93 0x400503e1 in rb\_frame\_last\_func () from /usr/lib/libruby.so.1.8  
#94 0x40045cb5 in rb\_eval\_string () from /usr/lib/libruby.so.1.8  
#95 0x4004ded9 in rb\_rescue2 () from /usr/lib/libruby.so.1.8  
#96 0x40018822 in lib\_watchdog\_ensure ()  
from /usr/lib/ruby/1.8/i586-linux-gnu/tcltklib.so  
#97 0x4004e11e in rb\_ensure () from /usr/lib/libruby.so.1.8  
#98 0x40018905 in lib\_watchdog\_ensure ()  
from /usr/lib/ruby/1.8/i586-linux-gnu/tcltklib.so

(no debugging symbols found)…(no debugging symbols found)…  
Program received signal SIGSEGV, Segmentation fault.  
0x401afb5d in mallopt () from /lib/i686/libc.so.6  
(gdb) bt  
#0 0x401afb5d in mallopt () from /lib/i686/libc.so.6  
#1 0x401aecb8 in malloc () from /lib/i686/libc.so.6  
(gdb)

---

<div class="post-metadata">

**Author:** ![Nobuyoshi\_Nakada](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nobuyoshi\_Nakada](https://rubytalk.org/u/Nobuyoshi_Nakada)\
**Post date:** [19 January 2004 23:48 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/5 "2004-01-19T23:48:43Z")

</div>

Hi,

> I still cannot know how to dump core, but running 3 times from gdb  
> caused 3 segfaults in different places.

Try “ulimit -c unlimited” to make core.

> Here are the backtraces (sorry about the long mail):

All seem related with GC. I guess it might be fixed in CVS  
HEAD, or disapper by configuring with --disable-pthread.

> **···**
>
> At Tue, 20 Jan 2004 07:42:41 +0900, Ferenc Engard wrote:
> 
> –  
> Nobu Nakada

---

<div class="post-metadata">

**Author:** ![Ferenc\_Engard1](https://avatars.discourse-cdn.com/v4/letter/f/c6cbf5/32.png) [@Ferenc\_Engard1](https://rubytalk.org/u/Ferenc_Engard1)\
**Post date:** [20 January 2004 06:14 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/6 "2004-01-20T06:14:49Z")

</div>

Does it affect multithreading (i.e., tk)?

Anyway, it seems that the problem exists only on mandrake, even with  
newer ruby than on my debian box. The latest one was tried is  
2003-12-27, and on debian I was happy with 2003-11-11. Are you sure  
compiling the HEAD version solves the problem?

Nobody uses mandrake here?

Ferenc

> **···**
>
> [nobu.nokada@softhome.net](mailto:nobu.nokada@softhome.net) wrote:
> 
> > Hi,
> > 
> > At Tue, 20 Jan 2004 07:42:41 +0900, \> Ferenc Engard wrote:
> > 
> > > I still cannot know how to dump core, but running 3 times from gdb  
> > > caused 3 segfaults in different places.
> > 
> > Try “ulimit -c unlimited” to make core.
> > 
> > > Here are the backtraces (sorry about the long mail):
> > 
> > All seem related with GC. I guess it might be fixed in CVS  
> > HEAD, or disapper by configuring with --disable-pthread.

---

<div class="post-metadata">

**Author:** ![Yukihiro\_Matsumoto2](https://avatars.discourse-cdn.com/v4/letter/y/b9e5f3/32.png) [@Yukihiro\_Matsumoto2](https://rubytalk.org/u/Yukihiro_Matsumoto2)\
**Post date:** [20 January 2004 06:29 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/7 "2004-01-20T06:29:21Z")

</div>

Hi,

> **···**
>
> In message “Re: segfaults on mandrake…” on 04/01/20, Ferenc Engard [ferenc@engard.hu](mailto:ferenc@engard.hu) writes:
> 
> > > All seem related with GC. I guess it might be fixed in CVS  
> > > HEAD, or disapper by configuring with --disable-pthread.
> > 
> > Does it affect multithreading (i.e., tk)?
> 
> Depends on your platform. If your tcltk is linked with -lpthread,  
> -enable-pthread is necessary.
> 
> ```
> matz.
> 
> ```

---

<div class="post-metadata">

**Author:** ![Nobuyoshi\_Nakada](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nobuyoshi\_Nakada](https://rubytalk.org/u/Nobuyoshi_Nakada)\
**Post date:** [20 January 2004 06:49 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/8 "2004-01-20T06:49:58Z")

</div>

Hi,

> > > Here are the backtraces (sorry about the long mail):
> > 
> > All seem related with GC. I guess it might be fixed in CVS  
> > HEAD, or disapper by configuring with --disable-pthread.
> 
> Does it affect multithreading (i.e., tk)?

It should have worked before --enable-pthread was introduced.

> Anyway, it seems that the problem exists only on mandrake, even with  
> newer ruby than on my debian box. The latest one was tried is  
> 2003-12-27, and on debian I was happy with 2003-11-11. Are you sure  
> compiling the HEAD version solves the problem?

Though I’m not sure, there are some fixes which are not  
backported to 1.8 yet.

> **···**
>
> At Tue, 20 Jan 2004 15:14:49 +0900, Ferenc Engard wrote:
> 
> –  
> Nobu Nakada

---

<div class="post-metadata">

**Author:** ![Mike\_Stok2](https://avatars.discourse-cdn.com/v4/letter/m/d2c977/32.png) [@Mike\_Stok2](https://rubytalk.org/u/Mike_Stok2)\
**Post date:** [20 January 2004 10:30 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/9 "2004-01-20T10:30:11Z")

</div>

In article [400CC766.8E0DD71@engard.hu](mailto:400CC766.8E0DD71@engard.hu),

> Does it affect multithreading (i.e., tk)?
> 
> Anyway, it seems that the problem exists only on mandrake, even with  
> newer ruby than on my debian box. The latest one was tried is  
> 2003-12-27, and on debian I was happy with 2003-11-11. Are you sure  
> compiling the HEAD version solves the problem?
> 
> Nobody uses mandrake here?

I use Mandrake 9.2 (up to date with the latest patches) with a “self  
compiled” Ruby 1.8.1 with no problems, and I am messing around with a  
Tk application quite happily.

[mike@ratdog mike]$ cat /etc/redhat-release  
Mandrake Linux release 9.2 (FiveStar) for i586  
[mike@ratdog mike]$ rpm -qa | grep ‘^tk-’  
tk-8.4.2-1mdk  
[mike@ratdog mike]$ ldd /usr/lib/libtk8.4.so  
libX11.so.6 =\> /usr/X11R6/lib/libX11.so.6 (0x400e2000)  
libdl.so.2 =\> /lib/libdl.so.2 (0x401c5000)  
libm.so.6 =\> /lib/i686/libm.so.6 (0x401c8000)  
libc.so.6 =\> /lib/i686/libc.so.6 (0x401eb000)  
/lib/ld-linux.so.2 =\> /lib/ld-linux.so.2 (0x80000000)

Would there be any mileage in setting up something like Perl’s smoke  
test system (see [Client Challenge](http://search.cpan.org/dist/Test-Smoke/FAQ) and an  
example report from the archive  
[Smoke [5.9.0] 22174 FAIL(XF) linux 2.4.22-26mdkenterprise (i686/1 cpu) - nntp.perl.org](http://www.nntp.perl.org/group/perl.daily-build.reports/13325))?

Mike

> **···**
>
> ## Ferenc Engard [ferenc@engard.hu](mailto:ferenc@engard.hu) wrote:
> 
> [mike@stok.co.uk](mailto:mike@stok.co.uk) | The “`Stok’ disclaimers” apply.  
> [http://www.stok.co.uk/~mike/](http://www.stok.co.uk/~mike/) | GPG PGP Key 1024D/059913DA  
> [mike@exegenix.com](mailto:mike@exegenix.com) | Fingerprint 0570 71CD 6790 7C28 3D60  
> [http://www.exegenix.com/](http://www.exegenix.com/) | 75D2 9EC4 C1C0 0599 13DA

---

<div class="post-metadata">

**Author:** ![Ferenc\_Engard1](https://avatars.discourse-cdn.com/v4/letter/f/c6cbf5/32.png) [@Ferenc\_Engard1](https://rubytalk.org/u/Ferenc_Engard1)\
**Post date:** [20 January 2004 08:54 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/10 "2004-01-20T08:54:10Z")

</div>

Yes, it does. ☹

fery@cirmi:~$ ldd /usr/lib/libtk8.4.so.0  
libpthread.so.0 =\> /lib/libpthread.so.0 (0x400e0000)  
[…]

Ferenc

> **···**
>
> On Tue, 20 Jan 2004, Yukihiro Matsumoto wrote:
> 
> > Hi,
> > 
> > In message “Re: segfaults on mandrake…” \> on 04/01/20, Ferenc Engard [ferenc@engard.hu](mailto:ferenc@engard.hu) writes:
> > 
> > > > All seem related with GC. I guess it might be fixed in CVS  
> > > > HEAD, or disapper by configuring with --disable-pthread.
> > > 
> > > Does it affect multithreading (i.e., tk)?
> > 
> > Depends on your platform. If your tcltk is linked with -lpthread,  
> > -enable-pthread is necessary.

---

<div class="post-metadata">

**Author:** ![Ferenc\_Engard1](https://avatars.discourse-cdn.com/v4/letter/f/c6cbf5/32.png) [@Ferenc\_Engard1](https://rubytalk.org/u/Ferenc_Engard1)\
**Post date:** [20 January 2004 08:56 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/11 "2004-01-20T08:56:01Z")

</div>

As there were no other suggestions, I try to do my first ruby  
compiling… :((

Mandrake uses many dist-specific patches to libc. Cannot be the  
problem connected with one of these patches?

Ferenc

> **···**
>
> On Tue, 20 Jan 2004 [nobu.nokada@softhome.net](mailto:nobu.nokada@softhome.net) wrote:
> 
> > Hi,
> > 
> > At Tue, 20 Jan 2004 15:14:49 +0900, \>Ferenc Engard wrote:
> > 
> > > > > Here are the backtraces (sorry about the long mail):
> > > > 
> > > > All seem related with GC. I guess it might be fixed in CVS  
> > > > HEAD, or disapper by configuring with --disable-pthread.
> > > 
> > > Does it affect multithreading (i.e., tk)?
> > 
> > It should have worked before --enable-pthread was introduced.
> > 
> > > Anyway, it seems that the problem exists only on mandrake, even with  
> > > newer ruby than on my debian box. The latest one was tried is  
> > > 2003-12-27, and on debian I was happy with 2003-11-11. Are you sure  
> > > compiling the HEAD version solves the problem?
> > 
> > Though I’m not sure, there are some fixes which are not  
> > backported to 1.8 yet.

---

<div class="post-metadata">

**Author:** ![Ferenc\_Engard1](https://avatars.discourse-cdn.com/v4/letter/f/c6cbf5/32.png) [@Ferenc\_Engard1](https://rubytalk.org/u/Ferenc_Engard1)\
**Post date:** [20 January 2004 17:10 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/12 "2004-01-20T17:10:44Z")

</div>

Mine:

ruby-1.8.1-1mdk (2004-01-07)  
tk-8.4.5-2mdk (2003-11-25)

Home-made libmysql-ruby, the source seems to be 2.4.5, 2003-08-09

I also use tktable and tix.

Ferenc

> **···**
>
> On Tue, 20 Jan 2004, Mike Stok wrote:
> 
> > In article [400CC766.8E0DD71@engard.hu](mailto:400CC766.8E0DD71@engard.hu),  
> > Ferenc Engard [ferenc@engard.hu](mailto:ferenc@engard.hu) wrote:
> > 
> > > Does it affect multithreading (i.e., tk)?
> > > 
> > > Anyway, it seems that the problem exists only on mandrake, even with  
> > > newer ruby than on my debian box. The latest one was tried is  
> > > 2003-12-27, and on debian I was happy with 2003-11-11. Are you sure  
> > > compiling the HEAD version solves the problem?
> > > 
> > > Nobody uses mandrake here?
> > 
> > I use Mandrake 9.2 (up to date with the latest patches) with a “self  
> > compiled” Ruby 1.8.1 with no problems, and I am messing around with a  
> > Tk application quite happily.
> > 
> > [mike@ratdog mike]$ cat /etc/redhat-release  
> > Mandrake Linux release 9.2 (FiveStar) for i586  
> > [mike@ratdog mike]$ rpm -qa | grep ‘^tk-’  
> > tk-8.4.2-1mdk

---

<div class="post-metadata">

**Author:** ![Ferenc\_Engard1](https://avatars.discourse-cdn.com/v4/letter/f/c6cbf5/32.png) [@Ferenc\_Engard1](https://rubytalk.org/u/Ferenc_Engard1)\
**Post date:** [20 January 2004 18:56 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/13 "2004-01-20T18:56:26Z")

</div>

> > > > Here are the backtraces (sorry about the long mail):
> > > 
> > > All seem related with GC. I guess it might be fixed in CVS  
> > > HEAD, or disapper by configuring with --disable-pthread.
> > 
> > Does it affect multithreading (i.e., tk)?
> 
> It should have worked before --enable-pthread was introduced.
> 
> > Anyway, it seems that the problem exists only on mandrake, even with  
> > newer ruby than on my debian box. The latest one was tried is  
> > 2003-12-27, and on debian I was happy with 2003-11-11. Are you sure  
> > compiling the HEAD version solves the problem?
> 
> Though I’m not sure, there are some fixes which are not  
> backported to 1.8 yet.

Compiling from the yesterday’s snapshot (with mdk patches) do not  
produce these errors. Thank you very much for your help!

Ferenc

---

<div class="post-metadata">

**Author:** ![Nobuyoshi\_Nakada](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nobuyoshi\_Nakada](https://rubytalk.org/u/Nobuyoshi_Nakada)\
**Post date:** [20 January 2004 12:01 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/14 "2004-01-20T12:01:00Z")

</div>

Hi,

> **···**
>
> At Tue, 20 Jan 2004 17:56:01 +0900, Ferenc Engard wrote:
> 
> > Mandrake uses many dist-specific patches to libc. Cannot be the  
> > problem connected with one of these patches?
> 
> As for possibility, yes. But I don’t know what patches there  
> are.
> 
> –  
> Nobu Nakada

---

<div class="post-metadata">

**Author:** ![Andre\_Nathan](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@Andre\_Nathan](https://rubytalk.org/u/Andre_Nathan)\
**Post date:** [20 January 2004 15:29 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/15 "2004-01-20T15:29:28Z")

</div>

Ferenc Engard said:

> As there were no other suggestions, I try to do my first ruby  
> compiling… :((
> 
> Mandrake uses many dist-specific patches to libc. Cannot be the  
> problem connected with one of these patches?

Mandrake has a ruby-tk package. Did you install this one? Also, the  
ruby rpm is not compiled with pthreads enabled (at least the one from  
[rpmfind.net](http://rpmfind.net)). You could try editing the spec file and re-create the  
rpm.

---

<div class="post-metadata">

**Author:** ![Ferenc\_Engard1](https://avatars.discourse-cdn.com/v4/letter/f/c6cbf5/32.png) [@Ferenc\_Engard1](https://rubytalk.org/u/Ferenc_Engard1)\
**Post date:** [20 January 2004 16:57 UTC](https://rubytalk.org/t/segfaults-on-mandrake/9735/16 "2004-01-20T16:57:14Z")

</div>

Sorry, I looked on my debian box. On mdk, the ruby and the libtk do  
not depend on pthreads.

So, this cannot be the problem. :-(((

We use those packages, and my brother tried compile from the latest  
sources which mdk provides. Still crashes…

The program crashes after I start to iterate through on a  
DBI::statementHandle with 2-3000 rows, but not always the same place.  
Sometimes during the iteration (searching, anyway), sometimes after  
it. I suspect to the GC, too, as many objects are created during this  
process.

How can I get more debug info, which I can forward to you?

Ferenc

> **···**
>
> On Wed, 21 Jan 2004, Andre Nathan wrote:
> 
> > Ferenc Engard said:
> > 
> > > As there were no other suggestions, I try to do my first ruby  
> > > compiling… :((
> > > 
> > > Mandrake uses many dist-specific patches to libc. Cannot be the  
> > > problem connected with one of these patches?
> > 
> > Mandrake has a ruby-tk package. Did you install this one? Also, the  
> > ruby rpm is not compiled with pthreads enabled (at least the one from  
> > [rpmfind.net](http://rpmfind.net)). You could try editing the spec file and re-create the  
> > rpm.
