<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5957208758270957184</id><updated>2012-02-16T06:53:26.234-08:00</updated><category term='bpm'/><category term='checkstyle'/><category term='C'/><category term='perl'/><category term='annotations'/><category term='http'/><category term='osx'/><category term='rpm'/><category term='ip'/><category term='C++'/><category term='wdk'/><category term='iphone'/><category term='zoneminder'/><category term='ejb'/><category term='git'/><category term='ios'/><category term='spring'/><category term='p4'/><category term='windows'/><category term='source control'/><category term='solaris'/><category term='google plus'/><category term='backup'/><category term='safari'/><category term='linux'/><category term='hibernate'/><category term='testcpp'/><category term='emacs'/><category term='threads'/><category term='jsf'/><category term='java'/><category term='seam'/><category term='wifi'/><category term='usb'/><category term='nsis'/><category term='vmware'/><category term='comcast'/><category term='firewire'/><category term='movable type'/><category term='networking'/><category term='log4j'/><category term='isp'/><category term='xemacs'/><category term='xcode'/><category term='ndis'/><category term='jpa'/><category term='iphoto'/><category term='mac'/><category term='OOP'/><category term='ssl'/><category term='jboss'/><category term='authorship'/><category term='routing'/><category term='ubuntu'/><category term='open-source'/><title type='text'>Tech Notes</title><subtitle type='html'>Where I record things that might be helpful to others...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>51</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-7239185865033711485</id><published>2011-12-25T13:50:00.000-08:00</published><updated>2011-12-25T13:50:27.073-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='zoneminder'/><title type='text'>Zoneminder: Got unexpected memory map file size</title><content type='html'>I'm trying to capture video from a device that's 640x480 24bit color, but I'm getting this in &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;/var/log/syslog&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;ERR [Got unexpected memory map file size 9217192, expected 36865192&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Google-ing for this doesn't turn up anything except the Zoneminder source code; but it turns out that this is caused by too small a setting in &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;/proc/sys/kernel/shmmax&lt;/span&gt;. This is explained the &lt;a href="http://www.zoneminder.com/wiki/index.php/FAQ#What_does_a_.27Can.27t_shmget:_Invalid_argument.27_error_in_my_logs_mean.3F_and_my_cameras_won.27t_display_video_at_higher_resolutions." target="_blank"&gt;Zoneminder FAQ&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;After updating my &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;/proc/sys/kernel/shmmax&lt;/span&gt; to the recommended 128MB, it works just fine...&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-7239185865033711485?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/7239185865033711485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/12/im-trying-to-capture-video-from-device.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7239185865033711485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7239185865033711485'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/12/im-trying-to-capture-video-from-device.html' title='Zoneminder: Got unexpected memory map file size'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-3752269206486611175</id><published>2011-11-09T20:34:00.000-08:00</published><updated>2011-12-25T13:43:36.163-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>EasyCap DC60 and Ubuntu 11.10</title><content type='html'>I got an &lt;a href="http://www.amazon.com/gp/product/B002H3BSCM"&gt;EasyCap DC60&lt;/a&gt; from Amazon to see if it would work with my Ubuntu box to capture video. It looked promising at first... The output from &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;dmesg&lt;/span&gt; looks like this:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;[ 3391.497363] easycap::0adjust_standard: selected standard: PAL_BGHIN&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;[ 3391.808248] easycap::0adjust_format: sought: &amp;nbsp; &amp;nbsp;640x480,UYVY(0x59565955),1=field,0x00=std mask&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;[ 3391.808256] easycap::0adjust_format: sought: &amp;nbsp; &amp;nbsp;V4L2_FIELD_NONE&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;[ 3391.808264] easycap::0adjust_format: actioning: 640x480 PAL_BGHIN_AT_640x480_FMT_UYVY-n&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;[ 3391.832121] easycap::0adjust_brightness: adjusting brightness to &amp;nbsp;0x7F&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;[ 3391.856121] easycap::0adjust_contrast: adjusting contrast to &amp;nbsp;0x3F&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;[ 3391.880121] easycap::0adjust_saturation: adjusting saturation to &amp;nbsp;0x2F&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;[ 3391.904122] easycap::0adjust_hue: adjusting hue to &amp;nbsp;0x00&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and it shows up as a video device just fine:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;$ ls -altr /dev/video0&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;crw-rw----+ 1 root video 81, 0 2011-11-05 22:58 /dev/video0&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But when actually using it, it shows an image at first, and then shows grey bars. Note that the above message shows PAL, but I've tried NTSC, and other encodings with the same result.&amp;nbsp;I found a &lt;a href="http://sourceforge.net/projects/easycapdc60/forums/forum/1071438/topic/4583233" target="_blank"&gt;thread&lt;/a&gt; about this on SourceForge.net, but the SourceForge project appears to be empty now. &lt;a href="http://webcache.googleusercontent.com/search?q=cache:YkuJI0oIozoJ:sourceforge.net/projects/easycapdc60/forums/forum/1071438/topic/4583233+&amp;amp;cd=1&amp;amp;hl=en&amp;amp;ct=clnk&amp;amp;gl=us" target="_blank"&gt;Google Cache&lt;/a&gt; currently contains the thread. The interesting pieces of text are:&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;blockquote class="tr_bq"&gt;&lt;i&gt;The vertical grey bars usually mean that the front-end video chip cannot lock onto the analogue input signal. &amp;nbsp;This can happen if, for example, the video signal is really NTSC while the mplayer command line specifies PAL. &amp;nbsp;But in these circumstances, I would not expect to see any video output at all (apart from the grey bars). &amp;nbsp;The puzzling thing is that you do get some valid video, which then disappears.&lt;/i&gt;&lt;/blockquote&gt;&lt;hr /&gt;&lt;blockquote class="tr_bq"&gt;&lt;i&gt;One possibility is that the SAA7113H chip is raising a hardware "lost signal" flag when in reality the signal remains entirely viable (some aspects of this chip are known to be flaky). &amp;nbsp;To investigate this, it would be useful if you could reinstall the driver after changing line 31 of the script ./install.sh to&lt;/i&gt;&lt;br /&gt;&lt;i&gt;BARS=0&lt;/i&gt;&lt;br /&gt;&lt;i&gt;and run ./test4PAL.sh again. &amp;nbsp;This is a straight go/no-go test: &amp;nbsp;either it solves the problem or it is doesn't. &amp;nbsp;We don't need a verbose kern.log this time, so you can set DEBUG=0 in the installation script.&lt;/i&gt;&lt;/blockquote&gt;Since the SourceForge project seems to have disappeared, I'm not sure where install.sh is, or how to find it. Maybe the whole thing's moved to &lt;a href="http://kernel.org/"&gt;kernel.org&lt;/a&gt;. I suppose I could start digging around in the kernel source and see if I can figure out what that does...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt;&amp;nbsp;OK, this was a lot easier than I thought:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Google for &lt;a href="http://www.google.com/search?q=easycap+site%3Akernel.org" target="_blank"&gt;"easycap site:kernel.org"&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Find the &lt;a href="http://www.kernel.org/doc/readme/drivers-staging-easycap-README" target="_blank"&gt;README&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Remove all users of easycap kernel mod (shut down apps/services)&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sudo rmmod easycap&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sudo modprobe easycap 'bars=0'&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Restart and try again...&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;Update 2:&amp;nbsp;&lt;/b&gt;The next thing you should probably do is:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;sudo vi /etc/modprobe.d/easycap.conf&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;options easycap bars=0&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;:wq&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;sudo reboot&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-3752269206486611175?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/3752269206486611175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/11/easycap-dc60-and-ubuntu-1110.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/3752269206486611175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/3752269206486611175'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/11/easycap-dc60-and-ubuntu-1110.html' title='EasyCap DC60 and Ubuntu 11.10'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-4674697449405383256</id><published>2011-11-06T14:56:00.000-08:00</published><updated>2011-12-25T13:43:21.540-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='zoneminder'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Zoneminder Memory.pm bug in 1.24.4</title><content type='html'>&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;If you have Zoneminder installed and you're seeing this in /var/log/syslog:&lt;/span&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Nov &amp;nbsp;6 14:36:11 &lt;i&gt;machine&lt;/i&gt; zmwatch[2741]: ERR [Shared data size conflict in shared_data for monitor &lt;i&gt;monitor&lt;/i&gt;, expected 328, got 316]&lt;/span&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;It's probably because of a bug that's been &lt;a href="http://www.freshports.org/multimedia/zoneminder/files/extra-patch-scripts_ZoneMinder_lib_ZoneMinder_Memory.pm.in" target="_blank"&gt;patched&lt;/a&gt;. On my distribution (Ubuntu 11.10) the file Memory.pm is at&lt;/span&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;/usr/share/perl5/ZoneMinder/Memory.pm&lt;/span&gt;&lt;/blockquote&gt;&lt;div&gt;and the patch in question was applied at line 130.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-4674697449405383256?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/4674697449405383256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/11/zoneminder-memorypm-bug-in-1244.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4674697449405383256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4674697449405383256'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/11/zoneminder-memorypm-bug-in-1244.html' title='Zoneminder Memory.pm bug in 1.24.4'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-734978735943349521</id><published>2011-10-08T18:10:00.000-07:00</published><updated>2011-11-04T08:29:02.161-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='authorship'/><category scheme='http://www.blogger.com/atom/ns#' term='google plus'/><category scheme='http://www.blogger.com/atom/ns#' term='movable type'/><title type='text'>Movable Type and Google Plus authorship</title><content type='html'>&lt;br /&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I found the instructions for linking authorship to your Google+ profile:&lt;a href="http://www.google.com/support/webmasters/bin/answer.py?answer=1408986" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;http://www.google.com/support/webmasters/bin/answer.py?answer=1408986&lt;/a&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I'm trying to get this to work in Movable Type, but so far either my page is not getting indexed, or I'm doing it wrong. These are the instructions I followed:&lt;/div&gt;&lt;ul style="background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Edit your Movable Type profile so that your Website URL is your Google+ profile page. You don't have to add&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;?rel=author&lt;/code&gt;&amp;nbsp;at the end of the URL; that will be done below.&lt;/div&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Choose Design-&amp;gt;Templates and edit Archive Templates-&amp;gt;Entry:&lt;/div&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Find the byline. In my template it looks like this:&lt;/li&gt;&lt;/ul&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;By &amp;lt;span class="vcard author"&amp;gt;&amp;lt;$mt:EntryAuthorLink show_hcard="1"$&amp;gt;&amp;lt;/span&amp;gt; on &amp;lt;abbr class="published" title="&amp;lt;$mt:EntryDate format_name="iso8601"$&amp;gt;"&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;ul style="background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Insert the following markup in an appropriate place; I've inserted it directly after the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&amp;lt;$mt:EntryAuthorLink&amp;gt;&lt;/code&gt;&amp;nbsp;element:&lt;/li&gt;&lt;/ul&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&amp;lt;a href="&amp;lt;$mt:EntryAuthorURL$&amp;gt;?rel=author"&amp;gt;Google+&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;ul style="background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Now go back to Design Templates and edit Template Modules-&amp;gt;Entry Summary. Repeat the same steps as above.&lt;/li&gt;&lt;/ul&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If you follow these instructions (which produces HTML which seems to match the requirements of authorship), and you're successful, please leave me a comment and let me know...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt;&amp;nbsp;I've moved to Blogger, and it will soon have Google+ profile integration, so I'm not as motivated to figure this out. If anyone else figures it out, please feel free to post a comment.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update2:&lt;/b&gt;&amp;nbsp;I've found out how to find out if your rel=author link will work. There's a &lt;a href="http://www.google.com/webmasters/tools/richsnippets"&gt;Rich Snippets Testing Tool&lt;/a&gt;&amp;nbsp;that tells you about authorship for a specific page. I tried that page and it said my Movable Type page is "Verified: Authorship markup is correct for this page." But it still doesn't show up in search results, because my blog &lt;a href="http://knol.google.com/k/google-rich-snippets/google-rich-snippets/32la2chf8l79m/1#Frequently_Asked_Questions"&gt;probably isn't interesting enough&lt;/a&gt; to be included yet...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-734978735943349521?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/734978735943349521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/10/movable-type-and-google-plus-authorship.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/734978735943349521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/734978735943349521'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/10/movable-type-and-google-plus-authorship.html' title='Movable Type and Google Plus authorship'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-7846083199382842111</id><published>2011-10-01T23:08:00.000-07:00</published><updated>2011-10-28T19:10:41.425-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ios'/><category scheme='http://www.blogger.com/atom/ns#' term='wifi'/><title type='text'>iOS 4.3.x wifi unresponsive after x minutes of use</title><content type='html'>&lt;br /&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I have a network setup with an Airport Extreme base station, and a second wired bridge access point with the exact same&amp;nbsp;&lt;span class="caps"&gt;SSID,&amp;nbsp;&lt;/span&gt;key, etc., that's running DD-WRT v24-sp2.&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;With my iPad 2 with iOS 4.3.3 and 4.3.5, my wifi connection won't work after x minutes of use. It looks like it's connected: icon is good, IP address is good, but no traffic. Turning wifi off and then back on instantly repairs the connection.&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;However, it always works when I'm close to the Airport Extreme.&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I filed this bug with Apple a while ago, and they've asked for more information, but haven't fixed it yet. I wonder if anyone else has this issue...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-7846083199382842111?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/7846083199382842111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/10/ios-43x-wifi-unresponsive-after-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7846083199382842111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7846083199382842111'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/10/ios-43x-wifi-unresponsive-after-x.html' title='iOS 4.3.x wifi unresponsive after x minutes of use'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-6620007465883442667</id><published>2009-10-01T14:42:00.000-07:00</published><updated>2011-10-28T19:09:48.382-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='safari'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Safari discards # anchor during 301 redirect</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, clean, HiraKakuPro-W3, Osaka, sans-serif; font-size: 14px; white-space: pre-wrap;"&gt;I filed a bug with Apple a few weeks ago about Safari dropping # anchors on redirects. It is problem ID #7209106. It doesn't seem like you can link to their bugs, so I will describe it here:When visiting a URL which causes a 301 redirect, the anchor at the end of the URL is discarded.Steps to Reproduce:Visit:http://wikipedia.org/wiki/Safari_(web_browser)#Safari_4Expected Results:The redirect to en.wikipedia.org should result in Safari visiting:http://en.wikipedia.org/wiki/Safari_(web_browser)#Safari_4Actual Results:Safari discards the anchor, and the resulting page is:http://en.wikipedia.org/wiki/Safari_(web_browser)Regression:I did not try this with Safari 3 or earlier. But Chrome and Firefox both preserve the anchor.Notes:Here is the transaction with the server that is the redirect:GET /wiki/Safari_(web_browser) HTTP/1.1Host: wikipedia.orgUser-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5Accept-Language: en-usAccept-Encoding: gzip, deflateConnection: keep-aliveHTTP/1.0 301 Moved PermanentlyDate: Wed, 09 Sep 2009 01:12:23 GMTServer: ApacheLocation: http://en.wikipedia.org/wiki/Safari_(web_browser)Content-Length: 257Content-Type: text/html; charset=iso-8859-1Connection: keep-alive&amp;lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&amp;gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;301 Moved Permanently&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;Moved Permanently&amp;lt;/h1&amp;gt;&amp;lt;p&amp;gt;The document has moved &amp;lt;a href="http://en.wikipedia.org/wiki/Safari_(web_browser)"&amp;gt;here&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-6620007465883442667?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/6620007465883442667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/10/safari-discards-anchor-during-301.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6620007465883442667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6620007465883442667'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/10/safari-discards-anchor-during-301.html' title='Safari discards # anchor during 301 redirect'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-7966643016116110620</id><published>2009-06-13T19:48:00.000-07:00</published><updated>2011-10-28T19:08:27.876-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='iphoto'/><title type='text'>iPhoto 8.0.3 causes you to backup all your data again</title><content type='html'>&lt;br /&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;That is, if you don't realize what happened.&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I haven't found a reference as to why this was done, but after my upgrade to&amp;nbsp;&lt;a href="http://support.apple.com/downloads/iPhoto_8_0_3_Update" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;iPhoto 8.0.3&lt;/a&gt;, my&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;rsync&lt;/code&gt;&amp;nbsp;backup strategy decided to re-backup almost every picture I have in my library. That is until I did some poking around and found this in my&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;iPhoto Library&lt;/code&gt;&amp;nbsp;directory:&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;pre style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;drwx---rwx  29 jared  staff        986 Jan 11 11:25 Data.noindex&lt;br /&gt;lrw-rw-rw-   1 jared  staff         14 Jun  7 17:16 Data -&amp;gt; ./Data.noindex&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Of course Jun 7 at 17:16 is about exactly when I upgraded to 8.0.3. Anyhow, this simple command from the appropriate point on my backup drive saved me a very large&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;rsync&lt;/code&gt;:&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;pre style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;$ mv Data Data.noindex&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If you're using TimeMachine this isn't possible or desireable. I've seen forum posts on the net that imply that 8.0.3 will cause TimeMachine to re-backup everything, but it seems to me it should be smart enough to realize that those files just changed their path; the inode number probably didn't change.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-7966643016116110620?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/7966643016116110620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/06/iphoto-803-causes-you-to-backup-all.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7966643016116110620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7966643016116110620'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/06/iphoto-803-causes-you-to-backup-all.html' title='iPhoto 8.0.3 causes you to backup all your data again'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-7463416662999438198</id><published>2009-05-28T10:14:00.000-07:00</published><updated>2011-10-28T19:07:27.536-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firewire'/><category scheme='http://www.blogger.com/atom/ns#' term='usb'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iPhone won't charge, won't connect: saved by FireWire</title><content type='html'>&lt;br /&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The other day my iPhone ran into a catastrophe: it wouldn't charge, it wouldn't connect via&amp;nbsp;&lt;span class="caps"&gt;USB,&amp;nbsp;&lt;/span&gt;and the battery was dying. It's a first generation iPhone, and it looked like that was the end of my old iPhone.&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I followed&amp;nbsp;&lt;a href="http://support.apple.com/kb/HT1737" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;Basic iPhone troubleshooing&lt;/a&gt;,&amp;nbsp;&lt;a href="http://forums.macnn.com/103/ipod-iphone-and-apple-tv/352439/iphone-wont-charge/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;read&lt;/a&gt;&amp;nbsp;&lt;a href="http://forums.macrumors.com/showthread.php?t=700201" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;various&lt;/a&gt;&amp;nbsp;&lt;a href="http://forums.macworld.com/thread/103344" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;threads&lt;/a&gt;&amp;nbsp;&lt;a href="http://www.modmyi.com/forums/general-iphone-chat/397451-iphone-wont-charge.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;about&lt;/a&gt;&amp;nbsp;&lt;a href="http://www.hackint0sh.org/forum/f131/35796.htm" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;similar&lt;/a&gt;&amp;nbsp;&lt;a href="http://www.everythingicafe.com/forum/iphone/iphone-wont-charge-or-turn-on-18460.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;problems&lt;/a&gt;, and tried a few of my own tricks:&lt;/div&gt;&lt;ul style="background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Tried different cable&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Tried different plug&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Tried different outlet&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Verified that those all worked with our other iPhone&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Blew gunk out of the iPhone connector area (there was actually a lot in there)&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Rebooted iPhone several times&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Tried to clean the tiny iPhone connector with rubbing alcohol&lt;/li&gt;&lt;/ul&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;None of that worked. So I went to the Apple Store, and the Genius did the same things, and determined that it must be the battery. Actually, it was not the battery--the connection sound never happened, and the iPhone never recognized a connection. But the Apple Store genius was doing us a favor, because if the battery dies, we can buy an exact replacement (a first generation iPhone) for $85 dollars.&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;And by this time the battery in my iPhone was completely dead: I had failed to email my pictures off before the battery died. Another lesson learned...&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I went home to consider my options, and try some other last resort actions, such as contact cleaner or disassembling the iPhone myself (or going to&amp;nbsp;&lt;a href="http://www.allmac.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;We Fix Macs&lt;/a&gt;). But I finally had an idea:&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;What if I tried to use a FireWire cable to charge?&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;It works!&lt;/b&gt;&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I have an old&amp;nbsp;&lt;a href="http://www.jbl.com/home/products/product_detail.aspx?prod=JBL%20ON%20STAGE" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;&lt;span class="caps"&gt;JBL&lt;/span&gt;&amp;nbsp;On Stage&lt;/a&gt;&amp;nbsp;iPod speaker/dock that uses the FireWire pins instead of the&lt;span class="caps"&gt;USB&amp;nbsp;&lt;/span&gt;pins to provide power, and that worked. It still doesn't make the "beep beep" sound when you connect the iPhone (and neither does the perfectly working iPhone). That must be reserved for a&amp;nbsp;&lt;span class="caps"&gt;USB&amp;nbsp;&lt;/span&gt;connection. But the iPhone immediately recognizes that it's getting power, and it charges perfectly.&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Note that this trick won't work with a 3G iPhone or a second generation iPod Touch: the FireWire connection inside those&amp;nbsp;&lt;a href="http://support.apple.com/kb/HT1476" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;have been removed&lt;/a&gt;.&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Also, I haven't yet tried to sync with a FireWire cable. I believe it just might work, but I still have to find a FireWire cable (not the speaker dock) and try.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-7463416662999438198?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/7463416662999438198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/05/iphone-wont-charge-wont-connect-saved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7463416662999438198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7463416662999438198'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/05/iphone-wont-charge-wont-connect-saved.html' title='iPhone won&apos;t charge, won&apos;t connect: saved by FireWire'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-8406570836199650475</id><published>2009-03-30T17:40:00.000-07:00</published><updated>2011-10-28T19:05:19.875-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open-source'/><category scheme='http://www.blogger.com/atom/ns#' term='testcpp'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Created Open Source project TestCpp</title><content type='html'>&lt;br /&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Today I created an Open Source project called&amp;nbsp;&lt;a href="http://testcpp.sourceforge.net/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;TestCpp&lt;/a&gt;. It's a very simple JUnit-like C++ unit testing framework, and I'll be adding more to it in the near future.&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I really wrote it because I'm working on another open source project, and I wanted to write some unit tests in C++; I quickly got frustrated with everything I had to do to get it going. With TestCpp you should be able to write your C++ unit tests and actually execute them in no time.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-8406570836199650475?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/8406570836199650475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/03/created-open-source-project-testcpp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/8406570836199650475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/8406570836199650475'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/03/created-open-source-project-testcpp.html' title='Created Open Source project TestCpp'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-7701061855444269759</id><published>2009-03-25T19:55:00.000-07:00</published><updated>2011-10-28T13:43:01.611-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu 8.10 and Static IP</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I just installed Ubuntu 8.10 Desktop and had a very interesting time trying to configure a static IP address. There are&amp;nbsp;&lt;a href="https://answers.launchpad.net/ubuntu/+question/55937" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;plenty&lt;/a&gt;&amp;nbsp;of&amp;nbsp;&lt;a href="http://ubuntuforums.org/archive/index.php/t-955415.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;discussions&lt;/a&gt;&amp;nbsp;on the forums about how this&amp;nbsp;&lt;a href="https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/255839" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;doesn't&lt;/a&gt;&amp;nbsp;&lt;a href="http://episteme.arstechnica.com/eve/forums/a/tpc/f/96509133/m/802008666931" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;just work&lt;/a&gt;&amp;nbsp;with the standard&amp;nbsp;&lt;a href="https://help.ubuntu.com/community/NetworkManager0.7" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Network Manager&lt;/a&gt;. And you can't just edit&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/etc/network/interfaces&lt;/code&gt;&amp;nbsp;because that is ignored when you have Network Manager installed.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;To make it work, I followed this procedure:&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;First, remove the Network Manager packages:&lt;/div&gt;&lt;pre style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;sudo apt-get remove network-manager&lt;br /&gt;sudo apt-get remove gnome-netstatus-applet&lt;/code&gt;&lt;/pre&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Now you'll have to manually set an IP so that you can connect to the Internet (modify this to be appropriate to your setup):&lt;/div&gt;&lt;pre style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;sudo ifconfig eth0 10.x.x.y netmask 255.255.255.0&lt;br /&gt;sudo ip route add default via 10.x.x.1&lt;br /&gt;sudo vi /etc/resolv.conf&lt;/code&gt;&lt;/pre&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Set&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;nameserver 10.x.x.z&lt;/code&gt;&amp;nbsp;appropriately. Next install the old gnome network admin tool:&lt;/div&gt;&lt;pre style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;sudo apt-get install gnome-network-admin&lt;/code&gt;&lt;/pre&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Finally use the old&amp;nbsp;&lt;span class="caps"&gt;GUI&amp;nbsp;&lt;/span&gt;to set networking configuration:&lt;/div&gt;&lt;pre style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;network-admin&lt;/code&gt;&lt;/pre&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;This will store the network configuration in&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/etc/network/interfaces&lt;/code&gt;&amp;nbsp;where it belongs. And it seems to work when you reboot. I'll keep it this way until Network Manager is fixed.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-7701061855444269759?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/7701061855444269759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/03/ubuntu-810-and-static-ip.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7701061855444269759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7701061855444269759'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/03/ubuntu-810-and-static-ip.html' title='Ubuntu 8.10 and Static IP'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-7821905107912932326</id><published>2009-02-24T12:36:00.000-08:00</published><updated>2011-10-28T08:17:35.897-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><title type='text'>Object Oriented C</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;In my first job, the project we worked on was 100% C code. However, it was object oriented C. This was led by our colleague&amp;nbsp;&lt;a href="http://www.linkedin.com/in/cwestin" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Chris Westin&lt;/a&gt;. As we were fond of pointing out, there is a difference between&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Object_oriented_language" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Object oriented languages&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Object-oriented_programming" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Object oriented programming&lt;/a&gt;. You can apply&amp;nbsp;&lt;span class="caps"&gt;OOP&amp;nbsp;&lt;/span&gt;concepts (given appropriate primitives) in any language. Here's a table where I'll record a few of these...&lt;/div&gt;&lt;table style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; text-align: left;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;Runtime&lt;a href="http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;polymorphism&lt;/a&gt;&lt;/th&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Achievable by using function pointers, and syntactic sugar is done with clever macros.&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;th style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;Link-time polymorphism&lt;/th&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;You probably do this already but don't define it as such; for instance, if you implement a function defined in a header differently on different platforms, you can consider this polymorphism. The function is different on Windows vs Linux. Another example might be a plugin for a browser. If you want it to run in Firefox and Opera, you might be able to get the core of it to call your own abstracted calls to the browser; the implementation thereof is determined at link-time.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;&lt;a href="http://en.wikipedia.org/wiki/Data_abstraction" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Abstraction&lt;/a&gt;&lt;/th&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This is more a matter of design than implementation, and thus is applicable to any language.&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;th style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;&lt;a href="http://en.wikipedia.org/wiki/Information_hiding" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Information hiding&lt;/a&gt;&lt;/th&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Again, this is a design issue. But the mechanism that is often used to achieve this is referred to as encapsulation.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;&lt;a href="http://en.wikipedia.org/wiki/Encapsulation_(computer_science)" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Encapsulation&lt;/a&gt;&lt;/th&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This can be done in different ways, but usually the most effective technique is&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Opaque_pointer#C" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;opaque types&lt;/a&gt;. Again, with clever data structures and macros, this can be combined with the above Runtime polymorphism to construct objects that feel like&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/C%2B%2B" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;C++&lt;/a&gt;, or can even co-exist with C++.&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;Exceptions&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&amp;nbsp;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;You can simulate some of this using&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;setjmp/longjmp&lt;/code&gt;, but this can only go so far; the compiler doesn't know what's going on, so if you have a&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;try/catch&lt;/code&gt;&amp;nbsp;block that's really two macros doing housekeeping on the&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;try/catch&lt;/code&gt;&amp;nbsp;data structures, and then you&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;return&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;break&lt;/code&gt;&amp;nbsp;or&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;continue&lt;/code&gt;&amp;nbsp;out of the middle of that, there's nothing to stop you, and you've corrupted your&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;try/catch&lt;/code&gt;&amp;nbsp;data structures. A better method to use is to create an error data structure that can contain more information (like&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;__FILE__&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;__LINE__&lt;/code&gt;) than a simple&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;int&lt;/code&gt;&amp;nbsp;error code. This doesn't get you the magic stack unwinding, but at least it can be more informative than -1.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Now you might be asking "why not use C++?" There are lots of answers to this, but here are a few:&lt;/div&gt;&lt;ul style="background-color: white; background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Fragile_binary_interface_problem" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Fragile binary interface problem&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Fragile_base_class" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Fragile base class problem&lt;/a&gt;&lt;br /&gt;This is a real problem for deployment of C++ code, and likely an important driver early on for Microsoft to develop&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Component_Object_Model" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;&lt;span class="caps"&gt;COM&lt;/span&gt;&lt;/a&gt;. If you ship C++ objects in a shared library, you can't do so without being extremely careful about what's exposed in the header file.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="background-color: white; background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/19f56tw3(VS.71).aspx" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Windows Debug Heap&lt;/a&gt;&lt;br /&gt;Similarly, on Windows you must be careful with memory management. You can't cross allocations/deallocations across module boundaries in Windows, because that would be&amp;nbsp;&lt;a href="http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;very&lt;/a&gt;&amp;nbsp;&lt;a href="http://stackoverflow.com/questions/443147/c-mix-new-delete-between-libs" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;bad&lt;/a&gt;. This can easily happen in C++ if you do allocations in the header file, and then deallocation in the implementation file (or vice-versa). You might be mixing memory heaps which will cause your app to crash.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="background-color: white; background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Incompatible behaviors across compilers or even compiler versions.&lt;br /&gt;Certainly early on different compilers or even different versions of the same compiler can generate code that is incompatible in terms of things like throwing/catching exceptions, or name mangling. This might not have been a problem for some time (I haven't checked), but is indicative of C++'s lack of an&amp;nbsp;&lt;span class="caps"&gt;ABI.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="background-color: white; background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://en.wikipedia.org/wiki/C%2B%2B_standard_library" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;C++ Standard library&lt;/a&gt;&amp;nbsp;lacks&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Application_binary_interface" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;&lt;span class="caps"&gt;ABI&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;Similar to the above points, if you use a certain version of compiler/C++ Standard library in your shared object, you cannot share those data types with another shared object or application that uses a different version of compiler/C++ Standard library.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="background-color: white; background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://en.wikipedia.org/wiki/C%2B%2B0x" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;C++0x&lt;/a&gt;&amp;nbsp;doesn't appear to address any of the&amp;nbsp;&lt;span class="caps"&gt;ABI&amp;nbsp;&lt;/span&gt;issues that are so well known in C++. If I'm wrong, please correct me. Bjarne's&amp;nbsp;&lt;a href="http://www.research.att.com/~bs/C++0xFAQ.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;C++0x&amp;nbsp;&lt;span class="caps"&gt;FAQ&lt;/span&gt;&lt;/a&gt;&amp;nbsp;(or his&amp;nbsp;&lt;a href="http://www.research.att.com/~bs/bs_faq.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;C++&amp;nbsp;&lt;span class="caps"&gt;FAQ&lt;/span&gt;&lt;/a&gt;) doesn't even mention the word "binary"; although the word "ABI" is used, but in reference to the GC system.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="background-color: white; background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Lack of a "platform".&lt;br /&gt;This is a common criticism, which of course C and other languages share. If you want to acquire a mutex, you have to do it differently depending on what platform you're on.&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Java_(programming_language)" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Java&lt;/a&gt;&amp;nbsp;and other more modern languages include ways to do this, and many many other things. C++0x and its standard library&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Threading_facilities" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;seem to address at least some of this&lt;/a&gt;...&lt;/li&gt;&lt;/ul&gt;&lt;ul style="background-color: white; background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://www.research.att.com/~bs/bs_faq.html#really-say-that" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off."&lt;/a&gt;&lt;br /&gt;Hmm... it's only harder to do in that there's more language to master.&lt;/li&gt;&lt;/ul&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Don't get me wrong, C++ is an extremely useful language that I use in lots of projects, but you have to know its limitations, in addition to mastering its use. I just wish that the most glaring deficiency, binary compatibility, was address in C++0x.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-7821905107912932326?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/7821905107912932326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/02/object-oriented-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7821905107912932326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7821905107912932326'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/02/object-oriented-c.html' title='Object Oriented C'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-5513272642292829628</id><published>2009-02-24T11:42:00.000-08:00</published><updated>2011-10-28T08:16:44.334-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='bpm'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><title type='text'>Exadel E7</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Just attended a web conference demonstrating a new product from&amp;nbsp;&lt;a href="http://www.exadel.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Exadel&lt;/a&gt;&amp;nbsp;called&amp;nbsp;&lt;a href="http://www.exadel.com/web/portal/e7" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;E7&lt;/a&gt;, hosted by Brandon Blell, Charley Cowens and&amp;nbsp;&lt;a href="http://mkblog.exadel.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Max Katz&lt;/a&gt;.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;It looks pretty cool, although I haven't played with it yet. The idea is to present to the business rules owner/author something that is removed from Java and UI code. The Java/UI author presents different types of services, such as Web services,&amp;nbsp;&lt;span class="caps"&gt;POJO,&lt;/span&gt;&amp;nbsp;Page services for&amp;nbsp;&lt;span class="caps"&gt;JSF&lt;/span&gt;/Flex/JavaFX, etc.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Right now it only works on&amp;nbsp;&lt;a href="http://www.seamframework.org/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Seam&lt;/a&gt;&amp;nbsp;(as Exadel is a&amp;nbsp;&lt;a href="http://www.jboss.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;JBoss&lt;/a&gt;&amp;nbsp;partner).&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I also asked the question "What if you had multiple UI types in your app:&lt;span class="caps"&gt;JSF&lt;/span&gt;/Flex/JavaFX. Could you set up a 'generic' type of page service so that the process can be shared across all 3 of the UI types?" The answer is that it's in development for the next release.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Also, someone asked if there's&amp;nbsp;&lt;a href="http://www.jboss.org/drools/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Drools&lt;/a&gt;&amp;nbsp;integration. The answer is not yet--they're working on it for the next release.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-5513272642292829628?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/5513272642292829628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/02/exadel-e7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/5513272642292829628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/5513272642292829628'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/02/exadel-e7.html' title='Exadel E7'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-2288057907120771568</id><published>2009-02-21T17:48:00.000-08:00</published><updated>2011-10-28T08:15:55.355-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='comcast'/><category scheme='http://www.blogger.com/atom/ns#' term='isp'/><title type='text'>Comcast issues in Palo Alto</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;My setup at home is&amp;nbsp;&lt;a href="http://www.comcast.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Comcast&lt;/a&gt;&amp;nbsp;for&amp;nbsp;&lt;span class="caps"&gt;ISP,&amp;nbsp;&lt;/span&gt;and&amp;nbsp;&lt;a href="http://www.vonage.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Vonage&lt;/a&gt;&amp;nbsp;for phone service. I haven't noticed any severe degradation in my Comcast service recently... But then again, I probably don't use my home phone often, and perhaps I'm not online when outages occur.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;However, that all changed on Thursday, and according to my neighbors this wasn't a one-time thing. On Thursday Feb 19, 2009, after 2pm and 4pm or so, my connection was pretty unusable. I couldn't use Vonage in a reasonable manner, and had real problems transferring data. This wasn't because of a complete inability to transfer data, it was dropping packets periodically. See the&amp;nbsp;&lt;a href="http://www.dslreports.com/linequality/nil/2491573" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;graph&lt;/a&gt;&amp;nbsp;that I generated from dslreports.com about that time.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;So I called 1-800-COMCAST and I hit the right buttons to report trouble with my "high speed Internet." A recorded informed me that there was trouble in my area, that technicians were working on it, and offered to call me back when it was better. It got better before 11pm that night, but I got my automated call back on Friday at 11am.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Some theories about what's happening:&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Recently, about 2 or 3 weeks ago, Comcast made a change and&amp;nbsp;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2009/01/comcast-blocking-incoming-port-25-smtp.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;blocked my incoming port 25&lt;/a&gt;. Ever since I've had Comcast I could never make an outgoing connection on port 25, which is "normal" for an&amp;nbsp;&lt;span class="caps"&gt;ISP.&lt;/span&gt;&amp;nbsp;But blocking incoming port 25 is deadly if you're attempting to run your own mail server.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;The reason I mention the blocked port 25 is that I believe that these problems are related to Comcast's recent changes to control their bandwidth utilization. Comcast is&lt;a href="http://www.pcmag.com/article2/0,2817,2217866,00.asp" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;notorious&lt;/a&gt;&amp;nbsp;for&amp;nbsp;&lt;a href="http://www.dslreports.com/forum/r18323368-Comcast-is-using-Sandvine-to-manage-P2P-Connections" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;sending forged&amp;nbsp;&lt;span class="caps"&gt;TCP&amp;nbsp;&lt;/span&gt;control packets&lt;/a&gt;&amp;nbsp;to upset your&amp;nbsp;&lt;span class="caps"&gt;P2P&amp;nbsp;&lt;/span&gt;transfers: that's like blowing out the tires of cars on a congested highway because cars might be carrying illegal contraband. In any case, they have been rightfully&amp;nbsp;&lt;a href="http://blog.wired.com/business/2008/08/a-p2p-solution.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;remorseful&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://news.cnet.com/8301-1023_3-10000352-93.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;punished&lt;/a&gt;, at least in reputation, for this behavior.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Because of this "turnaround," they've come up with a&amp;nbsp;&lt;a href="http://www.dslreports.com/shownews/97908" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;new scheme&lt;/a&gt;&amp;nbsp;to&amp;nbsp;&lt;a href="http://downloads.comcast.net/docs/Attachment_B_Future_Practices.pdf" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;control their traffic&lt;/a&gt;. Of course, every&amp;nbsp;&lt;span class="caps"&gt;ISP&amp;nbsp;&lt;/span&gt;has a right to control their traffic so a single subscriber doesn't swamp all other users. But perhaps their current implementation is is still a little green... And thus our current connectivity troubles.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;And you can see&amp;nbsp;&lt;a href="http://networkmanagement.comcast.net/transition/visualprogress.htm" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;here&lt;/a&gt;&amp;nbsp;we (Bay Area) were scheduled for the switchover at the end of November 2008 or so, but it probably happened more recently, or there are more changes than a simple switch, and takes time to convert all neighborhoods in the Bay Area. But apparently according to&amp;nbsp;&lt;a href="http://www.dslreports.com/shownews/New-Comcast-Throttling-System-100-Online-100015" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;this&lt;/a&gt;&amp;nbsp;the new system is 100% online a month and a half ago.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I just did another&amp;nbsp;&lt;a href="http://www.dslreports.com/linequality/nil/2492288" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;test&lt;/a&gt;, and at this time it's much better, but still not great. I should probably set up a&amp;nbsp;&lt;a href="http://www.dslreports.com/schedule" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;monitoring schedule&lt;/a&gt;&amp;nbsp;with dslreports.com; it costs a little bit of&amp;nbsp;&lt;a href="http://www.dslreports.com/faq/toolpts" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;money&lt;/a&gt;, but no big deal.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;b&gt;Update&lt;/b&gt;&lt;br /&gt;I've set up the monitoring tool. Here are my up-to-date line monitoring results:&lt;br /&gt;East Coast&amp;nbsp;&lt;a href="http://ny-monitor.dslreports.com/r3/cricket/grapher?type=gif&amp;amp;target=%2Fping-pktloss%2F242052&amp;amp;dslist=ping-time%2Cpktloss-time&amp;amp;range=151200&amp;amp;rand=8732" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Hourly&lt;/a&gt;&amp;nbsp;&lt;a href="http://ny-monitor.dslreports.com/r3/cricket/grapher?type=gif&amp;amp;target=%2Fping-pktloss%2F242052&amp;amp;dslist=ping-time%2Cpktloss-time&amp;amp;range=864000&amp;amp;rand=2588" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Daily&lt;/a&gt;&lt;br /&gt;West Coast&amp;nbsp;&lt;a href="http://64.81.79.40/r3/cricket/grapher?type=gif&amp;amp;target=%2Fping-pktloss%2F242052&amp;amp;dslist=ping-time%2Cpktloss-time&amp;amp;range=151200&amp;amp;rand=5017" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Hourly&lt;/a&gt;&amp;nbsp;&lt;a href="http://64.81.79.40/r3/cricket/grapher?type=gif&amp;amp;target=%2Fping-pktloss%2F242052&amp;amp;dslist=ping-time%2Cpktloss-time&amp;amp;range=864000&amp;amp;rand=3484" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Daily&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-2288057907120771568?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/2288057907120771568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/02/comcast-issues-in-palo-alto.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/2288057907120771568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/2288057907120771568'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/02/comcast-issues-in-palo-alto.html' title='Comcast issues in Palo Alto'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-1543328139742978098</id><published>2009-02-11T11:25:00.000-08:00</published><updated>2011-10-27T21:35:20.717-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='log4j'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><title type='text'>InterruptedIOException considered harmful</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;About a year ago I patched my own log4j to fix the fact that&amp;nbsp;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2008/01/log4j-can-swallow-interruptedexception-via-interruptedioexception.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;it can swallow&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedException&lt;/code&gt;&amp;nbsp;via&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedIOException&lt;/code&gt;&lt;/a&gt;. Then I filed a&amp;nbsp;&lt;a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=44157" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;bug&lt;/a&gt;&amp;nbsp;against log4j, and got into an email conversation with&amp;nbsp;&lt;a href="mailto:carnold@apache.org" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Curt Arnold&lt;/a&gt;, who rightly pointed out that there were other scenarios where&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedException&lt;/code&gt;&amp;nbsp;could be easily ignored. Anything that wraps an&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedException&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedIOException&lt;/code&gt;&amp;nbsp;and rethrows something that doesn’t derive from them is effectively ignoring the intended effect of a thread interrupt. The most common examples of this are&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.lang.reflect.Method.invoke&lt;/code&gt;&amp;nbsp;and&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.lang.reflect.Constructor.newInstance&lt;/code&gt;&amp;nbsp;which both throw&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.lang.reflect.InvocationTargetException&lt;/code&gt;, which can have this problem.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;The title of this post may be a bit misleading;&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.io.InterruptedIOException&lt;/code&gt;doesn’t cause this problem, it just makes it at least twice as difficult, because you must always check for both&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedException&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedIOException&lt;/code&gt;&amp;nbsp;in wrapped exceptions. But it also means that any method that throws&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.io.IOException&lt;/code&gt;&amp;nbsp;must have special handlers for an interrupted thread.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I tried to find a bug in Sun’s database that warns about&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedIOException&lt;/code&gt;and these cases, but the closest I could find was&amp;nbsp;&lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4385444" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Sun bug 4385444&lt;/a&gt;. That doesn’t really have anything to do with it.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;When I first saw the changes made for&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.nio&lt;/code&gt;&amp;nbsp;for interruptible IO, I thought the use of&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedIOException&lt;/code&gt;&amp;nbsp;was clever and elegant. But because of the very special nature of&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedException&lt;/code&gt;, I changed my mind—of course, there wasn’t much option, because&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.nio&lt;/code&gt;&amp;nbsp;integrates with existing&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.io&lt;/code&gt;&amp;nbsp;interfaces and methods which already do not throw&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedException&lt;/code&gt;, therefore they had to follow that path. It’s really a difficult situation; it isn’t the first case in Java of a hidden or wrapped&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedException&lt;/code&gt;, it just makes it more widespread. Now you have to handle an interrupted thread anywhere&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.io.IOException&lt;/code&gt;&amp;nbsp;is thrown.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Note that on Solaris (x86 and Sparc)&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.io&lt;/code&gt;&amp;nbsp;methods can also throw&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedIOException&lt;/code&gt;. You don’t need to use&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.nio&lt;/code&gt;&amp;nbsp;to see this effect. On other platforms you only have to worry about this if you (or things you call) use&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.nio&lt;/code&gt;.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I’ve come to the conclusion that thread interrupts are so special, and currently so difficult to deal with, that Java should treat&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InterruptedException&lt;/code&gt;&amp;nbsp;as a third type of exception: one that is implicitly thrown from every method. Of course this opens up its own can of worms, not to mention that it’s about 15 years too late to make such a change.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;This also speaks to the fact that you should be following a pattern where it’s rare that you catch exceptions that you don’t understand, and should be catching them as far up as possible, where you can centralize your exception handling. I think this is also a good case for frameworks like&amp;nbsp;&lt;a href="http://www.springsource.org/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Spring&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://www.seamframework.org/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Seam&lt;/a&gt;&amp;nbsp;which use&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;AoP&lt;/a&gt;; each method invocation can have a carefully thought out exception handler, either via your own AoP, or directly handled in the framework.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;strong&gt;Update&lt;/strong&gt;&amp;nbsp;I’ve found&amp;nbsp;&lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4176863" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;bug 4176863&lt;/a&gt;&amp;nbsp;which is related to this issue, but more importantly, the paper&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/guide/misc/threadPrimitiveDeprecation.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Java Thread Primitive Deprecation&lt;/a&gt;. I had read this long, long ago, and thought it important to link here.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-1543328139742978098?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/1543328139742978098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/02/interruptedioexception-considered.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1543328139742978098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1543328139742978098'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/02/interruptedioexception-considered.html' title='InterruptedIOException considered harmful'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-7671900704250163963</id><published>2009-02-05T15:26:00.000-08:00</published><updated>2011-10-27T21:34:19.108-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Xcode templates and company name</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I found a nice short description about why you get what you get in Xcode when you create a new source file:&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;a href="http://symmetricdesigns.com/component/content/article/3-misc/12-changing-copyright-notice-for-new-xcode-projects-just-change-your-address-card.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;"&gt;http://symmetricdesigns.com/component/content/article/3-misc/12-changing-copyright-notice-for-new-xcode-projects-just-change-your-address-card.html&lt;/a&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;and related, how you should configure your git global settings and project settings to get the right information about you:&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;a href="http://github.com/guides/tell-git-your-user-name-and-email-address" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;http://github.com/guides/tell-git-your-user-name-and-email-address&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-7671900704250163963?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/7671900704250163963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/02/xcode-templates-and-company-name.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7671900704250163963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7671900704250163963'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/02/xcode-templates-and-company-name.html' title='Xcode templates and company name'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-5490129188791811627</id><published>2009-01-30T12:38:00.000-08:00</published><updated>2011-10-27T21:28:55.388-07:00</updated><title type='text'>Comcast blocking incoming port 25 (SMTP)</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I’ve run my own mail server in my house for quite a long time now, with no problems, no downtime, and it just works. Not anymore… Comcast has finally gotten around to my account to block my incoming port 25. As far as I can tell this started at midnight Thursday morning.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Several years ago they blocked my outgoing port 25, unless I used the Comcast MTA. That’s OK… so that’s what I did, reconfigured my postfix to use their MTA. But now that doesn’t even work—until I change it to use port 587.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;A call to customer support gives you the expected response: “Are you using XP or Vista?” “You can’t read email in Outlook?” Of course, none of this is relevant. When the tech support person carries the appropriate information to the supervisor, the expected response is received: this is the policy for Comcast subscribers and there’s no option around it.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;But there are still options… Here’s my list that I’ve been considering:&lt;/div&gt;&lt;ul style="background-color: white; background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;Plead with Comcast&lt;/strong&gt;&amp;nbsp;Has anyone had success with this approach?&lt;/div&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;Switch ISP&lt;/strong&gt;&amp;nbsp;There really aren’t many options here in the Bay Area. I’ve tried AT&amp;amp;T, other medium sized and smaller DSL’s, and they all have their disadvantages, including blocking port 25. But I am forever hopeful that someday we’ll get&amp;nbsp;&lt;a href="http://www.verizon.com/fios" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Fios&lt;/a&gt;and they’ll be good enough not to do port blocking or other evil ISP things.&lt;/div&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;a href="http://pobox.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Pobox.com&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;This is the service I’ve been using for 12 years now. They forward my pobox.com email address to one that I specify. Until yesterday that was an address on a machine in my closet. Now I have it forwarded to gmail. I’ve asked them if they can forward to a port other than 25, but I haven’t gotten a response yet…&lt;/div&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;a href="http://www.no-ip.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;No-IP&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;This is a little different than Pobox.com. You point your MX record at their servers and they “reflect” the email right into your server with whatever address and port you give them. This costs $40 a year… The benefit over pobox.com is that I can use this for whatever email address I like with my own domain. There are other vendors, such as&amp;nbsp;&lt;a href="http://authsmtp.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;AuthSMTP&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://dyndns.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;DynDNS&lt;/a&gt;&amp;nbsp;(which I use for DNS), and there’s a list that’s slightly out of date&amp;nbsp;&lt;a href="http://www.birds-eye.net/article_archive/smtp_mail_relay_services.htm" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;&lt;a href="http://www.gmail.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;GMail&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;I can just stick with GMail and be done with it. You can find lots of discussions about using GMail, or any free email service. I just would have preferred to have some control over my own data…&amp;nbsp;&lt;strong&gt;Update:&lt;/strong&gt;&amp;nbsp;I discovered that gmail is rewriting my outgoing email address with xxx@gmail.com (this is a problem because I want everyone to remember my “permanent” address at pobox.com which is forwarded to gmail); but, you can actually teach gmail your intended email address. I saw this tip in&amp;nbsp;&lt;a href="http://lifehacker.com/software/email-apps/how-to-use-gmail-as-your-smtp-server-111166.php" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;this&lt;/a&gt;&amp;nbsp;lifehacker article.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-5490129188791811627?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/5490129188791811627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/01/comcast-blocking-incoming-port-25-smtp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/5490129188791811627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/5490129188791811627'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2009/01/comcast-blocking-incoming-port-25-smtp.html' title='Comcast blocking incoming port 25 (SMTP)'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-4207029300931581590</id><published>2008-12-26T11:02:00.000-08:00</published><updated>2011-10-27T21:28:08.837-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Bug in Solaris JVM, forkAndExec</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;We've discovered a bug in the Solaris JVM that we're using (1.5.0_08-b03). What happens is that we have a long running JVM that once a minute forks an executable via&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.lang.Runtime.exec&lt;/code&gt;&amp;nbsp;and reads its&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;stdout&lt;/code&gt;. After a long time, one of the forks doesn't actually make it to the exec, and the thread that asked for the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;exec&lt;/code&gt;&amp;nbsp;doesn't continue. That's why I think it's a JVM bug: the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;exec&lt;/code&gt;&amp;nbsp;call is made and only completes half of its job.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I describe the problem on a Sun forum&amp;nbsp;&lt;a href="http://forums.sun.com/thread.jspa?threadID=5297465#10548953" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I definitely have to upgrade the JVM to see if that helps...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-4207029300931581590?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/4207029300931581590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/bug-in-solaris-jvm-forkandexec.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4207029300931581590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4207029300931581590'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/bug-in-solaris-jvm-forkandexec.html' title='Bug in Solaris JVM, forkAndExec'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-8210624759595645239</id><published>2008-12-23T12:43:00.000-08:00</published><updated>2011-10-27T21:26:19.825-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='jpa'/><title type='text'>Hibernate emits empty DDL file</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;This is the second time this has bitten me: I want to use&amp;nbsp;&lt;a href="http://www.hibernate.org/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Hibernate&lt;/a&gt;&amp;nbsp;with standard&amp;nbsp;&lt;a href="http://java.sun.com/javaee/technologies/persistence.jsp" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;JPA&lt;/a&gt;&amp;nbsp;to persist my entities. And I want my Entities autodetected, as Hibernate is&amp;nbsp;&lt;a href="http://www.hibernate.org/hib_docs/entitymanager/reference/en/html_single/#d0e362" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;capable of&lt;/a&gt;, even outside of a JEE container. So in my&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;persistence.xml&lt;/code&gt;&amp;nbsp;I have this bit of code:&lt;/div&gt;&lt;pre style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;      &amp;lt;property name="hibernate.archive.autodetection" value="class,hbm"/&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;But, I do not compile this&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;persistence.xml&lt;/code&gt;&amp;nbsp;into my .jar file, instead I just make it part of my classpath for my unit tests, thinking this will make things more flexible. And of course, this doesn’t work. The autodetection only works if the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;persistence.xml&lt;/code&gt;&amp;nbsp;is located in the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;META-INF&lt;/code&gt;&amp;nbsp;section of the jarfile that contains the Entities to be detected. See my post in the&amp;nbsp;&lt;a href="http://forums.hibernate.org/viewtopic.php?t=950014&amp;amp;postdays=0&amp;amp;postorder=asc&amp;amp;start=18" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Hibernate forum&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-8210624759595645239?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/8210624759595645239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/hibernate-emits-empty-ddl-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/8210624759595645239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/8210624759595645239'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/hibernate-emits-empty-ddl-file.html' title='Hibernate emits empty DDL file'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-1357876916083937662</id><published>2008-12-23T12:23:00.000-08:00</published><updated>2011-10-27T21:25:36.262-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>JSF page based on Seam example not rendered</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;If you’re a&amp;nbsp;&lt;a href="http://java.sun.com/javaee/javaserverfaces/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;JSF&lt;/a&gt;&amp;nbsp;newbie (like me), and you’re using&amp;nbsp;&lt;a href="http://www.jboss.com/products/seam" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Seam&lt;/a&gt;, you might be tempted to take one of the examples and hack away at it. For instance, in the booking example, the first page is called&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;home.xhtml&lt;/code&gt;. After you type up some tags, you want it to run, so you point your browser at:&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;http://localhost:8080/myapp/home.xhtml&lt;/code&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;What you’ll find is not a JSF rendered page, but your JSF tag source! Then you think that you’ve misconfigured something, so you look over everything. But what’s really going on is that the Seam example isn’t configured to render that page, instead you should go to:&lt;/div&gt;&lt;pre style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;http://localhost:8080/myapp/home.seam&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;That will render the home.xhtml as JSF. Look in your war file’s&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;WEB-INF/web.xml&lt;/code&gt;, and find this bit of code:&lt;/div&gt;&lt;pre style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;  &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;    &amp;lt;servlet-name&amp;gt;Faces Servlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;    &amp;lt;url-pattern&amp;gt;*.seam&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;  &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;This means that the Faces Servlet logic executes against URLs that end with&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.seam&lt;/code&gt;. However, being a newbie, I’m not quite sure what maps that against the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.xhtml&lt;/code&gt;&amp;nbsp;file, unless it’s this previous entry:&lt;/div&gt;&lt;pre style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;  &amp;lt;context-param&amp;gt;&lt;br /&gt;    &amp;lt;param-name&amp;gt;javax.faces.DEFAULT_SUFFIX&amp;lt;/param-name&amp;gt;&lt;br /&gt;    &amp;lt;param-value&amp;gt;.xhtml&amp;lt;/param-value&amp;gt;&lt;br /&gt;  &amp;lt;/context-param&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Also being a newbie, I’m not sure what I should do to configure things so that it’s impossible for a user to download my JSF code…&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Anyhow, what makes this all work by default is the file&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;index.html&lt;/code&gt;, which is what will load when you visit:&lt;/div&gt;&lt;pre style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;http://localhost:8080/myapp/&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;and that contains the following:&lt;/div&gt;&lt;pre style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;  &amp;lt;head&amp;gt;&lt;br /&gt;    &amp;lt;meta http-equiv="Refresh" content="0; URL=home.seam"&amp;gt;&lt;br /&gt;  &amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;which naturally redirects you to the appropriate URL to start rendering your JSF/Seam application.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Thanks to anyone who points out the answers to the above mysteries (that are probably in the docs somewhere…)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-1357876916083937662?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/1357876916083937662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/jsf-page-based-on-seam-example-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1357876916083937662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1357876916083937662'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/jsf-page-based-on-seam-example-not.html' title='JSF page based on Seam example not rendered'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-6517777580707605908</id><published>2008-12-18T10:22:00.000-08:00</published><updated>2011-10-27T21:24:49.455-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='ejb'/><category scheme='http://www.blogger.com/atom/ns#' term='seam'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><title type='text'>Using JBoss AS and Seam</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Things to do when using&amp;nbsp;&lt;a href="http://www.jboss.org/jbossas/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;JBoss AS&lt;/a&gt;&amp;nbsp;(4.2.3.GA) and&amp;nbsp;&lt;a href="http://www.jboss.com/products/seam" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Seam&lt;/a&gt;&amp;nbsp;(2.1.0.SP1):&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="background-color: white; background-repeat: no-repeat repeat; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; list-style-image: initial; list-style-position: outside; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://commons.apache.org/downloads/download_beanutils.cgi" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Download&lt;/a&gt;&amp;nbsp;the latest (at least 1.8.0)&amp;nbsp;&lt;a href="http://commons.apache.org/beanutils/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;commons-beanutils&lt;/a&gt;&amp;nbsp;for your .ear. It&amp;nbsp;&lt;a href="https://issues.apache.org/jira/browse/BEANUTILS-291" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;fixes&lt;/a&gt;&amp;nbsp;a&lt;a href="http://blog.yannis-lionis.gr/?p=8" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;memory leak&lt;/a&gt;&amp;nbsp;you'd see after you redeploy your .ear.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If you're running on OS X,&amp;nbsp;&lt;a href="http://zzamboni.org/brt/2007/12/07/disable-dock-icon-for-java-programs-in-mac-osx-howto/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;disable&lt;/a&gt;&amp;nbsp;the unnecessary dock icon from JBoss by adding&amp;nbsp;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;-Djava.awt.headless=true&lt;/span&gt;. This might also solve problems on Linux/Solaris boxes that you're ssh'd onto and you don't have a&amp;nbsp;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;DISPLAY&lt;/span&gt;&amp;nbsp;environment variable set for X Windows.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Use your own&amp;nbsp;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;jboss-log4j.xml&lt;/span&gt;&amp;nbsp;file, which by default is in&lt;span class="Apple-style-span" style="font-style: italic;"&gt;${jboss.home}/server/default/conf/jboss-log4j.xml&lt;/span&gt;. You probably don't need DEBUG output emitted to your console...&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-6517777580707605908?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/6517777580707605908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/using-jboss-as-and-seam.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6517777580707605908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6517777580707605908'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/using-jboss-as-and-seam.html' title='Using JBoss AS and Seam'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-6970504031498542577</id><published>2008-12-16T12:06:00.000-08:00</published><updated>2011-10-27T21:23:58.421-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>OS X and Java SE 6</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;It appears that&amp;nbsp;&lt;/span&gt;&lt;a href="http://support.apple.com/kb/HT1856" style="background-color: white; color: black; font-family: 'trebuchet ms'; font-size: 13px; outline-color: initial; outline-style: none; outline-width: initial; text-align: left;"&gt;you can&lt;/a&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; text-align: left;"&gt;&amp;nbsp;run Java SE 6 on a Mac, but only if you're Intel 64-bit. No PowerPC, no 32-bit Intel.&lt;/span&gt;&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;But from my terminal on a 64-bit Intel machine with all updates:&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote class="webkit-indent-blockquote" style="background-color: white; background-repeat: no-repeat repeat; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;$ type java&lt;br /&gt;java is /usr/bin/java&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote class="webkit-indent-blockquote" style="background-color: white; background-repeat: no-repeat repeat; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;br /&gt;$ java -version&lt;br /&gt;java version "1.5.0_16"&lt;br /&gt;Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)&lt;br /&gt;Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)&lt;/span&gt;&lt;/blockquote&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In order to get Java SE 6 running on your Mac, open the Java Preferences (at&amp;nbsp;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;/Applications/Utilities/Java/Java Preferences&lt;/span&gt;) and drag Java SE 6 to the top of the list for Java applet versions and/or Java application versions. Now I get:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote class="webkit-indent-blockquote" style="background-color: white; background-repeat: no-repeat repeat; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;$ java -version&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;java version "1.6.0_07"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)&lt;/span&gt;&lt;/blockquote&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://blogs.oreilly.com/digitalmedia/2008/05/java-6-on-the-mac.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Note&lt;/a&gt;&amp;nbsp;that you&amp;nbsp;&lt;a href="http://java.dzone.com/news/java-6-mac-worsest-release-eve" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;may not be very happy with the result&lt;/a&gt;... Given the history of Java support on OS X, perhaps I should try&amp;nbsp;&lt;a href="http://landonf.bikemonkey.org/static/soylatte/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;SoyLatte&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-6970504031498542577?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/6970504031498542577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/os-x-and-java-se-6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6970504031498542577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6970504031498542577'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/os-x-and-java-se-6.html' title='OS X and Java SE 6'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-2351869331476688177</id><published>2008-12-12T13:33:00.000-08:00</published><updated>2011-10-27T21:23:10.595-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='p4'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>git is slow; too many lstat operations</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I'm working on a new project and using&amp;nbsp;&lt;a href="http://git.or.cz/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;git&lt;/a&gt;&amp;nbsp;for the first time; I really like the distributed source control model, it makes a lot of sense. I come from using&amp;nbsp;&lt;a href="http://www.perforce.com/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;p4&lt;/a&gt;&amp;nbsp;for quite a long time, so git feels a lot like CVS/SubVersion, but obviously a lot more powerful than CVS.&amp;nbsp;Also, I want to make sure that I do not say that git is&amp;nbsp;&lt;a href="http://www.linux-mips.org/wiki/Git#top" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;hard to understand and use&lt;/a&gt;.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;The way I work with my projects is by submitting not only all my source code for my project, but also all tools that are used to generate my project. (Obviously I draw the line somewhere, I don't submit my Linux distribution that I use on the build machine.) That way I can guarantee&amp;nbsp;reproducibility&amp;nbsp;and no one on the team has to install their own tools before being productive.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;A short time into my new project I already have more than 500,000 files in my git repository. Now every time I use any git command, it just sits there for many seconds... even when I open a file using&amp;nbsp;&lt;a href="http://www.emacswiki.org/cgi-bin/wiki/Git" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Emacs&lt;/a&gt;, I have a severe delay because git is invoked to check its status. Using&amp;nbsp;&lt;a href="http://www.macosxhints.com/article.php?story=20071031121823710" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;dtrace&lt;/a&gt;&amp;nbsp;I've determined that it is doing an lstat on every single file in the repository, to make sure that it's not out of date.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Therefore beware: git is not good for large repositories. And when I say large, I don't mean "sorta large" like 20,000 files. I mean more on the order of 500,000 or 2.5 million files (the current size of our p4 repository). This is because git is just like CVS: it automatically determines for you which files you have edited/deleted/added, and which you have not, but it does this by doing an lstat on every single file in your tree. p4 does not make this assumption, and requires you to tell it what files you have edited/deleted/added, therefore it never does an lstat of the files in your tree (unless you invoke some special commands to ask it to look).&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;It seems there are&amp;nbsp;&lt;a href="https://kerneltrap.org/mailarchive/git/2008/1/19/583208" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;attempts to optimize&lt;/a&gt;&amp;nbsp;the lstat operations, but it is part of the design of git, and would likely be unnatural to avoid it or suppress it.&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I found the&amp;nbsp;&lt;a href="http://git.or.cz/gitwiki/GitBenchmarks" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;git benchmarks&lt;/a&gt;, where it describes how efficient it is for the size of its&amp;nbsp;repositories, which is great. However, it does not mention the number of files in a repository. And I couldn't find the current size of the linux kernel&amp;nbsp;repository, but I found a&amp;nbsp;&lt;a href="http://www.wlug.org.nz/KernelDevelopmentWithGit" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;mention&lt;/a&gt;&amp;nbsp;that the pull of an entire tree was 5,000 files, which included all of git's metadata (if I understood it correctly).&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;In order to work around git's slowness with large numbers of files, I decided to split my git repository into two halves; the half with the tools, and the other half with my project source. I found a tool called&amp;nbsp;&lt;a href="http://kerneltrap.org/mailarchive/git/2006/10/24/228903" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;git split&lt;/a&gt;&amp;nbsp;that seems to do the job (see&lt;a href="http://people.freedesktop.org/~jamey/git-split" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;http://people.freedesktop.org/~jamey/git-split&lt;/a&gt;), but it didn't work on my git 1.6.0 repository. It got stuck because it couldn't read my .git/info/grafts. So I gave up there and just deleted all the tools out of my tree, and added them into a separate git repository. That made things much better.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;b&gt;Update:&amp;nbsp;&lt;/b&gt;I found this blog article that also claims that git does not scale:&amp;nbsp;&lt;/span&gt;&lt;a href="http://gandolf.homelinux.org/~smhanov/blog/index.php?id=50" rel="nofollow" style="color: black; line-height: 19px; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Why Perforce is more scalable than Git&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-2351869331476688177?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/2351869331476688177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/git-is-slow-too-many-lstat-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/2351869331476688177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/2351869331476688177'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/git-is-slow-too-many-lstat-operations.html' title='git is slow; too many lstat operations'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-2251788344306499233</id><published>2008-12-11T13:38:00.000-08:00</published><updated>2011-10-27T21:21:42.775-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='jpa'/><title type='text'>Hibernate JPA annotations work only on get method, not set</title><content type='html'>&lt;br /&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I have a project where I'm using&amp;nbsp;&lt;a href="http://hibernate.org/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;Hibernate&lt;/a&gt;&amp;nbsp;with JPA annotations. I got stuck where the annotations to one of my attributes wouldn't stick, but I finally figured it out:&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;a href="http://forum.hibernate.org/viewtopic.php?p=2401266" style="color: black; outline-color: initial; outline-style: none; outline-width: initial;"&gt;http://forum.hibernate.org/viewtopic.php?p=2401266&lt;/a&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;You have to annotate either the member (in which case all attributes must be annotated via member), or the get method for your attribute. You can't annotate the set method.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-2251788344306499233?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/2251788344306499233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/hibernate-jpa-annotations-work-only-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/2251788344306499233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/2251788344306499233'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/12/hibernate-jpa-annotations-work-only-on.html' title='Hibernate JPA annotations work only on get method, not set'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-4385168405503939460</id><published>2008-11-23T10:03:00.000-08:00</published><updated>2011-10-26T23:42:34.842-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Beware Windows exit codes</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;I have a Java process that is forked from a Windows service; the service process monitors the child Java process to make sure it's OK.&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;However, I was seeing in my logs that sometimes I would get the exit code 143. My code does not generate this exit code; further, there are no .dmp files or Java crash reports or exceptions logged or any other indication in my code that the process exited. The explanation is simple: my service and all other processes were receiving CTRL_SHUTDOWN_EVENT. My service process ignores this, but Java does not (see IBM's excellent document on&amp;nbsp;&lt;a href="http://www.ibm.com/developerworks/java/library/i-signalhandling/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;Java Signal Handling&lt;/a&gt;).&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The result is that my Java process would exit, my monitor would not know why, and restart it, at which time it would again get a shutdown event, etc, until the machine actually completed its shutdown.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Needless to say my service process now watches for those events...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-4385168405503939460?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/4385168405503939460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/11/beware-windows-exit-codes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4385168405503939460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4385168405503939460'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/11/beware-windows-exit-codes.html' title='Beware Windows exit codes'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-3369886028567257408</id><published>2008-11-12T12:46:00.000-08:00</published><updated>2011-10-26T23:41:44.190-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>AddVectoredExceptionHandler prevents Purify from working</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In all our Windows executables we&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/ms679274(VS.85).aspx" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;AddVectoredExceptionHandler&lt;/a&gt;&amp;nbsp;so that we can get .dmp files when things crash. However, I recently discovered that doing so prevents&lt;a href="http://www-01.ibm.com/software/awdtools/purify/win/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;Purify&lt;/a&gt;&amp;nbsp;from working correctly on Windows. This should probably be expected, and I'm probably not chaining to the next handler correctly, but it's something to watch out for.&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Subtopic #1: In all other operating systems, if you want a core dump file, it's very straight-forward; you ulimit -c unlimited, and you get core files. In Windows, you have to write your own Dump file from code that you write. You could depend on Dr. Watson, or Windows Error Reporting, but if you want your own dump file in a place where you or your customers can find it, you have to write it yourself.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Subtopic #2: Fifteen years ago, Purify was the most important development tool you could have. It's still the most important development tool you could have, except that it hasn't really changed in 15 years. I have several friends that are ex-Pure, and they are also dismayed at how it's just not keeping up. For instance:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;It wasn't until 2004 (or was it 2006?) that you could really use Purify on Linux. Wow.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;We still can't Purify JNI C code in a Java JVM on Linux. The JVM does magic things that Purify can't handle. Oh well.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Purify for Windows doesn't even work on x64.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-3369886028567257408?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/3369886028567257408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/11/addvectoredexceptionhandler-prevents.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/3369886028567257408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/3369886028567257408'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/11/addvectoredexceptionhandler-prevents.html' title='AddVectoredExceptionHandler prevents Purify from working'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-3092846118460528219</id><published>2008-11-11T15:30:00.000-08:00</published><updated>2011-10-26T23:40:49.663-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wdk'/><category scheme='http://www.blogger.com/atom/ns#' term='ndis'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>WDK 6001.18001 NDISPROT 5x cancel code bug</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I spent some time determining that the sample code for ndisprot that is included in the 6001.18001 WDK has a bug in the IRP cancel code. What's worse is that the bug only exists in the directory labeled 5x, not the directory labeled 60.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;For some (at least 2) of the samples in the latest WDK's, they made a clean break from the NDIS 5.x and earlier sample code when they wrote the samples for NDIS 6.0. In the NDIS 6.0 sample they wrote the cancel code according to the pseudo code in MSDN. Unfortunately, they didn't back-port those changes/fixes to the sample code in the 5x directory (sample code intended for NDIS 5.x)&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;My full description/conversation is here:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.osronline.com/showthread.cfm?link=142677" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;http://www.osronline.com/showthread.cfm?link=142677&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-3092846118460528219?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/3092846118460528219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/11/wdk-600118001-ndisprot-5x-cancel-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/3092846118460528219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/3092846118460528219'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/11/wdk-600118001-ndisprot-5x-cancel-code.html' title='WDK 6001.18001 NDISPROT 5x cancel code bug'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-2653438264375629251</id><published>2008-08-14T23:11:00.000-07:00</published><updated>2011-10-26T23:39:53.917-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='ssl'/><title type='text'>Java SSL connection calls InetAddress.getLocalHost</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;That sounds innocuous, right?&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4939977" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;Wrong.&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When you call&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InetAddress.getLocalhost()&lt;/code&gt;, a reverse DNS lookup for your hostname is done. In the worst case, you’ve specified a DNS server that isn’t reachable, and so you have to wait for the DNS timeout, which can be quite long, like 30 seconds or 2 minutes. The reason the crypto code in JCE is doing this is for a random seed generator. Seems you could find something else more random than your hostname…&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Below I’ve replicated the sample code that I created for this fix, in case it’s of any use to anyone:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I’ve found what I believe is a workaround to this problem, that seems to work against Java6. It works by setting the system property&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;impl.prefix&lt;/code&gt;, and using implementations derived from the following classes:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.net.PlainDatagramSocketImpl&lt;/code&gt;&lt;br /&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.net.Inet4AddressImpl&lt;/code&gt;&lt;br /&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.net.Inet6AddressImpl&lt;/code&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The override implementations of&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Inet4AddressImpl&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Inet6AddressImpl&lt;/code&gt;&amp;nbsp;are designed to make sure that&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;InetAddress.getLocalHost()&lt;/code&gt;&amp;nbsp;returns an answer without causing any network access. That means that SSL connections, when constructing their random seed that includes the local hostname, will not hang when DNS cannot be reached.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The reason&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;PlainDatagramSocketImpl&lt;/code&gt;&amp;nbsp;is overridden is because the system property&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;impl.prefix&lt;/code&gt;&amp;nbsp;is also used to construct it; if&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;impl.prefix&lt;/code&gt;&amp;nbsp;is not specified, then a prefix of “Plain” is assumed, and thus&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;PlainDatagramSocketImpl&lt;/code&gt;&amp;nbsp;is loaded. Therefore we must provide an implementation that with our own matching prefix.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The main class,&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;DefeatGetLocalHost&lt;/code&gt;&amp;nbsp;sets the system property&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;impl.prefix&lt;/code&gt;&amp;nbsp;to “DefeatGetLocalHost”. This will cause the following classes to be loaded when they are needed:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.net.DefeatGetLocalHostDatagramSocketImpl&lt;/code&gt;&lt;br /&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.net.DefeatGetLocalHostInet4AddressImpl&lt;/code&gt;&lt;br /&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.net.DefeatGetLocalHostInet6AddressImpl&lt;/code&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The reason that these derived classes are set in the same package, java.net, is because constructors and methods are package protected; therefore placing them in the same package provides the highest level of compatibility.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Also, in order to get our derived classes in package java.net to load in the Java runtime, we have to append the boot classpath. This is done with:&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xbootclasspath/a:&lt;/code&gt;&amp;nbsp;after which we specify the directory with our class files.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In the next comment are the source files that I wrote to demonstrate. Compile it and execute&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;DefeatGetLocalHost&lt;/code&gt;&amp;nbsp;using&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xbootclasspath/a:&lt;/code&gt;&amp;nbsp;to include the overridden classes.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;java/net/DefeatGetLocalHostDatagramSocketImpl.java:&lt;/strong&gt;&lt;/div&gt;&lt;pre style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;package java.net;&lt;br /&gt;&lt;br /&gt;class DefeatGetLocalHostDatagramSocketImpl extends PlainDatagramSocketImpl {&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;java/net/DefeatGetLocalHostInet4AddressImpl.java:&lt;/strong&gt;&lt;/div&gt;&lt;pre style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;package java.net;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;&lt;br /&gt;class DefeatGetLocalHostInet4AddressImpl extends Inet4AddressImpl {&lt;br /&gt;&lt;br /&gt;    public String getLocalHostName() {&lt;br /&gt;        System.out.println("Using implementation " +&lt;br /&gt;                           this.getClass().getName() + ".getLocalHostName");&lt;br /&gt;        return "localhost";&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public InetAddress[] lookupAllHostAddr(String hostname)&lt;br /&gt;        throws UnknownHostException {&lt;br /&gt;&lt;br /&gt;        System.out.println("Using implementation " +&lt;br /&gt;                           this.getClass().getName() + ".lookupAllHostAddr");&lt;br /&gt;&lt;br /&gt;        if (hostname.equals("localhost")) {&lt;br /&gt;            return new InetAddress[] {&lt;br /&gt;                InetAddress.getByAddress(new byte[] {&lt;br /&gt;                        (byte)127, (byte)0, (byte)0, (byte)1&lt;br /&gt;                    })&lt;br /&gt;            };&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return super.lookupAllHostAddr(hostname);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;java/net/DefeatGetLocalHostInet6AddressImpl.java:&lt;/strong&gt;&lt;/div&gt;&lt;pre style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;package java.net;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;&lt;br /&gt;class DefeatGetLocalHostInet6AddressImpl extends Inet6AddressImpl {&lt;br /&gt;&lt;br /&gt;    public String getLocalHostName() {&lt;br /&gt;        System.out.println("Using implementation " +&lt;br /&gt;                           this.getClass().getName() + ".getLocalHostName");&lt;br /&gt;        return "localhost";&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public InetAddress[] lookupAllHostAddr(String hostname)&lt;br /&gt;        throws UnknownHostException {&lt;br /&gt;&lt;br /&gt;        System.out.println("Using implementation " +&lt;br /&gt;                           this.getClass().getName() + ".lookupAllHostAddr");&lt;br /&gt;&lt;br /&gt;        if (hostname.equals("localhost")) {&lt;br /&gt;            return new InetAddress[] {&lt;br /&gt;                InetAddress.getByAddress(new byte[] {&lt;br /&gt;                        (byte)127, (byte)0, (byte)0, (byte)1&lt;br /&gt;                    })&lt;br /&gt;            };&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return super.lookupAllHostAddr(hostname);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong&gt;DefeatGetLocalHost.java:&lt;/strong&gt;&lt;/div&gt;&lt;pre style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;public class DefeatGetLocalHost {&lt;br /&gt;&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        try {&lt;br /&gt;            safeMain(args);&lt;br /&gt;        } catch(Throwable e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private static void safeMain(String[] args)&lt;br /&gt;        throws java.net.UnknownHostException, java.net.SocketException {&lt;br /&gt;&lt;br /&gt;        System.setProperty("impl.prefix", "DefeatGetLocalHost");&lt;br /&gt;&lt;br /&gt;        System.out.println("Getting localhost:");&lt;br /&gt;        System.out.println(java.net.InetAddress.getLocalHost().getHostAddress());&lt;br /&gt;&lt;br /&gt;        System.out.println("Creating DatagramSocket:");&lt;br /&gt;        java.net.DatagramSocket dg = new java.net.DatagramSocket();&lt;br /&gt;        dg.close();&lt;br /&gt;&lt;br /&gt;        System.out.println("Success");&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-2653438264375629251?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/2653438264375629251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/08/java-ssl-connection-calls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/2653438264375629251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/2653438264375629251'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/08/java-ssl-connection-calls.html' title='Java SSL connection calls InetAddress.getLocalHost'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-4728782226885167197</id><published>2008-02-08T11:03:00.000-08:00</published><updated>2011-10-26T23:39:01.122-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='xemacs'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Compiling xemacs 21.5.28 on Ubuntu 7.10</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;I'm actually now a&amp;nbsp;&lt;a href="http://www.gnu.org/software/emacs/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;GNU Emacs&lt;/a&gt;&amp;nbsp;user, not an&amp;nbsp;&lt;a href="http://www.xemacs.org/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;XEmacs&lt;/a&gt;&amp;nbsp;user, but in case this is helpful to anyone I've recorded how I figured out how to the get the XEmacs source to&amp;nbsp;&lt;a href="http://ubuntuforums.org/showthread.php?p=4200712" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;compile on Ubuntu 7.10.&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The reason I'm no longer an XEmacs user is because it's just not keeping up with GNU Emacs, but more importantly, there is an extremely annoying&amp;nbsp;&lt;a href="http://ubuntuforums.org/showthread.php?t=682166" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;bug&lt;/a&gt;...&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Update:&amp;nbsp;&lt;/span&gt;It appears that the "Xlib: unexpected async reply" that I refer to above is&amp;nbsp;&lt;a href="http://ubuntuforums.org/showthread.php?t=682166#4" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;fixed in Ubuntu 8.04.&lt;/a&gt;&amp;nbsp;Too bad I'm now using GNU Emacs...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-4728782226885167197?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/4728782226885167197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/10/compiling-xemacs-21528-on-ubuntu-710.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4728782226885167197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4728782226885167197'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/10/compiling-xemacs-21528-on-ubuntu-710.html' title='Compiling xemacs 21.5.28 on Ubuntu 7.10'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-6941760094063553925</id><published>2008-01-30T10:25:00.000-08:00</published><updated>2011-10-26T23:36:15.682-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>VMware Fusion 1.1 plus OS X 10.5.1 == freeze</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Most of the info about this I put in this thread:&amp;nbsp;&lt;a href="http://communities.vmware.com/thread/115466" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;http://communities.vmware.com/thread/115466&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;This issue was affecting me quite a bit after upgrading to OS X Leopard VMware Fusion. I helped by&amp;nbsp;&lt;a href="http://communities.vmware.com/thread/115466?tstart=0&amp;amp;start=30#824703" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;collecting the kernel stack traces&lt;/a&gt;&amp;nbsp;for the VMware engineer&amp;nbsp;&lt;a href="http://communities.vmware.com/people/bgertzfield" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;Ben Gertzfield&lt;/a&gt;. From there he&amp;nbsp;&lt;a href="http://communities.vmware.com/thread/115466?tstart=0&amp;amp;start=45#836233" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;reproduced the problem&lt;/a&gt;&amp;nbsp;and determined that this is a bug in the OS X kernel. Apple Radar bug&amp;nbsp;5679432 was filed, and fixed in 10.5.3.&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-6941760094063553925?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/6941760094063553925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/01/vmware-fusion-11-plus-os-x-1051-freeze.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6941760094063553925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6941760094063553925'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/01/vmware-fusion-11-plus-os-x-1051-freeze.html' title='VMware Fusion 1.1 plus OS X 10.5.1 == freeze'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-6375863427319829256</id><published>2008-01-14T16:24:00.000-08:00</published><updated>2011-10-22T09:06:19.441-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nsis'/><title type='text'>Common NSIS coding mistake with macros</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Read&amp;nbsp;&lt;a href="http://forums.winamp.com/showthread.php?postid=2295095" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;this forum entry&lt;/a&gt;&amp;nbsp;I wrote about what could be a common&amp;nbsp;&lt;span class="caps"&gt;NSIS&amp;nbsp;&lt;/span&gt;coding mistake with macros. For instance, this code:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;IfErrors 0 +2&lt;/code&gt;&lt;br /&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;!insertmacro LogProgressMessage '"There was an error..."'&lt;/code&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;will likely cause the error "Installer corrupted: invalid opcode" at runtime. Instead of using +2, you should use a label.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-6375863427319829256?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/6375863427319829256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/01/common-nsis-coding-mistake-with-macros.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6375863427319829256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6375863427319829256'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/01/common-nsis-coding-mistake-with-macros.html' title='Common NSIS coding mistake with macros'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-5181990492533467020</id><published>2008-01-01T23:15:00.000-08:00</published><updated>2011-10-21T08:13:03.878-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='log4j'/><title type='text'>log4j can swallow InterruptedException via InterruptedIOException</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;Just filed a bug against&amp;nbsp;&lt;a href="http://logging.apache.org/log4j/1.2/index.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;log4j&lt;/a&gt;; it can&amp;nbsp;&lt;a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=44157" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;swallow InterruptedException&lt;/a&gt;&amp;nbsp;delivered to a thread that uses logging. This is because it catches IOException and ignores it, but IOException can also be InterruptedIOException, which can be generated on some platforms when a thread is interrupted.&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Update:&amp;nbsp;&lt;/span&gt;As of 8/14/2008, the log4j developer Curt Arnold has bug&amp;nbsp;44157 fixed, and the current plan is to ship the fix with log4j 1.2.16.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-5181990492533467020?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/5181990492533467020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/01/log4j-can-swallow-interruptedexception.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/5181990492533467020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/5181990492533467020'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2008/01/log4j-can-swallow-interruptedexception.html' title='log4j can swallow InterruptedException via InterruptedIOException'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-8327106694155057718</id><published>2006-12-11T10:51:00.000-08:00</published><updated>2011-10-21T08:11:53.430-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ip'/><category scheme='http://www.blogger.com/atom/ns#' term='routing'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Platform specific IP routing behavior</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The code I'm working on manipulates routing tables on three different platforms: Linux, Windows and Solaris. Each of them has a different behavior for different scenarios. Here I attempt to document those differences.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;First some definitions:&lt;/div&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;Interface&lt;/b&gt;&amp;nbsp;A device which can directly reach a subnet via&amp;nbsp;&lt;i&gt;&lt;span class="caps"&gt;ARP&lt;/span&gt;&lt;/i&gt;&amp;nbsp;or other protocols. An example is&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;eth0&lt;/code&gt;.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;Direct route&lt;/b&gt;&amp;nbsp;A route which indicates which&amp;nbsp;&lt;i&gt;Interface&lt;/i&gt;&amp;nbsp;to use to reach a directly connected subnet.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;Gateway route&lt;/b&gt;&amp;nbsp;A route which indicates a gateway to use to reach a subnet which is connected via a router.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;Default route&lt;/b&gt;&amp;nbsp;A special case of a&amp;nbsp;&lt;i&gt;Gateway route&lt;/i&gt;&amp;nbsp;in which the destination subnet is all possible addresses.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;Host route&lt;/b&gt;&amp;nbsp;A special case of any of either a&amp;nbsp;&lt;i&gt;Direct route&lt;/i&gt;&amp;nbsp;or a&amp;nbsp;&lt;i&gt;Gateway route&lt;/i&gt;&amp;nbsp;in which the destination is a single machine.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;Multicast route&lt;/b&gt;&amp;nbsp;A special case of a&amp;nbsp;&lt;i&gt;Direct route&lt;/i&gt;&amp;nbsp;in which the destination subnet is the multicast address space,&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;224.0.0.0/8&lt;/code&gt;&amp;nbsp;or a subset thereof.&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Note that example route entries in this table is based on the format emitted from Linux's&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/sbin/ip/route&lt;/code&gt;.&lt;/div&gt;&lt;table style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/td&gt;&lt;th style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Linux 2.6&lt;/th&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/td&gt;&lt;th style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Windows 2003&lt;/th&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/td&gt;&lt;th style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;Solaris 10&lt;/th&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The interface chosen to access a gateway via a route is determined by traversing the route table, not hardcoded into the route entry.&lt;br /&gt;For instance,&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;default via 192.168.0.1&lt;/code&gt;&amp;nbsp;does not need the specification&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;dev eth0&lt;/code&gt;, because that is determined by finding the direct route&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;192.168.0.0/24 dev eth0&lt;/code&gt;.&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn1" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;A Gateway route which is also a Host route can be added where the destination is an address that exists in a subnet of another Direct route.&lt;br /&gt;For instance, the route&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;192.168.0.20/32 via 192.168.0.1 dev eth0&lt;/code&gt;&amp;nbsp;exists while the direct route&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;192.168.0.0/24 dev eth0&lt;/code&gt;&amp;nbsp;also exists.&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn2" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn2" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn2" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;A Direct route which is also a Host route can be added where the destination is an address that exists in a subnet of another Direct route.&lt;br /&gt;For instance, the route&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;192.168.0.20/32 dev eth0&lt;/code&gt;&amp;nbsp;exists while the direct route&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;192.168.0.0/24 dev eth0&lt;/code&gt;&amp;nbsp;also exists.&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Direct routes can be deleted.&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn3" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Route priority can be programmatically controlled.&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn4" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When an interface is administratively taken down, do the associated Direct route entries disappear?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When an interface is administratively taken down, and associated Direct route entries disappear, do they return when the interface is brought up again?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When an interface is administratively taken down, do the associated Gateway route entries disappear?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When an interface is administratively taken down, and associated Gateway route entries disappear, do they return when the interface is brought up again?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When an interface is administratively down, is it an error to add a route that references that interface?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When an interface is unplugged, do the associated route entries disappear?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When an interface is unplugged, and associated route entries disappear, do they return when the interface is plugged in again?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;N/A&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;N/A&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When an interface is unplugged, is it an error to add a route that references that interface?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn5" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When an interface is unplugged, and associated route entries do not disappear, will an alternate route be chosen because the interface is unplugged?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;N/A&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If two interfaces are connected to the same subnet, will&amp;nbsp;&lt;span class="caps"&gt;ARP&lt;/span&gt;respond on either interface for an address on one of the interfaces?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Can routes be modified for all attributes including priority? An answer of no means they must be destroyed and recreated to modify attributes.&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Does the operating system create Multicast routes by default?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Can multicast routes be deleted?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn3" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If Multicast routes do not exist, do multicast packets exit the machine? To where?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn6" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;6&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Can two routes be created with the same destination and priority, but a different interface?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn7" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;7&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Can a Gateway route be specified with an interface, where that interface does not have a Direct route for the gateway in the Gateway route?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn8" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;8&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn9" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;9&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn8" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;8&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When you remove a Direct route which is required by a Gateway route to reach the gateway, does the Gateway route disappear?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background-attachment: initial; background-clip: initial; background-color: #dddddd; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If you specify a Gateway route with a gateway that is not reachable via a Direct route, is this allowed?&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;td colspan="2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;yes&lt;sup class="footnote"&gt;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2006/12/platform-specific-ip-routing-behavior.html#fn10" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;10&lt;/a&gt;&lt;/sup&gt;&lt;/td&gt;&lt;td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" valign="top"&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="footnote" id="fn1" style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;sup&gt;1&lt;/sup&gt;&amp;nbsp;This configuration is possible if the route entry is set for this behavior. The route entry can also be configured for a specific interface.&lt;/div&gt;&lt;div class="footnote" id="fn2" style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;sup&gt;2&lt;/sup&gt;&amp;nbsp;When a ping is performed on the destination address, it is sent to the gateway, not via the direct route; this is what should be expected by following the rules in reading a route table. However, the gateway in my test was a Linux 2.6 machine, and it rejected the ping with an&amp;nbsp;&lt;span class="caps"&gt;ICMP&amp;nbsp;&lt;/span&gt;of "unreachable." This means such a configuration is possible, but useless.&lt;/div&gt;&lt;div class="footnote" id="fn3" style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;sup&gt;3&lt;/sup&gt;&amp;nbsp;One cannot directly delete a default route or other "protected" routes, but there is a way to fool Windows into deleting it. I found this&amp;nbsp;&lt;a href="http://groups.google.com/group/microsoft.public.win32.programmer.networks/browse_frm/thread/294a033eceeeb10c/427292ff2f33eec3" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;fascinating discussion&lt;/a&gt;&lt;/div&gt;&lt;div class="footnote" id="fn4" style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;nbsp;The metric attribute cannot be set for a route in Solaris.&lt;/div&gt;&lt;div class="footnote" id="fn5" style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;nbsp;The error that's returned is&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;ERROR_INVALID_PARAMETER&lt;/code&gt;. That doesn't differentiate this condition from other problems.&lt;/div&gt;&lt;div class="footnote" id="fn6" style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;nbsp;It appears to choose the first available interface.&lt;/div&gt;&lt;div class="footnote" id="fn7" style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;nbsp;This question is partly irrelevant in Solaris; the priority or metric cannot be set for a route. However, you can create two routes with the same destination but different interfaces.&lt;/div&gt;&lt;div class="footnote" id="fn8" style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;sup&gt;8&lt;/sup&gt;&amp;nbsp;It works even if the Direct route is on another interface, but it must exist.&lt;/div&gt;&lt;div class="footnote" id="fn9" style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;nbsp;You can set the route, but it doesn't do anything.&lt;/div&gt;&lt;div class="footnote" id="fn10" style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;sup&gt;10&lt;/sup&gt;&amp;nbsp;This strange behavior is apparently allowed; the source address that's used is the address on the interface that is preferred for the Default gateway.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-8327106694155057718?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/8327106694155057718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2006/12/platform-specific-ip-routing-behavior.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/8327106694155057718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/8327106694155057718'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2006/12/platform-specific-ip-routing-behavior.html' title='Platform specific IP routing behavior'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-6293705123763957324</id><published>2006-11-12T22:43:00.000-08:00</published><updated>2011-10-20T21:21:59.881-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='annotations'/><title type='text'>javac should warn about missing @Override annotation</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;Java5 includes a great metadata system called&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;Annotations&lt;/a&gt;. One of them is really good for catching a common bug--a method that should override a base class method, but is misnamed or has the wrong argument types. It's called&amp;nbsp;&lt;a href="http://java.sun.com/javase/6/docs/api/java/lang/Override.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;@Override.&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;But what would make this annotation really useful is an optional compiler warning that would inform you of all the overridden methods that do not have the @Override annotation, so that you can cover all your methods to make sure that things that should override something really do and things that should not really do not.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;There's an outstanding&amp;nbsp;&lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6329722" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;filed bug&lt;/a&gt;&amp;nbsp;for this feature, but it doesn't look like it's going to get implemented...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-6293705123763957324?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/6293705123763957324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2006/11/javac-should-warn-about-missing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6293705123763957324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6293705123763957324'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2006/11/javac-should-warn-about-missing.html' title='javac should warn about missing @Override annotation'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-6840454828463736612</id><published>2006-07-26T10:09:00.000-07:00</published><updated>2011-10-20T21:20:08.368-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Finding memory leaks in Windows</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I was trying to figure out where a memory leak was coming from on Windows, and didn't have the luxury of using Purify, and this really helped:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://blogs.msdn.com/greggm/archive/2004/02/12/72209.aspx" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;http://blogs.msdn.com/greggm/archive/2004/02/12/72209.aspx&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Essentially,&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;VirtualAlloc&lt;/code&gt;&amp;nbsp;is the equivalent of&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;sbrk&lt;/code&gt;&amp;nbsp;in other&amp;nbsp;&lt;span class="caps"&gt;OS'&lt;/span&gt;s, and allocates virtual pages to the process. If you can find out what's calling that all the time, you're likely to discover what's allocating memory.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-6840454828463736612?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/6840454828463736612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2006/07/finding-memory-leaks-in-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6840454828463736612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/6840454828463736612'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2006/07/finding-memory-leaks-in-windows.html' title='Finding memory leaks in Windows'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-4364759632709246971</id><published>2005-10-25T14:06:00.000-07:00</published><updated>2011-10-20T21:19:05.549-07:00</updated><title type='text'>Thanks Roy...</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;Roy West was nice enough to quote me in his blog: "You don't want to ship an experiment to a customer." Generally not a good idea...&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-4364759632709246971?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/4364759632709246971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2005/10/thanks-roy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4364759632709246971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4364759632709246971'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2005/10/thanks-roy.html' title='Thanks Roy...'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-9040989720232647369</id><published>2005-01-06T14:15:00.000-08:00</published><updated>2011-10-20T21:12:05.971-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Signals in Java</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;a href="http://www-106.ibm.com/developerworks/ibm/library/i-signalhandling/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;Revelations on Java Signal Handling&lt;/a&gt;&amp;nbsp;is an important document to know how to catch signals in Java.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-9040989720232647369?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/9040989720232647369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2005/01/signals-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/9040989720232647369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/9040989720232647369'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2005/01/signals-in-java.html' title='Signals in Java'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-1739680188515884045</id><published>2005-01-06T14:06:00.000-08:00</published><updated>2011-10-20T21:11:29.301-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Stopping Java Threads listening on Sockets</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="color: black; font-family: Verdana; font-size: 11px;"&gt;You should read this link to for a recent discussion on how to interrupt threads that are listening on Socket's in Java:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black; font-family: Verdana; font-size: 11px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: black; font-family: Verdana; font-size: 11px;"&gt;&lt;a href="http://www.javaworld.com/javaforums/showflat.php?Cat=2&amp;amp;Board=TheoryPractice&amp;amp;Number=382&amp;amp;page=0&amp;amp;view=collapsed&amp;amp;sb=7&amp;amp;o=&amp;amp;fpart=1" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;http://www.javaworld.com/javaforums/showflat.php?Cat=2&amp;amp;Board=TheoryPractice&amp;amp;Number=382&amp;amp;page=0&amp;amp;view=collapsed&amp;amp;sb=7&amp;amp;o=&amp;amp;fpart=1&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-1739680188515884045?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/1739680188515884045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2005/01/stopping-java-threads-listening-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1739680188515884045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1739680188515884045'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2005/01/stopping-java-threads-listening-on.html' title='Stopping Java Threads listening on Sockets'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-4892359774264561209</id><published>2004-12-05T18:13:00.000-08:00</published><updated>2011-10-20T21:08:39.661-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Problems with JVM crashing</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I suddenly seem to have all kinds of problems with the&amp;nbsp;&lt;span class="caps"&gt;JVM&amp;nbsp;&lt;/span&gt;crashing when I'm creating it in our monitor code. The way things work is that I have an executable that links&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.so&lt;/code&gt;&amp;nbsp;instead of using the shipped&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java&lt;/code&gt;&amp;nbsp;exectuable. I call this the "driver." Here's what I've found:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The driver will often (but not most of the time) crash, only when&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xdebug&lt;/code&gt;&amp;nbsp;is given, with the following stack trace:&lt;/div&gt;&lt;pre style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;gdb build/debug.linux.x86.rhel3/bin/scdriver_debug core.28224&lt;br /&gt;GNU gdb 6.0&lt;br /&gt;Copyright 2003 Free Software Foundation, Inc.&lt;br /&gt;GDB is free software, covered by the GNU General Public License, and you are&lt;br /&gt;welcome to change it and/or distribute copies of it under certain conditions.&lt;br /&gt;Type "show copying" to see the conditions.&lt;br /&gt;There is absolutely no warranty for GDB.  Type "show warranty" for details.&lt;br /&gt;This GDB was configured as "i686-pc-linux-gnu"...&lt;br /&gt;Core was generated by `/home/jared.oberhaus/jared.oberhaus-linux3-all/shared/1.2/build/debug.linux.x86'.&lt;br /&gt;Program terminated with signal 11, Segmentation fault.&lt;br /&gt;Reading symbols from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/libjava.so...done.&lt;br /&gt;Loaded symbols for /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/libjava.so&lt;br /&gt;Reading symbols from /lib/tls/libpthread.so.0...done.&lt;br /&gt;Loaded symbols for /lib/tls/libpthread.so.0&lt;br /&gt;Reading symbols from /lib/tls/libc.so.6...done.&lt;br /&gt;Loaded symbols for /lib/tls/libc.so.6&lt;br /&gt;Reading symbols from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so...done.&lt;br /&gt;Loaded symbols for /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so&lt;br /&gt;Reading symbols from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/libverify.so...done.&lt;br /&gt;Loaded symbols for /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/libverify.so&lt;br /&gt;Reading symbols from /lib/libnsl.so.1...done.&lt;br /&gt;Loaded symbols for /lib/libnsl.so.1&lt;br /&gt;Reading symbols from /lib/libdl.so.2...done.&lt;br /&gt;Loaded symbols for /lib/libdl.so.2&lt;br /&gt;Reading symbols from /lib/ld-linux.so.2...done.&lt;br /&gt;Loaded symbols for /lib/ld-linux.so.2&lt;br /&gt;Reading symbols from /lib/tls/libm.so.6...done.&lt;br /&gt;Loaded symbols for /lib/tls/libm.so.6&lt;br /&gt;Reading symbols from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so...done.&lt;br /&gt;Loaded symbols for /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so&lt;br /&gt;Reading symbols from /lib/libnss_files.so.2...done.&lt;br /&gt;Loaded symbols for /lib/libnss_files.so.2&lt;br /&gt;Reading symbols from /lib/libnss_ldap.so.2...done.&lt;br /&gt;Loaded symbols for /lib/libnss_ldap.so.2&lt;br /&gt;Reading symbols from /lib/libresolv.so.2...done.&lt;br /&gt;Loaded symbols for /lib/libresolv.so.2&lt;br /&gt;Reading symbols from /lib/libnss_dns.so.2...done.&lt;br /&gt;Loaded symbols for /lib/libnss_dns.so.2&lt;br /&gt;Reading symbols from /usr/lib/sasl/libanonymous.so...done.&lt;br /&gt;Loaded symbols for /usr/lib/sasl/libanonymous.so&lt;br /&gt;Reading symbols from /usr/lib/sasl/libcrammd5.so...done.&lt;br /&gt;Loaded symbols for /usr/lib/sasl/libcrammd5.so&lt;br /&gt;Reading symbols from /usr/lib/sasl/libdigestmd5.so...done.&lt;br /&gt;Loaded symbols for /usr/lib/sasl/libdigestmd5.so&lt;br /&gt;Reading symbols from /usr/kerberos/lib/libdes425.so.3...done.&lt;br /&gt;Loaded symbols for /usr/kerberos/lib/libdes425.so.3&lt;br /&gt;Reading symbols from /usr/kerberos/lib/libkrb5.so.3...done.&lt;br /&gt;Loaded symbols for /usr/kerberos/lib/libkrb5.so.3&lt;br /&gt;Reading symbols from /usr/kerberos/lib/libcom_err.so.3...done.&lt;br /&gt;Loaded symbols for /usr/kerberos/lib/libcom_err.so.3&lt;br /&gt;Reading symbols from /usr/kerberos/lib/libk5crypto.so.3...done.&lt;br /&gt;Loaded symbols for /usr/kerberos/lib/libk5crypto.so.3&lt;br /&gt;Reading symbols from /usr/lib/sasl/libgssapiv2.so...done.&lt;br /&gt;Loaded symbols for /usr/lib/sasl/libgssapiv2.so&lt;br /&gt;Reading symbols from /usr/kerberos/lib/libgssapi_krb5.so.2...done.&lt;br /&gt;Loaded symbols for /usr/kerberos/lib/libgssapi_krb5.so.2&lt;br /&gt;Reading symbols from /usr/lib/sasl/liblogin.so...done.&lt;br /&gt;Loaded symbols for /usr/lib/sasl/liblogin.so&lt;br /&gt;Reading symbols from /lib/libcrypt.so.1...done.&lt;br /&gt;Loaded symbols for /lib/libcrypt.so.1&lt;br /&gt;Reading symbols from /lib/libpam.so.0...done.&lt;br /&gt;Loaded symbols for /lib/libpam.so.0&lt;br /&gt;Reading symbols from /usr/lib/sasl/libplain.so...done.&lt;br /&gt;Loaded symbols for /usr/lib/sasl/libplain.so&lt;br /&gt;Reading symbols from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/libzip.so...done.&lt;br /&gt;Loaded symbols for /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/libzip.so&lt;br /&gt;Reading symbols from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/libjdwp.so...done.&lt;br /&gt;Loaded symbols for /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/libjdwp.so&lt;br /&gt;#0  0x0066e6c1 in pthread_mutex_init () from /lib/tls/libpthread.so.0&lt;br /&gt;(gdb) where&lt;br /&gt;#0  0x0066e6c1 in pthread_mutex_init () from /lib/tls/libpthread.so.0&lt;br /&gt;#1  0x01070e3c in ObjectMonitor::ObjectMonitor ()&lt;br /&gt;   from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so&lt;br /&gt;#2  0x01000517 in CreateRawMonitor ()&lt;br /&gt;   from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so&lt;br /&gt;#3  0x0039a872 in JVM_OnLoad ()&lt;br /&gt;   from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/libjdwp.so&lt;br /&gt;#4  0x00ff8a2e in JvmdiInternal::post_event ()&lt;br /&gt;   from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so&lt;br /&gt;#5  0x01002a0e in jvmdi::post_vm_initialized_event ()&lt;br /&gt;   from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so&lt;br /&gt;#6  0x010f109c in Threads::create_vm ()&lt;br /&gt;   from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so&lt;br /&gt;#7  0x00fb4388 in JNI_CreateJavaVM ()&lt;br /&gt;   from /home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre/lib/i386/server/libjvm.so&lt;br /&gt;#8  0x08048e6b in exec_java (java_library_path=0x0, &lt;br /&gt;    jre_home=0xbfffcdda "/home/jared.oberhaus/jared.oberhaus-linux3-all/tools/linux/j2sdk1.4.2_06/jre", &lt;br /&gt;    java_class=0xbfffce27 "com/scalent/shared/tools/test/MonitorTest3", &lt;br /&gt;    classpath=0x0) at driver.c:300&lt;br /&gt;#9  0x0804895d in main (argc=5, argv=0xbfffb054) at driver.c:81&lt;/code&gt;&lt;/pre&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I thought it was something I did because in the stack trace I can see that&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;classpath&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java_library_path&lt;/code&gt;, parameters to&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;exec_java&lt;/code&gt;&amp;nbsp;are null, and sometimes contain other bad values. Examining this with the debugger I've determined that this is just the optimizer. The compiler is passing in the right values for these when they're needed, but otherwise they reflect the value of the register&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;$esi&lt;/code&gt;&amp;nbsp;which can vary.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I tried to use Purify on this, but there is something seriously broken with Purify on the machine that I'm running on right now. It seems to work better with root, but when I try it as my own user, I get a&amp;nbsp;&lt;span class="caps"&gt;MSE&amp;nbsp;&lt;/span&gt;on almost every&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;malloc&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;pthread&lt;/code&gt;operation, whether my code does it or not. Another red/green/blue herring.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I tried&amp;nbsp;&lt;a href="http://valgrind.org/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;Valgrind&lt;/a&gt;&amp;nbsp;on it to try to find something, but that didn't seem to discover anything either. Of course, Valgrind can't really execute the whole&amp;nbsp;&lt;span class="caps"&gt;JVM,&amp;nbsp;&lt;/span&gt;but that's not what I was looking for; I was just trying to get it to execute my non-JVM code and find some sort of memory corruption.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I also tried the j2sdk1.4.2_06, better than our j2sdk1.4.2_03. That didn't help at all. It still crashes at least 1/3 times.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Finally, I went into our code and turned off all the options. After 34 runs of&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;com.scalent.shared.tools.test.TestMonitor&lt;/code&gt;&amp;nbsp;it did not fail once. I believe the whole thing has something to do with the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xdebug&lt;/code&gt;&amp;nbsp;and related options, as I've never seen a crash in the non-debug version of the driver.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I think I really proved that it has something devious to do with&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xdebug&lt;/code&gt;&amp;nbsp;and friends. I commented out just the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xdebug&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xrunjdwp:transport=dt_socket,address=9300,server=y,suspend=n&lt;/code&gt;options and ran the test&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;com.scalent.shared.tools.test.TestMonitor&lt;/code&gt;160 times and it didn't fail once.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I tried putting a 5 second delay between tests in&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;com.scalent.shared.tools.test.TestMonitor&lt;/code&gt;, but that didn't help. It still failed on the third test.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I tried again with&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;strict=y&lt;/code&gt;&amp;nbsp;on the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xrunjdwp:transport&lt;/code&gt;&amp;nbsp;line, but that didn't help.&lt;br /&gt;I also tried using the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;dt_shmem&lt;/code&gt;&amp;nbsp;transport for&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xrunjdwp&lt;/code&gt;, but that didn't help either.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I have resigned myself to the fact that this is a bug in the&amp;nbsp;&lt;span class="caps"&gt;JVM,&amp;nbsp;&lt;/span&gt;at least with the way that I'm calling it. Fortunately it only happens while we have&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xdebug&lt;/code&gt;&amp;nbsp;turned on.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-4892359774264561209?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/4892359774264561209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/12/i-suddenly-seem-to-have-all-kinds-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4892359774264561209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4892359774264561209'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/12/i-suddenly-seem-to-have-all-kinds-of.html' title='Problems with JVM crashing'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-1359964894630553370</id><published>2004-12-03T17:00:00.000-08:00</published><updated>2011-10-20T20:23:03.535-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Find your .jar file</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;a href="http://www.javaworld.com/javaworld/javaqa/2003-07/01-qa-0711-classsrc.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;This&lt;/a&gt;&amp;nbsp;should help you find the jarfile a class comes from...&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-1359964894630553370?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/1359964894630553370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/12/find-your-jar-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1359964894630553370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1359964894630553370'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/12/find-your-jar-file.html' title='Find your .jar file'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-8342632586441904527</id><published>2004-11-03T23:18:00.000-08:00</published><updated>2011-10-20T20:16:23.141-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>RedHat Enterprise Linux and iowait</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;We use RedHat Enterprise Linux 3.1 at work for a developer box, and I was seeing problems where the machine would get into 100% iowait lockups; it wouldn't completely lock, but it would get REALLY slow. The answer is here, and for me it worked instantly:&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://www.daniweb.com/techtalkforums/post38052.html#post38052" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;http://www.daniweb.com/techtalkforums/post38052.html#post38052&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-8342632586441904527?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/8342632586441904527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/11/redhat-enterprise-linux-and-iowait.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/8342632586441904527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/8342632586441904527'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/11/redhat-enterprise-linux-and-iowait.html' title='RedHat Enterprise Linux and iowait'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-5513108529599036999</id><published>2004-10-21T14:47:00.000-07:00</published><updated>2011-10-20T20:11:01.307-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Getting Purify to work with Java</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="asset-content entry-content" style="clear: both; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: static;"&gt;&lt;div class="asset-body" style="clear: both; height: 1719px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Let's say you wrote some code using Java&amp;nbsp;&lt;span class="caps"&gt;JNI&amp;nbsp;&lt;/span&gt;and you wanted to Purify that code so that you could find memory leaks and other bugs.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Short answer: you can't.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Here's the long description about what I went through to get to there.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;These are the software versions I'm working with:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;RedHat Enterprise Linux 3.1&lt;br /&gt;Linux kernel 2.4.21-9EL&lt;br /&gt;PurifyPlus.2003a.06.13.FixPack.0155&lt;br /&gt;Java Runtime 1.4.2_03-b02&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;One of the most important steps is the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.purify&lt;/code&gt;&amp;nbsp;file that I had constructed that suppress hundreds of thousands of warnings and allowed me to run things in a reasonable amount of time--but apparently I forgot to save that in a safe place and it's been destroyed. But easy to recreate if you follow these steps.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Anyhow, where I'm stuck is that when an attempt is made by Java to bind to a socket and start listening, it just sits there. There's no activity that I can see via&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;strace&lt;/code&gt;, no&lt;span class="caps"&gt;CPU&amp;nbsp;&lt;/span&gt;taken up by the process. But the&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;rtslave&lt;/code&gt;&amp;nbsp;is still responsive. It never goes past that step.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I can see this in two different ways; if I turn on Java debugging for my process using the appropriate flags, as soon as the&amp;nbsp;&lt;span class="caps"&gt;JVM&amp;nbsp;&lt;/span&gt;starts up it attempts to bind to that socket. The result is that it just hangs there before executing any Java code. However, if I turn off the Java debugging flag, much Java code is executed up to the point where my Java code attempts to bind to a socket and listen. Then it just sits there again.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In a previous exercise trying to debug Java and listening on a socket, I found that when Java opens a socket it apparently uses&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;rtnetlink&lt;/code&gt;&amp;nbsp;to turn off the multicast flag for that socket. I don't know if that has anything to do with it, but it might be interesting...&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;However, to get this far, here are the steps:&lt;/div&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;You generally have to build a purified executable on the same machine that you're executing on. If anything is different it will crash instantly.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The Purify&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;rtslave&lt;/code&gt;&amp;nbsp;process just eats tons of memory when it stores errors. If you suppress those errors, it will use much less (or no) memory for those suppressions. The reporting of those errors also takes a huge amount of time, so the purify process ran for a very long time, getting nowhere.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The&amp;nbsp;&lt;span class="caps"&gt;JVM&amp;nbsp;&lt;/span&gt;has lots and lots of things that look like&amp;nbsp;&lt;span class="caps"&gt;MSE'&lt;/span&gt;s and&amp;nbsp;&lt;span class="caps"&gt;UMR'&lt;/span&gt;s. Once you suppress those, the&amp;nbsp;&lt;span class="caps"&gt;JVM&amp;nbsp;&lt;/span&gt;can get somewhere under Purify.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;You have to set&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;DISPLAY&lt;/code&gt;, otherwise Purify will dump everything to stdout, which usually isn't very helpful.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I modified our startup environment to pass the environment variables&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;DISPLAY&lt;/code&gt;,&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;PUREOPTIONS&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;PURIFYOPTIONS&lt;/code&gt;&amp;nbsp;so that they can affect the operation of Purify.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I'm running the&amp;nbsp;&lt;span class="caps"&gt;JVM&amp;nbsp;&lt;/span&gt;with&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xint&lt;/code&gt;&amp;nbsp;so that the HotSpot compiler is not invoked, which probably would introduce lots and lots of interesting challenges to get things to work.&amp;nbsp;&lt;b&gt;Update&lt;/b&gt;: I got stuck and tried my luck with the HotSpot compiler, and now I'm getting farther. So you should not use&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-Xint&lt;/code&gt;.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I found out that&amp;nbsp;&lt;span class="caps"&gt;IBM&amp;nbsp;&lt;/span&gt;has a newer version of Purify that seems to work much better than the previous version against the&amp;nbsp;&lt;span class="caps"&gt;JVM.&lt;/span&gt;&amp;nbsp;It's PurifyPlus.2003a.06.13.FixPack.0155.&lt;br /&gt;There is an undocumented parameter when building with purify, called&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-handle-calls-to-java&lt;/code&gt;. I added this to my&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;PUREOPTIONS&lt;/code&gt;&amp;nbsp;environment variable.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Because of&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-handle-calls-to-java&lt;/code&gt;, Purify goes into its cache and sets up symbolic links to "help" the&amp;nbsp;&lt;span class="caps"&gt;JVM&amp;nbsp;&lt;/span&gt;find stuff. For instance, I have&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-cache-dir&lt;/code&gt;&amp;nbsp;set to&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/var/purify/cache&lt;/code&gt;. In&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/var/purify/cache/opt/scalent/jre/lib/&lt;/code&gt;there are lots of symbolic links back to&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/opt/scalent/jre/lib/&lt;/code&gt;. That is where our&amp;nbsp;&lt;span class="caps"&gt;JRE&amp;nbsp;&lt;/span&gt;is stored in the file system.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The&amp;nbsp;&lt;span class="caps"&gt;JVM&amp;nbsp;&lt;/span&gt;still needs at least one more (that I know about so far) symbolic link to find stuff. First you have to run the&amp;nbsp;&lt;span class="caps"&gt;JVM&amp;nbsp;&lt;/span&gt;and have it fail with the message: "Error occurred during initialization of VM java.lang.UnsatisfiedLinkError: no zip on java.library.path". This is because when java looks for a library to open called "zip", on Linux it's going to look for&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;libzip.so&lt;/code&gt;&amp;nbsp;on its&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.library.path&lt;/code&gt;. But since the name has been Purify-mangled, it can't find it. Therefore, do the following:&lt;/li&gt;&lt;/ul&gt;&lt;pre style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;cd /var/purify/cache/opt/scalent/jre/lib/i386/&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libawt.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libcmm.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libdcpr.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libdt_socket.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libfontmanager.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libhprof.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libioser12.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libjaas_unix.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libjavaplugin_jni.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libjawt.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libjcov.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libJdbc0dc.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libjdwp.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libjpeg.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libsig.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libjsoundalso.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libjsound.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libmlib_image.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libnative_chmod.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libnet.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libnio.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/librmi.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libverify.so&lt;br /&gt;ln -s /opt/scalent/jre/lib/i386/libzip.so&lt;/code&gt;&lt;/pre&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I found another directory that needs to be linked. I got the error "ZoneInfo: /var/purify/cache/opt/scalent/jre/lib/zi/ZoneInfoMappings (No such file or directory)". I also found lots of other directories in a similar state:&lt;/li&gt;&lt;/ul&gt;&lt;pre style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;cd /var/purify/cache/opt/scalent/jre/lib&lt;br /&gt;ln -s /opt/scalent/jre/lib/zi&lt;br /&gt;ln -s /opt/scalent/jre/lib/locale&lt;br /&gt;ln -s /opt/scalent/jre/lib/images&lt;br /&gt;ln -s /opt/scalent/jre/lib/im&lt;br /&gt;ln -s /opt/scalent/jre/lib/fonts&lt;br /&gt;ln -s /opt/scalent/jre/lib/ext&lt;br /&gt;ln -s /opt/scalent/jre/lib/cmm&lt;br /&gt;ln -s /opt/scalent/jre/lib/audio&lt;/code&gt;&lt;/pre&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When the Java code starts up, it forks off processes that are written in C. The result is that Purify follows the fork with another Purify&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;rtslave&lt;/code&gt;&amp;nbsp;that immediately does an exec. Purify takes this as a process exit, and so immediately starts looking for leaks in that process. We don't care about leaks at this point; we'll find the leaks in the original&amp;nbsp;&lt;span class="caps"&gt;JVM&amp;nbsp;&lt;/span&gt;process when we want by clicking on the leak button. So until I fix process forking, I'm adding the options&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;-inuse-at-exit=no -leaks-at-exit=no&lt;/code&gt;&amp;nbsp;to my&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;PURIFYOPTIONS&lt;/code&gt;&amp;nbsp;environment variable.&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In case you're wondering, Valgrind&amp;nbsp;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=69508" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;won't work either&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-5513108529599036999?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/5513108529599036999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/10/getting-purify-to-work-with-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/5513108529599036999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/5513108529599036999'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/10/getting-purify-to-work-with-java.html' title='Getting Purify to work with Java'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-1074192948256882075</id><published>2004-06-30T14:19:00.000-07:00</published><updated>2011-10-20T20:12:11.110-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='threads'/><title type='text'>Java and MT</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Java's memory model is very aggressive, and you have to be very careful when accessing memory from multiple threads. You of course have to synchronize access to memory locations, but you have to synchronize them even when it looks like you don't have to. There are several cases where you must use synchronize:&lt;/div&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;To provide a mutual exclusion barrier to prevent one thread from modifying a data structure while the other is reading it.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;To provide a memory barrier to prevent memory operation reordering from doing something you didn't want to have happen.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;To make the memory you're accessing volatile so that the runtime optimizer doesn't throw away your request to read a memory location.&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://www.javaperformancetuning.com/tips/volatile.shtml" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;Here's&lt;/a&gt;&amp;nbsp;a good web page that discusses this.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;A good rule to use is that when in doubt, synchronize.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Reordering can only hit you with a multiple-cpu machine, but the problems that I've been running into recently happen on my single&amp;nbsp;&lt;span class="caps"&gt;CPU&amp;nbsp;&lt;/span&gt;machine, with something like this:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;(Note that everything after this is speculation based on behavior I've seen):&lt;/div&gt;&lt;pre style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;int m_y = 0;&lt;br /&gt;Thread1() {&lt;br /&gt;    synchronized(m_x) {&lt;br /&gt;        m_y = 1;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;void Thread2() {&lt;br /&gt;    while(true)&lt;br /&gt;        System.out.println(m_y);&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Even after the code in Thread1 has executed in its thread, the code in Thread2 will print 0; I believe this is because the runtime optimizer doesn't bother to look at the value of m_y after the first access. This is similar to a compile-time optimizer, which you'd fix with volatile. But a compile-time optimizer couldn't do anything in this situation.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;But in Java the runtime optimizer will make it so that the first access gets the value, but it won't bother reading the value from memory anymore after that.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This strange behavior goes away by putting the synchronize(m_x) around the access to m_y. I believe this tells the runtime optimizer that something is likely to have been changed by another thread.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-1074192948256882075?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/1074192948256882075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/06/java-and-mt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1074192948256882075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1074192948256882075'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/06/java-and-mt.html' title='Java and MT'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-3354135121352534432</id><published>2004-06-08T11:11:00.000-07:00</published><updated>2011-10-20T20:08:05.330-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssl'/><title type='text'>Java uses /dev/random; may block forever creating SSL connections</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;The software that we're developing creates SSL connections when it starts up, and it does so at S13 (has to be after network, but before other services start). The result is that on an NFS booted Linux machine, it sits there forever, and never completes the connection.&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Clue #1: if you move the mouse or type on the machine's keyboard, eventually the connection will complete.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Of course the reason for it hanging is that Java is using /dev/random to generate the keys for the SSL connection. And /dev/random gets all of its entropy from the physical environment, and refuses to return random values until it gets some input from the outside world.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;We don't see this on a machine that boots from disk; I assume that /dev/random gets entropy from the interaction with the drive, via interrupts and so forth. For some reason the network activity doesn't yield the same entropy data, or at least not enough.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I found&amp;nbsp;&lt;a href="http://lwn.net/Articles/8228/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;this&lt;/a&gt;&amp;nbsp;article that discusses the usefulness of /dev/random given its current design.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In order to work around this, we decided to use /dev/urandom. We could do this by a link in the file system, but a much&amp;nbsp;&lt;a href="http://forums.sun.com/thread.jspa?trange=15&amp;amp;threadID=502002&amp;amp;forumID=2&amp;amp;tstart=75" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;superior&lt;/a&gt;&amp;nbsp;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/JAASRefGuide.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;solution&lt;/a&gt;&amp;nbsp;is to set the following system property in Java:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote class="webkit-indent-blockquote" style="background-repeat: no-repeat repeat; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;-Djava.security.egd=file:/dev/urandom&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote class="webkit-indent-blockquote" style="background-repeat: no-repeat repeat; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Now all you have to worry about is attacks against your SSL connection from those who know that you are using the pseudo-random number generator...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-3354135121352534432?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/3354135121352534432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/06/java-uses-devrandom-may-block-forever.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/3354135121352534432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/3354135121352534432'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/06/java-uses-devrandom-may-block-forever.html' title='Java uses /dev/random; may block forever creating SSL connections'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-5830056919372009852</id><published>2004-05-06T17:52:00.000-07:00</published><updated>2011-10-20T20:11:58.790-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='threads'/><title type='text'>Linux and Java and Threads and setuid</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="asset-content entry-content" style="clear: both; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: static;"&gt;&lt;div class="asset-body" style="clear: both; height: 504px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Today I learned something very interesting. I learned that you can't&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;setuid&lt;/code&gt;&amp;nbsp;on a process in Linux; not when you have multiple threads. Please see #8 in&amp;nbsp;&lt;a href="http://homepages.tesco.net/~J.deBoynePollard/FGA/linux-thread-problems.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;this&lt;/a&gt;&amp;nbsp;list.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;What they refer to as interesting times probably includes the following:&lt;/div&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;When calling&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;setuid&lt;/code&gt;, only the caller thread will actually get its uid changed. All other existing threads in the "process" retain their original uid.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I believe any sane person should recognize this as meaning Linux is broken when using threads and setuid.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This is a security hole, because root threads still exist in the process. If the non-root threads are hijacked by an attacker, they can stack stomp on the root threads and execute arbitrary code as root.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Because synchronization depends on the ability to deliver signals, and delivering signals depends on priviledges, it's easy to see how synchronization between a thread running as root and another running as non-root can wedge the process.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Even if I did call&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;setuid&lt;/code&gt;&amp;nbsp;in the first bytecode instruction in a Java process, it's too late; Java has already forked threads to do things like garbage collection, and those threads present the security hole described above, and the synchronization problem described above.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I'm sure there's a long list of other reasons why this is bad, but I can't think of them now, and the above is sufficient.&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In our project we have a Java process that uses forked processes written in C; the purpose of these forked processes is to run as root, or at least elevated privileges, while the Java process runs as some sort of nobody user. Unfortunately this doesn't work very well at all on Linux because we cannot downgrade the uid of the Java process after it starts.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This also means that if we want to listen on a port under 1024, we'll have to do that some other way; there's no way we could get the Java process to bind to that port as root and then downgrade to a nobody uid.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Also the processes I refer to have to be forked before the&amp;nbsp;&lt;span class="caps"&gt;JVM&amp;nbsp;&lt;/span&gt;starts. This means that we have to rendezvous with them in some manner that either means some sort of&amp;nbsp;&lt;span class="caps"&gt;JNI&amp;nbsp;&lt;/span&gt;code to hook up the file descriptors in the pipes, or use some other form of&amp;nbsp;&lt;span class="caps"&gt;IPC.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-5830056919372009852?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/5830056919372009852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/05/linux-and-java-and-threads-and-setuid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/5830056919372009852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/5830056919372009852'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/05/linux-and-java-and-threads-and-setuid.html' title='Linux and Java and Threads and setuid'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-7525343484639914190</id><published>2004-04-26T17:30:00.000-07:00</published><updated>2011-10-20T20:03:36.912-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Analysis of why creating socket in Java takes 3 minutes</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="asset-content entry-content" style="clear: both; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: static;"&gt;&lt;div class="asset-body" style="clear: both; height: 1605px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Here's what we think is happening, thanks to Evan's suggestion to use gdb and Carol's assistance in recreating the loopback's IP address and route:&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The first attempt by Java to open a socket is preceeded with an initialization of its socket code.&lt;br /&gt;The socket initialization code calls&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;java.net.PlainDatagramSocketImpl.leave&lt;/code&gt;, as is indicated in this stack trace from gdb:&lt;/div&gt;&lt;pre style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;#0  0xb75ebc32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2&lt;br /&gt;#1  0xb75e3bf8 in connect () from /lib/tls/libpthread.so.0&lt;br /&gt;#2  0xaa4b7c24 in Java_java_net_PlainDatagramSocketImpl_leave ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/libnet.so&lt;br /&gt;#3  0xaa4b8029 in Java_java_net_PlainSocketImpl_initProto ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/libnet.so&lt;br /&gt;#4  0xb2fa6bf2 in ?? ()&lt;br /&gt;#5  0xb2fa0ddb in ?? ()&lt;br /&gt;#6  0xb2f9e104 in ?? ()&lt;br /&gt;#7  0xb721bb44 in JavaCalls::call_helper ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#8  0xb72cfa6d in os::os_exception_wrapper ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#9  0xb721bd96 in JavaCalls::call ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#10 0xb7200f6f in instanceKlass::call_class_initializer_impl ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#11 0xb720569c in instanceKlass::call_class_initializer ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#12 0xb72001cb in instanceKlass::initialize_impl ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#13 0xb72059af in instanceKlass::initialize ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#14 0xb720d6d4 in InterpreterRuntime::_new ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#15 0xb2fad510 in ?? ()&lt;br /&gt;#16 0xb2fa0ddb in ?? ()&lt;br /&gt;#17 0xb2fa0ddb in ?? ()&lt;br /&gt;#18 0xb2fa0ddb in ?? ()&lt;br /&gt;#19 0xb2fa0ddb in ?? ()&lt;br /&gt;#20 0xb2fa0ddb in ?? ()&lt;br /&gt;#21 0xb2fa0d04 in ?? ()&lt;br /&gt;#22 0xb2fa0ddb in ?? ()&lt;br /&gt;#23 0xb2fa10e1 in ?? ()&lt;br /&gt;#24 0xb2f9e104 in ?? ()&lt;br /&gt;#25 0xb721bb44 in JavaCalls::call_helper ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#26 0xb72cfa6d in os::os_exception_wrapper ()&lt;br /&gt;---Type  to continue, or q  to quit---&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#27 0xb721bd96 in JavaCalls::call ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#28 0xb721b666 in JavaCalls::call_virtual ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#29 0xb721c1df in JavaCalls::call_virtual ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#30 0xb7274f25 in thread_entry ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#31 0xb7319caa in JavaThread::thread_main_inner ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#32 0xb7315674 in JavaThread::run ()&lt;br /&gt;   from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#33 0xb72d1083 in _start () from /opt/scalent/jre/lib/i386/client/libjvm.so&lt;br /&gt;#34 0xb75dedac in start_thread () from /lib/tls/libpthread.so.0&lt;/code&gt;&lt;/pre&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The call in question seems to be to make the machine leave the multicast group. See&amp;nbsp;&lt;a href="http://www.erights.org/javadoc/java/net/PlainDatagramSocketImpl.html#leave(java.net.InetAddress)" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Leaving the multicast group must involve connecting to loopback on a random port (the port it chooses changes and is always above 32768), and then shoving some random bytes through. That's my theory.&amp;nbsp;&lt;strong&gt;Update:&lt;/strong&gt;&amp;nbsp;This is almost certainly&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;rtnetlink&lt;/code&gt;.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;It just sits there trying to communicate with itself, and times out after ~3.5 minutes.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;It appears that it has its problem because the loopback device is not configured with an IP address and is not in the route table.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;After we issued the following commands, everything works just fine and the 3.5 minute delay turns into 18ms delay:&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;ip addr add 127.0.0.1/8 dev lo&lt;/code&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/sbin/route add -net 127.0.0.0/8 dev lo&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;We found a most interesting thread on the Java forum that seems to mirror our problem. But the guy apparently never figured it out. Maybe I should post a solution&lt;a href="http://forum.java.sun.com/thread.jsp?forum=37&amp;amp;thread=489160&amp;amp;tstart=0&amp;amp;trange=15" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;there&lt;/a&gt;.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;We went through the following other possible problems:&lt;/li&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I always thought it was some kind of nfs file locking problem, but that's not the case at all.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;We redirected the logging output to a local disk on the machine. That didn't help at all.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;We saw the process was blocked reading&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/dev/random&lt;/code&gt;;&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/dev/random&lt;/code&gt;&amp;nbsp;must use loopback to generate random numbers. To solve this we used&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/dev/urandom&lt;/code&gt;&amp;nbsp;which is not as random, but removed the block. But the connection delay persisted. This might explain why it took 50 minutes to send the first message on the&amp;nbsp;&lt;span class="caps"&gt;SSL&amp;nbsp;&lt;/span&gt;connection. Once we removed the block on&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/dev/random&lt;/code&gt;&amp;nbsp;the 50 minute message send delay seemed to go away.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;We wrote some code to try to connect without&amp;nbsp;&lt;span class="caps"&gt;SSL,&amp;nbsp;&lt;/span&gt;but I'm not convinced that ever worked. It's still in the code and can be activated with a configuration setting, and I tested that configuration setting in my client.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;We then thought it was a delay caused by doing a reverse&amp;nbsp;&lt;span class="caps"&gt;DNS&amp;nbsp;&lt;/span&gt;lookup on the peer's IP address--likely so it could do certificate validation/throw nice exceptions. We saw in gdb that the stack trace was deep in some Java code that was trying to do some kind of&amp;nbsp;&lt;span class="caps"&gt;DNS&amp;nbsp;&lt;/span&gt;operation.&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/etc/resolv.conf&lt;/code&gt;&amp;nbsp;was empty, so we added our name server to it and rebooted the machine. That didn't help, but the stack trace changed.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Then the stack trace was stuck in&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Java_java_net_PlainDatagramSocketImpl_leave&lt;/code&gt;; I thought that might have still been some&amp;nbsp;&lt;span class="caps"&gt;DNS&amp;nbsp;&lt;/span&gt;hosage, so I changed&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/etc/hosts&lt;/code&gt;&amp;nbsp;to include the addresses of the peers. That didn't help and didn't change the stack trace.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Finally we typed&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/sbin/ifconfig&lt;/code&gt;. That showed us that lo did not have an IP address.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Carol told us the correct magic commands to type.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-7525343484639914190?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/7525343484639914190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/04/analysis-of-why-creating-socket-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7525343484639914190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7525343484639914190'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/04/analysis-of-why-creating-socket-in-java.html' title='Analysis of why creating socket in Java takes 3 minutes'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-4054828004322468898</id><published>2004-04-26T16:44:00.000-07:00</published><updated>2011-10-20T20:02:29.293-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Creating a socket in Java takes 3 minutes</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;Sometimes we would see on some of our Linux boxes a 3 minute delay between an attempt to open a socket and a successful connection. This did not make sense... but I eventually determined that this was caused by the loopback device not having an address, or not having a route in the route table.&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;You can probably fix this by typing the following:&lt;/div&gt;&lt;blockquote class="webkit-indent-blockquote" style="background-repeat: no-repeat repeat; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 40px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;/sbin/ip addr add 127.0.0.1/8 dev lo&lt;br /&gt;/sbin/route add -net 127.0.0.0/8 dev lo&lt;/span&gt;&lt;/blockquote&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Also, we had these other symptoms:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/dev/random would block for about 3 minutes, probably because it depends on loopback to get its results.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Java trying to do a reverse DNS lookup would block for about 3 minutes, probably because it was trying to get results from 0.0.0.0, because /etc/resolv.conf was empty, and 0.0.0.0 was being interpreted as 127.0.0.1...&amp;nbsp;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Update:&amp;nbsp;&lt;/span&gt;see&amp;nbsp;&lt;a href="http://www.jaredoberhaus.com/tech_notes/2008/08/java-ssl-connection-calls-inetaddressgetlocalhost.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;this post&lt;/a&gt;about a related fix...&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://forums.sun.com/thread.jspa?threadID=489160&amp;amp;tstart=1320" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;Here&lt;/a&gt;&amp;nbsp;is a thread where I replied with this information; the thread also suggests other solutions, perhaps to the same or similar problems.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Now if I could just figure out how that Linux box got into that situation...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-4054828004322468898?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/4054828004322468898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/04/creating-socket-in-java-takes-3-minutes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4054828004322468898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4054828004322468898'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/04/creating-socket-in-java-takes-3-minutes.html' title='Creating a socket in Java takes 3 minutes'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-151861290780218931</id><published>2004-03-29T21:56:00.000-08:00</published><updated>2011-10-19T21:58:07.919-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>libstdc++ and compatibility</title><content type='html'>&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I've been studying the C/C++ build and I think I learned some things:&lt;/div&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;glibc is inextricably linked with the Linux operating system. You can't run with a new glibc.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;LD_LIBRARY_PATH&lt;/code&gt;&amp;nbsp;can affect libc, but cannot affect&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;ld-linux.so.2&lt;/code&gt;&amp;nbsp;(&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;ld-2.3.2.so&lt;/code&gt;). It seems you can get around this with&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;chroot&lt;/code&gt;, but then you have other problems.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;glibc 2.3.2 has the symbol&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;GLIBC_PRIVATE&lt;/code&gt;&amp;nbsp;which is in&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;ld-2.3.2.so&lt;/code&gt;, but not in&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;ld-2.2.x&lt;/code&gt;.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;libstdc++ 3.2 (it comes with g++ 3.2) requires glibc 2.3. Redhat 7 ships with 2.2 or earlier. See previous point. You cannot take a libstdc++ from Redhat 9 and run it on Redhat 7 unless you upgrade glibc and just about everything else in the&amp;nbsp;&lt;span class="caps"&gt;OS,&amp;nbsp;&lt;/span&gt;at which point it's not really Redhat 7.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;libstdc++ is more than&amp;nbsp;&lt;span class="caps"&gt;STL.&lt;/span&gt;&amp;nbsp;It's the C++ runtime and&amp;nbsp;&lt;span class="caps"&gt;STL.&lt;/span&gt;&amp;nbsp;Therefore&amp;nbsp;&lt;span class="caps"&gt;STL&lt;/span&gt;port can never replace libstdc++.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I can&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;chroot&lt;/code&gt;&amp;nbsp;with Redhat 7 (actually Mandrake 8) and get my Redhat 9 compiled binary and libstdc++ 3.2 shared object. However, once I do that I can't do things like read&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/proc&lt;/code&gt;&amp;nbsp;or modify&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/etc&lt;/code&gt;&amp;nbsp;which is something we need to do.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Starting with g++ 3.2, libstdc++ is attempting to be forward/backwards compatible in its&amp;nbsp;&lt;span class="caps"&gt;ABI&amp;nbsp;&lt;/span&gt;where possible. At this point compatibility was completely broken.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Redhat 9 ships with compat-libstdc++ which contains the C++ runtime libraries for gcc 2.96 as used in Redhat 7.3. This means C++ stuff compiled on Redhat 7 will work on Redhat 9, but only when this package is installed.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;glibc works very well forward/backwards compatibility-wise, with the&amp;nbsp;&lt;span class="caps"&gt;GLIBC&lt;/span&gt;_2.0,&lt;span class="caps"&gt;GLIBC&lt;/span&gt;_2.1, etc. symbols. If you build a binary that is C only, it's probably going to run anywhere, as long as it's glibc v2 or better, preferably glibc v2.1.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;It is impossible to statically link libstdc++ into an executable when exceptions are thrown/caught. This is because symbols such as&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;_Unwind_DeleteException&lt;/code&gt;exist in&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;libgcc.so&lt;/code&gt;&amp;nbsp;but do not exist in&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;libgcc.a&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-151861290780218931?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/151861290780218931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/10/libstdc-and-compatibility.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/151861290780218931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/151861290780218931'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2011/10/libstdc-and-compatibility.html' title='libstdc++ and compatibility'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-7520429271496810294</id><published>2004-03-14T17:43:00.000-08:00</published><updated>2011-10-19T17:44:12.019-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='source control'/><title type='text'>perl and relocating its installation</title><content type='html'>&lt;br /&gt;&lt;div class="asset-content entry-content" style="clear: both; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: static;"&gt;&lt;div class="asset-body" style="clear: both; height: 558px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;While setting up our development system and source control, I'm taking the philosophy that all tools are to be checked into source control, not installed on individual machines; in that way a developer's tools are never out of date. Unfortunately some tools don't like this approach, they like to hard-code or "relocate" their position during installation.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;One of those is&amp;nbsp;&lt;a href="http://www.perl.org/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;perl&lt;/a&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-05/msg00126.html" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;This link&lt;/a&gt;&amp;nbsp;explains a bit how&amp;nbsp;&lt;a href="http://www.activestate.com/activeperl/" style="color: black; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: underline;"&gt;ActivateState&lt;/a&gt;&amp;nbsp;relocates perl on install.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;What happens is that the @INC path must be embedded in the perl executable on&lt;br /&gt;Unix platforms, or so they claim. When&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;install.sh&lt;/code&gt;&amp;nbsp;is run, it calls&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;reloc_perl&lt;/code&gt;,&lt;br /&gt;which uses an ActiveState perl module&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Relocate&lt;/code&gt;&amp;nbsp;which then uses this trick to&lt;br /&gt;replace things like&lt;br /&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/tmp/.TheInstallScriptWasNotRunTheInstallScriptWasNotRunTheInstallScriptWasNotRun-perl/lib/5.8.0&lt;/code&gt;&lt;br /&gt;with the appropriate path. Unfortunately, when I first tried this, the path just happens to be my home directory where I downloaded it.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;By the way, there is only 0x80 (128) bytes of space to put the path in, so there is a limit to what location it can be relocated into.&lt;/div&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;So, the procedure I used to get an ActivePerl that works on anyone's machine no matter where their source directory is mapped to their file system:&lt;/div&gt;&lt;ul style="background-repeat: no-repeat repeat; list-style-image: initial; list-style-position: outside; list-style-type: disc; margin-bottom: 0.75em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Installed ActiveState Perl normally, into a place such as your home directory: in my case this was&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/home/jared.oberhaus/p4/tools/linux/ActivePerl-5.8.3.809&lt;/code&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Found all instance of text and binary files under the installation directory that contain&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/home/jared.oberhaus&lt;/code&gt;&amp;nbsp;and replaced them with the original files from the install tar. The original files still have encoded strings such as&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/tmp/.TheInstallScriptWasNotRunTheInstallScriptWasNotRunTheInstallScriptWasNotRun-perl/lib/5.8.0&lt;/code&gt;&amp;nbsp;inside them.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Submitted these files to source control as-is.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Modified ActiveState's&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;install.sh&lt;/code&gt;&amp;nbsp;by adding to it (not removing the original install procedures). First it links the magic&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/tmp&lt;/code&gt;&amp;nbsp;path to the file location where the source control version is mapped. This is controlled by detecting where the install script exists and processing that. When&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;reloc_perl&lt;/code&gt;&amp;nbsp;executes it will copy everything into&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/home/user/p4/tools/linux/perl-5.8.3&lt;/code&gt;&amp;nbsp;and at the same time replace the magic&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;/tmp&lt;/code&gt;&amp;nbsp;string with the correct location.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="asset-footer" style="border-top-color: rgb(221, 221, 221); clear: both; color: #999999; font-family: 'trebuchet ms'; font-size: 11px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-7520429271496810294?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/7520429271496810294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/03/perl-and-relocating-its-installation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7520429271496810294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7520429271496810294'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/03/perl-and-relocating-its-installation.html' title='perl and relocating its installation'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-4020925278405514181</id><published>2004-03-03T17:41:00.000-08:00</published><updated>2011-10-19T17:42:23.446-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Preventing System.exit()</title><content type='html'>&lt;br /&gt;&lt;div class="asset-content entry-content" style="clear: both; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: static;"&gt;&lt;div class="asset-body" style="clear: both; height: 333px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;You can prevent&amp;nbsp;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;System.exit()&lt;/code&gt;&amp;nbsp;by setting the appropriate thing in the SecurityManager. Try something like this in your JUnit test:&lt;/div&gt;&lt;pre style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;public void setUp() {&lt;br /&gt;    System.setSecurityManager(new CatchSystemExit());&lt;br /&gt;}&lt;br /&gt;public void tearDown() {&lt;br /&gt;    System.setSecurityManager(null);&lt;br /&gt;}&lt;br /&gt;private static class CatchSystemExit extends SecurityManager {&lt;br /&gt;    /** @see SecurityManager */&lt;br /&gt;    public void checkExit(int status) {&lt;br /&gt;        m_exitCode = status;&lt;br /&gt;        throw new SecurityException("System.exit() attempt caught");&lt;br /&gt;    }&lt;br /&gt;    /** @see SecurityManager */&lt;br /&gt;    public void checkPermission(Permission perm, Object context) {&lt;br /&gt;    }&lt;br /&gt;    /** @see SecurityManager */&lt;br /&gt;    public void checkPermission(Permission perm) {&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-4020925278405514181?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/4020925278405514181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/03/preventing-systemexit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4020925278405514181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/4020925278405514181'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2004/03/preventing-systemexit.html' title='Preventing System.exit()'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-7986631445811710227</id><published>2003-10-09T17:39:00.000-07:00</published><updated>2011-10-19T17:44:37.960-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rpm'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>cpio and rpm</title><content type='html'>&lt;br /&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;I'm trying to submit tools and libraries into source control, and the tools (such as glibc) arrive in rpm's. Instead of installing them (which is what I don't want to do), I'm ripping the contents out. Of course, rpm doesn't give you an easy way to do that.&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;But I have determined the correct syntax to do it, as rpm's are really cpio files:&lt;/div&gt;&lt;div style="color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;code style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;rpm2cpio rpmfile.rpm | cpio -id&lt;/code&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-7986631445811710227?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/7986631445811710227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2003/10/cpio-and-rpm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7986631445811710227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/7986631445811710227'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2003/10/cpio-and-rpm.html' title='cpio and rpm'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5957208758270957184.post-1631267875247227001</id><published>2003-10-08T17:14:00.000-07:00</published><updated>2011-10-19T17:44:55.565-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='checkstyle'/><title type='text'>checkstyle and phoning home</title><content type='html'>&lt;div style="background-color: white; color: #333333; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'trebuchet ms';"&gt;I noticed that everytime checkstyle runs it contacts &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;www.puppycrawl.com&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'trebuchet ms';"&gt; to get its&amp;nbsp;&lt;/span&gt;&lt;span class="caps" style="font-family: 'trebuchet ms';"&gt;DTD.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'trebuchet ms';"&gt;&amp;nbsp;This is annoying...&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white; color: #333333; font-family: 'trebuchet ms'; font-size: 13px; margin-bottom: 0.75em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;"&gt;I thought it was a bug in the checkstyle code, but it turns out I put the wrong&amp;nbsp;&lt;span class="caps"&gt;DTD&amp;nbsp;&lt;/span&gt;identifier at the top of all the checkstyle config files. Once I fixed that, it stopped phoning home.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5957208758270957184-1631267875247227001?l=jared-oberhaus-tech-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jared-oberhaus-tech-notes.blogspot.com/feeds/1631267875247227001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2003/10/checkstyle-and-phoning-home.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1631267875247227001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5957208758270957184/posts/default/1631267875247227001'/><link rel='alternate' type='text/html' href='http://jared-oberhaus-tech-notes.blogspot.com/2003/10/checkstyle-and-phoning-home.html' title='checkstyle and phoning home'/><author><name>Jared Oberhaus</name><uri>https://profiles.google.com/105152256487739162553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-cNuEcbz9hmM/AAAAAAAAAAI/AAAAAAAAWOc/ScoPkm4dWV8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
