public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Kang Kai <Kai.Kang@windriver.com>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net, Zhenfeng@suse.de,
	Zhao <Zhenfeng.Zhao@windriver.com>
Subject: Re: [LTP] [PATCH] pthread_detach/4-3: workaround for segment fault
Date: Wed, 22 Aug 2012 16:28:59 +0800	[thread overview]
Message-ID: <5034984B.3020905@windriver.com> (raw)
In-Reply-To: <2056136406.8818538.1345619173970.JavaMail.root@redhat.com>

On 2012年08月22日 15:06, Jan Stancek wrote:
>
> ----- Original Message -----
>> From: "Kang Kai"<Kai.Kang@windriver.com>
>> To: "Jan Stancek"<jstancek@redhat.com>
>> Cc: gaowanlong@cn.fujitsu.com, ltp-list@lists.sourceforge.net, "Zhenfeng Zhao"<Zhenfeng.Zhao@windriver.com>
>> Sent: Wednesday, 22 August, 2012 4:29:25 AM
>> Subject: Re: [LTP] [PATCH] pthread_detach/4-3: workaround for segment fault
>>
>> On 2012年08月21日 18:35, Jan Stancek wrote:
>>> ----- Original Message -----
>>>> From: "Kang Kai"<Kai.Kang@windriver.com>
>>>> To: "Jan Stancek"<jstancek@redhat.com>
>>>> Cc: gaowanlong@cn.fujitsu.com, ltp-list@lists.sourceforge.net,
>>>> "Zhenfeng Zhao"<Zhenfeng.Zhao@windriver.com>
>>>> Sent: Tuesday, 21 August, 2012 11:59:19 AM
>>>> Subject: Re: [LTP] [PATCH] pthread_detach/4-3: workaround for
>>>> segment fault
>>> <snip>
>>>
>>>> Hi Jan,
>>>>
>>>> Thanks.
>>>> I am sorry that It doesn't work and still "segment fault".
>>> Maybe we can narrow it down by running only subset of scenarios.
>>> I would suggest trying to limit "sc" or "NSCENAR" and see which
>>> one triggers it.
>>>
>>> Another thing that looks suspicious are scenarios with altstack,
>>> there seems
>>> to be small window where more than 1 thread can use same altstack.
>>> Can you try to reproduce it without altstack scenarios?
>>>
>>> diff --git
>>> a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c
>>> b/testcases/open_posix_testsuite/conforman
>>> index 5c15e93..63b6ee7 100644
>>> ---
>>> a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c
>>> +++
>>> b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c
>>> @@ -162,6 +162,11 @@ static void *test(void *arg)
>>>                   output("Starting test with scenario (%i): %s\n",
>>>                          sc, scenarii[sc].descr);
>>>    #endif
>> Hi Jan,
>>
>>> +               if (scenarii[sc].altstack) {
>>> +                       sc++;
>>> +                       sc %= NSCENAR;
>>> +                       continue;
>>> +               }
>>>
>> It fails with another error randomly, and output is:
>>
>> [09:45:16]System abilities:
>> [09:45:16] TSA: 200809
>> [09:45:16] TSS: 200809
>> [09:45:16] TPS: 200809
>> [09:45:16] pagesize: 4096
>> [09:45:16] min stack size: 16384
>> [09:45:16]WARNING: The TPS option is claimed to be supported but
>> setscope fails
>> [09:45:16]WARNING: The TPS option is claimed to be supported but
>> setscope fails
>> [09:45:16]WARNING: The TPS option is claimed to be supported but
>> setscope fails
>> [09:45:16]WARNING: The TPS option is claimed to be supported but
>> setscope fails
>> [09:45:16]WARNING: The TPS option is claimed to be supported but
>> setscope fails
>> [09:45:16]WARNING: The TPS option is claimed to be supported but
>> setscope fails
>> [09:45:16]WARNING: The TPS option is claimed to be supported but
>> setscope fails
>> [09:45:16]WARNING: The TPS option is claimed to be supported but
>> setscope fails
>> [09:45:16]WARNING: The TPS option is claimed to be supported but
>> setscope fails
>> [09:45:16]All 33 thread attribute objects were initialized
>>
>> [09:45:18]Test ../../../conformance/interfaces/pthread_detach/4-3.c
>> unresolved: got 12 (Cannot allocate memory) on line 179 (Failed to
>> create this thread)

Hi Jan,

> Is the above output from mips or x86_64?
> Are you running it as root user?

This was tested on x86_64 with unprivileged  user. I retest it with root 
and test passes.
It passes on routerstation(mips) with your patch too.
So it looks like a race condition issue about stack attribute between 
threads, right?

Thanks a lot.
Kai

>
> Regards,
> Jan
>
>>
>> Regards,
>> Kai
>>
>>>                   count_ope++;
>>>
>>>
>>> Regards,
>>> Jan
>>>
>>>> Regards,
>>>> Kai
>>>>
>>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2012-08-22  8:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21 10:35 [LTP] [PATCH] pthread_detach/4-3: workaround for segment fault Jan Stancek
2012-08-22  2:29 ` Kang Kai
2012-08-22  7:06   ` Jan Stancek
2012-08-22  8:28     ` Kang Kai [this message]
2012-08-22  8:58       ` Jan Stancek
2012-08-22 14:20         ` Jan Stancek
2012-08-23  6:21           ` Kang Kai
2012-08-23  7:09             ` Jan Stancek
2012-08-23 11:07               ` Jan Stancek
2012-08-24  2:46                 ` Kang Kai
2012-08-28  8:37                   ` Jan Stancek
2012-08-29  8:57                     ` Kang Kai
2012-08-29  9:21                       ` Jan Stancek
  -- strict thread matches above, loose matches on Subject: below --
2012-08-14  9:00 Kang Kai
2012-08-18 22:58 ` Wanlong Gao
2012-08-20  1:39   ` Kang Kai
2012-08-20  2:01     ` Wanlong Gao
2012-08-20  2:21       ` Kang Kai
2012-08-21  1:31         ` Kang Kai
2012-08-21  1:35           ` Wanlong Gao
2012-08-21  9:24             ` Kang Kai
2012-08-21  9:24               ` Wanlong Gao
2012-08-21  9:45               ` Jan Stancek
2012-08-21  9:59                 ` Kang Kai

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=5034984B.3020905@windriver.com \
    --to=kai.kang@windriver.com \
    --cc=Zhenfeng.Zhao@windriver.com \
    --cc=Zhenfeng@suse.de \
    --cc=jstancek@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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