public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* Re: [LTP] [PATCH] pthread_detach/4-3: workaround for segment fault
@ 2012-08-21 10:35 Jan Stancek
  2012-08-22  2:29 ` Kang Kai
  0 siblings, 1 reply; 24+ messages in thread
From: Jan Stancek @ 2012-08-21 10:35 UTC (permalink / raw)
  To: Kang Kai; +Cc: ltp-list, Zhenfeng Zhao



----- 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
+               if (scenarii[sc].altstack) {
+                       sc++;
+                       sc %= NSCENAR;
+                       continue;
+               }
 
                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

^ permalink raw reply related	[flat|nested] 24+ messages in thread
* [LTP] [PATCH] pthread_detach/4-3: workaround for segment fault
@ 2012-08-14  9:00 Kang Kai
  2012-08-18 22:58 ` Wanlong Gao
  0 siblings, 1 reply; 24+ messages in thread
From: Kang Kai @ 2012-08-14  9:00 UTC (permalink / raw)
  To: ltp-list; +Cc: Zhenfeng.Zhao

This case fails randomly with "Segmentation fault". Reset VERBOSE to 6
can avoid this problem.

Fix typo at same time.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 .../conformance/interfaces/pthread_detach/4-3.c    |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/4-3.c
index 5c15e93..23738dc 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
@@ -49,7 +49,7 @@
 #include "../testfrmw/testfrmw.c"
 
 #ifndef VERBOSE
-#define VERBOSE 1
+#define VERBOSE 6
 #endif
 
 #define WITH_SYNCHRO
@@ -281,7 +281,7 @@ int main(int argc, char *argv[])
 
 	do {
 		do_it2 = 0;
-	} while (do_it2 = 0);
+	} while (do_it2);
 
 	ret = pthread_join(th_sig1, NULL);
 	if (ret)
-- 
1.7.5.4


------------------------------------------------------------------------------
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

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2012-08-29  9:21 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox