|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] tools/xenstore: try to get minimum thread stack size for watch thread
On 02/22/2018 06:53 AM, Juergen Gross wrote: When creating a pthread in xs_watch() try to get the minimal needed size of the thread from glibc instead of using a constant. This avoids problems when the library is used in programs with large per-thread memory. Use dlsym() to get the pointer to __pthread_get_minstack() in order to avoid linkage problems and fall back to the current constant size if not found. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- Only compile tested. Jim, can you please verify this patch is solving your original problem?
It didn't help, but it could be due to my buggy glibc
# gdb xl
...
(gdb) r create test-hvm.xl
Starting program: /usr/sbin/xl create test-hvm.xl
Parsing config from test-hvm.xl
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff72d51c2 in __pthread_get_minstack () from /lib64/libpthread.so.0
(gdb) thr a a bt
Thread 1 (Thread 0x7ffff7fd8780 (LWP 2568)):
#0 0x00007ffff72d51c2 in __pthread_get_minstack () from /lib64/libpthread.so.0
#1 0x00007ffff66ae259 in xs_watch (h=0x55555578fc90,
path=path@entry=0x555555798fa0 "/local/domain/0/device-model/2/state",
token=token@entry=0x5555557990b0 "3/0") at xs.c:826
#2 0x00007ffff79476f4 in libxl__ev_xswatch_register
(gc=gc@entry=0x5555557955f0,
w=w@entry=0x555555797468, func=func@entry=0x7ffff793dd10
<xswait_xswatch_callback>,
path=0x555555798fa0 "/local/domain/0/device-model/2/state") at
libxl_event.c:638
#3 0x00007ffff793deb0 in libxl__xswait_start (gc=gc@entry=0x5555557955f0,
xswa=xswa@entry=0x5555557973e0) at libxl_aoutils.c:53
#4 0x00007ffff79326b0 in libxl__spawn_spawn (egc=egc@entry=0x7fffffffd950,
ss=ss@entry=0x555555797370) at libxl_exec.c:292
#5 0x00007ffff79258d3 in libxl__spawn_local_dm (egc=0x7fffffffd950,
dmss=<optimized out>)
at libxl_dm.c:2400
#6 0x00007ffff791d3a7 in domcreate_launch_dm (egc=0x7fffffffd950,
multidev=0x555555798168,
ret=<optimized out>) at libxl_create.c:1379
#7 0x00007ffff7967275 in libxl__bootloader_run (egc=egc@entry=0x7fffffffd950,
bl=bl@entry=0x555555796cc0) at libxl_bootloader.c:403
#8 0x00007ffff791ffe3 in initiate_domain_create (egc=egc@entry=0x7fffffffd950,
dcs=dcs@entry=0x555555796610) at libxl_create.c:997
#9 0x00007ffff79201a1 in do_domain_create (ctx=ctx@entry=0x55555578f2a0,
d_config=d_config@entry=0x7fffffffdb70, domid=domid@entry=0x7fffffffdaa8,
restore_fd=restore_fd@entry=-1, send_back_fd=send_back_fd@entry=-1,
params=params@entry=0x0,
ao_how=0x0, aop_console_how=0x0) at libxl_create.c:1682
#10 0x00007ffff79204b6 in libxl_domain_create_new (ctx=0x55555578f2a0,
d_config=d_config@entry=0x7fffffffdb70, domid=domid@entry=0x7fffffffdaa8,
ao_how=ao_how@entry=0x0, aop_console_how=aop_console_how@entry=0x0) at
libxl_create.c:1885
#11 0x00005555555780b4 in create_domain (dom_info=dom_info@entry=0x7fffffffe0b0)
at xl_vmcontrol.c:902
#12 0x00005555555790c4 in main_create (argc=1, argv=0x7fffffffe378) at
xl_vmcontrol.c:1207
#13 0x0000555555560c5b in main (argc=2, argv=0x7fffffffe370) at xl.c:384 If you like, I can try a patched glibc after the weekend :-). Regards, Jim
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |