Symptoms
Inventory is not successfully gathered from a computer running a Unix-like operating system. When inspecting the /var/opt/managesoft/log/tracker.log file, details like the following are observed.
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} ************************************************************
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} Program arguments are '/opt/managesoft/libexec/ndtrack -t Machine -o Upload=false'
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} Preferences loaded
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} Inventory Setting file is '/var/opt/managesoft/tracker/inventorysettings/InventorySettings.xml'
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} Obtaining semaphore lock (to ensure only one instance is running)...
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} ERROR: Could not obtain semaphore lock, Windows error code: 2
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} Program exited with code -536870910
[Thu Apr 12 16:36:37 2018 (G, 0)] {9303} ************************************************************
In particular, this article discusses details about possible causes for the "Windows error code: 2" detail shown after the message "Could not obtain semaphore lock".
Cause
The "Windows error code: 2" message is usually due to the system running out of semaphores to allocate.
Applications such as Oracle Database and Apache HTTP Server can use a lot of semaphores. Any application that consumes many semaphores without freeing them may lead to available semaphores being exhausted, with a symptom being the particular log message details described above.
Steps To Reproduce
- Reduce operating system semaphore limits to an unrealistically low number.
- Observe the error when running ndtrack,
Troubleshooting & Mitigation
Commands to investigate semaphore details will vary by operating system. Here are some examples of commands that can be used on Linux-based operating systems to troubleshoot this issue and find out if there are excessive semaphores in use by the system.
- Show current semaphore limits:
# ipcs -ls
------ Semaphore Limits --------
max number of arrays = 32000
max semaphores per array = 32000
max semaphores system wide = 1024000000
max ops per semop call = 500
semaphore max value = 32767 - Show current semaphore usage:
# ipcs -us
------ Semaphore Status --------
used arrays = 0
allocated semaphores = 0 - Show the processes associated with current semaphores in use:
# for pid in $(for semid in $(ipcs -s | awk '/0x/{ print $2 }'); do ipcs -s -i $semid | tail -2 | head -1 | awk '{print $5}'; done | sort -u); do ps uh -p $pid; done
After investigating the above you may notice that the semaphore limit is not set high enough or a process is using a lot of semaphores.
Related Articles
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago