Last (hopefully) Lion issue
I was getting frequent lockups – I wasn’t sure initially what was going on, but it became apparent that it was something related to Eclipse. While eclipse was building my projects, it would crawl to a halt (always at the same place on the same project). Other apps would be responsive- for a while, but eventually everything would crawl to a halt.
I think the ultimate issue was actually with the Java VM. I had two entries in my eclipse.ini: UseConcMarkSweepGC and UseCompressedOops which I had added per the ScalaIDE docs.
Once I removed these, things started behaving again. I didn’t like using the concurrent mark and sweep algorithm anyway, as I thought the pauses were worse. But something is certainly misbehaving in that algorithm (or in the VM as a whole) with Lion to allow it to lock up the entire machine.
It seems that the JDK available for Lion has at least changed some defaults (like the memory sizes I discovered earlier) and possibly some other things (memory/gc/hotspot-related).
Comments are off for this postAnd another thing
The Lion upgrade deleted all (except one random guy) in my address book contacts.
I restored the ~/Library/Application Support/AddressBook folder from the TimeMachine backup pre-Lion and everyone is back now.
Update – No, it’s not back. This was not Lion doing this, but iCloud. Every time I turned on iCloud to sync Contacts, it deleted everybody (apparently preferring the empty list on iCloud to the full list on my Mac). The solution (after many restores from backups) was:
Turn on iCloud on my iPhone (I had not done this previously). Sync contacts from there (after a short prayer). That did preserve my contact list (whew) and got everything up to iCloud. Then, turning on iCloud at the Mac did sync properly. Finally.
Apparently, this whole business of trying to make my computer work like a phone is not quite there yet – my computer is now in some ways less-capable than my phone. At least (for now) I can still do software development on the Mac.
Comments are off for this postLion upgrade issues
I just upgraded my MacBook Pro to Lion yesterday – and thought I’d summarize the things I’ve found so far:
The first thing to note is that, except for some issues noted below, this was a pretty smooth upgrade. I usually don’t like upgrades and prefer to do a clean install and reconfigure or move stuff over. But the upgrade install itself was pretty good.
I had terrible problems with Spotlight indexing – I think mdworker crashed about 10 times yesterday trying to get through the initial indexing. It is possible that it was colliding with Time Machine trying to backup the 9Gb or so that changed during the upgrade. Not sure, but now that it has (eventually) finished the initial index pass, it seems OK.
I had things just plain lock up several times – usually I was trying to get my Eclipse projects refreshed and rebuilt, and maybe that was deadlocking with the Spotlight vs. Time Machine issue. I don’t know, but it really annoyed me to reboot and have Lion reopen the very thing (Eclipse) that caused me to reboot in the first place.
Reboot (or even logout/in) should start you off clean, IMHO, not “where you left off”. If I wanted to be where I left off, I wouldn’t have rebooted in the first place. I should at least have an option to turn this off (globally and per-app).
I had trouble getting my work calendar (CalDAV) to sync. I eventually fixed it by deleting all the entries for that server in Keychain. We hit the same server for Calendar, Mail, and IM, and several of the keychain entries were accessible by Calendar, and a few of those were old – so maybe it was confused about which one to use.
Something changed in Java (other than the install location). I have stumbled upon two issues with WebLogic Server: First, I now need to bump up my MaxPermGen even for a basic web app to deploy – I’m now using -XX:MaxPermSize=256m (before Lion these apps were getting by with the default). Also, WLS is now not happy with Lion’s IPv6, and won’t bind to any port unless I specify a v4 listen-address (127.0.0.1).
I don’t really want my laptop to look/act like my phone. That’s probably why I don’t like the new look in Mail. So it’s Classic layout (under Prefs -> Viewing), and View -> Show Mailbox List. Then, System Prefs -> General -> Sidebar icon size to Small so my mail folders (yes, I’m old-school and still use folders for mail organization) fit in the window.
I do think I might like Launchpad – although it could sure use some tooling to help make the configuration better. But I finally think I got it usable enough to trim down my Dock. A couple of hints:
- You can drag an app from Finder onto the Launchpad icon (in Dock) to add an app (outside of the Application folders) to the Launchpad. I got Eclipse.app into Launchpad like this.
- You can bind Launchpad to a key shortcut in Sys Preferences -> Keyboard -> Shortcuts -> Launchpad. Check Show Launchpad and enter a shortcut. I went with Command-F12.
- There doesn’t seem to be a (good) way to remove icons from Launchpad, and it’s pretty cluttered with everything. So I made several groups/folders (whatever they’re called) to hide the junk, and tossed them on the last page.
The biggest surprise for me is that I am almost used to the upside-down scrolling thing. I thought I’d hate it, but it seems like it might be ok.
Comments are off for this postNetwork Location Switching
Been quite a long time since my last post, and I am not going to try to catch things up. But I did want to archive this information:
At work, we have an http proxy – an idea from the 18th century it seems. So I have to have two Network Locations (one for normal configurations, another for the work proxy). We also use Cisco AnyConnect VPN to connect from home.
I had been using MarcoPolo for switching locations. This worked great for home and work, but I wasn’t happy with how it worked with the VPN. All I could do was detect if the VPN application was running or not – so I couldn’t leave the VPN app open and connect/disconnect. Also, the process was to launch the VPN app, wait for MarcoPolo to switch the network to VPN, make sure it was stable (not switching back and forth), and then connect to the VPN. Disconnecting has to be followed by exiting the VPN else MarcoPolo wouldn’t switch things back to my no-proxy Location.
I took inspiration from this and created a LaunchAgent and a simple script to switch Network Locations.
The LaunchAgent plist file goes in ~/Library/LaunchAgents/com.srednal.netswitch.plist, and looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.srednal.netswitch</string>
<key>EnableGlobbing</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>~/bin/netswitch</string>
</array>
<key>WatchPaths</key>
<array>
<string>/Library/Preferences/SystemConfiguration</string>
</array>
</dict>
</plist>
The script, in ~/bin/netswitch, is something like this (names and addresses may have been changed):
#!/usr/bin/env ruby
# Test network and switch locations based on vpn and ip address
require 'ipaddr'
# see if VPN is connected
def vpn?
connected = false
IO.popen( '/opt/cisco/vpn/bin/vpn status' ) do |out|
out.each do |line|
connected = true if line =~ />> state: Connected/
end
end
connected
end
# are we on work network?
def work?
# Work IP will be within 10.345.678.00/24 - obviously this is something you need to tweak
work = IPAddr.new('10.345.678.00/24')
work.include?(local_ip)
end
# lookup local ip addr
def local_ip
orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true # turn off reverse DNS resolution temporarily
UDPSocket.open do |s|
s.connect '74.125.45.99', 1 # IP is anything
s.addr.last
end
ensure
Socket.do_not_reverse_lookup = orig
end
# set network location config
def location(name)
system "/usr/sbin/scselect '#{name}'"
end
if __FILE__ == $0
# let things settle down
sleep 2
if (vpn? || work?) then
location 'Proxy'
else
location 'Automatic'
end
end
The script can be run manually to test things. Then load the launch agent with launchctl load ~/Library/LaunchAgents/com.srednal.netswitch.plist.
After I got that working, I went into the Info.plist file of the AnyConnect client app, and added (to the dict element)
<key>LSUIElement</key> <string>1</string>
That makes the Dock icon go away (but leaves the icon in the status bar), so now I can leave the AnyConnect client running and just connect/disconnect as needed – the LaunchAgent and script keep my network location set right.
1 commentWinter Festival
Our Order of the Arrow lodge had its annual Winter Festival weekend and banquet this past weekend. I was head cook, and we prepared 5 meals for about 100 people (mostly hungry teenaged boys). It was a success, and the cook crew had loads of fun.
While we were in the kitchen, everyone else spent the morning in training classes, and the afternoon doing various activities (bowling and tours of local attractions).
At the banquet, we had a great speaker, a lot of recognitions and awards were handed out, and there were a couple of ceremonies.
One of the highlights is always the annual callout for Vigil Honor. Our lodge was allowed 9 candidates this year. I was so proud that my oldest son Paul was selected. I was still processing that pride when I realized that the next bio they were reading was mine! Quite an honor (and now a responsibility, for you are selected not so much for what you have done as for what is expected of you in the future). It is going to be great that Paul and I will do our Vigil together (the Vigil weekend is in May).
I also was encouraged to log my hours for the President’s Volunteer Service Award, which I have just finished doing. I found that I have qualified for the Gold level award for 2008. Neat!
Comments are off for this post