Page MenuHomePhabricator

Enhance logging tests for threaded use cases
Closed, WontfixPublic

Description

Sometimes I hear complaints about crashes when used in conjunction with threads.

Since the core test mitkLogTest does test basic threaded logging and does NOT fail on any platform, I'd like to enhance testing:

  • use more threads
  • use other threads than ITK threads
  • log to console AND to files

The idea is to either identify a reason for a crash or to make sure basic logging DOES work.

Event Timeline

[49f022]: Merge branch 'bug-15479-threaded-logging'

Merged commits:

2013-07-01 14:45:49 Daniel Maleike [be7b28]
Test logging to console AND to file


2013-07-01 16:24:23 Daniel Maleike [fd2e8a]
Indent (no code changed)

Conflicts:

Core/Code/Testing/mitkLogTest.cpp


2013-07-01 14:24:38 Daniel Maleike [50f7b0]
Increase number of threads during testing, increase test duration (+fix whitespace)

New remote branch pushed: bug-15479-threaded-logging

[274337]: Merge branch 'bug-15479-threaded-logging'

Merged commits:

2013-07-01 17:41:23 Daniel Maleike [a9b46c]
Add QmitkThreadedLogTest

[7b3ead]: Merge branch 'bug-15479-threaded-logging'

Merged commits:

2013-07-02 10:18:28 Daniel Maleike [4c2a90]
COMP: Fix syntax error

[414c92]: COMP: Merge branch 'bug-15479-threaded-logging'

Merged commits:

2013-07-02 10:39:13 Daniel Maleike [e21e4f]
Deactivate tests (fail on at least MacOS)

Ok, I now added unit tests for

  • logging to console or file
  • threading via ITK or Qt

At least the mix of Qt and files fails to pass on MacOS and Windows. I'll create a Windows build to look into the problem.

(In reply to Daniel Maleike from comment #6)

At least the mix of Qt and files fails to pass on MacOS and Windows. I'll
create a Windows build to look into the problem.

That fail was caused by missing characters in my code, quite stupid mistake.. In a virtual Windows machine the test passes now. Let's see about the continuous clients..

Ok, the test still fails on MacOS with a relatively early message:

QmitkTestDriver(70352,0x11b542000) malloc: *** error for object 0x7fd8859014b0: double free

  • set a breakpoint in malloc_error_break to debug

When run in release mode on my Windows VM, a similar error occurs at the end:

HEAP CORRUPTION DETECTED: after ... block (...) at (...). CRT detected that the application wrote to memory after end of heap buffer.

Seems like more work is required.

(In reply to Daniel Maleike from comment #8)

When run in release mode on my Windows VM, a similar error occurs at the end:

HEAP CORRUPTION DETECTED: after ... block (...) at (...). CRT detected that
the application wrote to memory after end of heap buffer.

This once again was my fault, local build configuration messed up.

The MacOS issue remains, I deactivated the Qt-Threading test for this platform

[943257]: COMP: Merge branch 'bug-15479-threaded-logging'

Merged commits:

2013-07-04 10:45:04 Daniel Maleike [11f082]
Test fails on Windows, too, so deactivate until behavior is fixed

What is the status of this bug?

Why is the test located in Modules\QtWidgets\Testing? It's the only test in this module, but the module is not directly releated to logging.

There also is a log test in the core which tests threaded logging but with another threading mechanism.

kislinsk added a project: Auto-closed.
kislinsk added a subscriber: kislinsk.

Hi there! ๐Ÿ™‚

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. ๐Ÿš‘

Best wishes,
The MITK devs