From: Nicolas P. <npa...@wy...> - 2008-11-20 14:47:55
|
On Thursday 20 November 2008 12:43:16 P. Durante wrote: > Hi Nicolas, > > On Thu, Nov 20, 2008 at 10:22 AM, Nicolas Parcollet > > <npa...@wy...> wrote: > > I everybody. I m occasionnaly working with DBus C++ and pushing it to its > > highest limits. > > that's very much needed and very appreciated, thanks > > > The following traces show a failure condition that happens sometime when > > I ran a very long test making heavy use of DBus C++. The program contains > > one adaptor and several proxies. It is a threaded environment. > > > > Program received signal SIGBUS, Bus error. > > [Switching to thread 1546] > > 0x004178c8 in DBus::RefCnt::noref (this=0x45c4a8) > > at > > /usr/targets/081119-1.1.13-debug/root/usr/include/dbus-c++-1/dbus-c++/uti > >l.h:72 72 return (*__ref) == 0; > > (gdb) > > Continuing. > > Program terminated with signal SIGBUS, Bus error. > > The program no longer exists. > > (gdb) > > > > It seems the the ref counter is broken. This is probably due to a race > > condition between unref/noref but it is still quite blur for me. From > > what i saw the ref counting sytem is not thread safe. Any idea how this > > could be solved? > > off the top of my head, the reference counting variable should be > declared 'volatile', after that the compiler should be smart enough to > use atomic intrinsics when incrementing/decrementing the counter, i'll > change that now > I will try the volatile solution since i need a quick fix. Beside this, I got some more infos. I don't see where the operator!= comes from. (gdb) info threads * 1 thread 2022 0x004177c0 in DBus::RefCnt::noref (this=0x45c4a8) at /usr/targets/081119-1.1.13-debug/root/usr/include/dbus-c++-1/dbus-c++/util.h:72 (gdb) bt #0 0x004177c0 in DBus::RefCnt::noref (this=0x45c4a8) at /usr/targets/081119-1.1.13-debug/root/usr/include/dbus-c++-1/dbus-c++/util.h:72 #1 0x29678026 in __gnu_cxx::operator!=<std::string*, std::vector<std::string, std::allocator<std::string> > > () from /usr/targets/current/root/usr/lib/libdbus-c++-1.so.0 #2 0x2967807c in __gnu_cxx::operator!=<std::string*, std::vector<std::string, std::allocator<std::string> > > () from /usr/targets/current/root/usr/lib/libdbus-c++-1.so.0 #3 0x7bc87cd8 in ?? () #4 0x7bc87cd8 in ?? () (gdb) print this->__ref $8 = (int *) 0x6433f379 (gdb) print *(this->__ref) Cannot access memory at address 0x6433f379 > > I am working with version 0.5 (AC_INIT([libdbus-c++], 0.5.0, > > [sh...@gm...])). Since the ChangeLog is not up to date i can't > > figure out if something like that was fixed or not, so I need your help. > > due to lack of active maintainership (blame me), there has never been > an official release, 0.5.0 could refer to any git snapshot taken in > the past months, I recommend using the latest source from freedesktop > git clone git://anongit.freedesktop.org/git/dbus/dbus-c++/ > It is actually a version of november 2007. Not sure it was on freedesktop already. Unfortunately i can't change the version like that. > > Thanks a lot. > > > > Nico P. > > thank you, > Paolo Anyway thanks for your fast reply. Nico P. ---- This message contains confidential information and may contain information that is legally privileged. If you have received this message by mistake, please immediately notify us and delete the original message. Thank you. Ce message contient des informations confidentielles. S'il vous est parvenu par erreur, merci de bien vouloir nous en aviser par retour, de n'en faire aucun usage et de n'en garder aucune copie. ---- |