[OpenAFS-devel] LWP and clang
Benjamin Kaduk
kaduk@MIT.EDU
Wed, 16 Oct 2013 15:05:50 -0400 (EDT)
On Wed, 16 Oct 2013, Marc Dionne wrote:
> On Wed, Oct 16, 2013 at 2:00 PM, Benjamin Kaduk <kaduk@mit.edu> wrote:
>> On Wed, 16 Oct 2013, Marc Dionne wrote:
>>
>>> On Wed, Oct 16, 2013 at 1:26 PM, Benjamin Kaduk <kaduk@mit.edu> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I've been seeing lots of runtime crashes when running clang-compiled
>>>> LWP-using binaries, for several months now at least. My experiences have
>>>
>>>
>>> Anything interesting about where the crashes occur - in the lwp
>>> functions themselves (savecontext, etc.) ? and does it crash every
>>> time it is switching lwps or are these sporadic?
>>
>>
>> I only remember crashes that reliably occur at program startup, perhaps even
>> before switching LWPs.
>>
>> Hmm, the example I have handy (aklog.core from ~tip-of-1.6.x) shows the
>> faulting line of source as:
>> rx_lwp.c:174:
>> 174 char name[MAXTHREADNAMELENGTH] = "srv_0";
>
> Crashing here which is probably the first write into stack memory
> after starting the rx_ListenerProc LWP, so that would seem consistent
> with having a bogus stack pointer after switching lwps.
I can access memory at $rsp at the faulting instruction, but it seems to
only be 8-byte aligned, which may be the issue. (This is on amd64.)
I will look around a bit more.
-Ben
P.S. I looked at Chas's suggestion of src/lwp/rw, but it doesn't link,
finding no main().