Mechanism to manually release license

Posted about 1 month ago by Gareth Williams

  • Topic is Locked
Answered
Gareth Williams
Gareth Williams

Hi there,


It would be very helpful to have a mechanism to manually force a license release from the command line.


In doing VPI work, one finds oneself gleefully slinging around raw pointers across language boundaries with joyful abandon.  It's pretty to easy to cause segfaults due to human error.


Having to wait for the 5 minute timeout makes for long debug cycles.


A simple command to explicitly request a release of license from a crashed sim would be a nice consideration to the intrepidif incompetent user.



Related:  https://help.metrics.ca/support/discussions/topics/154000621898


0 Votes

D

David Jones posted 23 days ago Admin Best Answer

There is no way to manually release a license. Unfortunately, providing a way to do this opens an avenue for unsavory users to tamper with the license mechanism. Your only recourse if a license is suspended is to wait for the timeout.


However, recent releases of DSim will automatically release the license if the program segfaults. Furthermore, this behavior is accessible from a debugger. You may be used to quitting GDB after investigating a segfault. Instead, when you are ready to quit, simply continue execution! GDB will deliver the signal to DSim, which will then release the license and exit, at which point you can exit GDB and re-run as necessary.


Another tip: the `-trace-vpi` command line option will log all VPI calls (supported or otherwise) and may provide good information without having to use a debugger.


0 Votes


3 Comments

Sorted by
S

Shaun Luong posted 16 days ago Admin

DSim 20240923.9.0 is the latest version, if you want to try it.

1 Votes

Gareth Williams

Gareth Williams posted 16 days ago

Fair enough --  I am, however, using what I believe is the latest version of DSim[1], and I fairly frequently crash DSim without the license being released (generally, I think it happens when my code is at fault on the app side). 


I've managed to crash the linker, too, a few times, which definitely doesn't release license.



-trace-vpi has been indeed a handy source of useful info -- thank you.


[1] $ dsim -version -> 20240923.5.0


0 Votes

D

David Jones posted 23 days ago Admin Answer

There is no way to manually release a license. Unfortunately, providing a way to do this opens an avenue for unsavory users to tamper with the license mechanism. Your only recourse if a license is suspended is to wait for the timeout.


However, recent releases of DSim will automatically release the license if the program segfaults. Furthermore, this behavior is accessible from a debugger. You may be used to quitting GDB after investigating a segfault. Instead, when you are ready to quit, simply continue execution! GDB will deliver the signal to DSim, which will then release the license and exit, at which point you can exit GDB and re-run as necessary.


Another tip: the `-trace-vpi` command line option will log all VPI calls (supported or otherwise) and may provide good information without having to use a debugger.


0 Votes