Wednesday, August 17, 2011

Maya 2012 Semaphore Issues

Recently I had the pleasure of installing Maya 2012 in a lab environment. To qualify "lab", it is a non-admin multi-user lab.

Maya 2012 seems to have a bit of an issue with cleaning itself up after running. Someone much more informed on the subject has guided me through the discovery of the issues and how to deal with them.

In a nutshell, Maya is leaving Semaphore ipc instances after quiting the program, which also persist after a user logs out! A reboot of the system will clear the semaphore, but it asking a little too much to have a user reboot after quitting Maya 2012.

So, how do I know this? After launching Maya 2012 (Or Mudbox 2012), try running this command:

$ ipcs -b
IPC status from as of Fri Aug 12 14:41:35 EDT 2011
T ID KEY MODE OWNER GROUP QBYTES
Message Queues:

T ID KEY MODE OWNER GROUP SEGSZ
Shared Memory:

T ID KEY MODE OWNER GROUP NSEMS
Semaphores:
s 327680 0xb3536107 --ra-r--r-- rzm102 psuguest 3

You can see it's being left there even after log out! To remove it, you need to pass the ID to the ipcrm command:

$ ipcrm -s 327680

That will clear the semaphore ipc and allow Maya to once again launch. I've noticed that the error in the console about "ACE_SV_Semaphore_Complex: Permission denied" still occurs, but has no effect on Maya launching.

To fix this for the labs, I'm suggesting having the logout hook clean this up using this code:

IPCSUCKS=`ipcs -b | grep -A 1 -i semaphores|tail -1|awk '{print $2}'`
sudo ipcrm -s "$IPCSUCKS"

This should clear the instance of the ipc from Semaphores. I'm not sure this is the best solution because there could be multiple ipc's from semaphore or it could be for something other than Maya. However, I'm running out of time this semester and I need to move on.

A bug report needs to be filled with Autodesk to ask them to change the permissions on the semaphore so that other non-admin users can overwrite that instance. As Frogor from ##osx-server explained: "They need to be setting it up as --ra-ra-r--".

This is a quick and dirty blog post, please forgive the assumptions, spelling mistakes, grammar mistakes, and overall vagueness.

For more information on IPC and Semaphores, check out wikipedia:

And if you are more knowledgeable about these issues, please post in the comments so we may all learn!

2 comments:

Anonymous said...

I have logged a change request for the development team to address this issue and I have posted the solution here as well.

http://upandready.typepad.com/up_and_ready/2011/08/systems-maya-on-the-mac-will-freeze-when-using-multiple-accounts-semaphores.html

Thanks for sharing with the community.

Unknown said...

Just and FYI for unfortunate future generations like myself(that ran out of time before installing a new licensing server to use an upgraded version) no hotfix posted to Maya2012 addressed this. 2013 supposedly does NOT exhibit the issue, and is reported to be backwards compatible with files created in 2012, so there you go, something like closure.
Oh, and I shed'd your bike:
ipcrm -s `ipcs -b | awk '/ra-r--r/{print $2}'`