Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-09 Thread Adeodato Simó
* Lucas Nussbaum [Thu, 05 Feb 2009 14:43:40 +0100]:

 On 05/02/09 at 14:12 +0100, Adeodato Simó wrote:
  * Lucas Nussbaum [Mon, 02 Feb 2009 19:04:48 +0100]:

   On alpha, there's a segfault during the build. Manual builds on porter
   machines do work, though.

  Failed again with the same exact segfault.

 Do you want me to upload a manual build, or wait until an alpha porter
 gets the chance to take a look?

Please upload a manual build this time. If you're in a position to do
the same for hppa, please do that as well, else we'll migrate ruby1.9 -9
without hppa.

Please reply to this mail if you won't be uploading for hppa, so that we
can take the manual action needed.

Thanks,

-- 
Adeodato Simó dato at net.com.org.es
Debian Developer  adeodato at debian.org
 
Man is certainly stark mad; he cannot make a flea, yet he makes gods by the
dozens.
-- Michel de Montaigne


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-09 Thread Adeodato Simó
* dann frazier [Mon, 09 Feb 2009 08:26:40 -0700]:

 On Mon, Feb 09, 2009 at 02:25:10PM +0100, Adeodato Sim?? wrote:
  Please upload a manual build this time. If you're in a position to do
  the same for hppa, please do that as well, else we'll migrate ruby1.9 -9
  without hppa.

  Please reply to this mail if you won't be uploading for hppa, so that we
  can take the manual action needed.

 I'd be happy to do a manual upload for hppa if it would build, but
 this isn't just a problem with the buildds :(

Right. However, I've known Lucas has managed in the past to build hppa
binaries somewhere (the previous upload, ruby1.9_1.9.0.2-8_hppa.changes,
is signed by him), that's why I asked.

-- 
Adeodato Simó dato at net.com.org.es
Debian Developer  adeodato at debian.org
 
- Oh my God, you're pimping me out for a new roof?
- And windows!
-- Andrew and Bree Van De Kamp


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-09 Thread dann frazier
On Mon, Feb 09, 2009 at 02:25:10PM +0100, Adeodato Sim?? wrote:
 * Lucas Nussbaum [Thu, 05 Feb 2009 14:43:40 +0100]:
 
  On 05/02/09 at 14:12 +0100, Adeodato Sim?? wrote:
   * Lucas Nussbaum [Mon, 02 Feb 2009 19:04:48 +0100]:
 
On alpha, there's a segfault during the build. Manual builds on porter
machines do work, though.
 
   Failed again with the same exact segfault.
 
  Do you want me to upload a manual build, or wait until an alpha porter
  gets the chance to take a look?
 
 Please upload a manual build this time. If you're in a position to do
 the same for hppa, please do that as well, else we'll migrate ruby1.9 -9
 without hppa.
 
 Please reply to this mail if you won't be uploading for hppa, so that we
 can take the manual action needed.

I'd be happy to do a manual upload for hppa if it would build, but
this isn't just a problem with the buildds :(

-- 
dann frazier


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-09 Thread Lucas Nussbaum
On 09/02/09 at 16:33 +0100, Adeodato Simó wrote:
 * dann frazier [Mon, 09 Feb 2009 08:26:40 -0700]:
 
  On Mon, Feb 09, 2009 at 02:25:10PM +0100, Adeodato Sim?? wrote:
   Please upload a manual build this time. If you're in a position to do
   the same for hppa, please do that as well, else we'll migrate ruby1.9 -9
   without hppa.
 
   Please reply to this mail if you won't be uploading for hppa, so that we
   can take the manual action needed.
 
  I'd be happy to do a manual upload for hppa if it would build, but
  this isn't just a problem with the buildds :(
 
 Right. However, I've known Lucas has managed in the past to build hppa
 binaries somewhere (the previous upload, ruby1.9_1.9.0.2-8_hppa.changes,
 is signed by him), that's why I asked.

working on it (on paer.d.o).

