[Bug 428] New: Logger::In in("module") may crash in multi-threaded scenarios

For more information about this bug, visit
A new bug was added:
Summary: Logger::In in("module") may crash in multi-threaded
scenarios
Product: RTT
Version: 1.2.1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Real-Time Toolkit (RTT)
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [dot] soetens [..] ...

This bug was found using valgrind.
The Logger::In helper class stores a pointer to the parent module, sets a new
module name and restores the parent module name upon scope exit. However, if
the parent was from another thread, the pointer may become invalid quickly.

There are the solutions to this:
1. do not (re)store the parent pointer
2. implement Thread-Local Storage/Data to store current logger module

I'll go for #1 given the time constraints. This means some module names will be
[Logger] after Logger::In scope exit. #2 is interesting for the
DataObject/Buffer LockFree communication as well, but not a high priority.

--
(this mail is best viewed with a fixed font)
Configure bugmail: https://www.fmtc.be/orocos-bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

[Bug 428] Logger::In in("module") may crash in multi-threaded sc

For more information about this bug, visit
A comment was added:
------- Comment #3 from peter [dot] soetens [..] ... 2007-07-13 09:20

(In reply to comment #2)
> (In reply to comment #1)
> > $ svn ci Logger.cpp -m"Fix for bug #428: Logger::In in("module") may crash in
> > multi-threaded scenarios:
> > > Do not restore parent Logger module pointer, but set it to [Logger].
> > > "
> > Sending Logger.cpp
> > Transmitting file data .
> > Committed revision 28400.
> > We need to wait until this issue is thoroughly fixed, using TLS.

[Bug 428] Logger::In in("module") may crash in multi-threaded sc

For more information about this bug, visit
A comment was added:
------- Comment #2 from sander [dot] vandenbroucke [..] ... 2007-07-13 07:45

(In reply to comment #1)
> $ svn ci Logger.cpp -m"Fix for bug #428: Logger::In in("module") may crash in
> multi-threaded scenarios:
> > Do not restore parent Logger module pointer, but set it to [Logger].
> > "
> Sending Logger.cpp
> Transmitting file data .
> Committed revision 28400.
> We need to wait until this issue is thoroughly fixed, using TLS.

TLS: Isn't it yet another OS feature OROCOS will be depending on?

Sander.

--
(this mail is best viewed with a fixed font)
Configure bugmail: https://www.fmtc.be/orocos-bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

[Bug 428] Logger::In in("module") may crash in multi-threaded sc

For more information about this bug, visit

peter [dot] soetens [..] ... changed:

What |Removed |Added
---------------------------------------------------------------------------
Target Milestone|--- |1.2.2
Resolution| |LATER
Status|NEW |RESOLVED

------- Comment #1 from peter [dot] soetens [..] ... 2007-07-12 13:53

$ svn ci Logger.cpp -m"Fix for bug #428: Logger::In in("module") may crash in
multi-threaded scenarios:
> Do not restore parent Logger module pointer, but set it to [Logger].
> "
Sending Logger.cpp
Transmitting file data .
Committed revision 28400.

We need to wait until this issue is thoroughly fixed, using TLS.

--
(this mail is best viewed with a fixed font)
Configure bugmail: https://www.fmtc.be/orocos-bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm