Yes! I was catching up slowly on all my mail.. I will commit this fix. Thanks!<div><br></div><div>Avati<br><br><div class="gmail_quote">On Fri, Jul 8, 2011 at 8:36 PM, Emmanuel Dreyfus <span dir="ltr"><<a href="mailto:manu@netbsd.org">manu@netbsd.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Anand Avati <<a href="mailto:anand.avati@gmail.com">anand.avati@gmail.com</a>> wrote:<br>
<br>
> I'm not sure how good/efficient the pthread implementation in NetBSD is.<br>
> Also, do you know if there are any NetBSD specifics about using<br>
> pthread_spinlock() APIs on it? Lot of the issues you have previously<br>
> described can occur if there is a broken implementation of pthread<br>
> spinlocks (which seems to get masked without io-threads)<br>
<br>
</div>Yes, all the crashes I reported were pthread related and were fixed by<br>
the patch I posted yesterday. I repost it below for your convenience.<br>
<br>
On the NetBSD specific issue, well, I would rather call that a<br>
Linux-specificity that your code managed to run :-)<br>
<br>
The only problem I have now is the "files exist but readdir do not see<br>
them" thing I have posted about this morning, but this is not a crash<br>
story.<br>
<br>
<br>
--- xlators/performance/io-threads/src/io-threads.c.orig<br>
+++ xlators/performance/io-threads/src/io-threads.c<br>
@@ -2181,8 +2181,20 @@<br>
"out of memory");<br>
goto out;<br>
}<br>
<br>
+ if ((ret = pthread_cond_init(&conf->cond, NULL)) != 0) {<br>
+ gf_log (this->name, GF_LOG_ERROR,<br>
+ "pthread_cond_init failed (%d)", ret);<br>
+ goto out;<br>
+ }<br>
+<br>
+ if ((ret = pthread_mutex_init(&conf->mutex, NULL)) != 0) {<br>
+ gf_log (this->name, GF_LOG_ERROR,<br>
+ "pthread_mutex_init failed (%d)", ret);<br>
+ goto out;<br>
+ }<br>
+<br>
set_stack_size (conf);<br>
<br>
thread_count = IOT_DEFAULT_THREADS;<br>
<font color="#888888"><br>
<br>
<br>
<br>
--<br>
Emmanuel Dreyfus<br>
<a href="http://hcpnet.free.fr/pubz" target="_blank">http://hcpnet.free.fr/pubz</a><br>
<a href="mailto:manu@netbsd.org">manu@netbsd.org</a><br>
</font></blockquote></div><br></div>