[lxc-devel] [PATCH] lxc_start: report error message when config is not a regular file

Serge Hallyn serge.hallyn at ubuntu.com
Mon Oct 19 02:10:22 UTC 2015


Quoting Shi, Yang (yang.shi at linaro.org):
> On 10/15/2015 7:31 AM, Serge Hallyn wrote:
> >Quoting Yang Shi (yang.shi at linaro.org):
> >>When run the below command:
> >>lxc-start -n name -f /path/to/config
> >>
> >>If config is not a regular file, lxc-start will be killed by SEG FAULT
> >>directly.
> >
> >What exactly was the file to get a segfault?  When I try with a device
> >or a directory I do not get a segfault.
> 
> I'm using lxc 1.1.3 stable release on armv8 target, when I run the
> below command I got segment fault.
> 
> # lxc-start -n test -f /var/lib/lxc/test/
> lxc-start[309]: unhandled level 2 translation fault (11) at
> 0x00000000, esr 0x92000006
> pgd = ffff80834780e000
> [00000000] *pgd=00000083cb385003, *pud=00000083c99e3003,
> *pmd=0000000000000000
> 
> CPU: 2 PID: 309 Comm: lxc-start Not tainted 4.1.10 #25
> Hardware name: Freescale Layerscape 2085a RDB Board (DT)
> task: ffff80007b944d00 ti: ffff808347874000 task.ti: ffff808347874000
> PC is at 0xffff9d1ff2d0
> LR is at 0xffff9d1bc0d0
> pc : [<0000ffff9d1ff2d0>] lr : [<0000ffff9d1bc0d0>] pstate: 80000000
> sp : 0000fffffd9f3af0
> x29: 0000fffffd9f3af0 x28: 0000000000413000
> x27: 0000000000000000 x26: 0000000000000001
> x25: 0000000000000000 x24: 0000000000414370
> x23: 0000fffffd9f3be0 x22: 0000ffff9d35d3b0
> x21: 000000000000000f x20: 0000ffff9d37c000
> x19: 00000000004166d0 x18: 0000000000000001
> x17: 0000ffff9d1bc1e8 x16: 0000ffff9d37a458
> x15: 1201001100000000 x14: 00000000004167e0
> x13: 0000000000000000 x12: 0000000000000023
> x11: 0000000000000023 x10: 0101010101010101
> x9 : 7f7f7f7f7f7f7f7f x8 : 0101010101010101
> x7 : 7f7f7f7f7f7f7f7f x6 : ff4753404f5e5245
> x5 : 8000000000000000 x4 : 0000000000000000
> x3 : 00485441505f5346 x2 : 544f4f525f43584c
> x1 : 0000000000000000 x0 : 0000000000000000
> 
> >
> >>Exit with some error message to improve user experience.
> >
> >This is not the place to put that check (if it is needed).  It should go
> >into either lxc_container_new or load_config, wherever it is failing.
> 
> Thanks. If you think the segment fault error sounds valid, I will
> try to move the check to the right place.

Could you run that in gdb with lxc debug symbols and show a stack
trace?


More information about the lxc-devel mailing list