<html><body bgcolor="#FFFFFF"><div>OpenBSD has good documentation.. (man pages)<br><br> - Jay (phone<span class="Apple-style-span" style="-webkit-composition-fill-color: rgba(175, 192, 227, 0.231373); -webkit-composition-frame-color: rgba(77, 128, 180, 0.231373); ">)</span></div><div><br>On Oct 21, 2009, at 11:05 AM, Olaf Wagner <<a href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><span>Stefan,</span><br><span></span><br><span>you are our OpenBSD fan, aren't you? Can you answer this?</span><br><span></span><br><span>Olaf</span><br><span></span><br><span>----- Forwarded message from <a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a> -----</span><br><span>    Date: Wed, 21 Oct 2009 12:06:12 -0400</span><br><span>    From: Tony Hosking <<a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a>></span><br><span>Reply-To: Tony Hosking <<a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a>></span><br><span> Subject: Re: [M3devel] Status of threads for RC4?</span><br><span>      To: Olaf Wagner <<a href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</a>></span><br><span>      Cc: Jay K <<a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>>, m3devel <<a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a>></span><br><span></span><br><span>This is a known problem for the user-level pthreads on OpenBSD.</span><br><span></span><br><span>Quick question: does OpenBSD support pthread_suspend, pthread_resume?</span><br><span>If so then we could work avoid the signals entirely (as we do on OS</span><br><span>X).  All that is needed is implementation of RTMachine.SuspendThread,</span><br><span>RTMachine.ResumeThread and RTMachine.GetState for OpenBSD targets.</span><br><span></span><br><span>On 21 Oct 2009, at 10:04, Olaf Wagner wrote:</span><br><span></span><br><blockquote type="cite"><span>Quoting Tony Hosking <<a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a>>:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span>Yes, a C test can tell us if threads waiting on mutexes are able to</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>receive pthread_kill signals.</span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Could you add such a simple test program somewhere in m3tests or</span><br></blockquote><blockquote type="cite"><span>m3core/tests? We could also use that for a bug report to the</span><br></blockquote><blockquote type="cite"><span>OpenBSD developers (they won't like to install m3 to reproduce</span><br></blockquote><blockquote type="cite"><span>the error).</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Olaf</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span>On 21 Oct 2009, at 03:21, Olaf Wagner wrote:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Quoting Jay K <<a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>>:</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Is it reasonable maybe to rewrite this test in C and see if it  hangs?</span><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>ie. see if maybe it is an OpenBSD bug?</span><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>It doesn't hang with garbage collection turned off, so there must be</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>some unhealthy interaction between that and the thread  implementation.</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>I don't think you will be able to narrow it down with a C test.</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Olaf</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>-- </span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Olaf Wagner -- elego Software Solutions GmbH</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>            Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin,   Germany</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30  23   45 86 95</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span><a href="http://www.elegosoft.com">http://www.elegosoft.com</a> | Geschäftsführer: Olaf Wagner | Sitz:   Berlin</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr:    DE163214194</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>-- </span><br></blockquote><blockquote type="cite"><span>Olaf Wagner -- elego Software Solutions GmbH</span><br></blockquote><blockquote type="cite"><span>              Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin,  Germany</span><br></blockquote><blockquote type="cite"><span>phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23  45 86 95</span><br></blockquote><blockquote type="cite"><span>  <a href="http://www.elegosoft.com">http://www.elegosoft.com</a> | Geschäftsführer: Olaf Wagner | Sitz:  Berlin</span><br></blockquote><blockquote type="cite"><span>Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr:  DE163214194</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span></span><br><span></span><br><span></span><br><span>----- End forwarded message -----</span><br><span></span><br><span></span><br><span>-- </span><br><span>Olaf Wagner -- elego Software Solutions GmbH</span><br><span>               Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany</span><br><span>phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95</span><br><span>   <a href="http://www.elegosoft.com">http://www.elegosoft.com</a> | Geschäftsführer: Olaf Wagner | Sitz: Berlin</span><br><span>Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194</span><br><span></span><br></div></blockquote><blockquote type="cite"><div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><span class="Apple-style-span" style="font-size: medium;"><font class="Apple-style-span" color="#0000FF" face="'Gill Sans'">This is a known problem for the user-level pthreads on OpenBSD.</font></span></div><div><font class="Apple-style-span" color="#0000FF" face="'Gill Sans'"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" color="#0000FF" face="'Gill Sans'"><span class="Apple-style-span" style="font-size: medium;">Quick question: does OpenBSD support pthread_suspend, pthread_resume?  If so then we could work avoid the signals entirely (as we do on OS X).  All that is needed is implementation of RTMachine.SuspendThread, RTMachine.ResumeThread and RTMachine.GetState for OpenBSD targets.</span></font></div></span></span></span></span></span></span></span></span></div></span></div></span> </div><br><div><div>On 21 Oct 2009, at 10:04, Olaf Wagner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Quoting Tony Hosking <<a href="mailto:hosking@cs.purdue.edu"><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a></a>>:<br><br><blockquote type="cite">Yes, a C test can tell us if threads waiting on mutexes are able to<br></blockquote><blockquote type="cite">receive pthread_kill signals.<br></blockquote><br>Could you add such a simple test program somewhere in m3tests or<br>m3core/tests? We could also use that for a bug report to the<br>OpenBSD developers (they won't like to install m3 to reproduce<br>the error).<br><br>Olaf<br><br><blockquote type="cite">On 21 Oct 2009, at 03:21, Olaf Wagner wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Quoting Jay K <<a href="mailto:jay.krell@cornell.edu"><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a></a>>:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Is it reasonable maybe to rewrite this test in C and see if it hangs?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">ie. see if maybe it is an OpenBSD bug?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">It doesn't hang with garbage collection turned off, so there must be<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">some unhealthy interaction between that and the thread implementation.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I don't think you will be able to narrow it down with a C test.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Olaf<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-- <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Olaf Wagner -- elego Software Solutions GmbH<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">             Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin,  Germany<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23   45 86 95<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> <a href="http://www.elegosoft.com"><a href="http://www.elegosoft.com">http://www.elegosoft.com</a></a> | Geschäftsführer: Olaf Wagner | Sitz:  Berlin<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr:   DE163214194<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><br><br><br>-- <br>Olaf Wagner -- elego Software Solutions GmbH<br>               Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany<br>phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95<br>   <a href="http://www.elegosoft.com"><a href="http://www.elegosoft.com">http://www.elegosoft.com</a></a> | Geschäftsführer: Olaf Wagner | Sitz: Berlin<br>Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194<br><br></div></blockquote></div><br></div></blockquote></body></html>