When an OS signal comes in at the wrong moment, an OpenEdge process can crash or it can deadlock itself on the OS resources involved.
Within the signal handler which calls backtrace, OS functions are used that are not async-signal safe. In particular OpenEdge makes use of the localtime OS function, and the functions it calls to retrieve timezone information to get the current timestamp are not guaranteed to be safe with asynchronous signal handling.
Part of this behavior depends on OS implementation of ctime functions in a way that's not safe with asynchronous signal handling, which is why this issue may or may not occur depending on the platform and does not always occur every time a signal is sent to a process.
For example: When the OpenEdge client receives a HANGUP signal:
- It will try to write "HANGUP signal received. (562) " to the database logfile,
- It calls the localtime function to get the correct timestamp.
- If this happens while the OS functions already are on the stack, the client will deadlock itself, including any shared-memory resources it may have in use.
- Any other process that then tries to use the same resource will stall as it will never be released.
- An example of an interrupt signal at the same time is described in Article SE 49 while writing "HANGUP signal received" to the lg file