Bug#355880: [Buildd-tools-devel] Bug#355880: Segfaults immediately until I remove /etc/dchroot.conf

Roger Leigh rleigh at whinlatter.ukfsn.org
Wed Mar 8 14:31:00 UTC 2006


Loïc Minier <lool at dooz.org> writes:

>  schroot provided a nice dchroot wrapper when I installed it, but it
>  segfaulted immediately.

> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1211849024 (LWP 12233)]
> dchroot::session::run_impl (this=0x80d6fe8) at dchroot-session.cc:67
> 67        if (get_ruid() != get_uid())
> (gdb) bt
> #0  dchroot::session::run_impl (this=0x80d6fe8) at dchroot-session.cc:67
> #1  0x080565a8 in dchroot::session::run_impl (this=0x80d6fe8)
>     at dchroot-session.cc:74
> #2  0x080565a8 in dchroot::session::run_impl (this=0x80d6fe8)
>     at dchroot-session.cc:74
> #3  0x080565a8 in dchroot::session::run_impl (this=0x80d6fe8)
>     at dchroot-session.cc:74
> #4  0x080565a8 in dchroot::session::run_impl (this=0x80d6fe8)
>     at dchroot-session.cc:74
> #5  0x080565a8 in dchroot::session::run_impl (this=0x80d6fe8)
>     at dchroot-session.cc:74
> (gdb) print this->ruid
> $1 = 0
> (gdb) print this->uid 
> $2 = 0
>
>  I didn't understand what code should be initializing this->ruid and /
>  or this->uid, you probably know better.

This is done in sbuild::auth (schroot/sbuild-auth.cc, in the ctor
around line 100), instantiated in schroot/schroot.cc (line 333 for
dchroot).

The backtrace looks corrupt, though, so I think it most likely ran out
of or corrupted the stack.  There shouldn't be so many instances of
session::run_impl.  Please could you try this patch:

Index: schroot/dchroot-session.cc
===================================================================
RCS file: /cvsroot/buildd-tools/schroot/schroot/dchroot-session.cc,v
retrieving revision 1.2
diff -u -r1.2 dchroot-session.cc
--- schroot/dchroot-session.cc	20 Feb 2006 12:10:00 -0000	1.2
+++ schroot/dchroot-session.cc	8 Mar 2006 14:24:05 -0000
@@ -71,7 +71,7 @@
       throw error(fmt);
     }
 
-  session::run_impl();
+  sbuild::session::run_impl();
 }
 
 

If it's recursing here, this should chain up correctly.  Quite why it
works for me on powerpc, I'm not sure.  This might be a GCC bug on
powerpc?

BTW, I just uploaded a new version of schroot (0.2.7-1) as your bug
report arrived.  It should be in incoming now, so if you could test
the dchroot in this release, and again with the patch, it would be
appreciated.  If this is the problem, I'll upload a 0.2.7-2 release
later today.


Regards,
Roger

-- 
Roger Leigh
                Printing on GNU/Linux?  http://gutenprint.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20060308/2637c7b8/attachment.pgp


More information about the Buildd-tools-devel mailing list