Licensing troubleshooting on Linux


Troubleshooting licensing problems on a Softimage Linux workstation? Here’s a quick summary of some things to look for on the workstation:

  • The Location of the license server is specified by the ADSKFLEX_LICENSE_FILE environment variable that is specified in /usr/Softimage/Softimage_2013/.xsi_2013.
  • The file ~/.flexlmrc can also be used to specify the license server location:

    ADSKFLEX_LICENSE_FILE=@example:@mtlicserver

    If Softimage can’t check out a license from the server specified in .xsi_2013, then it tries the servers listed in ~/.flexlmrc. The .flexlmrc lists all the license servers from which Softimage has checked out licenses.

  • There is a licensing log file named /var/tmp/SoftimageLicense.log. This log file will contain entries that look like this:
    18377	2011/06/23	19:18:59	Reason=Fatal error
    18377	2011/06/23	19:18:59	ComputerName=localhost.localdomain
    18377	2011/06/23	19:18:59	OS=2.6.35.6-45.fc14.x86_64
    18377	2011/06/23	19:18:59	File=AdlmIntNWFBLicense.cpp,Line=766
    18377	2011/06/23	19:18:59	VendorID=3 [FLEXLM-NW]
    18377	2011/06/23	19:18:59	VendorError=-18 [Server does not support this feature]
    18377	2011/06/23	19:18:59	FLEXLM-NW=v11.9.0.0 build 87342 x64_lsb
    18377	2011/06/23	19:18:59	Reason=Fatal error
    18377	2011/06/23	19:18:59	ComputerName=localhost.localdomain
    18377	2011/06/23	19:18:59	OS=2.6.35.6-45.fc14.x86_64
    18377	2011/06/23	19:18:59	File=AdlmIntNWFBLicense.cpp,Line=749
    18377	2011/06/23	19:18:59	AdlmIntError=20 [License check out failed]
    
  • Setting FLEXLM_DIAGNOSTICS to 3 didn’t get me any diagnostics messages or logs, but I did find those diagnostics in the strace log (just search for “FLEXnet”). See this post for more info on the FLEXLM diagnostics in the strace log.

Softimage on Ubuntu in VMware Player


After a few false starts, I managed to get Ubuntu 10.04 running in VMware Player, and to get Softimage to start up.

To get Softimage to start, first I had to edit MentalRayOptions.spdl and removed the µ (mu) character. Softimage still crashed at startup, so next I tried a tip I got from La Maison: setenv LC_ALL POSIX, but I still crashed.

Finally, I edited $XSI_HOME/Application/layouts/Default.xsily and hid the OpenGL viewports, and then Softimage started up.

So, based on that, I’ve been trying to switch from the nouveau drivers to the real Nvidia drivers for my QuadroFX 4800. But it doesn’t seem to be possible in a VM. I’ve tried https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia, but I end up with this:

I checked with QA, and they hadn’t had any luck either with nvidia drivers for Ubuntu in VMs.

Sigh, so close yet so far…

Troubleshooting Softimage on Linux


On Windows, I use Process Monitor, Process Explorer, and Dependency Walker.

On Linux, the primary troubleshooting tool is strace. strace is a tool that traces all the system calls that a running process makes. When a program is experiencing problems associated with I/O, strace can often help in quickly isolating the problem, since (almost) all I/O happens through system calls.

Here’s the basic syntax:

strace -o /tmp/out -f XSI 

-o writes the output to a log file
-f tells strace to follow forks, and trace all child processes
-p can be used to attach to an already running process

As well as system calls, strace also tracks signals that were thrown in the process. If a process is crashing due to a segmentation fault, it is worth investigating what was happening before the fault occurred; you can find where the fault occurred by searching for — SIGSEGV in the strace output.

strace output has been added as an XSI history log client under Linux. If you search the output of strace for the string write(-1, you should see all the scripting commands as they are executed. This is useful for associating system calls with the commands that caused them to execute.

There’s also ltrace ltrace is a tool that traces all the calls to shared library functions. It can be extremely useful with XSI because almost all of the XSI code lies in shared libraries. Note that calls from a given library to itself are generally not traced because the call is address-relative. Some useful options to ltrace are:

-C: remove leading underscores from C-linkage symbols and demangle C++-linkage symbols
-o and -f: same as for strace

20 Linux System Monitoring Tools Every SysAdmin Should Know

The baffling case of Softimage and the MYECSP license


“MYECSP” is, of course, “Maya Entertainment Creation Suite Premium” 😉

In this case, Softimage 2012 on Linux would not not run with a MYECSP license. But it would run with a regular SFTIM (Softimage) license.

/var/tmp/SoftimageLicense.log showed there was a “Server does not support this feature” error when Softimage 2012 tried to check out the MYECSP license.

On the license server (a Windows machine btw), the LMTOOLS debug log file didn’t show anything (sometimes there are “denied” log entries that can provide a clue).

I tried setting FLEXLM_DIAGNOSTICS to 3 before I started Softimage, but I didn’t get any diagnostics from that. But I did finally find the FLEXLM diagnostics in the strace logs:

17174 write(28, "FLEXnet Licensing checkout error"..., 323 <unfinished ...>
17182 <... read resumed> "F", 1)        = 1
17182 read(27, "L", 1)                  = 1
17182 read(27, "E", 1)                  = 1
17182 read(27, "X", 1)                  = 1
17182 read(27, "n", 1)                  = 1
17182 read(27, "e", 1)                  = 1
17182 read(27, "t", 1)                  = 1
17182 read(27, " ", 1)                  = 1
17182 read(27, "L", 1)                  = 1
17182 read(27, "i", 1)                  = 1
17182 read(27, "c", 1)                  = 1
17182 read(27, "e", 1)                  = 1
17182 read(27, "n", 1)                  = 1
17182 read(27, "s", 1)                  = 1
17182 read(27, "i", 1)                  = 1
17182 read(27, "n", 1)                  = 1
17182 read(27, "g", 1)                  = 1
17182 read(27, " ", 1)                  = 1
17182 read(27, "c", 1)                  = 1
17182 read(27, "h", 1)                  = 1
17182 read(27, "e", 1)                  = 1
17182 read(27, "c", 1)                  = 1
17182 read(27, "k", 1)                  = 1
17182 read(27, "o", 1)                  = 1
17182 read(27, "u", 1)                  = 1
17182 read(27, "t", 1)                  = 1
17182 read(27, " ", 1)                  = 1
17182 read(27, "e", 1)                  = 1
17182 read(27, "r", 1)                  = 1
17182 read(27, "r", 1)                  = 1
17182 read(27, "o", 1)                  = 1
17182 read(27, "r", 1)                  = 1
17182 read(27, ":", 1)                  = 1
snip...

After I reformatted it, the diagnostic message looked like this:

FLEXnet Licensing checkout error: Clock difference too large between client and license server system.
Feature:       85718MYECSP_2012_0F
License path:  @mtl-example:@127.0.0.1:
FLEXnet Licensing error:-34,147

For further information, refer to the FLEXnet Licensing documentation,
available at www.flexerasoftware.com

License file(s): @mtl2ua0150cwy@127.0.0.1

It turned out that the system time on the workstation was off by two days (it was two days in the past).

Softimage wouldn’t use the MYESCP license because that license was from the future (it was a brand new license that had just been generated).

The SFTIM license had been generated weeks ago, so that license worked ok.

EAGAIN Resource temporarily unavailable for tmp/.X11-unix/X0


This post is for Softimage 2011.5 on Linux, and for Google (I’ve posted about this before, but I didn’t include the strace output that time).

If Softimage doesn’t seem to want to start, or if it is taking forever to start, and you see something like this in your strace log. Note lines 02,03, and 18:

socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC, 0) = 19
connect(19, {sa_family=AF_FILE, path=@"/tmp/.X11-unix/X0"}, 20) = 0
getpeername(19, {sa_family=AF_FILE, path=@"/tmp/.X11-unix/X0"}, [20]) = 0
uname({sys="Linux", node="homer", ...}) = 0
access("/var/run/gdm/auth-for-xxx-Q2I4go/database", R_OK) = 0
open("/var/run/gdm/auth-for-xxx-Q2I4go/database", O_RDONLY) = 20
fstat(20, {st_mode=S_IFREG|0600, st_size=50, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3360deb000
read(20, "\1\0\0\5homer\0\0010\0\22MIT-MAGIC-COOKIE-1"..., 4096) = 50
close(20)                               = 0     
munmap(0x7f3360deb000, 4096)            = 0
getsockname(19, {sa_family=AF_FILE, NULL}, [2]) = 0
fcntl(19, F_GETFL)                      = 0x2 (flags O_RDWR)
fcntl(19, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
fcntl(19, F_SETFD, FD_CLOEXEC)          = 0
poll([{fd=19, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=19, revents=POLLOUT}])
writev(19, [{"l\0\v\0\0\0\22\0\20\0\0\0", 12}, {"", 0}, {"MIT-MAGIC-COOKIE-1", 18}, {"\0\0", 2}, {"\367\371\200\336\321\\\37\4\22\0324\274\3356|\313", 16}, {"", 0}], 6) = 48
read(19, 0x27ae690, ) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=19, events=POLLIN}], 1, -1)   = 1 ([{fd=19, revents=POLLIN}])

then you probably need to put back our x11 patch.

AAARGH! Licensing frustrations on Linux


As I’ve mentioned elsewhere, in support I’m often doing the opposite of what users do: I’m trying to break the licensing, because I’m testing something. And sometimes it can be really hard to do 😉

The other day I was trying to force Softimage (on Linux) to use a certain license server that didn’t have the right licenses, but no matter what I did, Softimage kept getting a license from somewhere else. After an extremely frustrating 30 minutes, I tracked it down to the ~/.flexlmrc file, which had a list of the license servers that Softimage has successfully used at some point:

ADSKFLEX_LICENSE_FILE=@mtl-blairs:@mtl-licserver

If Softimage can’t check out a license from the server specified in .xsi_2012, then it tries the servers listed in ~/.flexlmrc.

So all I had to do was remove the extra license servers and leave only the server specified in my .xsi_2012 resource file.

~/.flexlmrc is the Linux version of the HKEY_CURRENT_USER\Software\FLEXlm License Manager\ADSKFLEX_LICENSE_FILE registry key on Windows.

JScript Array.push on Linux = Object doesn’t support this property or method


On Linux, Array.push will give you this error: “// ERROR : Object doesn’t support this property or method.” That’s because Softimage ships with an older version of JScript (5.1) on Linux.

You can add the following to your JScript to add a push method to the Array object:

// Add a push method to the JScript Array Object
// (Array.Push was added in Jscript 5.5 but we cannot rely on this)
// @cc_on
// @if (@_jscript_version < 5.5)
var push = function(){
	for( var i = 0; arguments[ i ] != null; i++ )
		this[this.length++] = arguments[ i ];
	return( this );
	}
Array.prototype.push = push;
// @end

Softimage 2012 startup crash on Ubuntu


A customer reported that while he was running Softimage 2011 fine on Ubuntu, Softimage 2012 crashed at startup.

