Skip to content

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

Open
rurban opened this Issue Jan 5, 2013 · 2 comments

2 participants

@rurban
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/gen_version.pl >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 (libparrot.so.4.11.0+0x000000adbd24)
    #2 Parrot_cx_init_scheduler /usr/src/parrot/test/src/scheduler.c:73 (libparrot.so.4.11.0+0x000000da7be3)
    #3 Parrot_interp_initialize_interpreter /usr/src/parrot/test/src/interp/api.c:337 (libparrot.so.4.11.0+0x000000be7239)
    #4 Parrot_api_make_interpreter /usr/src/parrot/test/src/embed/api.c:155 (libparrot.so.4.11.0+0x000000a6e485)
    #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.
See http://code.google.com/p/thread-sanitizer/wiki/Flags

@rurban rurban was assigned Jan 5, 2013
@leto
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.

@rurban
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.