Re: [PATCH 1/1] dix: Silence TSan warnings when checking for pending input
Jeremy Huddleston Sequoia writes: > Ok, sent update for a final r-b. Done. > This also requires an updated release of xproto for the macros. I > sent that series out a few days ago but haven't had a review yet. Done. > Are there any other changes to xproto that might be useful to make at > the same time? If not, I'll tag and release xproto once I get > feedback on the xproto series. I'd say that anything which is ready should be on master, so go ahead and release at will. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 1/1] dix: Silence TSan warnings when checking for pending input
Jeremy Huddleston Sequoia writes: > V2: Moves InputCheckPending() into dix.h > > Bumps required version of xproto to 7.0.30 LGTM. Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 1/1] dix: Silence TSan warnings when checking for pending input
> On Sep 22, 2016, at 11:26, Keith Packard wrote: > > Jeremy Huddleston Sequoia writes: > >> I would've but we're post API freeze at this point, yes? Would that be ok? > > Yeah, better than duplicating, and it doesn't affect the actual ABI/API > seen to drivers. Ok, sent update for a final r-b. This also requires an updated release of xproto for the macros. I sent that series out a few days ago but haven't had a review yet. Are there any other changes to xproto that might be useful to make at the same time? If not, I'll tag and release xproto once I get feedback on the xproto series. Thanks, Jeremy smime.p7s Description: S/MIME cryptographic signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 1/1] dix: Silence TSan warnings when checking for pending input
V2: Moves InputCheckPending() into dix.h Bumps required version of xproto to 7.0.30 == WARNING: ThreadSanitizer: data race (pid=4943) Read of size 4 at 0x00010c4e3854 by thread T8: #0 WaitForSomething WaitFor.c:237 (X11.bin+0x00010049216c) #1 Dispatch dispatch.c:413 (X11.bin+0x000100352ed9) #2 dix_main main.c:287 (X11.bin+0x00010036e894) #3 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) Previous write of size 4 at 0x00010c4e3854 by thread T12 (mutexes: write M856, write M1976): #0 mieqEnqueue mieq.c:263 (X11.bin+0x000100448d14) #1 DarwinSendDDXEvent darwinEvents.c:641 (X11.bin+0x000100033613) #2 DarwinProcessFDAdditionQueue_thread darwinEvents.c:338 (X11.bin+0x000100032039) Location is global 'miEventQueue' at 0x00010c4e3850 (X11.bin+0x0001005ab854) Mutex M856 (0x00010c4c8c80) created at: #0 pthread_mutex_lock :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000321fe) #1 DarwinListenOnOpenFD darwinEvents.c:300 (X11.bin+0x000100031607) #2 socket_handoff bundle-main.c:288 (X11.bin+0x00012b40) #3 __do_request_fd_handoff_socket_block_invoke bundle-main.c:379 (X11.bin+0x000129ba) #4 __tsan::invoke_and_release_block(void*) :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0005d97b) #5 _dispatch_client_callout :33 (libdispatch.dylib+0x20ef) Mutex M1976 (0x00010c4e3d68) created at: #0 pthread_mutex_init :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000253c3) #1 input_lock inputthread.c:103 (X11.bin+0x00010049fd10) #2 TimerSet WaitFor.c:343 (X11.bin+0x0001004926c2) #3 RootlessQueueRedisplay rootlessScreen.c:594 (X11.bin+0x000100065d7f) #4 RootlessInstallColormap rootlessScreen.c:514 (X11.bin+0x000100069f1a) #5 miSpriteInstallColormap misprite.c:562 (X11.bin+0x000100467095) #6 miCreateDefColormap micmap.c:270 (X11.bin+0x000100440399) #7 DarwinScreenInit darwin.c:285 (X11.bin+0x0001000303bb) #8 AddScreen dispatch.c:3908 (X11.bin+0x00010036c417) #9 InitOutput darwin.c:671 (X11.bin+0x00010002fdeb) #10 dix_main main.c:197 (X11.bin+0x00010036e228) #11 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) Thread T8 (tid=4198779, running) created by main thread at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x00024490) #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039dad) #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039c16) #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cde4) #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a642) #5 server_main quartzStartup.c:136 (X11.bin+0x00010003a03b) #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x00012eb5) #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x00014e99) #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x00015734) #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x00012186) #10 start :29 (libdyld.dylib+0x5254) Thread T12 (tid=4198797, running) created by thread T8 at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x00024490) #1 create_thread darwinEvents.c:121 (X11.bin+0x000100031ecf) #2 DarwinEQInit darwinEvents.c:365 (X11.bin+0x000100031860) #3 InitInput darwin.c:571 (X11.bin+0x00010002ea09) #4 dix_main main.c:261 (X11.bin+0x00010036e7ce) #5 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) SUMMARY: ThreadSanitizer: data race WaitFor.c:237 in WaitForSomething == == WARNING: ThreadSanitizer: data race (pid=22841) Write of size 4 at 0x000105bbd864 by main thread (mutexes: write M1945): #0 mieqEnqueue mieq.c:263 (X11.bin+0x000100448cf4) #1 DarwinSendDDXEvent darwinEvents.c:642 (X11.bin+0x000100033693) #2 -[X11Controller set_window_menu:] X11Controller.m:275 (X11.bin+0x0001000222fd) #3 -[X11Application set_window_menu:] X11Application.m:486 (X11.bin+0x000100018b44) #4 -[X11Application handleMachMessage:] X11Application.m:177 (X11.bin+0x000100016678) #5 __NSFireMachPort :69 (Foundation+0x0009b62b) #6 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5f2) #7 server_main quartzStartup.c:136 (X11.bin+0x000100039ffb) #8 do_start_x11_server bundle-main.c:436 (X11.bin+0x00012e65) #9 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x00014e49) #10 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000156e4) #11 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x00012186) #12 start :29 (libdyld.dylib+0x5254) Previous read of size 4 at 0x000105bbd864 by thread T7: #0 Dispatch dispatch.c:434 (X11.bin+0x000100352fc8) #1 dix_main main.c:287 (X11.bin+0x00010036e874) #2 server_thread quartzStartup.c:66 (X11.bin+0x000100039e23) Location is global 'miEventQueue' at 0x000105bbd860 (X11.bin+0x0001005ab864) Mutex M1945 (0x000105bbdd78) created at: #0 pthr
Re: [PATCH 1/1] dix: Silence TSan warnings when checking for pending input
Jeremy Huddleston Sequoia writes: > I would've but we're post API freeze at this point, yes? Would that be ok? Yeah, better than duplicating, and it doesn't affect the actual ABI/API seen to drivers. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 1/1] dix: Silence TSan warnings when checking for pending input
> On Sep 22, 2016, at 00:22, Keith Packard wrote: > > Jeremy Huddleston Sequoia writes: > >> +static inline _X_NOTSAN Bool >> +InputCheckPending(void) >> +{ >> +return (*checkForInput[0] != *checkForInput[1]); >> +} > >> +static inline _X_NOTSAN Bool >> +InputCheckPending(void) >> +{ >> +return (*checkForInput[0] != *checkForInput[1]); >> +} > > You should stick this in dix.h, or some other suitable header > file. I would've but we're post API freeze at this point, yes? Would that be ok? smime.p7s Description: S/MIME cryptographic signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 1/1] dix: Silence TSan warnings when checking for pending input
Jeremy Huddleston Sequoia writes: > +static inline _X_NOTSAN Bool > +InputCheckPending(void) > +{ > +return (*checkForInput[0] != *checkForInput[1]); > +} > +static inline _X_NOTSAN Bool > +InputCheckPending(void) > +{ > +return (*checkForInput[0] != *checkForInput[1]); > +} You should stick this in dix.h, or some other suitable header file. Otherwise, this looks good. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 1/1] dix: Silence TSan warnings when checking for pending input
Bumps required version of xproto to 7.0.30 == WARNING: ThreadSanitizer: data race (pid=4943) Read of size 4 at 0x00010c4e3854 by thread T8: #0 WaitForSomething WaitFor.c:237 (X11.bin+0x00010049216c) #1 Dispatch dispatch.c:413 (X11.bin+0x000100352ed9) #2 dix_main main.c:287 (X11.bin+0x00010036e894) #3 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) Previous write of size 4 at 0x00010c4e3854 by thread T12 (mutexes: write M856, write M1976): #0 mieqEnqueue mieq.c:263 (X11.bin+0x000100448d14) #1 DarwinSendDDXEvent darwinEvents.c:641 (X11.bin+0x000100033613) #2 DarwinProcessFDAdditionQueue_thread darwinEvents.c:338 (X11.bin+0x000100032039) Location is global 'miEventQueue' at 0x00010c4e3850 (X11.bin+0x0001005ab854) Mutex M856 (0x00010c4c8c80) created at: #0 pthread_mutex_lock :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000321fe) #1 DarwinListenOnOpenFD darwinEvents.c:300 (X11.bin+0x000100031607) #2 socket_handoff bundle-main.c:288 (X11.bin+0x00012b40) #3 __do_request_fd_handoff_socket_block_invoke bundle-main.c:379 (X11.bin+0x000129ba) #4 __tsan::invoke_and_release_block(void*) :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0005d97b) #5 _dispatch_client_callout :33 (libdispatch.dylib+0x20ef) Mutex M1976 (0x00010c4e3d68) created at: #0 pthread_mutex_init :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000253c3) #1 input_lock inputthread.c:103 (X11.bin+0x00010049fd10) #2 TimerSet WaitFor.c:343 (X11.bin+0x0001004926c2) #3 RootlessQueueRedisplay rootlessScreen.c:594 (X11.bin+0x000100065d7f) #4 RootlessInstallColormap rootlessScreen.c:514 (X11.bin+0x000100069f1a) #5 miSpriteInstallColormap misprite.c:562 (X11.bin+0x000100467095) #6 miCreateDefColormap micmap.c:270 (X11.bin+0x000100440399) #7 DarwinScreenInit darwin.c:285 (X11.bin+0x0001000303bb) #8 AddScreen dispatch.c:3908 (X11.bin+0x00010036c417) #9 InitOutput darwin.c:671 (X11.bin+0x00010002fdeb) #10 dix_main main.c:197 (X11.bin+0x00010036e228) #11 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) Thread T8 (tid=4198779, running) created by main thread at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x00024490) #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039dad) #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039c16) #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cde4) #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a642) #5 server_main quartzStartup.c:136 (X11.bin+0x00010003a03b) #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x00012eb5) #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x00014e99) #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x00015734) #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x00012186) #10 start :29 (libdyld.dylib+0x5254) Thread T12 (tid=4198797, running) created by thread T8 at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x00024490) #1 create_thread darwinEvents.c:121 (X11.bin+0x000100031ecf) #2 DarwinEQInit darwinEvents.c:365 (X11.bin+0x000100031860) #3 InitInput darwin.c:571 (X11.bin+0x00010002ea09) #4 dix_main main.c:261 (X11.bin+0x00010036e7ce) #5 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) SUMMARY: ThreadSanitizer: data race WaitFor.c:237 in WaitForSomething == == WARNING: ThreadSanitizer: data race (pid=22841) Write of size 4 at 0x000105bbd864 by main thread (mutexes: write M1945): #0 mieqEnqueue mieq.c:263 (X11.bin+0x000100448cf4) #1 DarwinSendDDXEvent darwinEvents.c:642 (X11.bin+0x000100033693) #2 -[X11Controller set_window_menu:] X11Controller.m:275 (X11.bin+0x0001000222fd) #3 -[X11Application set_window_menu:] X11Application.m:486 (X11.bin+0x000100018b44) #4 -[X11Application handleMachMessage:] X11Application.m:177 (X11.bin+0x000100016678) #5 __NSFireMachPort :69 (Foundation+0x0009b62b) #6 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5f2) #7 server_main quartzStartup.c:136 (X11.bin+0x000100039ffb) #8 do_start_x11_server bundle-main.c:436 (X11.bin+0x00012e65) #9 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x00014e49) #10 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000156e4) #11 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x00012186) #12 start :29 (libdyld.dylib+0x5254) Previous read of size 4 at 0x000105bbd864 by thread T7: #0 Dispatch dispatch.c:434 (X11.bin+0x000100352fc8) #1 dix_main main.c:287 (X11.bin+0x00010036e874) #2 server_thread quartzStartup.c:66 (X11.bin+0x000100039e23) Location is global 'miEventQueue' at 0x000105bbd860 (X11.bin+0x0001005ab864) Mutex M1945 (0x000105bbdd78) created at: #0 pthread_mutex_init :144 (libclang_rt.tsan_osx