The problem turned out to be the microsecond character (µs) in $XSI_HOME/Application/spdl/MentalRayOptions.spdl:

	Parameter "DiagnosticMaxPixelTime"
	{
		GUID		= {0A2DA6AE-B850-4189-BE71-BD244F8938A4};	// GUID_MentalRayOptions_DiagnosticMaxPixelTime
		Label		= "Max Pixel Time (µs)";

For some reason, this causes problems on some Linux flavors, but not on Fedora.
The solution was to edit the .spdl, and remove the “(µs)” from the string “Max Pixel Time (µs)”.

Hat Tip to Sean Donnelly for the solution.

For reference, here’s the gbd backtrace for the startup crash. Note that it pretty clearly points to some problem related the spdl 😉

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4bd588a in CSIString::AllocBSTR() const () from /usr/Softimage/Softimage_2012/Application/bin/libsigeneral.so
(gdb) bt full
#0  0x00007ffff4bd588a in CSIString::AllocBSTR() const () from /usr/Softimage/Softimage_2012/Application/bin/libsigeneral.so
No symbol table info available.
#1  0x00007ffff56e59ea in SpdlValue2Variant(miSpdl_PropertyValue const&amp;, tagVARIANT&amp;) () from /usr/Softimage/Softimage_2012/Application/bin/libspdlparse.so
No symbol table info available.
#2  0x00007fffce5976cc in CSpdlPopulate::AddPropertyDefaults(miSpdl_Property*, CComPtr&amp;) () from /usr/Softimage/Softimage_2012/Application/bin/libspdlpop.so
No symbol table info available.
#3  0x00007fffce597a05 in CSpdlPopulate::AddPropertyDefaults(miSpdl_Property*) () from /usr/Softimage/Softimage_2012/Application/bin/libspdlpop.so
No symbol table info available.
#4  0x00007fffce597b04 in CSpdlPopulate::AddToParamDict(miSpdl_Property*) () from /usr/Softimage/Softimage_2012/Application/bin/libspdlpop.so
No symbol table info available.
#5  0x00007fffce597baf in CSpdlPopulate::AddToParamDict(miSpdl_Section*) () from /usr/Softimage/Softimage_2012/Application/bin/libspdlpop.so
No symbol table info available.
#6  0x00007fffce598e90 in CSpdlPopulate::DoAll() () from /usr/Softimage/Softimage_2012/Application/bin/libspdlpop.so
No symbol table info available.
#7  0x00007fffce59513b in CSpdlParser::DoParse(tagS3DSPDLPARSERINFO*) () from /usr/Softimage/Softimage_2012/Application/bin/libspdlpop.so
No symbol table info available.
#8  0x00007ffff5ea0da1 in DSCompileSPDLEx(_GUID const&amp;, IUnknown*, char const*) () from /usr/Softimage/Softimage_2012/Application/bin/libdssdk10.so
No symbol table info available.
#9  0x00007fffca3b7600 in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libmentalray.so
No symbol table info available.
#10 0x00007fffd9a9b041 in C3DActiveData::Initialize(_GUID const&amp;) () from /usr/Softimage/Softimage_2012/Application/bin/libactivedata.so
No symbol table info available.
#11 0x00007fffd9a7f39c in C3DActiveData::Construct() () from /usr/Softimage/Softimage_2012/Application/bin/libactivedata.so
No symbol table info available.
#12 0x00007fffca3b965e in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libmentalray.so
No symbol table info available.
#13 0x00007fffca3c6a76 in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libmentalray.so
No symbol table info available.
#14 0x00007fffca3c8500 in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libmentalray.so
No symbol table info available.
#15 0x00007ffff5e8eab4 in SICreateInstanceEx(_GUID const&amp;, IUnknown*, unsigned int, _GUID const&amp;, void**) () from /usr/Softimage/Softimage_2012/Application/bin/libdssdk10.so
No symbol table info available.
#16 0x00007fffca38f8c2 in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libmentalray.so
No symbol table info available.
#17 0x00007fffced89f50 in ?? () from /usr/Softimage/Softimage_2012/Application/bin/librendercore.so
No symbol table info available.
#18 0x00007fffcedc4c14 in ?? () from /usr/Softimage/Softimage_2012/Application/bin/librendercore.so
No symbol table info available.
#19 0x00007fffcedc5a2c in ?? () from /usr/Softimage/Softimage_2012/Application/bin/librendercore.so
No symbol table info available.
#20 0x00007fffcedc674d in ?? () from /usr/Softimage/Softimage_2012/Application/bin/librendercore.so
No symbol table info available.
#21 0x00007fffd30530af in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libscnmgr.so
No symbol table info available.
#22 0x00007fffd3055bbd in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libscnmgr.so
No symbol table info available.
#23 0x00007fffd3014899 in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libscnmgr.so
No symbol table info available.
#24 0x00007fffd304853a in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libscnmgr.so
No symbol table info available.
#25 0x00007fffd304bc15 in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libscnmgr.so
No symbol table info available.
#26 0x00007fffdf7f4b69 in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libdssdkco.so
No symbol table info available.
#27 0x00007fffdf7f38b2 in ?? () from /usr/Softimage/Softimage_2012/Application/bin/libdssdkco.so
No symbol table info available.

Autodesk Softimage Hardware Certification FAQ


From the Autodesk Softimage Hardware Certification FAQ:

Q: What version of Linux does Autodesk use in the Softimage graphics certification process?
A: Autodesk Softimage 2012 graphics certification testing was performed using Fedora Core 14.

OS: Fedora 14 64bit OS
Kernel Version: 2.6.35.11-83.fc14.x86_64
Xorg Version: 1.9.4-1.fc14.x86_64
Glibc Version: 2.13-1.x86_64

The glibc version is missing from the FAQ page, but it’s a safe bet that it’s the same version used for the Maya certification.