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