I also uploaded the alpha binary packages, after building them on
albeniz.d.o (nothing special was necessary to get them to build ; there
might be something fishy on the buildds).
-- 
| Lucas Nussbaum
| lu...@lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
| jabber: lu...@nussbaum.fr GPG: 1024D/023B3F4F |


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-09 Thread dann frazier
On Mon, Feb 09, 2009 at 06:20:41PM +0100, Lucas Nussbaum wrote:
 On 09/02/09 at 16:33 +0100, Adeodato Sim? wrote:
  * dann frazier [Mon, 09 Feb 2009 08:26:40 -0700]:
  
   On Mon, Feb 09, 2009 at 02:25:10PM +0100, Adeodato Sim?? wrote:
Please upload a manual build this time. If you're in a position to do
the same for hppa, please do that as well, else we'll migrate ruby1.9 -9
without hppa.
  
Please reply to this mail if you won't be uploading for hppa, so that we
can take the manual action needed.
  
   I'd be happy to do a manual upload for hppa if it would build, but
   this isn't just a problem with the buildds :(
  
  Right. However, I've known Lucas has managed in the past to build hppa
  binaries somewhere (the previous upload, ruby1.9_1.9.0.2-8_hppa.changes,
  is signed by him), that's why I asked.
 
 working on it (on paer.d.o).

Thanks Lucas - I'll be very interested if you manage to get this to
succeed - I've tried it several times on several machines running a
current kernel and found it consistently hangs :(

Whomever manages to get it to build, please let me know the recipe
used - we'll need to reproduce it for security updates.

 I also uploaded the alpha binary packages, after building them on
 albeniz.d.o (nothing special was necessary to get them to build ; there
 might be something fishy on the buildds).

-- 
dann frazier


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-06 Thread dann frazier
On Thu, Feb 05, 2009 at 04:51:15PM -0700, dann frazier wrote:
 On Thu, Feb 05, 2009 at 09:00:43PM +0100, Helge Deller wrote:
  dann frazier wrote:
   On Mon, Feb 02, 2009 at 07:04:48PM +0100, Lucas Nussbaum wrote:
   ruby1.9 still fails to build on hppa and alpha.
  
   On hppa, it's caused by a kernel bug, which was partially fixed (at
   least the kernel doesn't panic() anymore). Since the issue is related to
   threading, it is possible that retrying could make it build
   successfully.
   
   fyi, I've retried it numerous times on both buildds with no
   luck. We're not crashing the buildd anymore - thanks to Helge's fix -
  
  The kudos belong to James Bottomley btw. I did debugging and testing,
  but James gave me the final hint to the solution then...
  
   but the build hangs indefinitely. I've no objection to it being
   retried again of course (and I'm not the buildd admin anyway) - I just
   want to set your expectations.
  
  I tried a few times now to find the bug. I'm not sure if it's really due to 
  a) a kernel bug (probably)
  b) the fact that hppa still uses Linuxthreads (although Dann mentioned
  in another mail that he saw similar problems with another server which
  used NPTL instead of Linuxthreads)
 
 Since I don't remember the last time I tried, I've started another
 build in my NPTL chroot running a fixed kernel to verify that I'm
 still seeing it.

And I am. Hangs at:

