xenstore: Increase stack size for xs reader thread
authorIan Jackson <ian.jackson@citrix.com>
Fri, 22 Feb 2019 13:38:13 +0000 (13:38 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 10 Jan 2020 17:09:30 +0000 (17:09 +0000)
commitea35fe81094d54e4d274b2219cdec7f0ed60d84d
tree35f52e2ba131067e758ddb4998c7c4d21bd4fcec
parentebaba9302e8d176618ac7c697207616495e0db1c
xenstore: Increase stack size for xs reader thread

Because of a glibc bug, PTHREAD_STACK_MIN can be too small for any
thread.  Especially on Intel machines with AVX, as reported in
Debian bug #900746.

In recent Xen this is worked around more comprehensively in:
   448c03b3cbe1487
   tools/xenstore: try to get minimum thread stack size for watch thread
but this is not a good candidate for an upstream stable
backport because it introduces new linking dependencies etc.

So bodge it by doubling the size.  This is almost entirely risk-free.
Even if in theory someone might be using libxenstore in a very highly
multithreaded program, we only steal one extra 16k of address space.

Closes: #900746
Reported-by: Christian Schwamborn <christian.schwamborn@nswit.de>
Suggested-by: Damian Pietras <damianp@daper.net>
Tested-by: Damian Pietras <damianp@daper.net>
Signed-off-by: Ian Jackson <ian.jackson@citrix.com>
Gbp-Pq: Name 0033-xenstore-Increase-stack-size-for-xs-reader-thread.patch
shim/tools/xenstore/xs.c
tools/xenstore/xs.c