From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH] xenstore: set READ_THREAD_STACKSIZE to a sane value
Date: Tue, 11 Mar 2014 14:52:05 +0100 [thread overview]
Message-ID: <531F1505.6010108@citrix.com> (raw)
In-Reply-To: <1394544254.18366.68.camel@kazak.uk.xensource.com>
On 11/03/14 14:24, Ian Campbell wrote:
> On Mon, 2014-03-10 at 17:12 +0000, Ian Jackson wrote:
>> Roger Pau Monne writes ("[PATCH] xenstore: set READ_THREAD_STACKSIZE to a sane value"):
>>> On FreeBSD PTHREAD_STACK_MIN is 2048 by default, which is obviously
>>> too low.
>
> How does this manifest itself? (I suppose this may be answered as part
> of answering Ian J)
Yes, I'm still looking into it, this gdb output:
Starting program: /usr/local/bin/xenstore-watch /foo
[New LWP 100169]
[New Thread 801406800 (LWP 100182/xenstore-watch)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 801406800 (LWP 100182/xenstore-watch)]
0x0000000800ac1258 in sbrk () from /lib/libc.so.7
(gdb) bt
#0 0x0000000800ac1258 in sbrk () from /lib/libc.so.7
#1 0x0000000800ac110e in sbrk () from /lib/libc.so.7
#2 0x0000000800ac9ee8 in sbrk () from /lib/libc.so.7
#3 0x0000000800ac456b in sbrk () from /lib/libc.so.7
#4 0x0000000800ac447d in sbrk () from /lib/libc.so.7
#5 0x0000000800aaf6ce in syscall () from /lib/libc.so.7
#6 0x0000000800acb37b in malloc () from /lib/libc.so.7
#7 0x00000008008202b9 in read_message (h=0x801417080, nonblocking=0) at xs.c:313
#8 0x0000000800820a06 in read_thread (arg=0x801417080) at xs.c:313
#9 0x0000000800dc64a4 in pthread_create () from /lib/libthr.so.3
#10 0x0000000000000000 in ?? ()
I've also tried to debug it using valgrind, and here's what I got:
[root@loki ~/xen/xen]# valgrind xenstore-watch /foo
==1901== Memcheck, a memory error detector
==1901== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==1901== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==1901== Command: xenstore-watch /foo
==1901==
==1901== Syscall param socketcall.connect(serv_addr..sa_len) points to uninitialised byte(s)
==1901== at 0x152A14A: connect (in /lib/libc.so.7)
==1901== by 0x1210B46: get_handle (xs.c:205)
==1901== by 0x1210CEC: xs_open (xs.c:297)
==1901== by 0x4027B1: main (xenstore_client.c:635)
==1901== Address 0x7ff000a70 is on thread 1's stack
==1901==
/foo
Strangely enough, when running under valgrind it doesn't segfault, and
I'm still trying to figure out why valgrind complains.
Roger.
next prev parent reply other threads:[~2014-03-11 13:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 12:22 [PATCH] xenstore: set READ_THREAD_STACKSIZE to a sane value Roger Pau Monne
2014-03-10 17:12 ` Ian Jackson
2014-03-11 13:24 ` Ian Campbell
2014-03-11 13:52 ` Roger Pau Monné [this message]
2014-03-11 14:12 ` Ian Campbell
2014-03-11 15:55 ` Roger Pau Monné
2014-03-11 16:03 ` Ian Campbell
2014-03-11 16:10 ` Ian Campbell
2014-03-11 16:18 ` Roger Pau Monné
2014-03-11 16:22 ` Ian Campbell
2014-03-11 16:25 ` Ian Jackson
2014-03-11 16:32 ` Ian Campbell
2014-03-11 16:42 ` Roger Pau Monné
2014-03-11 16:52 ` Ian Jackson
2014-03-12 10:27 ` Roger Pau Monné
2014-03-12 10:30 ` Ian Campbell
2014-03-12 10:34 ` Roger Pau Monné
2014-03-18 17:16 ` Ian Campbell
2014-03-18 17:20 ` Ian Jackson
2014-03-21 12:18 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=531F1505.6010108@citrix.com \
--to=roger.pau@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).