<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wil Tan</title>
	<atom:link href="http://dready.org/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://dready.org/blog</link>
	<description>musings on internationalized identifiers: domain names, OpenID, TLDs</description>
	<lastBuildDate>Thu, 30 Aug 2012 00:08:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Querying the DNS by hand</title>
		<link>http://dready.org/blog/2012/08/30/querying-the-dns-by-hand/</link>
		<comments>http://dready.org/blog/2012/08/30/querying-the-dns-by-hand/#comments</comments>
		<pubDate>Thu, 30 Aug 2012 00:08:54 +0000</pubDate>
		<dc:creator>wil</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[socat]]></category>

		<guid isPermaLink="false">http://dready.org/blog/?p=352</guid>
		<description><![CDATA[Well, almost. I wanted to get acquainted with using socat for UDP, so here&#8217;s something whipped up with the help of DNSPython: python -c "import dns.message, dns.rdataclass, dns.rdatatype; "\ "print dns.message.make_query(dns.name.Name(['dready', 'org', '']), dns.rdatatype.A).to_wire()" \ &#124; socat - UDP:8.8.4.4:53 \ &#124; python -c "import sys, dns.message; "\ "print '\n'.join(str(m) for m in dns.message.from_wire(sys.stdin.read()).answer)"
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Well, almost.</p>
<p>I wanted to get acquainted with using <a href="http://www.dest-unreach.org/socat/">socat</a> for UDP, so here&#8217;s something whipped up with the help of <a href="http://dnspython.org/">DNSPython</a>:</p>
<pre><code>
python -c "import dns.message, dns.rdataclass, dns.rdatatype; "\
"print dns.message.make_query(dns.name.Name(['dready', 'org', '']), dns.rdatatype.A).to_wire()" \
| socat - UDP:8.8.4.4:53 \
| python -c "import sys, dns.message; "\
"print '\n'.join(str(m) for m in dns.message.from_wire(sys.stdin.read()).answer)"
</code></pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://dready.org/blog/2012/08/30/querying-the-dns-by-hand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed up Your SSH Connections for Free</title>
		<link>http://dready.org/blog/2012/08/08/speed-up-your-ssh-connections-for-free/</link>
		<comments>http://dready.org/blog/2012/08/08/speed-up-your-ssh-connections-for-free/#comments</comments>
		<pubDate>Wed, 08 Aug 2012 02:47:06 +0000</pubDate>
		<dc:creator>wil</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://dready.org/blog/?p=341</guid>
		<description><![CDATA[Adding the following directives to your .ssh/config should reduce your SSH connection establishment time significantly: ControlMaster auto ControlPersist yes ControlPath "/tmp/ssh-c-%r@%h:%p" This works by having all SSH sessions sharing a single &#8220;control&#8221; connection. The ControlMaster auto directive tells OpenSSH client to start a control master if one is not already running, otherwise it will reuse [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Adding the following directives to your <code>.ssh/config</code> should reduce your SSH connection establishment time significantly:</p>
<pre>
        ControlMaster auto
        ControlPersist yes
        ControlPath "/tmp/ssh-c-%r@%h:%p"
</pre>
<p>This works by having all SSH sessions sharing a single &#8220;control&#8221; connection.</p>
<p>The <code>ControlMaster auto</code> directive tells OpenSSH client to start a control master if one is not already running, otherwise it will reuse a previous one.</p>
<p>The <code>ControlPersist yes</code> directive tells the control master process to continue running in the background even though you&#8217;ve exited from the session, allowing subsequent sessions to reuse its connection.</p>
<p>The <code>ControlPath</code> is the control socket rendezvous point for masters and slaves. If you&#8217;re on a shared host, you might want to set it to a private location such as in your <code>~/.ssh/</code> directory instead of <code>/tmp</code>.</p>
<p>In my case, I stuck these into the wildcard <code>Host</code> section:</p>
<pre>
Host *
        Compression yes
        ServerAliveInterval 60
        ServerAliveCountMax 5
        ControlMaster auto
        ControlPersist yes
        ControlPath "/tmp/ssh-c-%r@%h:%p"
</pre>
<p>I&#8217;ve always known that OpenSSH had this functionality, but hadn&#8217;t bothered to try it out until now and it&#8217;s sooo very handy!</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://dready.org/blog/2012/08/08/speed-up-your-ssh-connections-for-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dot Sydney GovCampNSW Session Debrief</title>
		<link>http://dready.org/blog/2011/12/15/dot-sydney-govcamp-nsw-session/</link>
		<comments>http://dready.org/blog/2011/12/15/dot-sydney-govcamp-nsw-session/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 03:42:26 +0000</pubDate>
		<dc:creator>wil</dc:creator>
				<category><![CDATA[City / Geographic TLD]]></category>
		<category><![CDATA[icann]]></category>
		<category><![CDATA[New gTLDs]]></category>
		<category><![CDATA[Cloud Registry]]></category>
		<category><![CDATA[dotmelbourne]]></category>
		<category><![CDATA[dotnsw]]></category>
		<category><![CDATA[dotsydney]]></category>
		<category><![CDATA[dotvictoria]]></category>
		<category><![CDATA[govcampnsw]]></category>

		<guid isPermaLink="false">http://dready.org/blog/?p=303</guid>
		<description><![CDATA[Recently I attended GovCampNSW, several days after Cloud Registry, in partnership with Sedari and CoCCA, submitted our response to the RFP for .sydney, .melbourne and .victoria gTLDs. GovCampNSW turned out to be one of the most inspiring unconferences I&#8217;ve attended, to the credit of the (un)organisers, volunteers, and supporting partners. For the uninitiated: GovCampNSW is [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Recently I attended <a href="http://govcampnsw.info/">GovCampNSW</a>, several days after <a href="http://www.cloudregistry.net/">Cloud Registry</a>, in partnership with Sedari and CoCCA, submitted our response to the RFP for .sydney, .melbourne and .victoria <acronym title="generic top-level domains">gTLDs</acronym>.</p>
<p>GovCampNSW turned out to be one of the most inspiring unconferences I&#8217;ve attended, to the credit of the <a href="http://govcampnsw.info/orgs-and-supporters/">(un)organisers, volunteers, and supporting partners</a>. For the uninitiated:</p>
<blockquote><p>GovCampNSW is an invitation to be part of an emerging conversation, that may inspire and shape new opportunities for innovation in government in Sydney, in NSW and beyond.</p>
<p>It is an opportunity to talk with a mix of people – from inside and outside government, from the worlds of technology and policy, of community and universities – to talk about shaping an agenda for innovation in NSW and to make a start on that agenda.
</p></blockquote>
<p>My agenda for attending was simple: to gauge the level of awareness of new gTLDs among fellow attendees and take home some pertinent lessons.</p>
<p>It was shaping up to be a great day. I arrived bright and early and bumped into <a href="http://paulwallbank.com/">Paul Wallbank</a>, with whom I had an interesting conversation about new gTLDs over coffee! I also managed to speak to the Information Commissioner <a href="http://www.oic.nsw.gov.au/oic/oic_aboutus/informationcommisioner.html">Deirdre O’Donnell</a> briefly about Whois privacy and the .sydney project.</p>
<p>When the time came to nominate sessions on the white board, I scribbled in one of the slots:<br />
<em>.sydney manifesto ~ public-citizen collaboration</em></p>
<p><img src="http://dready.org/blog/wp-content/uploads/2011/12/govcampnsw-board.jpg" alt="" title="govcampNSW Board" width="450" height="798" class="alignnone size-full wp-image-313" /></p>
<p>The question I had in mind was &#8220;how should the government of NSW involve the stakeholders in its design of the city&#8217;s digital identity, including the name space planning and governance aspects of the dotSydney gTLD?&#8221;</p>
<p>After the crowd had settled in our little cozy break out spot, I presented the story:</p>
<p><script src="http://speakerdeck.com/embed/4ee1e7bff31302004d00b90d.js"></script></p>
<p>I was hopeful that the discussions would help craft some important points to inform the government about what matters to the stakeholders; hence, the &#8220;collaborative manifesto&#8221; in the slide title.</p>
<p>Following are my notes from the session. While they are far from being a &#8220;manifesto&#8221;, it highlights several important areas that may not be apparent to those of us who have been working in the industry for far too long.</p>
<ul>
<li>On the Environment and Scoping Study:
<ul>
<li><a href="https://twitter.com/dominiccampbell">Dominic Campbell</a>: almost as if they were trying to obscure the whole thing with a name like that</li>
<li><a href="https://twitter.com/emjaymitchell">Emily Mitchell</a> and others <a href="https://twitter.com/emjaymitchell/status/137703696497770496">wondered</a> about the results of the study</li>
</ul>
</li>
<li><a href="https://twitter.com/paulwallbank">Paul Wallbank</a>: the $185,000 ICANN application fee <a href="https://twitter.com/#!/paulwallbank/status/137715520400138241">smells</a> like a scam</li>
<li>Paul Wallbank: How do you define Sydney, and the granularity of it? Who owns it? The NSW government? Or the people?</li>
<li><a href="http://twitter.com/johnW3LLS">John Wells</a> advised us to look at auDA&#8217;s <a href="http://cgdn.org.au/">Community Geographic Domain Name</a> which has an interesting governance model</li>
<li>Several participants expressed the concern that: do businesses need to do defensive registration their product or name in every city that the business has a presence in, that also happen to have its own TLD?</li>
<li>There were also concerns about pricing of domains</li>
<li>Judy: .sydney could foster a sense of community</li>
<li>Some people agreed that there&#8217;s immense peer pressure &#8212; if major metropolitan cities like New York City, Paris and London have their own top-level domains, Sydney must have one too.</li>
</ul>
<p>It it obvious that there is a lot of work to be done on outreach and public engagement in order to ensure that the .sydney, .melbourne and .victoria TLDs are well-integrated into the respective communities that they represent. We are keen to extend the efforts to the greater public sphere.</p>
<p>Please leave a comment if you have any ideas, suggestions or criticisms.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://dready.org/blog/2011/12/15/dot-sydney-govcamp-nsw-session/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What&#8217;s with the J in Emails?</title>
		<link>http://dready.org/blog/2011/12/01/whats-with-the-j/</link>
		<comments>http://dready.org/blog/2011/12/01/whats-with-the-j/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 05:52:23 +0000</pubDate>
		<dc:creator>wil</dc:creator>
				<category><![CDATA[i18n]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[emoticons]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[windings]]></category>

		<guid isPermaLink="false">http://dready.org/blog/?p=292</guid>
		<description><![CDATA[This has bothered me ever since I saw it appearing in emails: I&#8217;d love that J WTF is that &#8220;J&#8221;? Does it stand for &#8220;joke&#8221;? &#8220;Jesus&#8221;? After a while it became apparent that it&#8217;s somewhat equivalent to a smiley face, but I was still puzzled by it until I peeked under the hood today and [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>This has bothered me ever since I saw it appearing in emails:</p>
<blockquote><p>I&#8217;d love that J</p></blockquote>
<p>WTF is that &#8220;J&#8221;? Does it stand for &#8220;joke&#8221;? &#8220;Jesus&#8221;?</p>
<p>After a while it became apparent that it&#8217;s somewhat equivalent to a smiley face, but I was still puzzled by it until I peeked under the hood today and found an email sent from Outlook with the following bit in the HTML part:</p>
<pre class="code">I'd love that &lt;span style="font-family:Wingdings"&gt;J&lt;/span&gt;</pre>
<p>A-ha!</p>
<p>When rendered using the Windings font, indeed you get a smiley face:</p>
<pre class="code">I'd love that <span style="font-family:Wingdings">J</span></pre>
<p>And the <code>text/plain</code> part of the email actually does contain the regular <code>&#58;)</code>, so you&#8217;d only see the &#8220;J&#8221; showing up if your device is trying to display the HTML version but it doesn&#8217;t have the Windings font available.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://dready.org/blog/2011/12/01/whats-with-the-j/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Find For-Else Statements in Python Code</title>
		<link>http://dready.org/blog/2011/10/24/find-for-else-statements-in-python-code/</link>
		<comments>http://dready.org/blog/2011/10/24/find-for-else-statements-in-python-code/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 12:23:57 +0000</pubDate>
		<dc:creator>wil</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://dready.org/blog/?p=287</guid>
		<description><![CDATA[I came across Ned Batchelder&#8217;s post on the for/else construct, which explains its purpose in a different way from the standard Python docs. I&#8217;m fairly certain that more than once in my Python career I have been confused, or as one of the commenters put it: &#8220;Whenever I see it, I usually require an extra [...]
Related posts:<ol>
<li><a href='http://dready.org/blog/2012/08/30/querying-the-dns-by-hand/' rel='bookmark' title='Querying the DNS by hand'>Querying the DNS by hand</a> <small>Well, almost. I wanted to get acquainted with using socat for UDP, so here&#8217;s something whipped up with the help...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I came across <a href="http://nedbatchelder.com/blog/201110/forelse.html">Ned Batchelder&#8217;s post</a> on the for/else construct, which explains its purpose in a different way from the standard Python docs. I&#8217;m fairly certain that more than once in my Python career I have been confused, or as one of the commenters put it: &#8220;Whenever I see it, I usually require an extra mental cycle to remember what it does&#8221;.</p>
<p>It got me paranoid and I wanted to quickly scan through my code to make sure that I haven&#8217;t got a lurking bug somewhere. This is the script that I came up with, which takes a <code>.py</code> file and look in its <acronym title="Abstract Syntax Tree">AST</acronym> to identify such constructs and report them:</p>
<p><script src="https://gist.github.com/1308847.js?file=find_forelse.py"></script></p>
<p>This is the first time I&#8217;m using the <code>ast</code> module, and it took a grand total of 30 minutes to find the module, read the documentation, experiment on the shell and come up with the script. I&#8217;d say that&#8217;s a pretty good testament to the power and intuitiveness of Python!</p>
<p>Hope you find it useful!</p>
<p>Related posts:<ol>
<li><a href='http://dready.org/blog/2012/08/30/querying-the-dns-by-hand/' rel='bookmark' title='Querying the DNS by hand'>Querying the DNS by hand</a> <small>Well, almost. I wanted to get acquainted with using socat for UDP, so here&#8217;s something whipped up with the help...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://dready.org/blog/2011/10/24/find-for-else-statements-in-python-code/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hash Ring fork</title>
		<link>http://dready.org/blog/2010/07/10/hash-ring-fork/</link>
		<comments>http://dready.org/blog/2010/07/10/hash-ring-fork/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 10:11:17 +0000</pubDate>
		<dc:creator>wil</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hash_ring]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://dready.org/blog/?p=281</guid>
		<description><![CDATA[Amir Salihefendic&#8216;s hash_ring module is awesome, but it doesn&#8217;t install cleanly with pip (dies with ez_setup import error) and spews some deprecation warning on Python 2.6+ (md5 module deprecated in favour of hashlib.) In order to keep my deployment recipe sane, I&#8217;ve decided to fork the project on github. Now, all you need is the [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://amix.dk/">Amir Salihefendic</a>&#8216;s <a href="http://pypi.python.org/pypi/hash_ring">hash_ring</a> module is awesome, but it doesn&#8217;t install cleanly with <a href="http://pypi.python.org/pypi/pip">pip</a> (dies with <code>ez_setup</code> import error) and spews some deprecation warning on Python 2.6+ (md5 module deprecated in favour of hashlib.)</p>
<p>In order to keep my deployment recipe sane, I&#8217;ve decided to <a href="http://github.com/wil/hash_ring">fork the project on github</a>.</p>
<p>Now, all you need is the following in requirements.txt:</p>
<pre>
-e git://github.com/wil/hash_ring.git#egg=hash-ring
</pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://dready.org/blog/2010/07/10/hash-ring-fork/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nginx + Django + FastCGI + SSL</title>
		<link>http://dready.org/blog/2010/07/10/nginx-django-fastcgi-ssl/</link>
		<comments>http://dready.org/blog/2010/07/10/nginx-django-fastcgi-ssl/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 05:36:00 +0000</pubDate>
		<dc:creator>wil</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[flup]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://dready.org/blog/?p=277</guid>
		<description><![CDATA[My favourite method for deploying Django sites in production is with Nginx at the frontend talking FastCGI to a dedicated Django process (either flup or supervisord) via a UNIX or TCP socket. There are two recurring issues that I keep running into costing hours of fruitless Googling. Hopefully, this will help others: SCRIPT_NAME is evil! [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>My favourite method for deploying Django sites in production is with Nginx at the frontend talking FastCGI to a dedicated Django process (either <a href="http://trac.saddi.com/flup">flup</a> or <a href="http://supervisord.org/">supervisord</a>) via a UNIX or TCP socket.</p>
<p>There are two recurring issues that I keep running into costing hours of fruitless Googling. Hopefully, this will help others:</p>
<ul>
<li><code>SCRIPT_NAME</code> is evil! At least it&#8217;s useless in Django, and if present as a FastCGI parameter, Django will trip that away from your request URI and you&#8217;re almost certainly going to get <code>/</code> no matter what URI you navigate to! So, save <code>SCRIPT_NAME</code> for your PHP stuff, and leave it out of the parts where you expect to be talking to Django.<br />
If you have <code>include fastcgi_params</code> in your <code>nginx.conf</code>, make sure it&#8217;s not hiding behind the <code>fastcgi_params</code> file.</li>
<li>If you want SSL to work, i.e. for Django to <em>know</em> that it is serving in <code>https</code> mode, and to build proper <code>Location</code> header for redirects, you need to include the following in the appropriate section of your <code>nginx.conf</code>:<br />
<code><br />
fastcgi_param  HTTPS on;<br />
</code></p>
<p>Obviously, if you&#8217;re running both plain and SSL version, you shouldn&#8217;t be sharing that section or Django will just thinking that it is in SSL mode even when it&#8217;s not.</p>
</li>
</ul>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://dready.org/blog/2010/07/10/nginx-django-fastcgi-ssl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>httpd exited on signal 11 &#8211; solved</title>
		<link>http://dready.org/blog/2010/07/04/httpd-exited-on-signal-11-solved/</link>
		<comments>http://dready.org/blog/2010/07/04/httpd-exited-on-signal-11-solved/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 14:29:50 +0000</pubDate>
		<dc:creator>wil</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[core]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[segfault]]></category>
		<category><![CDATA[sig11]]></category>

		<guid isPermaLink="false">http://dready.org/blog/?p=270</guid>
		<description><![CDATA[tl;dr It&#8217;s probably mod_php, and try recompiling PHP without zend_multibyte. If you have WITH_MULTIBYTE=true in /var/db/ports/php5/options, change it to WITHOUT_MULTIBYTE=true and rebuild the port. Long Story The Apache 2.2 processes on my FreeBSD box keep dying intermittently, with messages such as: Jul 3 08:08:37 yama kernel: pid 13526 (httpd), uid 80: exited on signal 10 [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<h4>tl;dr</h4>
<p>It&#8217;s probably mod_php, and try recompiling PHP without zend_multibyte. If you have <code>WITH_MULTIBYTE=true</code> in <code>/var/db/ports/php5/options</code>, change it to <code>WITHOUT_MULTIBYTE=true</code> and rebuild the port.</p>
<h4>Long Story</h4>
<p>The Apache 2.2 processes on my FreeBSD box keep dying intermittently, with messages such as:</p>
<p><code><br />
Jul  3 08:08:37 yama kernel: pid 13526 (httpd), uid 80: exited on signal 10<br />
Jul  3 08:25:58 yama kernel: pid 33050 (httpd), uid 80: exited on signal 11<br />
</code></p>
<p>I&#8217;ve googled around and tried various extensions.ini reordering tricks without luck. Eventually, I figured out how to get Apache to dump core. First, you need to tell Apache where to dump core by adding the <a href="http://httpd.apache.org/docs/2.2/mod/mpm_common.html#coredumpdirectory">CoreDumpDirectory</a> directive to your <code>httpd.conf</code>. Restart apache.</p>
<p>Then, check to make sure that the <code>kern.coredump</code> and <code>kern.sugid_coredump</code> sysctl variables are set to <code>1</code>. Because Apache calls <code>setuid</code> and <code>setgid</code> to the configured user after listening on port 80 (privileged port), FreeBSD by default will refuse to dump core on segfaults. Setting <code>kern.sugid_coredump</code> will make it do so.</p>
<p><code><br />
$ sysctl kern.coredump<br />
kern.coredump: 1<br />
$ sysctl kern.sugid_coredump<br />
kern.sugid_coredump: 0<br />
$ sudo sysctl kern.sugid_coredump=1<br />
kern.sugid_coredump: 0 -> 1<br />
</code></p>
<p>Of course, you&#8217;d also need to make sure that your <code>ulimit</code> doesn&#8217;t prevent it from dumping core:</p>
<p><code><br />
$ ulimit -c<br />
unlimited<br />
</code></p>
<p>Great! Now wait for Apache to segfault (or, if you have a reproducible test case, hit it!)</p>
<p>You should now find <code>httpd.core</code> in the directory that you configured in <code>httpd.conf</code> (in my case, it is <code>/tmp</code>.)</p>
<p>Do the usual gdb stuff:</p>
<p><code><br />
$ gdb /tmp/httpd.core /usr/local/bin/httpd<br />
</code><br />
In my case, I found <code>zend_multibyte_read_script</code> near the top of the stack, so it&#8217;s pretty clear that PHP is to blame.<br />
Did I mention that I abhor PHP? Someday I will get rid of it entirely!</p>
<p>This led me to more googling and <a href="http://lists.freebsd.org/pipermail/freebsd-ports/2010-May/061362.html">found</a> that I may have accidentally enabled Zend Multibyte support (well, its purpose is not very well documented and I just assumed that since I do lots of i18n work, it&#8217;ll come in handy. Okay so it&#8217;s my fault after all but it still shouldn&#8217;t crash!)</p>
<p>Changing <code>WITH_MULTIBYTE=true</code> to <code>WITHOUT_MULTIBYTE=true</code> in <code>/var/db/ports/php5/options</code> and rebuilding the port made the problem go away.</p>
<p>Hopefully, the above will help someone in a similar situation.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://dready.org/blog/2010/07/04/httpd-exited-on-signal-11-solved/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Trials and Tribulations of Global Communities</title>
		<link>http://dready.org/blog/2010/04/30/trials-tribulations-global-communities/</link>
		<comments>http://dready.org/blog/2010/04/30/trials-tribulations-global-communities/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 03:30:56 +0000</pubDate>
		<dc:creator>wil</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tornado]]></category>

		<guid isPermaLink="false">http://dready.org/blog/?p=267</guid>
		<description><![CDATA[I&#8217;m not about to write a lengthy essay on online cultures. Just an interesting observation on some events on the Tornado mailing list. So, I lurk in that mailing list because Tornado is one of those awesome technologies in the Python world, and there are usually gems flying around. As with most discussion groups I [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not about to write a lengthy essay on online cultures. Just an interesting observation on some events on the <a href="http://groups.google.com/group/python-tornado">Tornado mailing list</a>.</p>
<p>So, I lurk in that mailing list because Tornado is one of those awesome technologies in the Python world, and there are usually gems flying around.</p>
<p>As with most discussion groups I join, English is the norm. In fact, some have gone as far as to argue that <a href="http://www.codinghorror.com/blog/2009/03/the-ugly-american-programmer.html">English should be the lingua franca of hackers</a>. To a great extent, I agree.</p>
<p>So, all is well until one day some <a href="http://groups.google.com/group/python-tornado/browse_frm/thread/edffb4cffbbe2ef4">Chinese messages</a> started appearing on the list. Now, I read and write Chinese but I can&#8217;t making a living with Chinese geek-speak. Those messages didn&#8217;t bother me though I was thinking it must be annoying to non-Chinese speaking subscribers. And true enough, we got a <a href="http://groups.google.com/group/python-tornado/browse_frm/thread/196a172ca0b0979b">message from one of the subscribers</a> today:</p>
<blockquote><p>
我们看不懂你的中文信息，写英语，请。
</p></blockquote>
<p>Obviously the output of machine translation with an input to the effect of:</p>
<blockquote><p>
We cannot understand your Chinese messages, write in English, please.
</p></blockquote>
<p>I find it pretty amusing, and hope our fellow Chinese hackers don&#8217;t take offense.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://dready.org/blog/2010/04/30/trials-tribulations-global-communities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>git conflict resolution</title>
		<link>http://dready.org/blog/2010/04/28/git-conflict-resolution/</link>
		<comments>http://dready.org/blog/2010/04/28/git-conflict-resolution/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 18:10:47 +0000</pubDate>
		<dc:creator>wil</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://dready.org/blog/?p=264</guid>
		<description><![CDATA[Logging this mostly for myself. When a conflict occurs during a pull operation from remote repository, we get this: $ git pull kumo1 develop From ssh://kumo0/home/wil/... * branch develop -> FETCH_HEAD Auto-merged src/.../file.py CONFLICT (content): Merge conflict in src/.../file.py Automatic merge failed; fix conflicts and then commit the result. What git did was to fetch [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Logging this mostly for myself.</p>
<p>When a conflict occurs during a pull operation from remote repository, we get this:</p>
<pre>
$ git pull kumo1 develop
From ssh://kumo0/home/wil/...
 * branch            develop    -> FETCH_HEAD
Auto-merged src/.../file.py
CONFLICT (content): Merge conflict in src/.../file.py
Automatic merge failed; fix conflicts and then commit the result.
</pre>
<p>What git did was to fetch objects from the remote repository, and tried to merge it in the branch that you specified. Sometimes the merge operation fails due to a conflict, and the conflicting edits are left in the file. It is then up to you to eyeball the file, straighten it and then &#8220;commit the result&#8221; (as the message said.)</p>
<p>However, if you tried to commit that file (after fixing the conflict), you&#8217;d get this:</p>
<pre>
$ git commit -m "my fixes" src/.../file.py
fatal: cannot do a partial commit during a merge.
</pre>
<p>What you&#8217;d want is to add the <code>-i</code> argument to the <code>git commit</code> command, which tells it to stage the additional file before committing.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://dready.org/blog/2010/04/28/git-conflict-resolution/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
