plasma-umass / coz

Coz: Causal Profiling
Other
4.09k stars 159 forks source link

Fail to profile unstripped vlc in Debian testing #89

Open petterreinholdtsen opened 7 years ago

petterreinholdtsen commented 7 years ago

Hi. As a test, I just tried to profile vlc in Debian. This did not work, and I am not sure why. I rebuilt the vlc Debian package using 'DEB_BUILD_OPTIONS=nostrip apt-get source -b vlc' to make sure the debug symbols remained in the binaries, and started the profiling using 'coz run --- vlc http://video.nuug.no:8000/frikanalen.webm'. It showed a window for a fraction of a second before exiting. This is the output on the tty:

[libcoz.cpp:100] bootstrapping coz
[libcoz.cpp:128] Including MAIN, which is /usr/bin/vlc
[inspect.cpp:509] Included source file /home/pere/bin/vlc.c
[inspect.cpp:509] Included source file /usr/include/i386-linux-gnu/bits/stdio2.h
[inspect.cpp:509] Included source file /usr/include/i386-linux-gnu/bits/string3.h
[inspect.cpp:509] Included source file /home/pere/bin/override.c
[inspect.cpp:509] Included source file /usr/include/i386-linux-gnu/bits/stdio2.h
[inspect.cpp:509] Included source file /build/glibc-lM58X1/glibc-2.24/nptl/pthread_atfork.c
[inspect.cpp:509] Included source file /build/gcc-6-F046OM/gcc-6-6.2.1/build/gcc/include/cpuid.h
[inspect.cpp:509] Included source file /build/gcc-6-F046OM/gcc-6-6.2.1/src/libgcc/config/i386/crtfastmath.c
[inspect.cpp:317] Including lines from executable /usr/bin/vlc
[inspect.cpp:325] /usr/lib/coz-profiler/libcoz.so is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libdbus-1.so.3.14.9 is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libidn.so.11.6.16 is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libselinux.so.1 is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libpcre.so.3.13.3 is not in scope
[inspect.cpp:325] /usr/lib/i386-linux-gnu/libvlccore.so.8.0.0 is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libsystemd.so.0.17.0 is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/ld-2.24.so is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libgcc_s.so.1 is not in scope
[inspect.cpp:325] /usr/lib/i386-linux-gnu/libvlc.so.5.5.0 is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libm-2.24.so is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libdl-2.24.so is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libgcrypt.so.20.1.3 is not in scope
[inspect.cpp:325] /usr/lib/i386-linux-gnu/libstdc++.so.6.0.22 is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/librt-2.24.so is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/liblzma.so.5.2.2 is not in scope
[inspect.cpp:325] /usr/lib/i386-linux-gnu/libelf++.so.0 is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libgpg-error.so.0.20.0 is not in scope
[inspect.cpp:325] /usr/lib/i386-linux-gnu/liblz4.so.1.7.1 is not in scope
[inspect.cpp:325] /usr/lib/i386-linux-gnu/libdwarf++.so.0 is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libc-2.24.so is not in scope
[inspect.cpp:325] /lib/i386-linux-gnu/libpthread-2.24.so is not in scope
[profiler.cpp:75] Starting profiler thread
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[b86d0ba0] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[profiler.h:118] running pthread_create()
[b6514a80] http access error: cannot connect to video.nuug.no:8000
[b6514a80] access_mms access error: cannot connect to video.nuug.no:8000
QObject::~QObject: Timers cannot be stopped from another thread

The vlc command run as it should when I am not profiling it.

emeryberger commented 7 years ago

Ping @ccurtsinger

ccurtsinger commented 7 years ago

I am actively looking into this issue, but I haven't made any headway yet. I'll try to keep you updated.

petterreinholdtsen commented 7 years ago

Hi. Did you manage to crack this nut yet?

ccurtsinger commented 7 years ago

I can't reproduce this on my machine (Ubuntu 17.04) using the apt-installed coz. I'll give it a shot on a Debian machine soon.

