On Tue, 2014-09-23 22:59:46 +0300, Niko Tyni wrote:
> 
> I also had a look at the mips one, and there the problem doesn't seem
> to be with the backtrace, as running gdb separately works as expected.
> However, running perl with -d:bt doesn't seem to do anything. It looks
> like the host is just too slow; inserting a 'sleep(1)' just before the
> "thread apply all backtrace" command in stack_trace() fixes it for
> me. Perhaps the code should just check that the fd is ready for writing?

With Niko's workaround, libdevel-bt-perl-0.06 builds on mips and mipsel.

debdiff libdevel-bt-perl_0.06-2.dsc libdevel-bt-perl_0.06-2.1.dsc
diff -Nru libdevel-bt-perl-0.06/debian/changelog 
libdevel-bt-perl-0.06/debian/changelog
--- libdevel-bt-perl-0.06/debian/changelog      2014-09-04 13:24:11.000000000 
+0100
+++ libdevel-bt-perl-0.06/debian/changelog      2014-09-25 12:08:43.000000000 
+0100
@@ -1,3 +1,13 @@
+libdevel-bt-perl (0.06-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS on mips and mipsel.
+    Add sleep-bt.xs.patch.
+    Patch by Niko Tyni.
+    Closes: #721421.
+
+ -- Anibal Monsalve Salazar <ani...@debian.org>  Thu, 25 Sep 2014 12:08:40 
+0100
+
 libdevel-bt-perl (0.06-2) unstable; urgency=low
 
   [ gregor herrmann ]
diff -Nru libdevel-bt-perl-0.06/debian/patches/series 
libdevel-bt-perl-0.06/debian/patches/series
--- libdevel-bt-perl-0.06/debian/patches/series 2014-09-04 13:24:11.000000000 
+0100
+++ libdevel-bt-perl-0.06/debian/patches/series 2014-09-25 12:07:45.000000000 
+0100
@@ -1,2 +1,3 @@
 hurd_path_max.patch
 0001-Raise-instead-of-kill-the-signal.patch
+sleep-bt.xs.patch
diff -Nru libdevel-bt-perl-0.06/debian/patches/sleep-bt.xs.patch 
libdevel-bt-perl-0.06/debian/patches/sleep-bt.xs.patch
--- libdevel-bt-perl-0.06/debian/patches/sleep-bt.xs.patch      1970-01-01 
01:00:00.000000000 +0100
+++ libdevel-bt-perl-0.06/debian/patches/sleep-bt.xs.patch      2014-09-25 
12:07:59.000000000 +0100
@@ -0,0 +1,25 @@
+From: Niko Tyni <nt...@debian.org>
+Subject: Re: Bug#721421: libdevel-bt-perl: FTBFS on armel, hurd-i386, 
kfreebsd-amd64
+Date: Tue, 23 Sep 2014 22:59:46 +0300
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721421
+
+I had a look at the mips one, and there the problem doesn't seem to be with the
+backtrace, as running gdb separately works as expected.  However, running perl
+with -d:bt doesn't seem to do anything. It looks like the host is just too
+slow; inserting a 'sleep(1)' just before the "thread apply all backtrace"
+command in stack_trace() fixes it for me. Perhaps the code should just check
+that the fd is ready for writing?
+
+Index: libdevel-bt-perl-0.06/bt.xs
+===================================================================
+--- libdevel-bt-perl-0.06.orig/bt.xs
++++ libdevel-bt-perl-0.06/bt.xs
+@@ -91,6 +91,7 @@ stack_trace (char **args)
+     FD_ZERO(&fdset);
+     FD_SET(out_fd[0], &fdset);
+ 
++    sleep(1);
+     write(in_fd[1], "thread apply all backtrace\n", 27);
+     write(in_fd[1], "quit\n", 5);
+ 

Attachment: signature.asc
Description: Digital signature

Reply via email to