Coda File System

Re: ulocoda on OS X 10.6 - RVM_ENOT_MAPPED

From: Piotr Isajew <pki_at_ex.com.pl>
Date: Mon, 25 Feb 2013 17:28:37 +0100
On Mon, Feb 25, 2013 at 03:33:51PM +0100, u-codalist-9wcu_at_aetey.se wrote:

> Hmm, your programs should have been set up to preload the
> library which talks to venus as needed, have you done this?

Thanks for pointing this out. Doing this revealed two kinds of
problems (observable when launching tests from userland package).

First, several traps in form:

dyld: Symbol not found: _fcntl$NOCANCEL$UNIX2003
  Referenced from: /Users/pki/.ulocoda/lib/tenaron.dylib
  Expected in: flat namespace
 in /Users/pki/.ulocoda/lib/tenaron.dylib

This probably means, that something has changed in symbol naming
between os versions, so it could be fixed by correcting
interposers table to match current naming.

I commented out most of the mappings and left only one, for
open(), just to check if first test passes.

It showed that although call is being properly intercepted by
Python part, it crashed with something like:

<Thread(Thread-3, started 4315418624)> Connection to  /Users/pki/.ulocoda/spool/mariner opened thread=
<Thread(Thread-3, started 4315418624)> Unexpected error: <class 'struct.error'>
<Thread(Thread-3, started 4315418624)> 2013-02-25T16:43:30.416936
<Thread(Thread-3, started 4315418624)> Exception ---------------------------------------------
<Thread(Thread-3, started 4315418624)>
----------------------------------------
Exception happened during processing of request from 
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 558, in process_request_thread
    self.finish_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 615, in __init__
    self.handle()
  File "/Users/pki/.ulocoda/lib/terra.py", line 157, in handle
    self._do_handle()
  File "/Users/pki/.ulocoda/lib/terra.py", line 211, in _do_handle
    (unique, tid, pid, pgid, uid, op, reslen) = unpack('LIIII14sH', packet[0:HEADER_LENGTH])
error: unpack requires a string argument of length 40
----------------------------------------


I assumed, that it might be a Python2.6 compatibility issue, so I 
downgraded to 2.5, but this just made terra crash faster:

$ terra-start 
        CODACONFPATH /Users/pki/.ulocoda/etc/coda
                LANG pl_PL.UTF-8
                TERM xterm-color
Apple_PubSub_Socket_Render /tmp/launch-eM0csH/Render
               SHLVL 2
       SSH_AUTH_SOCK /tmp/launch-AjvKf3/Listeners
TERM_PROGRAM_VERSION 273.1
__CF_USER_TEXT_ENCODING 0x3E8:0:0
                 PWD /Users/pki
               SHELL /bin/bash
             LOGNAME pki
                USER pki
                HOME /Users/pki
                PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/pki/.ulocoda/bin:/Users/pki/.ulocoda/sbin:/usr/local/bin:/usr/local/sbin
        COMMAND_MODE unix2003
                   _ /Users/pki/.ulocoda/lib/terra.py
             DISPLAY /tmp/launch-COHdTr/org.x:0
              TMPDIR /var/folders/Er/ErEmxnljEWyIf1b1tVtxo++++yU/-Tmp-/
        TERM_PROGRAM Apple_Terminal
Serving Syscalls  on local socket at '/Users/pki/.ulocoda/ullib.socket'
<_MainThread(MainThread, started)> Initializing server thread Library server, serving socket /Users/pki/.ulocoda/ullib.socket, call handler = __main__.Syscallhandler
<ServerThread(Thread-2, initial)>
Traceback (most recent call last):
  File "/Users/pki/.ulocoda/lib/terra.py", line 671, in <module>
    import syscall_functions
  File "/Users/pki/.ulocoda/lib/syscall_functions.py", line 43, in <module>
    import ctypes
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ctypes/__init__.py", line 10, in <module>
    from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes
macbook:~ pki$ vi /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ctypes/__init__.py
Received on 2013-02-25 11:28:51