petterreinholdtsen commented 7 years ago

Does this mean you are able to profile vlc using coz? Care to share the result?

petterreinholdtsen commented 7 years ago

I tried to reproduce it, by building and installing vlc using DEB_BUILD_OPTIONS=nostrip to make sure vlc had debug symbols, and then ran it using coz run --- vlc http://video.nuug.no:8000/frikanalen.webm in Debian Stretch.

I got this result:

% coz run --- vlc http://video.nuug.no:8000/frikanalen.webm
[libcoz.cpp:100] bootstrapping coz
[libcoz.cpp:128] Including MAIN, which is /usr/bin/vlc
[inspect.cpp:325] /lib/x86_64-linux-gnu/libsystemd.so.0.17.0 is not in scope
[inspect.cpp:325] /usr/lib/x86_64-linux-gnu/libvlccore.so.8.0.0 is not in scope
[inspect.cpp:509] Included source file /home/pere/src/bin/vlc.c
[inspect.cpp:509] Included source file /usr/include/x86_64-linux-gnu/bits/stdio2.h
[inspect.cpp:509] Included source file /usr/include/x86_64-linux-gnu/bits/string3.h
[inspect.cpp:509] Included source file /home/pere/src/bin/override.c
[inspect.cpp:509] Included source file /usr/include/x86_64-linux-gnu/bits/stdio2.h
[inspect.cpp:509] Included source file /build/glibc-p3Km7c/glibc-2.24/nptl/pthread_atfork.c
[inspect.cpp:509] Included source file /build/gcc-6-t_8K6C/gcc-6-6.3.0/src/libgcc/config/i386/crtfastmath.c
[inspect.cpp:317] Including lines from executable /usr/bin/vlc
[inspect.cpp:325] /lib/x86_64-linux-gnu/libgcc_s.so.1 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/libdbus-1.so.3.14.11 is not in scope
[inspect.cpp:325] /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/libselinux.so.1 is not in scope
[inspect.cpp:325] /usr/lib/x86_64-linux-gnu/liblz4.so.1.7.1 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/libidn.so.11.6.16 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/liblzma.so.5.2.2 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/librt-2.24.so is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/libpcre.so.3.13.3 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/libdl-2.24.so is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/libm-2.24.so is not in scope
[inspect.cpp:325] /usr/lib/x86_64-linux-gnu/libdwarf++.so.0 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/libpthread-2.24.so is not in scope
[inspect.cpp:325] /usr/lib/x86_64-linux-gnu/libelf++.so.0 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/libc-2.24.so is not in scope
[inspect.cpp:325] /usr/lib/x86_64-linux-gnu/libvlc.so.5.5.0 is not in scope
[inspect.cpp:325] /lib/x86_64-linux-gnu/ld-2.24.so is not in scope
[inspect.cpp:325] /usr/lib/coz-profiler/libcoz.so is not in scope
[profiler.cpp:75] Starting profiler thread
VLC media player 2.2.6 Umbrella (revision 2.2.6-0-g1aae78981c)
[000055c17a963978] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007f3700000ee8] http access error: cannot connect to video.nuug.no:8000
[00007f3700000ee8] access_mms access error: cannot connect to video.nuug.no:8000
QObject::~QObject: Timers cannot be stopped from another thread
%

This is the output when running without coz:

% vlc http://video.nuug.no:8000/frikanalen.webm
VLC media player 2.2.6 Umbrella (revision 2.2.6-0-g1aae78981c)
[0000564e15c3a178] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007f1180000ec8] http access: Raw-audio server found, any demuxer selected
Failed to open VDPAU backend libvdpau_i965.so: cannot open shared object file: No such file or directory
[^C]
QObject::~QObject: Timers cannot be stopped from another thread
petterreinholdtsen commented 6 years ago

Hi. Is there any more information I can provide?

emeryberger commented 6 years ago

It's the holidays, but bumping this for @ccurtsinger