Skip to content

thread leaks (non-joined) reported by ThreadSanitizer #915

rurban opened this Issue Jan 5, 2013 · 2 comments

2 participants

Parrot Virtual Machine member
rurban commented Jan 5, 2013

The alarm thread leaks, is not joined. We might want join it, or suppress these warnings.

Recent clang 3.3 (trunk 171626)

clang -o miniparrot frontend/parrot/main.o src/null_config.o src/longopt.o \
    "-Wl,-rpath=/home/rurban/Perl/parrot/test/blib/lib" -L"/home/rurban/Perl/parrot/test/blib/lib" \
    -lparrot -L/usr/lib  -licuuc -licudata  -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp -lreadline  -lffi \
   -pie -fsanitize=undefined -fsanitize=thread -fstack-protector -L/usr/local/lib -Wl,-E    
perl tools/build/ >runtime/parrot/include/parrot_version.pir
./miniparrot -Iruntime/parrot/include config_lib.pir > runtime/parrot/include/config.fpmc
==1687== WARNING: Program is run with unlimited stack size, which wouldn't work with ThreadSanitizer.
==1687== Re-execing with stack size limited to 33554432 bytes.
WARNING: ThreadSanitizer: thread leak (pid=1687)
  Thread T1 (tid=1688, running) created by main thread at:
    #0 pthread_create ??:0 (exe+0x00000002eb8a)
    #1 Parrot_alarm_init /usr/src/parrot/test/src/alarm.c:61 (
    #2 Parrot_cx_init_scheduler /usr/src/parrot/test/src/scheduler.c:73 (
    #3 Parrot_interp_initialize_interpreter /usr/src/parrot/test/src/interp/api.c:337 (
    #4 Parrot_api_make_interpreter /usr/src/parrot/test/src/embed/api.c:155 (
    #5 main /usr/src/parrot/test/frontend/parrot/main.c:178 (exe+0x000000016a84)

ThreadSanitizer: reported 1 warnings
make: *** [runtime/parrot/include/config.fpmc] Error 66

export TSAN_OPTIONS="report_thread_leaks=0" would suppress this warning.

@rurban rurban was assigned Jan 5, 2013
Parrot Virtual Machine member
leto commented Jan 5, 2013

@rurban Can you explain what "is not joined" means? I don't quite understand the terminology.

Parrot Virtual Machine member
rurban commented Jan 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.