cc -fno-strict-aliasing -g -g -O2 -O2 -g -Wall -Wno-parentheses  -fPIC  -I. 
-I.ext/include/hppa-linux -I./include -I.  -DRUBY_EXPORT   -o dmyext.o -c 
dmyext.c
cc -fno-strict-aliasing -g -g -O2 -O2 -g -Wall -Wno-parentheses  -fPIC  -L.  
-rdynamic -Wl,-export-dynamic   main.o dln.o dmyencoding.o miniprelude.o 
array.o bignum.o class.o compar.o complex.o dir.o enum.o enumerator.o error.o 
eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o 
object.o pack.o parse.o process.o prec.o random.o range.o rational.o re.o 
regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o signal.o 
sprintf.o st.o string.o struct.o time.o transcode.o util.o variable.o version.o 
blockinlining.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o id.o 
ascii.o us_ascii.o unicode.o utf_8.o strlcpy.o strlcat.o  dmyext.o  -lpthread 
-lrt -ldl -lcrypt -lm   -o miniruby
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb  ./enc/make_encdb.rb 
./enc encdb.h.new


 
  C) wrong pthread coding in ruby1.9
  
  If it's due to a) (kernel bug), then it's hard to find and track down.
  I concentrated on b) and c) for now. LT uses a few signals to synchronize 
  the
  threads, and ruby plays some small but bad games with signals in it's code, 
  e.g.
  rb_disable_interrupt() and rb_enable_interrupt() in signal.c.
  With the attached patch/hack below I tried to work around possible 
  LT-related cornercases
  in ruby1.9, but the issue stays the same: make test will make the ruby
  testsuite hang in the test_thread.rb test. It seems some thread is waiting
  for a signal which will not arrive, since the other thread is a zombie 
  already
  
  Anyway, it would be nice if someone with ruby knowledge could reduce 
  the testsuite, so that it will be easier to reproduce the bug. I'm a little
  lost at this stage. Now since the hppa kernel doesn't crash any longer, 
  building
  such a testcase should be much easier to create.
 
 
 
 

-- 
dann frazier


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-05 Thread Adeodato Simó
* Lucas Nussbaum [Mon, 02 Feb 2009 19:04:48 +0100]:

 On alpha, there's a segfault during the build. Manual builds on porter
 machines do work, though.

Failed again with the same exact segfault.

-- 
Adeodato Simó dato at net.com.org.es
Debian Developer  adeodato at debian.org
 
The surest way to corrupt a youth is to instruct him to hold in higher
esteem those who think alike than those who think differently.
-- F. Nietzsche


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-05 Thread Lucas Nussbaum
On 05/02/09 at 14:12 +0100, Adeodato Simó wrote:
 * Lucas Nussbaum [Mon, 02 Feb 2009 19:04:48 +0100]:
 
  On alpha, there's a segfault during the build. Manual builds on porter
  machines do work, though.
 
 Failed again with the same exact segfault.

Do you want me to upload a manual build, or wait until an alpha porter
gets the chance to take a look?
-- 
| Lucas Nussbaum
| lu...@lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
| jabber: lu...@nussbaum.fr GPG: 1024D/023B3F4F |


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-05 Thread Helge Deller
dann frazier wrote:
 On Mon, Feb 02, 2009 at 07:04:48PM +0100, Lucas Nussbaum wrote:
 ruby1.9 still fails to build on hppa and alpha.

 On hppa, it's caused by a kernel bug, which was partially fixed (at
 least the kernel doesn't panic() anymore). Since the issue is related to
 threading, it is possible that retrying could make it build
 successfully.
 
 fyi, I've retried it numerous times on both buildds with no
 luck. We're not crashing the buildd anymore - thanks to Helge's fix -

The kudos belong to James Bottomley btw. I did debugging and testing,
but James gave me the final hint to the solution then...

 but the build hangs indefinitely. I've no objection to it being
 retried again of course (and I'm not the buildd admin anyway) - I just
 want to set your expectations.

I tried a few times now to find the bug. I'm not sure if it's really due to 
a) a kernel bug (probably)
b) the fact that hppa still uses Linuxthreads (although Dann mentioned
in another mail that he saw similar problems with another server which
used NPTL instead of Linuxthreads)
c) wrong pthread coding in ruby1.9

If it's due to a) (kernel bug), then it's hard to find and track down.
I concentrated on b) and c) for now. LT uses a few signals to synchronize the
threads, and ruby plays some small but bad games with signals in it's code, e.g.
rb_disable_interrupt() and rb_enable_interrupt() in signal.c.
With the attached patch/hack below I tried to work around possible LT-related 
cornercases
in ruby1.9, but the issue stays the same: make test will make the ruby
testsuite hang in the test_thread.rb test. It seems some thread is waiting
for a signal which will not arrive, since the other thread is a zombie 
already

Anyway, it would be nice if someone with ruby knowledge could reduce 
the testsuite, so that it will be easier to reproduce the bug. I'm a little
lost at this stage. Now since the hppa kernel doesn't crash any longer, building
such a testcase should be much easier to create.

