| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <a name="wapi"></a>
- * ~/.wapi error message
- Q: What does the following error message mean?
- <pre>
- Failed to attach shared memory!
- Falling back to non-shared handles
- </pre>
- A: To properly implement the handle semantics expected by .NET
- applications where a handle number is all that its needed to pass
- a descriptor from one process to another and have it just work.
- Handles are used to specify: files, events, locks, semaphores,
- sockets, pipes and processes descriptors. So two Mono processes
- can share any of those resources just by exchanging the handle
- tokens (a number) between them.
- This is accomplished by using a helper process that is launched by
- the first Mono invocation (that is why you see two mono processes
- running on your machine).
- The various Mono processes communicate with each other with a local
- file in the ~/.wapi directory (one per hostname, so this works fine
- over NFS).
- If the system crashes, or all of the Mono processes are killed
- without a chance to shut down properly those files will remain
- there, but there will no longer be an owner for them. If a new
- Mono start up, it will notice that the file exists, but it will
- fail to contact the helper process, issuing the above warning.
- Q: How do I fix the problem?
- A: If you are sure that no other Mono process is running, you can just
- delete the contents of the ~/.wapi directory:
- <pre>
- rm -i ~/.wapi/*
- </pre>
- If you can not delete those files (because say, you have a running
- Mono, you can disable the use of the shared handles setup by
- setting the MONO_DISABLE_SHM environment variable as well:
- <pre>
- # Notice: Highly discouraged
- bash$ export MONO_DISABLE_SHM=1
- </pre>
- The above is highly discouraged as that will make process execution
- fail, and without that many things like XSP/ASP.NET or the C#
- compiler's -pkg: support will not work.
|