|
|
Home » Community » U++ community news and announcements » ide: Assist parsing now parallel and some of it background
Re: ide: Assist parsing now parallel and some of it background [message #54329 is a reply to message #54325] |
Tue, 23 June 2020 15:24 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Tue, 23 June 2020 04:54
I am trying to decipher that, but so far it _looks_ like races in GTK. Or maybe false reports of races in GTK...
IMHO, it is very unlikely that GTK has races. Maybe, it just requires extra-synchronization ...
ThreadSanitizer can check only code, compiled with ThreadSanitizer. That means it cannot see any problems with GTK ...
Valgrind-based tools can. Helgrind, for example, reports tons of this:
==1004525== Possible data race during read of size 4 at 0x6C47A60 by thread #4
==1004525== Locks held: none
==1004525== at 0x5BD9D45: g_private_get (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x5B895CF: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x5B8C17C: g_main_current_source (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x59AF34E: g_task_new (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5A18C71: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5A18DAF: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5A18E61: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5B8CE8D: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x5B8D23F: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x5B8D532: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x5A18E99: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5BB6930: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== Address 0x6c47a60 is 0 bytes inside a block of size 4 alloc'd
==1004525== at 0x483C893: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_helgrind-amd64-linux.so)
==1004525== by 0x5BD9743: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x5BD9D63: g_private_get (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x5B895CF: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x5B8C17C: g_main_current_source (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x59AF34E: g_task_new (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5A05E7A: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5A09BEC: g_dbus_connection_send_message_with_reply (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5A0A4DA: g_dbus_connection_send_message_with_reply_sync (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5A0A8DE: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5A0C8C6: g_dbus_connection_call_sync (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5A0CB65: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== Block was alloc'd by thread #1
==1004525==
==1004525== ----------------------------------------------------------------
==1004525==
==1004525== Lock at 0x14AD088 was first observed
==1004525== at 0x4843D9D: pthread_mutex_init (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_helgrind-amd64-linux.so)
==1004525== by 0x8DFF18: Upp::Mutex::Mutex() (Mt.cpp:601)
==1004525== by 0x6AB669: Upp::StaticPrimitive_<Upp::Mutex>::Initialize() (Mt.h:313)
==1004525== by 0x6AB5E4: Upp::StaticPrimitive_<Upp::Mutex>::Get() (Mt.h:316)
==1004525== by 0x6A7A67: Upp::StaticMutex::Enter() (Core/Mt.h:323)
==1004525== by 0xCBC9A0: Upp::EnterGuiMutex() (CtrlMt.cpp:15)
==1004525== by 0x678070: Upp::GuiLock::GuiLock() (CtrlCore/CtrlCore.h:66)
==1004525== by 0xCC4274: Upp::Ctrl::InstallKeyHook(bool (*)(Upp::Ctrl*, unsigned int, int)) (Ctrl.cpp:712)
==1004525== by 0x7807B2: Upp::s__sF29_328_fn() (MenuBar.cpp:330)
==1004525== by 0x518D75: Upp::Callinit::Callinit(void (*)(), char const*, int) (Core/Defs.h:86)
==1004525== by 0x410D2B: __cxx_global_var_init.120 (MenuBar.cpp:328)
==1004525== by 0x411700: _GLOBAL__sub_I_CtrlLib_blitz.cpp (CtrlLib$blitz.cpp:0)
==1004525== Address 0x14ad088 is 8 bytes inside data symbol "_ZN3UppL6sGLockE"
==1004525==
==1004525== Lock at 0x6C1AC70 was first observed
==1004525== at 0x4843D9D: pthread_mutex_init (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_helgrind-amd64-linux.so)
==1004525== by 0x5BD993D: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x5BD9A17: g_rec_mutex_lock (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x597BAC6: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5965681: g_file_new_for_path (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x4EF9BCB: gtk_css_provider_load_from_path (in /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.2404.14)
==1004525== by 0x4EF9F07: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.2404.14)
==1004525== by 0x503A30A: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.2404.14)
==1004525== by 0x503D944: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.2404.14)
==1004525== by 0x7D5D80: Upp::GtkSettingsString(char const*) (ChGtk3.cpp:24)
==1004525== by 0x7D5E6E: Upp::SetupFont() (ChGtk3.cpp:35)
==1004525== by 0x7D283F: Upp::ChHostSkin() (ChGtk3.cpp:285)
==1004525== Address 0x6c1ac70 is 0 bytes inside a block of size 40 alloc'd
==1004525== at 0x483C893: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_helgrind-amd64-linux.so)
==1004525== by 0x5BD9910: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x5BD9A17: g_rec_mutex_lock (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6400.2)
==1004525== by 0x597BAC6: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x5965681: g_file_new_for_path (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6400.2)
==1004525== by 0x4EF9BCB: gtk_css_provider_load_from_path (in /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.2404.14)
==1004525== by 0x4EF9F07: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.2404.14)
==1004525== by 0x503A30A: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.2404.14)
==1004525== by 0x503D944: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.2404.14)
==1004525== by 0x7D5D80: Upp::GtkSettingsString(char const*) (ChGtk3.cpp:24)
==1004525== by 0x7D5E6E: Upp::SetupFont() (ChGtk3.cpp:35)
==1004525== by 0x7D283F: Upp::ChHostSkin() (ChGtk3.cpp:285)
==1004525== Block was alloc'd by thread #1
DRD, on other side, reports a lot of problems with GTK itself, but Upp (on startup).
The only Upp-related error I saw so far is this:
==1005305== Probably a race condition: condition variable 0x1484d88 has been signaled but the associated mutex 0x1484d60 is not locked by the signalling thread.
==1005305== at 0x48487EB: pthread_cond_broadcast@* (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_drd-amd64-linux.so)
==1005305== by 0x97DEF4: Upp::ConditionVariable::Broadcast() (Mt.h:265)
==1005305== by 0x94AD20: Upp::CoWork::Pool::ExitThreads() (CoWork.cpp:39)
==1005305== by 0x94B0FC: Upp::CoWork::Pool::~Pool() (CoWork.cpp:71)
==1005305== by 0x60AEA26: __run_exit_handlers (exit.c:108)
==1005305== by 0x60AEBDF: exit (exit.c:139)
==1005305== by 0x608C0B9: (below main) (libc-start.c:342)
==1005305== cond 0x1484d88 was first observed at:
==1005305== at 0x4846F6B: pthread_cond_init@* (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_drd-amd64-linux.so)
==1005305== by 0x97E0B8: Upp::ConditionVariable::ConditionVariable() (Mt.h:267)
==1005305== by 0x94AEDB: Upp::CoWork::Pool::Pool() (CoWork.cpp:54)
==1005305== by 0x94AAA7: Upp::CoWork::GetPool() (CoWork.cpp:17)
==1005305== by 0x94BBE8: Upp::CoWork::Finish() (CoWork.cpp:287)
==1005305== by 0xC2F2AD: Upp::BufferPainter::FinishFillJob() (BufferPainter.h:296)
==1005305== by 0xC109C4: Upp::BufferPainter::Finish() (Render.cpp:450)
==1005305== by 0x7FFD80: Upp::ImagePainter::GetResult() (Painter/Painter.h:376)
==1005305== by 0x7F2012: Upp::ImagePainter::operator Upp::Image() (Painter/Painter.h:377)
==1005305== by 0x7CBD0D: Upp::MakeElement(Upp::Size_<int>, double, Upp::Image const&, double, Upp::Color, Upp::Function<void (Upp::Painter&, Upp::Rect_<double> const&)>) (Ch.cpp:281)
==1005305== by 0x7CBFB7: Upp::MakeButton(int, Upp::Image const&, double, Upp::Color, unsigned int) (Ch.cpp:290)
==1005305== by 0x7C8391: Upp::MakeButton(int, Upp::Color, double, Upp::Color, unsigned int) (Ch.cpp:297)
==1005305== mutex 0x1484d60 was first observed at:
==1005305== at 0x4844C36: pthread_mutex_init (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_drd-amd64-linux.so)
==1005305== by 0x8DFF18: Upp::Mutex::Mutex() (Mt.cpp:601)
==1005305== by 0x94AEC0: Upp::CoWork::Pool::Pool() (CoWork.cpp:54)
==1005305== by 0x94AAA7: Upp::CoWork::GetPool() (CoWork.cpp:17)
==1005305== by 0x94BBE8: Upp::CoWork::Finish() (CoWork.cpp:287)
==1005305== by 0xC2F2AD: Upp::BufferPainter::FinishFillJob() (BufferPainter.h:296)
==1005305== by 0xC109C4: Upp::BufferPainter::Finish() (Render.cpp:450)
==1005305== by 0x7FFD80: Upp::ImagePainter::GetResult() (Painter/Painter.h:376)
==1005305== by 0x7F2012: Upp::ImagePainter::operator Upp::Image() (Painter/Painter.h:377)
==1005305== by 0x7CBD0D: Upp::MakeElement(Upp::Size_<int>, double, Upp::Image const&, double, Upp::Color, Upp::Function<void (Upp::Painter&, Upp::Rect_<double> const&)>) (Ch.cpp:281)
==1005305== by 0x7CBFB7: Upp::MakeButton(int, Upp::Image const&, double, Upp::Color, unsigned int) (Ch.cpp:290)
==1005305== by 0x7C8391: Upp::MakeButton(int, Upp::Color, double, Upp::Color, unsigned int) (Ch.cpp:297)
Regards,
Novo
|
|
|
|
|
ide: Assist parsing now parallel and some of it background
By: mirek on Mon, 22 June 2020 16:08
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: Novo on Mon, 22 June 2020 16:34
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: mirek on Mon, 22 June 2020 17:13
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: Novo on Mon, 22 June 2020 17:23
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: Novo on Mon, 22 June 2020 19:34
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: Novo on Mon, 22 June 2020 22:44
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: mirek on Tue, 23 June 2020 10:01
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: Novo on Tue, 23 June 2020 14:29
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: mirek on Tue, 23 June 2020 15:17
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: Novo on Tue, 23 June 2020 19:43
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: Novo on Tue, 23 June 2020 19:56
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: mirek on Tue, 23 June 2020 10:54
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: Novo on Tue, 23 June 2020 15:24
|
|
|
Re: ide: Assist parsing now parallel and some of it background
By: mirek on Tue, 23 June 2020 17:02
|
Goto Forum:
Current Time: Wed May 15 03:33:13 CEST 2024
Total time taken to generate the page: 0.02558 seconds
|
|
|