Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 557458 - app-emulation/xen-tools-4.5.1-r3 xl cpupool-create segfault (with config file parameter)
Summary: app-emulation/xen-tools-4.5.1-r3 xl cpupool-create segfault (with config file...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Xen Devs
URL: http://lists.xen.org/archives/html/xe...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-13 12:02 UTC by Benjamin Beier
Modified: 2016-11-19 15:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Beier 2015-08-13 12:02:14 UTC
Since xen version 4.5.1 there is a bug with the xl cpupool-create command.
It always throws a segmentation fault when used with a config file as parameter.
The content of the config file does not really matter (valid or invalid).
It also fails with the example config file in /etc/xen/cpupool or with the dryrun flag.
You never get any output apart from "segmentation fault".
If you create exactly the same cpupool without using a config file it works absolutely fine.
Tested on multiple gentoo systems and it seems to be reproducible for everyone.
STrace shows that the command fails right after reading the content of the config file.

# cat testing
foo

# xl cpupool-create testing
Segmentation fault

# strace xl cpupool-create testing
(...)
open("testing", O_RDONLY)               = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=4, ...}) = 0
fstat(7, {st_mode=S_IFREG|0644, st_size=4, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x776ec3228000
read(7, "foo\n", 4096)                  = 4
close(7)                                = 0
munmap(0x776ec3228000, 4096)            = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault

::: GDB Backtrace :::

Program received signal SIGSEGV, Segmentation fault.
0x0000000000418db5 in main_cpupoolcreate (argc=<optimized out>, argv=0x7fffffffda50) at xl_cmdimpl.c:7102
7102    xl_cmdimpl.c: No such file or directory.
(gdb) bt
#0  0x0000000000418db5 in main_cpupoolcreate (argc=<optimized out>, argv=0x7fffffffda50) at xl_cmdimpl.c:7102
#1  0x0000000000407c79 in main (argc=2, argv=0x7fffffffda50) at xl.c:361 

::: Upstream Bug Report :::

I also reported this bug upstream and yet it is not sure whether it is gentoo related or not:
http://lists.xen.org/archives/html/xen-devel/2015-08/msg01374.html
Comment 1 Benjamin Beier 2016-11-19 15:48:22 UTC
Xen-tools version 4.5.X is not in the portage tree anymore and the problem seems to be fixed on newer xen-tools versions (4.6+).