[Bug 61861] Re: fails to build on ppc

2006-09-25 Thread Benjamin Herrenschmidt
Well, it didn't reproduce on my quad g5, at least not right away.
However, looking at the source is a bit scary ... that thing is just a
steaming pile of poo to re-use paulus expression... especially the way
it synchronizes with the timer thread without using any
synchronisation primitives, not even the (generally bogus) volatile,
etc... it's scray how bad that code is and I would definitely expect
random behaviour in races with it's timer thread thingy. I don't know if
it also takes signals but if it does, it's racy too, things like
rb_disable_interrupt++ to mask interrupts just don't work

-- 
fails to build on ppc
https://launchpad.net/bugs/61861

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 61861] Re: fails to build on ppc

2006-09-24 Thread Fabio Massimo Di Nitto
Ben,

do you happen to have any idea what the problem could be? the kernel on
these machines is .15 from dapper ppc64.

Thanks
Fabio

** Description changed:

  Build segfaults on ppc, but only on the machines in the datacentre so
- far.
+ far (that are running 64bit kernels)

-- 
fails to build on ppc
https://launchpad.net/bugs/61861

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 61861] Re: fails to build on ppc

2006-09-24 Thread Benjamin Herrenschmidt
Can I get a quick step-by-step howto reproduce the build environment ? I
have a quad g5 running dapper here that should be able to reproduce. Or
at least how to get the source of the bits that are segfaulting...

There is something that comes to mind right away though: rb_thread_* . I
don't know what that is, but if something is trying to invent it's own
threading/locking primitives without using glibc, then it's most likely
to get them wrong (incorrect barriers especially).

-- 
fails to build on ppc
https://launchpad.net/bugs/61861

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 61861] Re: fails to build on ppc

2006-09-24 Thread Fabio Massimo Di Nitto
The easiest way to reproduce it is to upgrade to edgy running dapper
kernel and:

apt-get source ruby1.8
sudo apt-get build-dep ruby1.8
sudo apt-get install fakeroot
cd ruby1.8-$version
dpkg-buildpackage -rfakeroot -uc -us -b

If upgrading to edgy is not an option you can easily use debootstrap to
create a chroot.

Thanks!
Fabio

-- 
fails to build on ppc
https://launchpad.net/bugs/61861

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 61861] Re: fails to build on ppc

2006-09-22 Thread Colin Watson
** Description changed:

- Build segfaults on pcc, but only on the machines in the datacentre so
+ Build segfaults on ppc, but only on the machines in the datacentre so
  far.

-- 
fails to build on ppc
https://launchpad.net/bugs/61861

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 61861] Re: fails to build on ppc

2006-09-22 Thread Colin Watson
(The sched_setaffinity rune above effectively disables concurrent
execution of threads without ABI problems by binding the process to run
on only a single CPU. It is definitely not an optimal solution.)

-- 
fails to build on ppc
https://launchpad.net/bugs/61861

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 61861] Re: fails to build on ppc

2006-09-22 Thread Colin Watson
This is a threading bug. While applying gdb to the problem, I noticed
that (a) the thing that was NULL was prot_tag and (b) prot_tag was
fiddled with in some rb_thread_* functions, so I tried building with
threading disabled, and it built fine (at least 'debian/rules build';
'debian/rules binary' failed because Ruby/Tk doesn't work when Ruby is
built without pthreads but Tk is built with pthreads).

Obviously this isn't actually a viable workaround due to the Ruby/Tk
problem and the fact that building without pthreads almost certainly
changes libruby's ABI, but it does indicate where to start looking. mono
had a similar problem, and we worked around it for a while with
something along the lines of:

#ifdef __powerpc__
#include sched.h
#endif

#ifdef __powerpc__
cpu_set_t cpuset;
CPU_ZERO(cpuset);
CPU_SET(0, cpuset);
sched_setaffinity(0, sizeof(cpuset), cpuset);
#endif

** Changed in: ruby1.8 (Ubuntu)
   Importance: Untriaged = Medium
   Status: Unconfirmed = Confirmed

-- 
fails to build on ppc
https://launchpad.net/bugs/61861

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 61861] Re: fails to build on ppc

2006-09-22 Thread Colin Watson
Unfortunately, my sched_setaffinity workaround doesn't actually appear
to work.

-- 
fails to build on ppc
https://launchpad.net/bugs/61861

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs