OSSP CVS Repository |
![]() |
|
l2 appears to be thread safe if used carefully by itself. However, when l2 is used with fsl, thread safety problems are evident when log lines start overwriting each other once the thread level becomes dense. The problem arises in the l2_channel_vlog call, which takes as an argument the l2 channel that fsl creates. From this channel, the function extracts the l2_env_t struct, which has a buffer that is used by a subsequent call to l2_util_format to store the formatted log message. The problem is that this l2_env_t struct is part of the l2 channel that fsl passed, which is global. The log line overwriting can occur anywhere after this buffer in l2_env_t is used becacuse any thread can write to it during the l2_util_format call while other threads read from it in downstream calls. The temporary solution that serves our purpose was to store the message in a local function variable before passing it to l2_util_format. The patch file used is attached.
|
Type: code Version: 0.9.4 Status: new Created: 2003-Oct-31 21:35 Severity: 2 Last Change: 2003-Oct-31 21:35 Priority: 3 Subsystem: l2 Assigned To: rse Derived From: Creator: anonymous
- l2_channel_c.patch 1598 bytes added by anonymous on 2003-Oct-31 20:35:54 UTC.