mico-devel Mailing List for MICO
Brought to you by:
kgardas
You can subscribe to this list here.
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(7) |
Jul
(15) |
Aug
(7) |
Sep
(5) |
Oct
|
Nov
|
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2011 |
Jan
(1) |
Feb
(7) |
Mar
(6) |
Apr
(3) |
May
(9) |
Jun
(12) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(10) |
Nov
|
Dec
(8) |
| 2012 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
(3) |
May
|
Jun
(6) |
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
(13) |
Nov
(3) |
Dec
|
| 2013 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(3) |
Nov
(3) |
Dec
(1) |
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(2) |
| 2016 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(11) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Michael H. <mic...@ss...> - 2019-05-27 12:04:40
|
The very first AC_CHECK for HEADERS found by autoconf does pull in the AC_REQUIRE(AC_PROG_EGREP) configure code. If we skip that configure part, which we do when threading was disabled, EGREP is unset for any subsequent check, breaking the checks for function prototypes at least. So we better do the AC_HEADER_STDC before any other AC_CHECK_HEADERS. --- configure.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 98dd5c5..6621688 100644 --- a/configure.in +++ b/configure.in @@ -411,6 +411,8 @@ ac_link="$ac_link "'$EXTRA_LIBS' AC_SUBST(EXTRA_CXXFLAGS) ac_compile="$ac_compile "'$EXTRA_CXXFLAGS' +AC_HEADER_STDC + # # thread support # @@ -1381,7 +1383,6 @@ CURSES_LIBS="$LIBS $SHLIBS" # Checks for header files. # -AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h unistd.h sys/select.h strings.h float.h ieeefp.h) AC_CHECK_HEADERS(sys/un.h netinet/in.h arpa/inet.h netdb.h dlfcn.h dl.h) AC_CHECK_HEADERS(netinet/tcp.h stdlib.h sys/time.h sys/timeb.h sunmath.h sys/stat.h) -- 2.19.2 |
|
From: Michael H. <mic...@ss...> - 2019-05-24 15:18:28
|
When caching the ORBInvokeRec object, which does happen when threads are
disabled, we need to respect the reference count of ORBInvokeRec.
Otherwise, the idl compiler dumps core when built with optimization,
and valgrind does report invalid memory read after free.
---
include/mico/orb_mico.h | 2 +-
orb/orb.cc | 11 ++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/mico/orb_mico.h b/include/mico/orb_mico.h
index 29c2d62..3e6fe9c 100644
--- a/include/mico/orb_mico.h
+++ b/include/mico/orb_mico.h
@@ -308,7 +308,7 @@ private:
OctetSeq _terminal_id;
#ifdef USE_ORB_CACHE
- ORBInvokeRec *_cache_rec;
+ ORBInvokeRec_var _cache_rec;
CORBA::Boolean _cache_used;
#endif
typedef std::map<std::string, bool> OptionMap;
diff --git a/orb/orb.cc b/orb/orb.cc
index 5c60239..d11aeeb 100644
--- a/orb/orb.cc
+++ b/orb/orb.cc
@@ -727,8 +727,8 @@ CORBA::ORB::ORB (int &argc, char **argv, const char *rcfile)
CORBA::ORB::~ORB ()
{
#ifdef USE_ORB_CACHE
- if (_cache_used && _cache_rec != NULL)
- delete _cache_rec;
+ _cache_used = FALSE;
+ _cache_rec = NULL;
#endif
assert(this->_disp != NULL);
delete _disp;
@@ -2369,7 +2369,7 @@ CORBA::ORB::create_invoke (MsgId msgid)
if (!_cache_used) {
_cache_used = TRUE;
_cache_rec = new ORBInvokeRec(msgid);
- return _cache_rec;
+ return ORBInvokeRec::_duplicate(_cache_rec);
}
#endif
return new ORBInvokeRec(msgid);
@@ -2416,7 +2416,7 @@ CORBA::ORB::get_invoke (MsgId id)
{
#ifdef USE_ORB_CACHE
if (_cache_used && _cache_rec->id() == id && _cache_rec->active() )
- return _cache_rec;
+ return CORBA::ORBInvokeRec::_duplicate(_cache_rec);
#endif
if (MICO::Logger::IsLogged (MICO::Logger::ORB)) {
@@ -2464,7 +2464,7 @@ CORBA::ORB::del_invoke (MsgId id)
{
#ifdef USE_ORB_CACHE
if (_cache_used && _cache_rec->id() == id) {
- delete _cache_rec;
+ _cache_rec = NULL;
_cache_used = FALSE;
return;
}
@@ -2839,6 +2839,7 @@ CORBA::ORB::invoke_async (Object_ptr obj,
#ifdef USE_ORB_CACHE
if (_cache_used && _cache_rec == rec) {
_cache_used = FALSE;
+ _cache_rec = NULL;
}
#endif
//delete rec;
--
2.19.2
|
|
From: Michael H. <mic...@ss...> - 2019-05-24 15:17:50
|
Adjust #ifdef HAVE_THREADS for when not defined.
---
daemon/poamediator.cc | 6 +++++-
orb/iop.cc | 4 ++--
orb/orb.cc | 6 ++++++
orb/ssl.cc | 2 +-
orb/util.cc | 36 ++++++++++++++++++++++++++++++------
5 files changed, 44 insertions(+), 10 deletions(-)
diff --git a/daemon/poamediator.cc b/daemon/poamediator.cc
index 9d0f6e2..d772021 100644
--- a/daemon/poamediator.cc
+++ b/daemon/poamediator.cc
@@ -454,7 +454,11 @@ POAMediatorImpl::create_server (const char * svid)
command += " -POARemoteIOR ";
command += s;
- if (inf.proc != NULL && inf.proc->finished()) {
+ if (inf.proc != NULL
+#ifdef HAVE_THREADS
+ && inf.proc->finished()
+#endif // HAVE_THREADS
+ ) {
// GCing still allocated previous UnixProcess object which happen
// on multi-threaded build due to inabiliaty to delete still
// running thread object in the process callback method
diff --git a/orb/iop.cc b/orb/iop.cc
index 16a27ff..b7bd06f 100644
--- a/orb/iop.cc
+++ b/orb/iop.cc
@@ -5953,8 +5953,8 @@ MICO::IIOPServer::handle_invoke_request (GIOPConn *conn, GIOPInContext &in)
CORBA::Boolean resp;
CORBA::ORBRequest* req;
CORBA::Principal_ptr pr = conn->transport()->get_principal();
-#ifdef HAVE_THREADS
CORBA::Object_ptr obj = CORBA::Object::_nil();
+#ifdef HAVE_THREADS
if (MICO::MTManager::thread_per_connection()) {
CORBA::Object_ptr throbj = static_cast<CORBA::Object*>
(MICOMT::Thread::get_specific(MICO::IIOPServer::target_obj_key_));
@@ -6037,8 +6037,8 @@ MICO::IIOPServer::handle_locate_request (GIOPConn *conn, GIOPInContext &in)
{
CORBA::ULong req_id;
//CORBA::Object_ptr obj = new CORBA::Object (new CORBA::IOR);
-#ifdef HAVE_THREADS
CORBA::Object_ptr obj = CORBA::Object::_nil();
+#ifdef HAVE_THREADS
if (MICO::MTManager::thread_per_connection()) {
CORBA::Object_ptr throbj = static_cast<CORBA::Object*>
(MICOMT::Thread::get_specific(MICO::IIOPServer::target_obj_key_));
diff --git a/orb/orb.cc b/orb/orb.cc
index fad2844..5c60239 100644
--- a/orb/orb.cc
+++ b/orb/orb.cc
@@ -207,9 +207,11 @@ CORBA::ORBInvokeRec::init_invoke (ORB_ptr orb,
_cb = callback;
_cb_async_callback = FALSE;
if (_cb != NULL) {
+#ifdef HAVE_THREADS
if (dynamic_cast<ORBAsyncCallback*>(_cb) != NULL) {
_cb_async_callback = TRUE;
}
+#endif
}
_active = TRUE;
#ifdef USE_MESSAGING
@@ -273,11 +275,13 @@ CORBA::ORBInvokeRec::init_bind (ORB_ptr orb, const char *repo,
_adapter = oa;
_cb = callback;
_cb_async_callback = FALSE;
+#ifdef HAVE_THREADS
if (_cb != NULL) {
if (dynamic_cast<ORBAsyncCallback*>(_cb) != NULL) {
_cb_async_callback = TRUE;
}
}
+#endif
_objtag = tag;
_active = TRUE;
}
@@ -299,11 +303,13 @@ CORBA::ORBInvokeRec::init_locate (ORB_ptr orb, Object_ptr o,
_adapter = oa;
_cb = callback;
_cb_async_callback = FALSE;
+#ifdef HAVE_THREADS
if (_cb != NULL) {
if (dynamic_cast<ORBAsyncCallback*>(_cb) != NULL) {
_cb_async_callback = TRUE;
}
}
+#endif
_active = TRUE;
}
diff --git a/orb/ssl.cc b/orb/ssl.cc
index 3feea3a..6c79e11 100644
--- a/orb/ssl.cc
+++ b/orb/ssl.cc
@@ -1096,8 +1096,8 @@ MICOSSL::SSLTransport::isreadable ()
CORBA::Long
MICOSSL::SSLTransport::read (void *_b, CORBA::Long len)
{
-#ifdef HAVE_THREADS
int i = -1;
+#ifdef HAVE_THREADS
// We can't lock while using blocking transport (blocking is used only
// by thread per connection concurrency model) because it block on read
// and it can lead to deadlock ie. reader will be faster then writer,
diff --git a/orb/util.cc b/orb/util.cc
index 1be2b2a..b52527d 100644
--- a/orb/util.cc
+++ b/orb/util.cc
@@ -1328,13 +1328,21 @@ mico_float2ieee (CORBA::Octet ieee[4], CORBA::Float f)
void
mico_print_stack_trace()
{
- cerr << getpid() << "|" << MICOMT::Thread::self() << ": Stack trace:" << endl;
+ cerr << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << ": Stack trace:" << endl;
const int max_length = 500;
void* array[max_length];
size_t size = backtrace(array, max_length);
char** strings = backtrace_symbols(array, size);
for (size_t i = 0; i < size; i++) {
- cerr << getpid() << "|" << MICOMT::Thread::self() << " " << strings[i] << endl;
+ cerr << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << " " << strings[i] << endl;
}
free (strings);
}
@@ -1342,13 +1350,21 @@ mico_print_stack_trace()
void
mico_print_stack_trace(ostream& out)
{
- out << getpid() << "|" << MICOMT::Thread::self() << ": Stack trace:" << endl;
+ out << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << ": Stack trace:" << endl;
const int max_length = 500;
void* array[max_length];
size_t size = backtrace(array, max_length);
char** strings = backtrace_symbols(array, size);
for (size_t i = 0; i < size; i++) {
- out << getpid() << "|" << MICOMT::Thread::self() << " " << strings[i] << endl;
+ out << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << " " << strings[i] << endl;
}
free (strings);
}
@@ -1369,9 +1385,17 @@ mico_print_stack_trace(const char* s)
}
}
if (found == 1) {
- cerr << getpid() << "|" << MICOMT::Thread::self() << ": Stack trace:" << endl;
+ cerr << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << ": Stack trace:" << endl;
for (size_t i = 0; i < size; i++) {
- cerr << getpid() << "|" << MICOMT::Thread::self() << " " << strings[i] << endl;
+ cerr << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << " " << strings[i] << endl;
}
}
free (strings);
--
2.19.2
|
|
From: Michael H. <mic...@ss...> - 2019-05-24 15:14:30
|
Hi Karel, On 5/24/19 10:38 AM, Karel Gardas wrote: > > Hi Michael, > > your changes generally looks fine, although I'm highly curious why do you still (in 2019) need single-threaded build. Well, this is some older application with CORBA parts untouched for a decade, and I'm unsure what may happen when threads are enabled in mico. As the code to disable threads in mico still is around and was easy enough to fix, I just haven't seen need to try the application with mico threads enabled. > > On the other hand, I've attempted to merge them here using GNU patch and this process failed miserably as all hunks were rejected. Not sure if my MUA has not corrupted patches in some way. > Anyway, I've pushed my working tree now so you can darcs pull and see yourself if the issue is with patches you provided or they apply fine on your end and then I would request them in gziped GNU patch format not to give mu MUA chance to corrupt them. Patch updates on the way in plain text for discussion and patch.gz attached. Thanks! /haubi/ > > Thanks! > Karel > > On 05/22/19 05:01 PM, Michael Haubenwallner wrote: >> Hi, >> >> I'm about to update mico in a situation with threads disabled, >> and face compilation errors because of two distinct problems: >> >> 1) HAVE_THREADS not being defined causes compilation errors, >> and the first patch does fix them. >> >> 2) The idl compiler dumps core when optimization is enabled, >> and valgrind does show some invalid memory read after free. >> This eventually is because ORBInvokeRec is ref-counted since 2014, >> but ORB::_cache_rec does not respect that. Fixed by second patch. >> >> What do you think? >> >> Thanks! >> /haubi/ >> >> >> >> >> _______________________________________________ >> Mico-devel mailing list >> Mic...@li... >> https://lists.sourceforge.net/lists/listinfo/mico-devel >> > > |
|
From: Karel G. <kg...@ob...> - 2019-05-24 08:39:20
|
Hi Michael, your changes generally looks fine, although I'm highly curious why do you still (in 2019) need single-threaded build. On the other hand, I've attempted to merge them here using GNU patch and this process failed miserably as all hunks were rejected. Not sure if my MUA has not corrupted patches in some way. Anyway, I've pushed my working tree now so you can darcs pull and see yourself if the issue is with patches you provided or they apply fine on your end and then I would request them in gziped GNU patch format not to give mu MUA chance to corrupt them. Thanks! Karel On 05/22/19 05:01 PM, Michael Haubenwallner wrote: > Hi, > > I'm about to update mico in a situation with threads disabled, > and face compilation errors because of two distinct problems: > > 1) HAVE_THREADS not being defined causes compilation errors, > and the first patch does fix them. > > 2) The idl compiler dumps core when optimization is enabled, > and valgrind does show some invalid memory read after free. > This eventually is because ORBInvokeRec is ref-counted since 2014, > but ORB::_cache_rec does not respect that. Fixed by second patch. > > What do you think? > > Thanks! > /haubi/ > > > > > _______________________________________________ > Mico-devel mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/mico-devel > -- ------------------------------------------------------------------------------- Karel Gardas, kg...@ob... ObjectSecurity OSA GmbH, Rheinstr.93b, 14612 Falkensee Geschäftsführer: Rudolf Schreiner Handelsregister: HRB 31497, Amtsgericht Potsdam Umsatzsteuer-Identifikationsnummer: DE319654022 ------------------------------------------------------------------------------- |
|
From: Michael H. <mic...@ss...> - 2019-05-22 15:38:50
|
Hi, I'm about to update mico in a situation with threads disabled, and face compilation errors because of two distinct problems: 1) HAVE_THREADS not being defined causes compilation errors, and the first patch does fix them. 2) The idl compiler dumps core when optimization is enabled, and valgrind does show some invalid memory read after free. This eventually is because ORBInvokeRec is ref-counted since 2014, but ORB::_cache_rec does not respect that. Fixed by second patch. What do you think? Thanks! /haubi/ |
|
From: Michael H. <mic...@ss...> - 2019-05-22 15:38:48
|
Adjust #ifdef HAVE_THREADS for when not defined.
---
orb/iop.cc | 4 ++--
orb/orb.cc | 6 ++++++
orb/ssl.cc | 2 +-
orb/util.cc | 36 ++++++++++++++++++++++++++++++------
4 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/orb/iop.cc b/orb/iop.cc
index fd5220a..f9fdd89 100644
--- a/orb/iop.cc
+++ b/orb/iop.cc
@@ -5931,8 +5931,8 @@ MICO::IIOPServer::handle_invoke_request (GIOPConn *conn, GIOPInContext &in)
CORBA::Boolean resp;
CORBA::ORBRequest* req;
CORBA::Principal_ptr pr = conn->transport()->get_principal();
-#ifdef HAVE_THREADS
CORBA::Object_ptr obj = CORBA::Object::_nil();
+#ifdef HAVE_THREADS
if (MICO::MTManager::thread_per_connection()) {
CORBA::Object_ptr throbj = static_cast<CORBA::Object*>
(MICOMT::Thread::get_specific(MICO::IIOPServer::target_obj_key_));
@@ -6015,8 +6015,8 @@ MICO::IIOPServer::handle_locate_request (GIOPConn *conn, GIOPInContext &in)
{
CORBA::ULong req_id;
//CORBA::Object_ptr obj = new CORBA::Object (new CORBA::IOR);
-#ifdef HAVE_THREADS
CORBA::Object_ptr obj = CORBA::Object::_nil();
+#ifdef HAVE_THREADS
if (MICO::MTManager::thread_per_connection()) {
CORBA::Object_ptr throbj = static_cast<CORBA::Object*>
(MICOMT::Thread::get_specific(MICO::IIOPServer::target_obj_key_));
diff --git a/orb/orb.cc b/orb/orb.cc
index af85775..638aae5 100644
--- a/orb/orb.cc
+++ b/orb/orb.cc
@@ -207,9 +207,11 @@ CORBA::ORBInvokeRec::init_invoke (ORB_ptr orb,
_cb = callback;
_cb_async_callback = FALSE;
if (_cb != NULL) {
+#ifdef HAVE_THREADS
if (dynamic_cast<ORBAsyncCallback*>(_cb) != NULL) {
_cb_async_callback = TRUE;
}
+#endif
}
_active = TRUE;
#ifdef USE_MESSAGING
@@ -273,11 +275,13 @@ CORBA::ORBInvokeRec::init_bind (ORB_ptr orb, const char *repo,
_adapter = oa;
_cb = callback;
_cb_async_callback = FALSE;
+#ifdef HAVE_THREADS
if (_cb != NULL) {
if (dynamic_cast<ORBAsyncCallback*>(_cb) != NULL) {
_cb_async_callback = TRUE;
}
}
+#endif
_objtag = tag;
_active = TRUE;
}
@@ -299,11 +303,13 @@ CORBA::ORBInvokeRec::init_locate (ORB_ptr orb, Object_ptr o,
_adapter = oa;
_cb = callback;
_cb_async_callback = FALSE;
+#ifdef HAVE_THREADS
if (_cb != NULL) {
if (dynamic_cast<ORBAsyncCallback*>(_cb) != NULL) {
_cb_async_callback = TRUE;
}
}
+#endif
_active = TRUE;
}
diff --git a/orb/ssl.cc b/orb/ssl.cc
index 3b92614..2a7404f 100644
--- a/orb/ssl.cc
+++ b/orb/ssl.cc
@@ -1096,8 +1096,8 @@ MICOSSL::SSLTransport::isreadable ()
CORBA::Long
MICOSSL::SSLTransport::read (void *_b, CORBA::Long len)
{
-#ifdef HAVE_THREADS
int i = -1;
+#ifdef HAVE_THREADS
// We can't lock while using blocking transport (blocking is used only
// by thread per connection concurrency model) because it block on read
// and it can lead to deadlock ie. reader will be faster then writer,
diff --git a/orb/util.cc b/orb/util.cc
index 1be2b2a..b52527d 100644
--- a/orb/util.cc
+++ b/orb/util.cc
@@ -1328,13 +1328,21 @@ mico_float2ieee (CORBA::Octet ieee[4], CORBA::Float f)
void
mico_print_stack_trace()
{
- cerr << getpid() << "|" << MICOMT::Thread::self() << ": Stack trace:" << endl;
+ cerr << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << ": Stack trace:" << endl;
const int max_length = 500;
void* array[max_length];
size_t size = backtrace(array, max_length);
char** strings = backtrace_symbols(array, size);
for (size_t i = 0; i < size; i++) {
- cerr << getpid() << "|" << MICOMT::Thread::self() << " " << strings[i] << endl;
+ cerr << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << " " << strings[i] << endl;
}
free (strings);
}
@@ -1342,13 +1350,21 @@ mico_print_stack_trace()
void
mico_print_stack_trace(ostream& out)
{
- out << getpid() << "|" << MICOMT::Thread::self() << ": Stack trace:" << endl;
+ out << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << ": Stack trace:" << endl;
const int max_length = 500;
void* array[max_length];
size_t size = backtrace(array, max_length);
char** strings = backtrace_symbols(array, size);
for (size_t i = 0; i < size; i++) {
- out << getpid() << "|" << MICOMT::Thread::self() << " " << strings[i] << endl;
+ out << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << " " << strings[i] << endl;
}
free (strings);
}
@@ -1369,9 +1385,17 @@ mico_print_stack_trace(const char* s)
}
}
if (found == 1) {
- cerr << getpid() << "|" << MICOMT::Thread::self() << ": Stack trace:" << endl;
+ cerr << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << ": Stack trace:" << endl;
for (size_t i = 0; i < size; i++) {
- cerr << getpid() << "|" << MICOMT::Thread::self() << " " << strings[i] << endl;
+ cerr << getpid()
+#ifdef HAVE_THREADS
+ << "|" << MICOMT::Thread::self()
+#endif // HAVE_THREADS
+ << " " << strings[i] << endl;
}
}
free (strings);
--
2.19.2
|
|
From: Michael H. <mic...@ss...> - 2019-05-22 15:15:25
|
When caching the ORBInvokeRec object, which does happen when threads are
disabled, we need to respect the reference count of ORBInvokeRec.
Otherwise, the idl compiler dumps core when built with optimization,
and valgrind does report invalid memory read after free.
---
include/mico/orb_mico.h | 2 +-
orb/orb.cc | 11 ++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/mico/orb_mico.h b/include/mico/orb_mico.h
index 1cc936b..4dc0b23 100644
--- a/include/mico/orb_mico.h
+++ b/include/mico/orb_mico.h
@@ -307,7 +307,7 @@ private:
OctetSeq _terminal_id;
#ifdef USE_ORB_CACHE
- ORBInvokeRec *_cache_rec;
+ ORBInvokeRec_var _cache_rec;
CORBA::Boolean _cache_used;
#endif
typedef std::map<std::string, bool> OptionMap;
diff --git a/orb/orb.cc b/orb/orb.cc
index 638aae5..4ef2804 100644
--- a/orb/orb.cc
+++ b/orb/orb.cc
@@ -727,8 +727,8 @@ CORBA::ORB::ORB (int &argc, char **argv, const char *rcfile)
CORBA::ORB::~ORB ()
{
#ifdef USE_ORB_CACHE
- if (_cache_used && _cache_rec != NULL)
- delete _cache_rec;
+ _cache_used = FALSE;
+ _cache_rec = NULL;
#endif
assert(this->_disp != NULL);
delete _disp;
@@ -2369,7 +2369,7 @@ CORBA::ORB::create_invoke (MsgId msgid)
if (!_cache_used) {
_cache_used = TRUE;
_cache_rec = new ORBInvokeRec(msgid);
- return _cache_rec;
+ return ORBInvokeRec::_duplicate(_cache_rec);
}
#endif
return new ORBInvokeRec(msgid);
@@ -2416,7 +2416,7 @@ CORBA::ORB::get_invoke (MsgId id)
{
#ifdef USE_ORB_CACHE
if (_cache_used && _cache_rec->id() == id && _cache_rec->active() )
- return _cache_rec;
+ return CORBA::ORBInvokeRec::_duplicate(_cache_rec);
#endif
if (MICO::Logger::IsLogged (MICO::Logger::ORB)) {
@@ -2464,7 +2464,7 @@ CORBA::ORB::del_invoke (MsgId id)
{
#ifdef USE_ORB_CACHE
if (_cache_used && _cache_rec->id() == id) {
- delete _cache_rec;
+ _cache_rec = NULL;
_cache_used = FALSE;
return;
}
@@ -2835,6 +2835,7 @@ CORBA::ORB::invoke_async (Object_ptr obj,
#ifdef USE_ORB_CACHE
if (_cache_used && _cache_rec == rec) {
_cache_used = FALSE;
+ _cache_rec = NULL;
}
#endif
//delete rec;
--
2.19.2
|
|
From: Michael H. <mic...@ss...> - 2019-05-22 11:42:56
|
On 5/20/19 11:08 AM, Karel Gardas wrote: > > Hi Michael, > > you don't miss anything except the fact that when the work is done for the customer we usually prefer to do ground work first and after some stabilization and more testing we decide to push that to the MICO repository. It's more like repository is conservative reference point and bleeding edge development and fixes are not pushed there at the time of the development. > > I hope this helps, Yes, thanks! /haubi/ > Karel > > On 05/17/19 12:10 PM, Michael Haubenwallner wrote: >> Hi Karel, >> >> although there is a development snapshot[1] mico-2019.04 for download, >> and the snapshot content has changed since the mico-2019.01 snapshot, >> but the most recent commit in the darcs repository[2] is from 2019-01-29. >> >> What am I missing? >> >> [1] http://www.mico.org/snapshots/ >> [2] http://www.mico.org/mico-darcs-repository >> >> Thanks! >> /haubi/ >> >> >> _______________________________________________ >> Mico-devel mailing list >> Mic...@li... >> https://lists.sourceforge.net/lists/listinfo/mico-devel >> > > |
|
From: Karel G. <kg...@ob...> - 2019-05-20 09:25:56
|
Hi Michael, you don't miss anything except the fact that when the work is done for the customer we usually prefer to do ground work first and after some stabilization and more testing we decide to push that to the MICO repository. It's more like repository is conservative reference point and bleeding edge development and fixes are not pushed there at the time of the development. I hope this helps, Karel On 05/17/19 12:10 PM, Michael Haubenwallner wrote: > Hi Karel, > > although there is a development snapshot[1] mico-2019.04 for download, > and the snapshot content has changed since the mico-2019.01 snapshot, > but the most recent commit in the darcs repository[2] is from 2019-01-29. > > What am I missing? > > [1] http://www.mico.org/snapshots/ > [2] http://www.mico.org/mico-darcs-repository > > Thanks! > /haubi/ > > > _______________________________________________ > Mico-devel mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/mico-devel > -- ------------------------------------------------------------------------------- Karel Gardas, kg...@ob... ObjectSecurity OSA GmbH, Rheinstr.93b, 14612 Falkensee Geschäftsführer: Rudolf Schreiner Handelsregister: HRB 31497, Amtsgericht Potsdam Umsatzsteuer-Identifikationsnummer: DE319654022 ------------------------------------------------------------------------------- |
|
From: Michael H. <mic...@ss...> - 2019-05-17 10:23:28
|
Hi Karel, although there is a development snapshot[1] mico-2019.04 for download, and the snapshot content has changed since the mico-2019.01 snapshot, but the most recent commit in the darcs repository[2] is from 2019-01-29. What am I missing? [1] http://www.mico.org/snapshots/ [2] http://www.mico.org/mico-darcs-repository Thanks! /haubi/ |
|
From: Karel G. <kg...@ob...> - 2018-04-23 08:50:01
|
corbaloc as specified does not support TLS, hence my advise below to use some kind of bootstrapping service. You can even use naming service for that if you like ... Cheers, Karel On 04/23/18 10:44 AM, GANGA KAMATH wrote: > Thank you for the response . > Can you please tell me what modification should i do in my corbaloc url > : corbaloc:iiop:1.1@<ip>:<port>/server/SerPOA/hello to access server > with ssl. > > Thanks and Regards, > Ganga. > > > On Mon, Apr 23, 2018 at 2:06 PM, Karel Gardas > <kg...@ob... <mailto:kg...@ob...>> wrote: > > > Use IIOP based bootstrap service which will provide you with the > SSLIOP-based IOR for your real service... > > Cheers, > Karel > > On 04/23/18 06:09 AM, GANGA KAMATH wrote: > > Hi, > I am using corbaloc url > : corbaloc:iiop:1.1@<ip>:<port>/server/SerPOA/hello with clinet to > connect to the host , but i am getting > IDL:omg.org/CORBA/TRANSIENT:1.0 <http://omg.org/CORBA/TRANSIENT:1.0> > <http://omg.org/CORBA/TRANSIENT:1.0 > <http://omg.org/CORBA/TRANSIENT:1.0>> exception. > > What am i missing here ?? > > Thanks and Regards, > Ganga. > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > Mico-devel mailing list > Mic...@li... > <mailto:Mic...@li...> > https://lists.sourceforge.net/lists/listinfo/mico-devel > <https://lists.sourceforge.net/lists/listinfo/mico-devel> > > > > -- > Karel Gardas kg...@ob... > <mailto:kg...@ob...> > ObjectSecurity Ltd. http://www.objectsecurity.com > > -- Karel Gardas kg...@ob... ObjectSecurity Ltd. http://www.objectsecurity.com |
|
From: GANGA K. <kam...@gm...> - 2018-04-23 08:45:09
|
Thank you for the response . Can you please tell me what modification should i do in my corbaloc url : corbaloc:iiop:1.1@<ip>:<port>/server/SerPOA/hello to access server with ssl. Thanks and Regards, Ganga. On Mon, Apr 23, 2018 at 2:06 PM, Karel Gardas <kg...@ob...> wrote: > > Use IIOP based bootstrap service which will provide you with the > SSLIOP-based IOR for your real service... > > Cheers, > Karel > > On 04/23/18 06:09 AM, GANGA KAMATH wrote: > >> Hi, >> I am using corbaloc url >> : corbaloc:iiop:1.1@<ip>:<port>/server/SerPOA/hello with clinet to >> connect to the host , but i am getting IDL:omg.org/CORBA/TRANSIENT:1.0 >> <http://omg.org/CORBA/TRANSIENT:1.0> exception. >> >> What am i missing here ?? >> >> Thanks and Regards, >> Ganga. >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> >> >> _______________________________________________ >> Mico-devel mailing list >> Mic...@li... >> https://lists.sourceforge.net/lists/listinfo/mico-devel >> >> > > -- > Karel Gardas kg...@ob... > ObjectSecurity Ltd. http://www.objectsecurity.com > |
|
From: Karel G. <kg...@ob...> - 2018-04-23 08:36:55
|
Use IIOP based bootstrap service which will provide you with the SSLIOP-based IOR for your real service... Cheers, Karel On 04/23/18 06:09 AM, GANGA KAMATH wrote: > Hi, > I am using corbaloc url > : corbaloc:iiop:1.1@<ip>:<port>/server/SerPOA/hello with clinet to > connect to the host , but i am getting IDL:omg.org/CORBA/TRANSIENT:1.0 > <http://omg.org/CORBA/TRANSIENT:1.0> exception. > > What am i missing here ?? > > Thanks and Regards, > Ganga. > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > Mico-devel mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/mico-devel > -- Karel Gardas kg...@ob... ObjectSecurity Ltd. http://www.objectsecurity.com |
|
From: GANGA K. <kam...@gm...> - 2018-04-23 04:09:09
|
Hi, I am using corbaloc url : corbaloc:iiop:1.1@<ip>:<port>/server/SerPOA/hello with clinet to connect to the host , but i am getting IDL: omg.org/CORBA/TRANSIENT:1.0 exception. What am i missing here ?? Thanks and Regards, Ganga. |
|
From: GANGA K. <kam...@gm...> - 2018-04-19 09:08:45
|
Hi, I see in the demo examples of ssl, sl3 the client uses the IOR file to bind with the server object . Is it mandatory to use the IOR file itself when we are using SSL/TLS ? Can the client connect with corbaloc uri? I was trying to achieve this with Corbaloc on my application , but I am getting IDL:omg.org/CORBA/TRANSIENT:1.0 (0, maybe-completed) exception. server.cc: class HelloWorld_impl : virtual public POA_HelloWorld { public: virtual void hello ( const char* msg); }; void HelloWorld_impl::hello(const char* msg) { cout<<"Hello world for client = " << msg <<endl; } int main (int argc, char *argv[]) { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); CORBA::Object_var poaobj = orb->resolve_initial_references ("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow (poaobj); PortableServer::POAManager_var mgr = poa->the_POAManager(); CORBA::PolicyList pl1; pl1.length (3); pl1[0] = poa->create_lifespan_policy (PortableServer::PERSISTENT); pl1[1] = poa->create_id_assignment_policy (PortableServer::USER_ID); pl1[2] = poa->create_thread_policy (PortableServer::SINGLE_THREAD_MODEL); PortableServer::POA_var ser_poa = poa->create_POA ("SerPOA", PortableServer::POAManager::_nil (), pl1); PortableServer::POAManager_var ser_mgr = ser_poa->the_POAManager (); HelloWorld_impl * hello = new HelloWorld_impl; PortableServer::ObjectId_var oid = PortableServer::string_to_ObjectId( "hello" ); ser_poa -> activate_object_with_id( oid.in(), hello ); ofstream of ("hello.ref"); CORBA::Object_var ref = ser_poa->id_to_reference (oid.in()); CORBA::String_var str = orb->object_to_string (ref.in()); of << str.in() << endl; of.close (); mgr->activate (); ser_mgr->activate (); orb->run(); poa->destroy (TRUE, TRUE); delete hello; return 0; } client.cc int main (int argc, char *argv[]) { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); timeval a, c, d; timeval b; char uri[300]; sprintf (uri, "corbaloc::%s:%s/server/SerPOA/hello", argv[1], argv[2]); cout << "uri:" << uri << endl; try { CORBA::Object_var obj = orb->string_to_object (uri); if (!CORBA::is_nil(obj)) { HelloWorld_var hello = HelloWorld::_narrow (obj); string msg= "HI"; hello->hello(msg.c_str()); } } catch (CORBA::Exception &ex) { cout<<"Error calling method hello : " << ex <<endl; } return 0; } I run the server as : ./server -ORBIIOPAddr ssl:inet:`uname -n`:12124 -ORBDebug Warning -ORBSSLcert s_cert.pem -ORBSSLkey s_key.pem -POAImplName server client as : ./client $host 12124 -ORBDebug Warning -ORBSSLcert c_cert.pem -ORBSSLkey c_key.pem what am i missing here. Thanks and Regards, Ganga |
|
From: GANGA K. <kam...@gm...> - 2018-04-12 03:54:52
|
Hi, I configured mico with ssl support with flag "with-ssl=<openssl path>. Build and install mico. I modified the code under demo/ssl to send a message from client to server . in command prompt run the server : ADDR=ssl:inet:`uname -n`:12124 ./server -ORBIIOPAddr $ADDR -ORBSSLcert s_cert.pem -ORBSSLkey s_key.pem on another command prompt , run the client using below command : ./client `cat sec_hello.ior` -ORBSSLcert c_cert.pem -ORBSSLkey c_key.pem client is able to achieve a connection with server . But i am getting core dump . ./server -ORBIIOPAddr $ADDR -ORBSSLcert s_cert.pem -ORBSSLkey s_key.pem authentication method: ssl peer address: ssl:inet:10.79.1.91:58442 cipher: AES256-GCM-SHA384 issuer: subject: subject's name: subject's email: incoming msg from client: hello ssl.cc:918: assertion failed Aborted (core dumped) Coredump: Program terminated with signal 6, Aborted. #0 0x00007f7863afa1d7 in raise () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7_3.1.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.13.2-10.el7.x86_64 libcom_err-1.42.9-7.el7.x86_64 libgcc-4.8.5-11.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 libstdc++-4.8.5-11.el7.x86_64 openssl-libs-1.0.1e-42.el7.9.x86_64 pcre-8.32-15.el7.x86_64 xz-libs-5.1.2-12alpha.el7.x86_64 zlib-1.2.7-17.el7.x86_64 (gdb) bt #0 0x00007f7863afa1d7 in raise () from /lib64/libc.so.6 #1 0x00007f7863afb8c8 in abort () from /lib64/libc.so.6 #2 0x00007f78651f5899 in mico_assert(char const*, int) () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #3 0x00007f78651fe4d2 in MICOSSL::SSLTransport::close() () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #4 0x00007f78651fefcd in MICOSSL::SSLTransport::~SSLTransport() () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #5 0x00007f78651ff0f9 in MICOSSL::SSLTransport::~SSLTransport() () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #6 0x00007f78651e8472 in MICO::GIOPConn::~GIOPConn() () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #7 0x00007f78651e8739 in MICO::GIOPConn::~GIOPConn() () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #8 0x00007f78651e6770 in MICO::IIOPServer::kill_conn(MICO::GIOPConn*, unsigned char) () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #9 0x00007f78651e6a93 in MICO::IIOPServer::callback(MICO::GIOPConn*, MICO::GIOPConnCallback::Event) () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #10 0x00007f78651ec2ff in MICO::GIOPConn::do_read(unsigned char) () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #11 0x00007f78651b879b in MICO::SelectDispatcher::handle_fevents(fd_set&, fd_set&, fd_set&) () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #12 0x00007f78651b8865 in MICO::SelectDispatcher::run(unsigned char) () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #13 0x00007f78651ca5ef in CORBA::ORB::run() () from /sect/package/mico_2.3.12/lib/libmico2.3.12.so #14 0x0000000000405c2d in main () Can you please help me to fix this assertion. Thanks and regards, Ganga. On Tue, Apr 10, 2018 at 7:47 PM, GANGA KAMATH <kam...@gm...> wrote: > sorry for the typo .its not game. Its gmake > > I am compiling the code under demo/ssl using gmake and when i try to run > ssl script and i get the below error. > > uncaught MICO exception: IDL:omg.org/CORBA/INITIALIZE:1.0 (0, > not-completed) > ./ssl: line 47: 6547 Aborted (core dumped) ./server > -ORBIIOPAddr $ADDR -ORBSSLcert s_cert.pem -ORBSSLkey s_key.pem > -ORBSSLverify 0 > client.cc:33: assertion failed > ./ssl: line 52: 6551 Aborted (core dumped) ./client `cat > sec_hello.ior` -ORBSSLcert c_cert.pem -ORBSSLkey c_key.pem -ORBSSLverify 0 > > If i just run the server with ./server command and client with ./client > `cat sec_hello.ior` command , it works fine ,but i dont see any > encryption. Am i missing anything here ? > > > > Thanks and Regards, > Ganga. > > On Tue, Apr 10, 2018 at 7:22 PM, Karel Gardas <kg...@ob...> > wrote: > >> >> Sorry, but I don't have any idea about what's "game" you are talking >> about... >> >> Cheers, >> Karel >> >> On 04/10/18 03:18 PM, GANGA KAMATH wrote: >> >>> Thank you for the response . >>> >>> Do I have to run the game command with any flag to enable SSL option ? >>> I tried running this example , but I couldn't achieve the encryption . >>> >>> Thanks and Regards, >>> Ganga. >>> >>> On Tue, Apr 10, 2018, 6:08 PM Karel Gardas <kg...@ob... >>> <mailto:kg...@ob...>> wrote: >>> >>> >>> Please update to latest MICO HEAD from darcs repository and then see >>> demo/ssl and demo/sl3 or even test/sl3 subdirectories for various >>> examples of using TLS-protected communication. >>> >>> Cheers, >>> Karel >>> >>> On 04/10/18 02:31 PM, GANGA KAMATH wrote: >>> > In my project, all the subsytems talk to each other thro CORBA >>> objects . >>> > When I tried to capture the packet between these subsystems , I >>> see that >>> > it uses GIOP protocol and data is not encrypted . Is it possible >>> to >>> > encrypt the data sent between CORBA objects. >>> > >>> > I am using mico 2.3.12 version on Cent OS 7.2. Kindly guide me >>> how to >>> > achieve TLS for communication between these CORBA ports. >>> > >>> > I read about option of encryption thro SSLIOP, but how do we >>> integrate >>> > that feature? >>> > >>> > Thanks and Regards, >>> > Ganga >>> > >>> > >>> > >>> ------------------------------------------------------------ >>> ------------------ >>> > Check out the vibrant tech community on one of the world's most >>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> > >>> > >>> > >>> > _______________________________________________ >>> > Mico-devel mailing list >>> > Mic...@li... >>> <mailto:Mic...@li...> >>> > https://lists.sourceforge.net/lists/listinfo/mico-devel >>> > >>> >>> >>> -- >>> Karel Gardas kg...@ob... >>> <mailto:kg...@ob...> >>> ObjectSecurity Ltd. http://www.objectsecurity.com >>> >>> >> >> -- >> Karel Gardas kg...@ob... >> ObjectSecurity Ltd. http://www.objectsecurity.com >> > > |
|
From: GANGA K. <kam...@gm...> - 2018-04-10 14:17:47
|
sorry for the typo .its not game. Its gmake I am compiling the code under demo/ssl using gmake and when i try to run ssl script and i get the below error. uncaught MICO exception: IDL:omg.org/CORBA/INITIALIZE:1.0 (0, not-completed) ./ssl: line 47: 6547 Aborted (core dumped) ./server -ORBIIOPAddr $ADDR -ORBSSLcert s_cert.pem -ORBSSLkey s_key.pem -ORBSSLverify 0 client.cc:33: assertion failed ./ssl: line 52: 6551 Aborted (core dumped) ./client `cat sec_hello.ior` -ORBSSLcert c_cert.pem -ORBSSLkey c_key.pem -ORBSSLverify 0 If i just run the server with ./server command and client with ./client `cat sec_hello.ior` command , it works fine ,but i dont see any encryption. Am i missing anything here ? Thanks and Regards, Ganga. On Tue, Apr 10, 2018 at 7:22 PM, Karel Gardas <kg...@ob...> wrote: > > Sorry, but I don't have any idea about what's "game" you are talking > about... > > Cheers, > Karel > > On 04/10/18 03:18 PM, GANGA KAMATH wrote: > >> Thank you for the response . >> >> Do I have to run the game command with any flag to enable SSL option ? >> I tried running this example , but I couldn't achieve the encryption . >> >> Thanks and Regards, >> Ganga. >> >> On Tue, Apr 10, 2018, 6:08 PM Karel Gardas <kg...@ob... >> <mailto:kg...@ob...>> wrote: >> >> >> Please update to latest MICO HEAD from darcs repository and then see >> demo/ssl and demo/sl3 or even test/sl3 subdirectories for various >> examples of using TLS-protected communication. >> >> Cheers, >> Karel >> >> On 04/10/18 02:31 PM, GANGA KAMATH wrote: >> > In my project, all the subsytems talk to each other thro CORBA >> objects . >> > When I tried to capture the packet between these subsystems , I >> see that >> > it uses GIOP protocol and data is not encrypted . Is it possible to >> > encrypt the data sent between CORBA objects. >> > >> > I am using mico 2.3.12 version on Cent OS 7.2. Kindly guide me how >> to >> > achieve TLS for communication between these CORBA ports. >> > >> > I read about option of encryption thro SSLIOP, but how do we >> integrate >> > that feature? >> > >> > Thanks and Regards, >> > Ganga >> > >> > >> > >> ------------------------------------------------------------ >> ------------------ >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> > >> > >> > >> > _______________________________________________ >> > Mico-devel mailing list >> > Mic...@li... >> <mailto:Mic...@li...> >> > https://lists.sourceforge.net/lists/listinfo/mico-devel >> > >> >> >> -- >> Karel Gardas kg...@ob... >> <mailto:kg...@ob...> >> ObjectSecurity Ltd. http://www.objectsecurity.com >> >> > > -- > Karel Gardas kg...@ob... > ObjectSecurity Ltd. http://www.objectsecurity.com > |
|
From: Karel G. <kg...@ob...> - 2018-04-10 13:52:36
|
Sorry, but I don't have any idea about what's "game" you are talking about... Cheers, Karel On 04/10/18 03:18 PM, GANGA KAMATH wrote: > Thank you for the response . > > Do I have to run the game command with any flag to enable SSL option ? > I tried running this example , but I couldn't achieve the encryption . > > Thanks and Regards, > Ganga. > > On Tue, Apr 10, 2018, 6:08 PM Karel Gardas <kg...@ob... > <mailto:kg...@ob...>> wrote: > > > Please update to latest MICO HEAD from darcs repository and then see > demo/ssl and demo/sl3 or even test/sl3 subdirectories for various > examples of using TLS-protected communication. > > Cheers, > Karel > > On 04/10/18 02:31 PM, GANGA KAMATH wrote: > > In my project, all the subsytems talk to each other thro CORBA > objects . > > When I tried to capture the packet between these subsystems , I > see that > > it uses GIOP protocol and data is not encrypted . Is it possible to > > encrypt the data sent between CORBA objects. > > > > I am using mico 2.3.12 version on Cent OS 7.2. Kindly guide me how to > > achieve TLS for communication between these CORBA ports. > > > > I read about option of encryption thro SSLIOP, but how do we > integrate > > that feature? > > > > Thanks and Regards, > > Ganga > > > > > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > > > > > _______________________________________________ > > Mico-devel mailing list > > Mic...@li... > <mailto:Mic...@li...> > > https://lists.sourceforge.net/lists/listinfo/mico-devel > > > > > -- > Karel Gardas kg...@ob... > <mailto:kg...@ob...> > ObjectSecurity Ltd. http://www.objectsecurity.com > -- Karel Gardas kg...@ob... ObjectSecurity Ltd. http://www.objectsecurity.com |
|
From: GANGA K. <kam...@gm...> - 2018-04-10 13:18:49
|
Thank you for the response . Do I have to run the game command with any flag to enable SSL option ? I tried running this example , but I couldn't achieve the encryption . Thanks and Regards, Ganga. On Tue, Apr 10, 2018, 6:08 PM Karel Gardas <kg...@ob...> wrote: > > Please update to latest MICO HEAD from darcs repository and then see > demo/ssl and demo/sl3 or even test/sl3 subdirectories for various > examples of using TLS-protected communication. > > Cheers, > Karel > > On 04/10/18 02:31 PM, GANGA KAMATH wrote: > > In my project, all the subsytems talk to each other thro CORBA objects . > > When I tried to capture the packet between these subsystems , I see that > > it uses GIOP protocol and data is not encrypted . Is it possible to > > encrypt the data sent between CORBA objects. > > > > I am using mico 2.3.12 version on Cent OS 7.2. Kindly guide me how to > > achieve TLS for communication between these CORBA ports. > > > > I read about option of encryption thro SSLIOP, but how do we integrate > > that feature? > > > > Thanks and Regards, > > Ganga > > > > > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > > > > > _______________________________________________ > > Mico-devel mailing list > > Mic...@li... > > https://lists.sourceforge.net/lists/listinfo/mico-devel > > > > > -- > Karel Gardas kg...@ob... > ObjectSecurity Ltd. http://www.objectsecurity.com > |
|
From: Karel G. <kg...@ob...> - 2018-04-10 12:56:33
|
Please update to latest MICO HEAD from darcs repository and then see demo/ssl and demo/sl3 or even test/sl3 subdirectories for various examples of using TLS-protected communication. Cheers, Karel On 04/10/18 02:31 PM, GANGA KAMATH wrote: > In my project, all the subsytems talk to each other thro CORBA objects . > When I tried to capture the packet between these subsystems , I see that > it uses GIOP protocol and data is not encrypted . Is it possible to > encrypt the data sent between CORBA objects. > > I am using mico 2.3.12 version on Cent OS 7.2. Kindly guide me how to > achieve TLS for communication between these CORBA ports. > > I read about option of encryption thro SSLIOP, but how do we integrate > that feature? > > Thanks and Regards, > Ganga > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > Mico-devel mailing list > Mic...@li... > https://lists.sourceforge.net/lists/listinfo/mico-devel > -- Karel Gardas kg...@ob... ObjectSecurity Ltd. http://www.objectsecurity.com |
|
From: GANGA K. <kam...@gm...> - 2018-04-10 12:32:10
|
In my project, all the subsytems talk to each other thro CORBA objects . When I tried to capture the packet between these subsystems , I see that it uses GIOP protocol and data is not encrypted . Is it possible to encrypt the data sent between CORBA objects. I am using mico 2.3.12 version on Cent OS 7.2. Kindly guide me how to achieve TLS for communication between these CORBA ports. I read about option of encryption thro SSLIOP, but how do we integrate that feature? Thanks and Regards, Ganga |
|
From: Karel G. <kg...@ob...> - 2018-03-13 17:25:49
|
Hi Rob,
what version exactly do you use? I'm afraid the best would be if you use
that from darcs HEAD, at least that's always my recommendation to grab
HEAD and try to duplicate the issue on it. The chance is, this is fixed
(if you use latest release) for quite some time already...
Thanks,
Karel
On 03/ 6/18 11:25 PM, Rob Ratcliff wrote:
> Hi,
>
> I typically use MICO compiled for single threaded operation, but
> recently I've been testing it with threads enabled. I've noticed that if
> I fire a continuous sequence of events at eventd that I can make it
> core dump in the dynamic cast. (My version is off by one line since I
> added a null check just to see if that fixed it, which it didn't.)
>
> I'm not a C++ expert so this may be an easy one for somebody who has
> worked with dynamic casts more than I have.
>
> Thanks,
>
> Rob
>
> Here's the stack trace:
>
> gdb `which eventd` core
>
> (gdb) where
>
> #0__cxxabiv1::(anonymous namespace)::adjust_pointer<void> (
>
> offset=<error reading variable: Cannot access memory at address
> 0xfffffffffffffff0>, base=0x6acee0)
>
> at ../../../../libstdc++-v3/libsupc++/tinfo.h:68
>
> #1__cxxabiv1::__dynamic_cast (src_ptr=0x6acee0, src_type=0x2aaaabe691b0
> <typeinfo for CORBA::ORBCallback>,
>
> dst_type=0x2aaaabe69198 <typeinfo for CORBA::ORBAsyncCallback>,
> src2dst=0) at ../../../../libstdc++-v3/libsupc++/dyncast.cc:55
>
> #20x00002aaaab6e7bdb in CORBA::ORBInvokeRec::~ORBInvokeRec
> (this=0x6ad2f0, __in_chrg=<optimized out>) at orb.cc:304
>
> #30x00002aaaab6e7cbc in CORBA::ORBInvokeRec::~ORBInvokeRec
> (this=0x6ad2f0, __in_chrg=<optimized out>) at orb.cc:310
>
> #40x00002aaaab67acf3 in CORBA::release (o=0x6ad2f0) at
> ../include/mico/object.h:71
>
> #50x00002aaaab6857ff in ObjVar<CORBA::ORBInvokeRec>::release
> (t=0x6ad2f0) at ../include/mico/template_impl.h:49
>
> #60x00002aaaab683825 in ObjVar<CORBA::ORBInvokeRec>::free
> (this=0x2aaaae28f770) at ../include/mico/template.h:139
>
> #70x00002aaaab681ec8 in ObjVar<CORBA::ORBInvokeRec>::~ObjVar
> (this=0x2aaaae28f770, __in_chrg=<optimized out>)
>
> at ../include/mico/template.h:74
>
> #80x00002aaaab72901b in MICO::IIOPProxy::handle_invoke_reply
> (this=0x685230, conn=0x6a6800, in=...) at iop.cc:4821
>
> #90x00002aaaab729716 in MICO::IIOPProxy::handle_input (this=0x685230,
> conn=0x6a6800, inp=0x6a80c0) at iop.cc:4985
>
> #10 0x00002aaaab729ddf in MICO::IIOPProxy::input_callback
> (this=0x685230, conn=0x6a6800, inp=0x6a80c0) at iop.cc:5061
>
> #11 0x00002aaaab730f6d in MICO::GIOPConn::input_ready_callback
> (this=0x6a6800, b=0x6a80c0) at ../include/mico/iop.h:582
>
> #12 0x00002aaaab71f331 in MICO::GIOPConn::input_ready (this=0x6a6800) at
> iop.cc:2639
>
> #13 0x00002aaaab720e02 in MICO::GIOPConn::do_read (this=0x6a6800,
> break_after_read=0 '\000') at iop.cc:2968
>
> #14 0x00002aaaab7212c5 in MICO::GIOPConn::callback (this=0x6a6800,
> ev=CORBA::TransportCallback::Read) at iop.cc:3020
>
> #15 0x00002aaaab70f56b in MICO::SocketTransport::callback
> (this=0x6a5e30, disp=0x6a6350, ev=CORBA::Dispatcher::Read)
>
> at transport.cc:213
>
> #16 0x00002aaaab6c6372 in MICO::SelectDispatcher::handle_fevents
> (this=0x6a6350, rset=..., wset=..., xset=...) at dispatch.cc:270
>
> #17 0x00002aaaab6c70b8 in MICO::SelectDispatcher::run (this=0x6a6350,
> infinite=0 '\000') at dispatch.cc:477
>
> #18 0x00002aaaab71d6e4 in MICO::GIOPConnReader::_run (this=0x6a6af0,
> arg=0x6a6af0) at iop.cc:2256
>
> #19 0x00002aaaab924bd7 in MICOMT::Thread::_thr_startup (this=0x6a6af0,
> arg=0x6a6af0) at os-thread/pthreads.cc:214
>
> #20 0x00002aaaab924b8f in MICOMT::Thread::ThreadWrapper (arg=0x6a6af0)
> at os-thread/pthreads.cc:194
>
> #21 0x00002aaaad0bf806 in start_thread () from /lib64/libpthread.so.0
>
> #22 0x00002aaaad3b367d in clone () from /lib64/libc.so.6
>
>
> Machine generated alternative text: - mico/orb/orb.cc - Eclipse File
> Edit Source Retactor Navigate Search project Pro]ect Explorer r
> optypes_cc or_cc ir base_cc ir_ppc_cpp ir-cc ltp address_cc ltp_lor_cc r
> memcheck_cc r memleaks_cc r memtrace_cc message_cc > messaging_impl_cc >
> messaging_cc r mt dispatcher_cc mt manager_cc r mtdeöug_cc > mtpollcy
> impl_cc > mtpollcy_cc > mttypes_cc r operation_cc orb all_cc orb
> excepts_cc orb_ppc_cpp > orb.cc os-ppc_cpp r os-thread_cc os-unlx_cc
> os-windows_cc pi_impl_cc pi_cc poa base_cc > poa_impl_cc poa_cc Run
> Window CosEvent 281 282 283 284 285 286 287 288 289 290 Help impl_c
> CosEventComm_cc target = Object: : duplicate (o) ; nil ; reg = CORBA: :
> ORBRequest: _principal Principal: : ( ) ; response expected = TRUE; addr
> adapter cb = callback; active = TRUE; gui_tcl ClientLiörary_t 2918 292
> 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
> 311 CORBA : : ORBInvokeRec : : —ORBInvokeRec o if caller needs the
> object then he CORBA: : release ( 0b') ; CORBA: : release ( target) ;
> CORBA: : release (_principal) ; / / reg is intentionally omitted here
> must as it to // For more information see comment next // declaration in
> orb mica. h duplicate ( ) it may be object allocated reg variable //
> CORBA: : release ( _ reg) ; CORBA: : release ( Sri) ; #ifdef HAVE
> THREADS if ( cb { // rrr CORBA: : ORBAsyncca11back• if (tmp cb ! = NULL)
> { delete cb ; #end i f tmp cb dynamic cast CORBA. 312" void CORBA: :
> ORBInvokeRec : . free 313 o target) ; allocated on on Notitler_tcl stack
> ! stack ! 314 { 315 316 317 318 319 320 321 322 323 324 325 326 327 328
> 329 330 331 332 333 mico/orb/orj CORBA: : release ( CORBA: : release (
> CORBA: : release (_principal) ; / / reg is intentionally omitted here as
> // For more information see comment next // declaration in orb mica. h
> // CORBA: : release ( _ reg) ; CORBA: : release ( Sri) ; if ( cb) delete
> cb ; have result = FALSE; type = Request Unknown ; target = O;
> _principal it to may be object reg variable reg act IV e FALSE ; NORMAL
> Writaöle Smart Insert 8 304 Computer charon-g0002 C/C++ _ [charon-
> g0002] outline @ Make Target El Task List orb_pch_h CORBA_h string_h
> ostream tstream iostream_h tstream_h m Ico/os-net_h mico/impl_h
> mico/ssl_h mico/watm_h mico/ltp_h mico/template_impl_h mico/util_h
> mico/dynany_impl_h mico/security/securitylevell _h
> mico/security/securityIeve12_impI_h mico/security/Auditlntercept_h
> mico/security/odm_impl_h mico/security/DomainManager_impI_h
> mico/security/s13pm_impl_h mico/security/securityleve13 impl_h
> mico/security/transportsecurlty impl_h mico/security/s13tcpip_impl_h
> mico/security/s13tls impl_h mico/security/s13csi impl_h
> mico/security/s13ipc_impl_h mico/process_impl_h m Ico/throw_h algorithm
> mico/memtrace_h •A Mon Mar S. 1258 PM a
>
--
Karel Gardas kg...@ob...
ObjectSecurity Ltd. http://www.objectsecurity.com
|
|
From: Milton <mil...@gm...> - 2017-09-24 11:23:18
|
Good morning everyone! I downloaded mico.2.3.13 and started the build on the macOS Sierra. I needed to make changes to the "configure" script and some source files. I discovered that the "-enable-threads" option generated code that aborted some "assert ()" calls. I switched to the "-disable-threads" option and the new build worked. I took advantage of an example given in "Advanced CORBA Programming with C ++" by Michi Henning and Steve Vinoski. Server performs and prints IOR; I copy this IOR and provide it on the client command line, which aborts with the message 'Uncaught CORBA exception: "IDL: omg.org/CORBA/COMM_FAILURE: 1.0 (0, not-completed)"'. On a virtual machine (on the same MacBook) with Ubuntu, I built the mico.2.3.13 and executed the same server and client, which worked without problem. I used the "iordump" to show the content of the IOR provided by the server: In the macOS Sierra: Repo Id: IDL: Time: 1.0 IIOP Profile Version: 1.0 Address: inet: 1.0.0.127.in-addr.arpa: 52406 Location: corbaloc :: 1.0.0.127.in-addr.arpa: 52406 // 22682/1506076299 /% 5f0 Key: 2f 32 32 36 38 32 2f 31 35 30 36 30 37 36 32 39/22682/150607629 39 2f 5f 30 9 / _0 Multiple Components Profile Components: Native Codesets: normal: ISO 8859-1: 1987; Latin Alphabet No. 1 wide: ISO / IEC 10646-1: 1993; UTF-16, UCS Transformation Format 16-bit form Key: (empty) In Ubuntu: Repo Id: IDL: Time: 1.0 IIOP Profile Version: 1.0 Address: inet: 127.0.1.1: 42257 Location: corbaloc :: 127.0.1.1: 42257 // 2796/1506251240 /% 5f0 Key: 2f 32 37 39 36 2f 31 35 30 36 32 35 31 32 34 30/2796/1506251240 2f 5f 30 / _0 Multiple Components Profile Components: Native Codesets: normal: ISO 8859-1: 1987; Latin Alphabet No. 1 wide: ISO / IEC 10646-1: 1993; UTF-16, UCS Transformation Format 16-bit form Key: (empty) Any idea of the cause of the bug in the macOS Sierra? Thank you, Milton. |
|
From: Michael H. <mic...@ss...> - 2016-08-25 13:02:07
|
Any thoughts so far? On 04/13/2015 11:01 AM, Michael Haubenwallner wrote: > Hi, > > as shown in https://bugs.gentoo.org/show_bug.cgi?id=544488 the file name of > MICO name service server "nsd" is in conflict with the "Name Service Daemon" > project http://www.nlnetlabs.nl/projects/nsd/ > > Question now is how to solve this conflict - the options I can see for now is: > *) Rename the Name Service Daemon project to something different. > *) Rename MICO "nsd" to "mico-nsd", plus optionally (build-time?) > keep symlink "nsd -> mico-nsd" for backwards compatibility. > > Using "nsd" for the "Name Service Daemon" project IMHO feels more natural than > for the "MICO name service server", where "mico-nsd" feels appropriate as well. > > Thoughts? > > Thanks! > /haubi/ |