Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 #54330 is a reply to message #54329] Tue, 23 June 2020 17:02 Go to previous message
mirek is currently offline  mirek
Messages: 14256
Registered: November 2005
Ultimate Member
Novo wrote on Tue, 23 June 2020 15:24
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 ...


Well, the first error reported by sanitizer

==================
WARNING: ThreadSanitizer: data race (pid=27062)
  Read of size 8 at 0x7b04000096a0 by thread T1:
    #0 strlen <null> (libtsan.so.0+0x31275)
    #1 pthread_setname_np ../sysdeps/unix/sysv/linux/pthread_setname.c:38 (libpthread.so.0+0x1391c)
    #2 <null> <null> (libglib-2.0.so.0+0x7415d)

  Previous write of size 8 at 0x7b04000096a0 by main thread (mutexes: write M505):
    #0 malloc <null> (libtsan.so.0+0x2ae03)
    #1 g_malloc <null> (libglib-2.0.so.0+0x51ab8)
    #2 main /home/cxl/upp.src/uppsrc/ide/main.cpp:120 (debugide+0x51ee31)

  Location is heap block of size 13 at 0x7b04000096a0 allocated by main thread:
    #0 malloc <null> (libtsan.so.0+0x2ae03)
    #1 g_malloc <null> (libglib-2.0.so.0+0x51ab8)
    #2 main /home/cxl/upp.src/uppsrc/ide/main.cpp:120 (debugide+0x51ee31)

  Mutex M505 (0x000001f35198) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x2c5ad)
    #1 Mutex /home/cxl/upp.src/uppsrc/Core/Mt.cpp:601 (debugide+0xbc27ac)
    #2 Upp::StaticPrimitive_<Upp::Mutex>::Initialize() /home/cxl/upp.src/uppsrc/Core/Mt.h:313 (debugide+0x81c9ca)
    #3 Upp::StaticPrimitive_<Upp::Mutex>::Get() /home/cxl/upp.src/uppsrc/Core/Mt.h:316 (debugide+0x81c901)
    #4 Upp::StaticMutex::Enter() /home/cxl/upp.src/uppsrc/Core/Mt.h:323 (debugide+0x816818)
    #5 Upp::EnterGuiMutex() /home/cxl/upp.src/uppsrc/CtrlCore/CtrlMt.cpp:15 (debugide+0x12d2658)
    #6 GuiLock /home/cxl/upp.src/uppsrc/CtrlCore/CtrlCore.h:66 (debugide+0x7d5614)
    #7 Upp::Ctrl::InstallKeyHook(bool (*)(Upp::Ctrl*, unsigned int, int)) /home/cxl/upp.src/uppsrc/CtrlCore/Ctrl.cpp:712 (debugide+0x12de181)
    #8 Upp::s__sF29_328_fn() /home/cxl/upp.src/uppsrc/CtrlLib/MenuBar.cpp:330 (debugide+0x97a71c)
    #9 Callinit /home/cxl/upp.src/uppsrc/Core/Defs.h:86 (debugide+0x583742)
    #10 __cxx_global_var_init.120 /home/cxl/upp.src/uppsrc/CtrlLib/MenuBar.cpp:328 (debugide+0x41311f)
    #11 _GLOBAL__sub_I_CtrlLib_blitz.cpp /home/cxl/.cache/upp.out/uppsrc/CtrlLib/CLANG_TS.Debug.Debug_Full.Gui.Shared/CtrlLib$blitz.cpp (debugide+0x413fc5)
    #12 __libc_csu_init <null> (debugide+0x154e76c)

  Thread T1 'dconf worker' (tid=27064, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x2bcee)
    #1 <null> <null> (libglib-2.0.so.0+0x9240f)
    #2 main /home/cxl/upp.src/uppsrc/ide/main.cpp:120 (debugide+0x51ee31)

SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x31275) in __interceptor_strlen


This looks like "dconf worker", which I think is DBus related, is trying to set the name of thread to a value set by main gtk thread and passed by the heap. The only U++ code referenced is our locked mutex, which is really only listed because it is being locked at the same time...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Variadic templates helper functions
Next Topic: get_i
Goto Forum:
  


Current Time: Wed Apr 30 03:34:10 CEST 2025

Total time taken to generate the page: 0.00712 seconds