Comment 5 for bug 1070008

Revision history for this message
Roger Leigh (rleigh) wrote :

Unwanted side effect of cloning; triggered by the copy constructor chaining up to the block_device_base ctor, which calls set_device, which then calls chroot_facet_mountable::set_mount_device.

(gdb) run --recover-session -c snaptest
Starting program: /home/rleigh/schroot/bin/schroot/schroot --recover-session -c snaptest
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, sbuild::session::set_user_options (this=0x54b830,
    user_options=...) at sbuild-session.cc:330
330 this->user_options = user_options;
(gdb) break sbuild::chroot_facet_mountable::set_mount_device
Breakpoint 2 at 0x4ad960: file sbuild-chroot-facet-mountable.cc, line 74.
(gdb) c
Continuing.

Breakpoint 2, sbuild::chroot_facet_mountable::set_mount_device (this=0x595e20,
    mount_device=...) at sbuild-chroot-facet-mountable.cc:74
74 this->mount_device = mount_device;
(gdb) bt
#0 sbuild::chroot_facet_mountable::set_mount_device (this=0x595e20,
    mount_device=...) at sbuild-chroot-facet-mountable.cc:74
#1 0x00000000004a58a5 in sbuild::chroot_block_device_base::set_device (
    this=this@entry=0x595b20, device=...)
    at sbuild-chroot-block-device-base.cc:83
#2 0x00000000004a595f in sbuild::chroot_block_device_base::chroot_block_device_base (this=0x595b20, rhs=...) at sbuild-chroot-block-device-base.cc:54
#3 0x00000000004a7d35 in sbuild::chroot_lvm_snapshot::chroot_lvm_snapshot (
    this=0x595b20, rhs=...) at sbuild-chroot-lvm-snapshot.cc:50
#4 0x00000000004a7f31 in sbuild::chroot_lvm_snapshot::clone (this=0x586550)
    at sbuild-chroot-lvm-snapshot.cc:61
#5 0x00000000004634f3 in sbuild::session::run_impl (this=0x54b830)
    at sbuild-session.cc:660
#6 0x000000000045e7d4 in sbuild::session::run (this=0x54b830)
    at sbuild-session.cc:585
#7 0x000000000042b77f in schroot::main_base::run_impl (this=0x7fffffffe9e0)
    at schroot-main-base.cc:360
#8 0x000000000041988a in schroot_base::main::run (this=0x7fffffffe9e0,
    argc=<optimized out>, argv=0x7fffffffeb78) at schroot-base-main.cc:107
#9 0x0000000000414bef in run<schroot::options, schroot::main> (
    argv=0x7fffffffeb78, argc=4)
    at ../../bin/schroot-base/schroot-base-run.h:69
#10 main (argc=4, argv=0x7fffffffeb78) at schroot.cc:43