We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment
Describe the bug
On current master branch (v2.5), on Linux, run:
master
meson setup tsan -Db_sanitize=thread ninja -Ctsan ./run tsan --no-audio
TSAN reports the following data race:
================== WARNING: ThreadSanitizer: data race (pid=3929379) Read of size 5 at 0x7b0800006c00 by thread T8: #0 strcmp <null> (scrcpy+0x5ee18) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #1 <null> <null> (libSDL2-2.0.so.0+0x35e83) (BuildId: 0fb7bbebd06b14aed999b59790f45986efc8fe9e) #2 sc_process_observer_init /home/rom/projects/scrcpy/t/../app/src/util/process.c:67:10 (scrcpy+0x112fdb) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #3 run_server /home/rom/projects/scrcpy/t/../app/src/server.c:987:10 (scrcpy+0x10a594) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #4 <null> <null> (libSDL2-2.0.so.0+0xa70d8) (BuildId: 0fb7bbebd06b14aed999b59790f45986efc8fe9e) Previous write of size 8 at 0x7b0800006c00 by main thread: #0 memcpy <null> (scrcpy+0x60fd4) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #1 <null> <null> (libSDL2-2.0.so.0+0xa6421) (BuildId: 0fb7bbebd06b14aed999b59790f45986efc8fe9e) #2 main_scrcpy /home/rom/projects/scrcpy/t/../app/src/main.c:88:52 (scrcpy+0xdc79c) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #3 main /home/rom/projects/scrcpy/t/../app/src/main.c:107:12 (scrcpy+0xdc628) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) Location is heap block of size 27 at 0x7b0800006c00 allocated by main thread: #0 malloc <null> (scrcpy+0x53010) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #1 <null> <null> (libSDL2-2.0.so.0+0xa5896) (BuildId: 0fb7bbebd06b14aed999b59790f45986efc8fe9e) #2 main_scrcpy /home/rom/projects/scrcpy/t/../app/src/main.c:88:52 (scrcpy+0xdc79c) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #3 main /home/rom/projects/scrcpy/t/../app/src/main.c:107:12 (scrcpy+0xdc628) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) Thread T8 'scrcpy-server' (tid=3929388, running) created by main thread at: #0 pthread_create <null> (scrcpy+0x54d8f) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #1 <null> <null> (libSDL2-2.0.so.0+0x15147e) (BuildId: 0fb7bbebd06b14aed999b59790f45986efc8fe9e) #2 sc_server_start /home/rom/projects/scrcpy/t/../app/src/server.c:1067:9 (scrcpy+0x109bee) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #3 scrcpy /home/rom/projects/scrcpy/t/../app/src/scrcpy.c:430:10 (scrcpy+0x101f2e) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #4 main_scrcpy /home/rom/projects/scrcpy/t/../app/src/main.c:88:52 (scrcpy+0xdc79c) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) #5 main /home/rom/projects/scrcpy/t/../app/src/main.c:107:12 (scrcpy+0xdc628) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) SUMMARY: ThreadSanitizer: data race (/home/rom/projects/scrcpy/t/app/scrcpy+0x5ee18) (BuildId: f25f1d9d4465c158a50a2cbaa67900ae7da71ddc) in strcmp ==================
I investigated, but I cannot understand why. I don't know if it comes from SDL or from scrcpy.
If this call does not create a new SDL thread, then the data race disappears:
scrcpy/app/src/server.c
Line 987 in a8871bf
But if it creates a thread and the thread function does nothing, a data race is still reported.
If someone finds the cause, I'm interested 😉
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Describe the bug
On current
master
branch (v2.5), on Linux, run:TSAN reports the following data race:
I investigated, but I cannot understand why. I don't know if it comes from SDL or from scrcpy.
If this call does not create a new SDL thread, then the data race disappears:
scrcpy/app/src/server.c
Line 987 in a8871bf
But if it creates a thread and the thread function does nothing, a data race is still reported.
If someone finds the cause, I'm interested 😉
The text was updated successfully, but these errors were encountered: