[Ace-users] [ace-bugs] Proactor event loop doesn't end when calling proactor_end_event_loop()

David Faure dfaure at klaralvdalens-datakonsult.se
Thu Jun 21 03:52:39 CDT 2007


ACE VERSION: 5.5.6

HOST MACHINE and OPERATING SYSTEM: Dual amd64, Linux Kubuntu 7.04

COMPILER NAME AND VERSION (AND PATCHLEVEL): gcc-4.1.2

THE $ACE_ROOT/ace/config.h FILE: symlink to config-linux.h

THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE: symlink to platform_linux.GNU

AREA/CLASS/EXAMPLE AFFECTED: examples/Reactor/Proactor/test_end_event_loop.cpp

DOES THE PROBLEM AFFECT: Execution

SYNOPSIS:
 This test is supposed to show how the proactor event loop ends when calling proactor_end_event_loop().
 However it fails, the event loop doesn't terminate.

DESCRIPTION:
 On linux, the Proactor is in a blocking call to ACE_POSIX_AIOCB_Proactor::handle_events_i(),
 so if no events come in, the event loop never terminates, the end_event_loop_ flag is never checked.

 The description of the test says "To end the event loop, threads that are blocked in
 waiting for completions are  woken up and the event loop comes to the end."
 but this waking up mechanism doesn't seem to work in the current version of ACE (on linux).

REPEAT BY:
 ./test_end_event_loop in ACE_wrappers/examples/Reactor/Proactor/

[...]
(7869|1174452544):Going to do *timed* <run_event_loop>
(7869 | 47863888310992):Calling end_event_loop     (I added that debug line)
... and then nothing happens.

SAMPLE FIX/WORKAROUND:
 That's the question. How do we wake up the proactor?

-- 
David Faure, faure at kde.org, dfaure at klaralvdalens-datakonsult.se
KDE/KOffice developer, Qt consultancy projects
Klarälvdalens Datakonsult AB, Platform-independent software solutions



More information about the Ace-users mailing list