Helge

--- ./signal.c.org	2009-02-05 11:16:23.0 +0100
+++ ./signal.c	2009-02-05 20:52:38.0 +0100
@@ -36,6 +36,46 @@
 # endif
 #endif
 
+/* ruby1.9 is a multithreaded program.
+   Nevertheless, ruby1.9 uses sigprocmask() which has unspecified 
+   behaviour in a multi-threaded process (see man page!).
+ */
+static void ruby_generate_sigprocmask(int how, sigset_t *mask, sigset_t *oldset)
+{
+	/* make sure that ruby does not block the Linuxthreads
+	   signals */
+	if (how == SIG_BLOCK) {
+		sigdelset(mask, __SIGRTMIN);
+		sigdelset(mask, __SIGRTMIN+1);
+		sigdelset(mask, __SIGRTMIN+2);
+	} else if (how == SIG_SETMASK) {
+		sigaddset(mask, __SIGRTMIN);
+		sigaddset(mask, __SIGRTMIN+1);
+		sigaddset(mask, __SIGRTMIN+2);
+	} else { // SIG_UNBLOCK
+		sigaddset(mask, __SIGRTMIN);
+		sigaddset(mask, __SIGRTMIN+1);
+		sigaddset(mask, __SIGRTMIN+2);
+	}
+}
+
+static int ruby_pthread_sigprocmask(int how, sigset_t *mask, sigset_t *oldset)
+{
+	ruby_generate_sigprocmask(how, mask, oldset);
+	return pthread_sigmask(how,mask,oldset);
+}
+
+static int ruby_sigprocmask(int how, sigset_t *mask, sigset_t *oldset)
+{
+#if 0 
+	return ruby_pthread_sigprocmask(how, mask, oldset);
+#else
+	ruby_generate_sigprocmask(how, mask, oldset);
+	/* XXX: ruby should not use sigprocmask(). */
+	return sigprocmask(how,mask,oldset);
+#endif
+}
+
 static const struct signals {
 const char *signm;
 int  signo;
@@ -430,7 +470,6 @@ static sighandler_t
 ruby_signal(int signum, sighandler_t handler)
 {
 struct sigaction sigact, old;
-
 #if 0
 rb_trap_accept_nativethreads[signum] = 0;
 #endif
@@ -448,6 +487,10 @@ ruby_signal(int signum, sighandler_t han
 if (signum == SIGCHLD  handler == SIG_IGN)
 	sigact.sa_flags |= SA_NOCLDWAIT;
 #endif
+
+//printf(signal: %d (%d), %p\n, signum, __SIGRTMIN, handler);
+if (signum = __SIGRTMIN  signum = __SIGRTMIN+2)
+	return NULL;
 sigaction(signum, sigact, old);
 return old.sa_handler;
 }
@@ -505,7 +548,7 @@ rb_disable_interrupt(void)
 sigfillset(mask);
 sigdelset(mask, SIGVTALRM);
 sigdelset(mask, SIGSEGV);
-pthread_sigmask(SIG_SETMASK, mask, NULL);
+ruby_pthread_sigprocmask(SIG_SETMASK, mask, NULL);
 #endif
 }
 
@@ -515,7 +558,7 @@ rb_enable_interrupt(void)
 #ifndef _WIN32
 sigset_t mask;
 sigemptyset(mask);
-pthread_sigmask(SIG_SETMASK, mask, NULL);
+ruby_pthread_sigprocmask(SIG_SETMASK, mask, NULL);
 #endif
 }
 
@@ -852,7 +895,7 @@ trap_ensure(struct trap_arg *arg)
 {
 /* enable interrupt */
 #ifdef HAVE_SIGPROCMASK
-sigprocmask(SIG_SETMASK, arg-mask, NULL);
+ruby_sigprocmask(SIG_SETMASK, arg-mask, NULL);
 #else
 sigsetmask(arg-mask);
 #endif
@@ -866,7 +909,7 @@ rb_trap_restore_mask(void)
 {
 #if USE_TRAP_MASK
 # ifdef HAVE_SIGPROCMASK
-sigprocmask(SIG_SETMASK, trap_last_mask, NULL);
+ruby_sigprocmask(SIG_SETMASK, trap_last_mask, NULL);
 # else
 sigsetmask(trap_last_mask);
 # endif
@@ -931,7 +974,7 @@ sig_trap(int argc, VALUE *argv)
 

Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-05 Thread dann frazier
On Thu, Feb 05, 2009 at 09:00:43PM +0100, Helge Deller wrote:
 dann frazier wrote:
  On Mon, Feb 02, 2009 at 07:04:48PM +0100, Lucas Nussbaum wrote:
  ruby1.9 still fails to build on hppa and alpha.
 
  On hppa, it's caused by a kernel bug, which was partially fixed (at
  least the kernel doesn't panic() anymore). Since the issue is related to
  threading, it is possible that retrying could make it build
  successfully.
  
  fyi, I've retried it numerous times on both buildds with no
  luck. We're not crashing the buildd anymore - thanks to Helge's fix -
 
 The kudos belong to James Bottomley btw. I did debugging and testing,
 but James gave me the final hint to the solution then...
 
  but the build hangs indefinitely. I've no objection to it being
  retried again of course (and I'm not the buildd admin anyway) - I just
  want to set your expectations.
 
 I tried a few times now to find the bug. I'm not sure if it's really due to 
 a) a kernel bug (probably)
 b) the fact that hppa still uses Linuxthreads (although Dann mentioned
 in another mail that he saw similar problems with another server which
 used NPTL instead of Linuxthreads)

Since I don't remember the last time I tried, I've started another
build in my NPTL chroot running a fixed kernel to verify that I'm
still seeing it.

 c) wrong pthread coding in ruby1.9
 
 If it's due to a) (kernel bug), then it's hard to find and track down.
 I concentrated on b) and c) for now. LT uses a few signals to synchronize the
 threads, and ruby plays some small but bad games with signals in it's code, 
 e.g.
 rb_disable_interrupt() and rb_enable_interrupt() in signal.c.
 With the attached patch/hack below I tried to work around possible LT-related 
 cornercases
 in ruby1.9, but the issue stays the same: make test will make the ruby
 testsuite hang in the test_thread.rb test. It seems some thread is waiting
 for a signal which will not arrive, since the other thread is a zombie 
 already
 
 Anyway, it would be nice if someone with ruby knowledge could reduce 
 the testsuite, so that it will be easier to reproduce the bug. I'm a little
 lost at this stage. Now since the hppa kernel doesn't crash any longer, 
 building
 such a testcase should be much easier to create.




-- 
dann frazier


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-02 Thread dann frazier
On Mon, Feb 02, 2009 at 07:04:48PM +0100, Lucas Nussbaum wrote:
 Hi,

hey Lucas!

 ruby1.9 still fails to build on hppa and alpha.
 
 On hppa, it's caused by a kernel bug, which was partially fixed (at
 least the kernel doesn't panic() anymore). Since the issue is related to
 threading, it is possible that retrying could make it build
 successfully.

fyi, I've retried it numerous times on both buildds with no
luck. We're not crashing the buildd anymore - thanks to Helge's fix -
but the build hangs indefinitely. I've no objection to it being
retried again of course (and I'm not the buildd admin anyway) - I just
want to set your expectations.

 On alpha, there's a segfault during the build. Manual builds on porter
 machines do work, though.

-- 
dann frazier


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Please give back ruby1.9/1.9.0.2-9 on hppa and alpha

2009-02-02 Thread Lucas Nussbaum
Hi,

ruby1.9 still fails to build on hppa and alpha.

On hppa, it's caused by a kernel bug, which was partially fixed (at
least the kernel doesn't panic() anymore). Since the issue is related to
threading, it is possible that retrying could make it build
successfully.

On alpha, there's a segfault during the build. Manual builds on porter
machines do work, though.
-- 
| Lucas Nussbaum
| lu...@lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
| jabber: lu...@nussbaum.fr GPG: 1024D/023B3F4F |


-- 
To UNSUBSCRIBE, email to debian-alpha-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org