Closed cebe closed 8 years ago
can you get a backtrace?
or are you killing it?
I assume you're compileing with make?
ulimit is killing it, can you tell me how I could get a backtrace from it this way? I am not able to use my computer while it is running so it is hard to debug. need to wait about 30sec for things to get stable after it got killed.
I built it with make, yes.
tried it with gdb, not sure if there is anything helpful in it:
$ gdb utox
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/cebe/dev/tox/uTox/utox...done.
(gdb) run
Starting program: /home/cebe/dev/tox/uTox/utox
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
File not found (/home/cebe/.config/tox/utox_save)
File not found (utox_save)
File not found (utox_save)
0
have GTK
[New Thread 0x7ffff3de1700 (LWP 19463)]
new tox object ipv6: 1 udp: 1 proxy: 0 0
Tox ID: 7F50119368DC8FD3B1ECAF5D18E3F8854F0484CEC5BBF625D420B8E38638733C02486E387AF8
[New Thread 0x7fffedf32700 (LWP 19464)]
Audio Filtering enabled in this build
frame size: 960
[New Thread 0x7fffedee6700 (LWP 19465)]
[New Thread 0x7fffede84700 (LWP 19466)]
Toxav thread init
desktop: 5760 1080
Video size: 640 480
something went wrong
[Thread 0x7fffedee6700 (LWP 19465) exited]
[Thread 0x7ffff3de1700 (LWP 19463) exited]
[Thread 0x7ffff7fca700 (LWP 19460) exited]
Couldn't get registers: Kein passender Prozess gefunden.
(gdb)
it gets unstable after "something went wrong".
I have never worked with breakpoints or step debugging in gdb, might try that tomorrow...
@irungentoo can probably help you out more that I could, but try to compile with this
clang -o utox *.c png/png.c icons/utox-128x128.o -g -Wall -Wshadow -pthread -std=gnu99 \
`pkg-config --libs --cflags fontconfig freetype2 libtoxav libtoxcore openal vpx x11 xext xrender \
dbus-1 libv4lconvert filteraudio xcb xcb-util xcb-ewmh xcb-icccm` -pthread -lm -lresolv -ldl \
-fsanitize=address && ./utox
@cebe do the jenkins build produce the same issue? https://jenkins.libtoxcore.so/job/uTox_linux_amd64/
@irungentoo the jenkins build is the one that needs glibc >= 2.14, I have only 2.13 thats why I compiled it myself. @GrayHatter thanks, will try that later.
Why aren't you able to upgrade your glibc
On Sun, Jun 7, 2015 at 2:26 PM, Carsten Brandt notifications@github.com wrote:
@irungentoo https://github.com/irungentoo the jenkins build is the one that needs glibc >= 2.14, I have only 2.13 thats why I compiled it myself. @GrayHatter https://github.com/GrayHatter thanks, will try that later.
— Reply to this email directly or view it on GitHub https://github.com/notsecure/uTox/issues/1072#issuecomment-109800584.
debian wheezy has glibc version 2.13-38+deb7u8 https://packages.debian.org/wheezy/libc6
I tried again today and did a make clean
, make
and it worked. Can not reproduce this issue...
damn, have the same thing on another machine...
now this happens when I switch a video device from the one that is selected by default to another one. Will try to find more details tormorrow.
Anything related to this in the changelog from the version of glibc?
I've never seen this, and without more information, there's not much I can do. Can you run it with valgrind?
nothing, also happens with the newer version of glibc on debian jessie so it does not seem releated to it. Trying with clang, and address sanitizer does not change anything.
Setting up a proper IDE now to try step debugging. May also try valgrind later.
getting closer... now it only kills the IDE instead of the whole computer. And it seems related to opening video device.
while opening video device:
dev_name = "/dev/video0"
cap = {struct v4l2_capability}
driver = {__u8 [16]} "uvcvideo"
card = {__u8 [32]} "USB 2.0 Camera"
bus_info = {__u8 [32]} "usb-0000:00:1a.0-1.3"
version = {__u32} 200711
capabilities = {__u32} 2214592513
device_caps = {__u32} 67108865
reserved = {__u32 [3]}
[0] = {__u32} 0
[1] = {__u32} 0
[2] = {__u32} 0
cropcap = {struct v4l2_cropcap}
type = {__u32} 1
bounds = {struct v4l2_rect}
left = {__s32} 0
top = {__s32} 0
width = {__u32} 640
height = {__u32} 480
defrect = {struct v4l2_rect}
left = {__s32} 0
top = {__s32} 0
width = {__u32} 640
height = {__u32} 480
pixelaspect = {struct v4l2_fract}
numerator = {__u32} 1
denominator = {__u32} 1
crop = {struct v4l2_crop}
type = {__u32} 1
c = {struct v4l2_rect}
left = {__s32} 0
top = {__s32} 0
width = {__u32} 640
height = {__u32} 480
min = 614400
req = {struct v4l2_requestbuffers}
count = {__u32} 4
type = {__u32} 1
memory = {__u32} 1
reserved = {__u32 [2]}
[0] = {__u32} 0
[1] = {__u32} 0
fh = 10
request = 3222558216
arg = 0x7fffe95f2bc0
r = 32767
stepping into that ioctl call, results in the described behavior.
valgrind --leak-check=yes utox --portable
does not report any problems.
Got this output from valgrind helgrind
tool which checks problems with threads:
$ valgrind --tool=helgrind ./utox --portable
==675== Helgrind, a thread error detector
==675== Copyright (C) 2007-2013, and GNU GPL'd, by OpenWorks LLP et al.
==675== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==675== Command: ./utox --portable
==675==
==675==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
==675==Process memory map follows:
0x000000400000-0x00000084b000 /home/cebe/dev/tox/uTox/utox
0x000000a4a000-0x000000a78000 /home/cebe/dev/tox/uTox/utox
0x000000a78000-0x000001d80000
0x000004000000-0x000004020000 /lib/x86_64-linux-gnu/ld-2.19.so
0x000004020000-0x000004035000
0x000004050000-0x00000405f000
0x000004220000-0x000004221000 /lib/x86_64-linux-gnu/ld-2.19.so
0x000004221000-0x000004222000 /lib/x86_64-linux-gnu/ld-2.19.so
0x000004222000-0x000004223000
0x000004223000-0x000004224000
0x000004a23000-0x000004a24000 /usr/lib/valgrind/vgpreload_core-amd64-linux.so
0x000004a24000-0x000004c23000 /usr/lib/valgrind/vgpreload_core-amd64-linux.so
0x000004c23000-0x000004c24000 /usr/lib/valgrind/vgpreload_core-amd64-linux.so
0x000004c24000-0x000004c25000 /usr/lib/valgrind/vgpreload_core-amd64-linux.so
0x000004c25000-0x000004c3a000 /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so
0x000004c3a000-0x000004e39000 /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so
0x000004e39000-0x000004e3a000 /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so
0x000004e3a000-0x000004e3b000 /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so
0x000004e3b000-0x000004e76000 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0
0x000004e76000-0x000005075000 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0
0x000005075000-0x000005077000 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0
0x000005077000-0x000005078000 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.8.0
0x000005078000-0x00000511c000 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.11.1
0x00000511c000-0x00000531b000 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.11.1
0x00000531b000-0x000005321000 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.11.1
0x000005321000-0x000005322000 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.11.1
0x000005322000-0x000005379000 /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1
0x000005379000-0x000005579000 /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1
0x000005579000-0x00000557b000 /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1
0x00000557b000-0x00000557c000 /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1
0x00000557c000-0x00000557d000
0x00000557d000-0x00000558e000 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
0x00000558e000-0x00000578d000 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
0x00000578d000-0x00000578e000 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
0x00000578e000-0x00000578f000 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
0x00000578f000-0x000005798000 /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
0x000005798000-0x000005997000 /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
0x000005997000-0x000005998000 /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
0x000005998000-0x000005999000 /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
0x000005999000-0x000005ad5000 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
0x000005ad5000-0x000005cd4000 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
0x000005cd4000-0x000005cd6000 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
0x000005cd6000-0x000005cdb000 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
0x000005cdb000-0x000005cdc000
0x000005cdc000-0x000005d23000 /lib/x86_64-linux-gnu/libdbus-1.so.3.8.13
0x000005d23000-0x000005f22000 /lib/x86_64-linux-gnu/libdbus-1.so.3.8.13
0x000005f22000-0x000005f23000 /lib/x86_64-linux-gnu/libdbus-1.so.3.8.13
0x000005f23000-0x000005f24000 /lib/x86_64-linux-gnu/libdbus-1.so.3.8.13
0x000005f24000-0x000005f49000 /usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0
0x000005f49000-0x000006149000 /usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0
0x000006149000-0x00000614c000 /usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0
0x00000614c000-0x00000614d000 /usr/lib/x86_64-linux-gnu/libv4lconvert.so.0.0.0
0x00000614d000-0x00000619f000
0x00000619f000-0x0000061e8000 /usr/local/lib/libfilteraudio.so.0.0.0
0x0000061e8000-0x0000063e8000 /usr/local/lib/libfilteraudio.so.0.0.0
0x0000063e8000-0x0000063ea000 /usr/local/lib/libfilteraudio.so.0.0.0
0x0000063ea000-0x0000063f0000 /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0
0x0000063f0000-0x0000065ef000 /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0
0x0000065ef000-0x0000065f1000 /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0
0x0000065f1000-0x0000065f2000 /usr/lib/x86_64-linux-gnu/libxcb-util.so.0.0.0
0x0000065f2000-0x0000065f6000 /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4.0.0
0x0000065f6000-0x0000067f5000 /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4.0.0
0x0000067f5000-0x0000067f6000 /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4.0.0
0x0000067f6000-0x0000067f7000 /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4.0.0
0x0000067f7000-0x000006818000 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
0x000006818000-0x000006a17000 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
0x000006a17000-0x000006a18000 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
0x000006a18000-0x000006a19000 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
0x000006a19000-0x000006a23000 /usr/local/lib/libtoxav.so.0.0.0
0x000006a23000-0x000006c23000 /usr/local/lib/libtoxav.so.0.0.0
0x000006c23000-0x000006c24000 /usr/local/lib/libtoxav.so.0.0.0
0x000006c24000-0x000006c6b000 /usr/lib/x86_64-linux-gnu/libopus.so.0.5.0
0x000006c6b000-0x000006e6b000 /usr/lib/x86_64-linux-gnu/libopus.so.0.5.0
0x000006e6b000-0x000006e6c000 /usr/lib/x86_64-linux-gnu/libopus.so.0.5.0
0x000006e6c000-0x000006e6d000 /usr/lib/x86_64-linux-gnu/libopus.so.0.5.0
0x000006e6d000-0x00000701c000 /usr/lib/x86_64-linux-gnu/libvpx.so.1.3.0
0x00000701c000-0x00000721c000 /usr/lib/x86_64-linux-gnu/libvpx.so.1.3.0
0x00000721c000-0x00000721e000 /usr/lib/x86_64-linux-gnu/libvpx.so.1.3.0
0x00000721e000-0x00000721f000 /usr/lib/x86_64-linux-gnu/libvpx.so.1.3.0
0x00000721f000-0x000007265000
0x000007265000-0x000007267000 /usr/local/lib/libtoxdns.so.0.0.0
0x000007267000-0x000007466000 /usr/local/lib/libtoxdns.so.0.0.0
0x000007466000-0x000007467000 /usr/local/lib/libtoxdns.so.0.0.0
0x000007467000-0x000007469000 /usr/local/lib/libtoxencryptsave.so.0.0.0
0x000007469000-0x000007668000 /usr/local/lib/libtoxencryptsave.so.0.0.0
0x000007668000-0x000007669000 /usr/local/lib/libtoxencryptsave.so.0.0.0
0x000007669000-0x00000769f000 /usr/local/lib/libtoxcore.so.0.0.0
0x00000769f000-0x00000789e000 /usr/local/lib/libtoxcore.so.0.0.0
0x00000789e000-0x0000078a0000 /usr/local/lib/libtoxcore.so.0.0.0
0x0000078a0000-0x0000078f0000 /usr/local/lib/libsodium.so.13.0.2
0x0000078f0000-0x000007aef000 /usr/local/lib/libsodium.so.13.0.2
0x000007aef000-0x000007af0000 /usr/local/lib/libsodium.so.13.0.2
0x000007af0000-0x000007af9000 /usr/local/lib/libsodium.so.13.0.2
0x000007af9000-0x000007bf9000 /lib/x86_64-linux-gnu/libm-2.19.so
0x000007bf9000-0x000007df8000 /lib/x86_64-linux-gnu/libm-2.19.so
0x000007df8000-0x000007df9000 /lib/x86_64-linux-gnu/libm-2.19.so
0x000007df9000-0x000007dfa000 /lib/x86_64-linux-gnu/libm-2.19.so
0x000007dfa000-0x000007e12000 /lib/x86_64-linux-gnu/libpthread-2.19.so
0x000007e12000-0x000008011000 /lib/x86_64-linux-gnu/libpthread-2.19.so
0x000008011000-0x000008012000 /lib/x86_64-linux-gnu/libpthread-2.19.so
0x000008012000-0x000008013000 /lib/x86_64-linux-gnu/libpthread-2.19.so
0x000008013000-0x000008017000
0x000008017000-0x00000802b000 /lib/x86_64-linux-gnu/libresolv-2.19.so
0x00000802b000-0x00000822a000 /lib/x86_64-linux-gnu/libresolv-2.19.so
0x00000822a000-0x00000822b000 /lib/x86_64-linux-gnu/libresolv-2.19.so
0x00000822b000-0x00000822c000 /lib/x86_64-linux-gnu/libresolv-2.19.so
0x00000822c000-0x00000822e000
0x00000822e000-0x000008231000 /lib/x86_64-linux-gnu/libdl-2.19.so
0x000008231000-0x000008430000 /lib/x86_64-linux-gnu/libdl-2.19.so
0x000008430000-0x000008431000 /lib/x86_64-linux-gnu/libdl-2.19.so
0x000008431000-0x000008432000 /lib/x86_64-linux-gnu/libdl-2.19.so
0x000008432000-0x000008439000 /lib/x86_64-linux-gnu/librt-2.19.so
0x000008439000-0x000008638000 /lib/x86_64-linux-gnu/librt-2.19.so
0x000008638000-0x000008639000 /lib/x86_64-linux-gnu/librt-2.19.so
0x000008639000-0x00000863a000 /lib/x86_64-linux-gnu/librt-2.19.so
0x00000863a000-0x000008650000 /lib/x86_64-linux-gnu/libgcc_s.so.1
0x000008650000-0x00000884f000 /lib/x86_64-linux-gnu/libgcc_s.so.1
0x00000884f000-0x000008850000 /lib/x86_64-linux-gnu/libgcc_s.so.1
0x000008850000-0x0000089ef000 /lib/x86_64-linux-gnu/libc-2.19.so
0x0000089ef000-0x000008bef000 /lib/x86_64-linux-gnu/libc-2.19.so
0x000008bef000-0x000008bf3000 /lib/x86_64-linux-gnu/libc-2.19.so
0x000008bf3000-0x000008bf5000 /lib/x86_64-linux-gnu/libc-2.19.so
0x000008bf5000-0x000008bf9000
0x000008bf9000-0x000008c1f000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
0x000008c1f000-0x000008e1e000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
0x000008e1e000-0x000008e21000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
0x000008e21000-0x000008e22000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
0x000008e22000-0x000008e3c000 /lib/x86_64-linux-gnu/libz.so.1.2.8
0x000008e3c000-0x00000903b000 /lib/x86_64-linux-gnu/libz.so.1.2.8
0x00000903b000-0x00000903c000 /lib/x86_64-linux-gnu/libz.so.1.2.8
0x00000903c000-0x00000903d000 /lib/x86_64-linux-gnu/libz.so.1.2.8
0x00000903d000-0x000009063000 /lib/x86_64-linux-gnu/libpng12.so.0.50.0
0x000009063000-0x000009262000 /lib/x86_64-linux-gnu/libpng12.so.0.50.0
0x000009262000-0x000009263000 /lib/x86_64-linux-gnu/libpng12.so.0.50.0
0x000009263000-0x000009264000 /lib/x86_64-linux-gnu/libpng12.so.0.50.0
0x000009264000-0x0000092a9000 /usr/lib/x86_64-linux-gnu/libjpeg.so.62.1.0
0x0000092a9000-0x0000094a9000 /usr/lib/x86_64-linux-gnu/libjpeg.so.62.1.0
0x0000094a9000-0x0000094aa000 /usr/lib/x86_64-linux-gnu/libjpeg.so.62.1.0
0x0000094aa000-0x0000094ab000 /usr/lib/x86_64-linux-gnu/libjpeg.so.62.1.0
0x0000094ab000-0x0000094bb000
0x0000094bb000-0x0000094be000 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
0x0000094be000-0x0000096bd000 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
0x0000096bd000-0x0000096be000 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
0x0000096be000-0x0000096bf000 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
0x0000096bf000-0x0000096c4000 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
0x0000096c4000-0x0000098c3000 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
0x0000098c3000-0x0000098c4000 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
0x0000098c4000-0x000009c16000
0x000038000000-0x0000383bf000 /usr/lib/valgrind/helgrind-amd64-linux
0x0000385bf000-0x0000385c2000 /usr/lib/valgrind/helgrind-amd64-linux
0x0000385c2000-0x00003b9a8000
0x000802001000-0x00080297c000
0x00080297c000-0x00080297e000
0x00080297e000-0x000802a7e000 [stack:675]
0x000802a7e000-0x000802a80000
0x000802a80000-0x000802a81000 /tmp/vgdb-pipe-shared-mem-vgdb-675-by-cebe-on-???
0x000802a81000-0x000802bb1000
0x000802bbd000-0x000802fd3000
0x00080309b000-0x000803787000
0x00080386c000-0x00080b027000
0x000ffeffe000-0x000fff001000
0x7ffdfba08000-0x7ffdfba29000
0x7ffdfbaad000-0x7ffdfbaaf000 [vvar]
0xffffffffff600000-0xffffffffff601000 [vsyscall]
==675==End of process memory map.
==675==
==675== For counts of detected and suppressed errors, rerun with: -v
==675== Use --history-level=approx or =none to gain increased speed, at
==675== the cost of reduced accuracy of conflicting-access information
==675== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
The above message was from the binary compiled with
clang -o utox -g -Wall -Wshadow -pthread -std=gnu99 ./*.c png/png.c icons/utox-128x128.o `pkg-config --libs --cflags fontconfig freetype2 openal x11 xext xrender dbus-1 libv4lconvert filteraudio xcb xcb-util xcb-icccm libtoxav` -lvpx -pthread -lm -lresolv -ldl -D GIT_VERSION="\"$(date)\"" -fsanitize=address && echo \\a
Here is an output of the binary compiled with make:
$ valgrind --tool=helgrind ./utox --portable
==1178== Helgrind, a thread error detector
==1178== Copyright (C) 2007-2013, and GNU GPL'd, by OpenWorks LLP et al.
==1178== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==1178== Command: ./utox --portable
==1178==
Launching uTox in portable mode: All data will be saved to the tox folder in the current working directory
arg 1: --portable
Read 84 bytes (./tox/utox_save)
0
have GTK
new tox object ipv6: 1 udp: 1 proxy: 0 0
File not found (./tox/7CCB9885A398747422BE128A8985E8416F39977095931DED2826D2A826DCF51B.txt)
File not found (7CCB9885A398747422BE128A8985E8416F39977095931DED2826D2A826DCF51B.txt)
Meta Data not found (./tox/7CCB9885A398747422BE128A8985E8416F39977095931DED2826D2A826DCF51B.fmetadata)
Meta Data not found (./tox/8252FB48E51D2BE9B08D54052F95503AC0A19EF5FD70EF459C13619EB9CF075C.fmetadata)
Tox ID: 57D9425FC843A539AC90EE95AEFDFC80E14EF5F2EDA385DB407773856D8FAE563D4B0B39D219
Toxav thread init
Audio Filtering enabled in this build
frame size: 960
desktop: 5760 1080
==1178== ---Thread-Announcement------------------------------------------
==1178==
==1178== Thread #6 was created
==1178== at 0x7EE900E: clone (clone.S:74)
==1178== by 0x670A2B9: do_clone.constprop.3 (createthread.c:75)
==1178== by 0x670B762: create_thread (createthread.c:245)
==1178== by 0x670B762: pthread_create@@GLIBC_2.2.5 (pthread_create.c:606)
==1178== by 0x4C2EEBD: pthread_create_WRK (hg_intercepts.c:270)
==1178== by 0xFE0A26C: pa_thread_new (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xF991DF2: pa_threaded_mainloop_start (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0x6953E91: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693CC4F: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x671044F: pthread_once (pthread_once.S:103)
==1178== by 0x693BA4E: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693DD27: alcGetString (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x487D99: audio_thread (audio.c:146)
==1178==
==1178== ---Thread-Announcement------------------------------------------
==1178==
==1178== Thread #4 was created
==1178== at 0x7EE900E: clone (clone.S:74)
==1178== by 0x670A2B9: do_clone.constprop.3 (createthread.c:75)
==1178== by 0x670B762: create_thread (createthread.c:245)
==1178== by 0x670B762: pthread_create@@GLIBC_2.2.5 (pthread_create.c:606)
==1178== by 0x4C2EEBD: pthread_create_WRK (hg_intercepts.c:270)
==1178== by 0x41B16E: thread (main.c:441)
==1178== by 0x409CBD: tox_thread (tox.c:582)
==1178== by 0x4C2F056: mythread_wrapper (hg_intercepts.c:234)
==1178== by 0x670B0A3: start_thread (pthread_create.c:309)
==1178==
==1178== ----------------------------------------------------------------
==1178==
==1178== Lock at 0x96149F0 was first observed
==1178== at 0x4C3028A: pthread_mutex_init (hg_intercepts.c:518)
==1178== by 0xFE09915: pa_mutex_new (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A13D: pa_static_mutex_get (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF586E: pa_once_begin (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF59DA: pa_run_once (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A9D3: pa_thread_self (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xF9920FD: pa_threaded_mainloop_lock (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0x6953EA2: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693CC4F: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x671044F: pthread_once (pthread_once.S:103)
==1178== by 0x693BA4E: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693DD27: alcGetString (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== Address 0x96149f0 is 0 bytes inside a block of size 40 alloc'd
==1178== at 0x4C2A040: malloc (vg_replace_malloc.c:296)
==1178== by 0xF997B36: pa_xmalloc (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0xFE09907: pa_mutex_new (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A13D: pa_static_mutex_get (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF586E: pa_once_begin (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF59DA: pa_run_once (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A9D3: pa_thread_self (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xF9920FD: pa_threaded_mainloop_lock (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0x6953EA2: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693CC4F: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x671044F: pthread_once (pthread_once.S:103)
==1178== by 0x693BA4E: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== Block was alloc'd by thread #4
==1178==
==1178== Possible data race during read of size 4 at 0x100349F8 by thread #6
==1178== Locks held: none
==1178== at 0xFDF5851: pa_once_begin (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF59DA: pa_run_once (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0AA7C: ??? (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0x4C2F056: mythread_wrapper (hg_intercepts.c:234)
==1178== by 0x670B0A3: start_thread (pthread_create.c:309)
==1178==
==1178== This conflicts with a previous write of size 4 by thread #4
==1178== Locks held: 1, at address 0x96149F0
==1178== at 0xFDF5903: pa_once_end (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A9D3: pa_thread_self (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xF9920FD: pa_threaded_mainloop_lock (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0x6953EA2: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693CC4F: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x671044F: pthread_once (pthread_once.S:103)
==1178== by 0x693BA4E: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693DD27: alcGetString (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== Address 0x100349f8 is in the BSS segment of /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so
==1178==
==1178== ----------------------------------------------------------------
==1178==
==1178== Lock at 0x96149F0 was first observed
==1178== at 0x4C3028A: pthread_mutex_init (hg_intercepts.c:518)
==1178== by 0xFE09915: pa_mutex_new (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A13D: pa_static_mutex_get (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF586E: pa_once_begin (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF59DA: pa_run_once (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A9D3: pa_thread_self (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xF9920FD: pa_threaded_mainloop_lock (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0x6953EA2: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693CC4F: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x671044F: pthread_once (pthread_once.S:103)
==1178== by 0x693BA4E: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693DD27: alcGetString (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== Address 0x96149f0 is 0 bytes inside a block of size 40 alloc'd
==1178== at 0x4C2A040: malloc (vg_replace_malloc.c:296)
==1178== by 0xF997B36: pa_xmalloc (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0xFE09907: pa_mutex_new (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A13D: pa_static_mutex_get (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF586E: pa_once_begin (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF59DA: pa_run_once (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A9D3: pa_thread_self (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xF9920FD: pa_threaded_mainloop_lock (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0x6953EA2: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693CC4F: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x671044F: pthread_once (pthread_once.S:103)
==1178== by 0x693BA4E: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== Block was alloc'd by thread #4
==1178==
==1178== Possible data race during read of size 8 at 0x10034A00 by thread #6
==1178== Locks held: none
==1178== at 0xFE0AA7D: ??? (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0x4C2F056: mythread_wrapper (hg_intercepts.c:234)
==1178== by 0x670B0A3: start_thread (pthread_create.c:309)
==1178==
==1178== This conflicts with a previous write of size 8 by thread #4
==1178== Locks held: 1, at address 0x96149F0
==1178== at 0xFE0A820: ??? (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF59F1: pa_run_once (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A9D3: pa_thread_self (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xF9920FD: pa_threaded_mainloop_lock (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0x6953EA2: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693CC4F: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x671044F: pthread_once (pthread_once.S:103)
==1178== by 0x693BA4E: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== Address 0x10034a00 is in the BSS segment of /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so
==1178==
==1178== ---Thread-Announcement------------------------------------------
==1178==
==1178== Thread #1 is the program's root thread
==1178==
==1178== ----------------------------------------------------------------
==1178==
==1178== Possible data race during read of size 4 at 0x93E96B0 by thread #6
==1178== Locks held: none
==1178== at 0xFE0A94A: pa_tls_set (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0AA8B: ??? (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0x4C2F056: mythread_wrapper (hg_intercepts.c:234)
==1178== by 0x670B0A3: start_thread (pthread_create.c:309)
==1178==
==1178== This conflicts with a previous write of size 4 by thread #1
==1178== Locks held: none
==1178== at 0x700496F: ??? (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==1178== by 0x7002A13: _XimLocalOpenIM (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==1178== by 0x7000F2F: _XimOpenIM (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==1178== by 0x41EB26: main (main.c:1182)
==1178== Address 0x93e96b0 is 0 bytes inside a block of size 4 alloc'd
==1178== at 0x4C2A040: malloc (vg_replace_malloc.c:296)
==1178== by 0xF997B36: pa_xmalloc (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0xFE0A7E2: pa_tls_new (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A81F: ??? (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFDF59F1: pa_run_once (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xFE0A9D3: pa_thread_self (in /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-5.0.so)
==1178== by 0xF9920FD: pa_threaded_mainloop_lock (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.17.3)
==1178== by 0x6953EA2: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693CC4F: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x671044F: pthread_once (pthread_once.S:103)
==1178== by 0x693BA4E: ??? (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== by 0x693DD27: alcGetString (in /usr/lib/x86_64-linux-gnu/libopenal.so.1.15.1)
==1178== Block was alloc'd by thread #4
==1178==
Video size: 640 480
Getötet
looks as if it is related to sound but still may be related.
here is what syslog says about this:
...
Dec 6 03:09:54 cebe-desktop kernel: [167043.559881] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name
...
Dec 6 03:09:54 cebe-desktop kernel: [167043.560061] [ 2017] 1000 2017 202912 57936 358 61180 0 helgrind-amd64-
Dec 6 03:09:54 cebe-desktop kernel: [167043.560063] Out of memory: Kill process 2017 (helgrind-amd64-) score 21 or sacrifice child
Dec 6 03:09:54 cebe-desktop kernel: [167043.560065] Killed process 2017 (helgrind-amd64-) total-vm:811648kB, anon-rss:231744kB, file-rss:0kB
Dec 6 03:09:54 cebe-desktop kernel: [167043.582848] vmalloc: allocation failure, allocated 286990336 of 3725586432 bytes
Dec 6 03:09:54 cebe-desktop kernel: [167043.582851] helgrind-amd64-: page allocation failure: order:0, mode:0x80d2
Dec 6 03:09:54 cebe-desktop kernel: [167043.582854] CPU: 6 PID: 2037 Comm: helgrind-amd64- Tainted: G C O 3.16.0-4-amd64 #1 Debian 3.16.7-ckt11-1+deb8u6
Dec 6 03:09:54 cebe-desktop kernel: [167043.582855] Hardware name: LENOVO 782442G/ , BIOS 9HKT50AUS 04/18/2012
Dec 6 03:09:54 cebe-desktop kernel: [167043.582856] ffff88001e943bf8 ffffffff8150b4e5 00000000000080d2 ffffffff811426bf
Dec 6 03:09:54 cebe-desktop kernel: [167043.582858] ffffffff81729408 ffff88001e943b90 ffffffff00000018 ffff88001e943c08
Dec 6 03:09:54 cebe-desktop kernel: [167043.582859] ffff88001e943ba8 0000000000000000 0000000000000000 ffff8802312754b0
Dec 6 03:09:54 cebe-desktop kernel: [167043.582861] Call Trace:
Dec 6 03:09:54 cebe-desktop kernel: [167043.582866] [<ffffffff8150b4e5>] ? dump_stack+0x41/0x51
Dec 6 03:09:54 cebe-desktop kernel: [167043.582869] [<ffffffff811426bf>] ? warn_alloc_failed+0xdf/0x130
Dec 6 03:09:54 cebe-desktop kernel: [167043.582873] [<ffffffff81177eea>] ? __vmalloc_node_range+0x24a/0x280
Dec 6 03:09:54 cebe-desktop kernel: [167043.582881] [<ffffffffa03d12dc>] ? vb2_vmalloc_alloc+0x3c/0xb0 [videobuf2_vmalloc]
Dec 6 03:09:54 cebe-desktop kernel: [167043.582883] [<ffffffff81178009>] ? vmalloc_user+0x49/0x70
Dec 6 03:09:54 cebe-desktop kernel: [167043.582885] [<ffffffffa03d12dc>] ? vb2_vmalloc_alloc+0x3c/0xb0 [videobuf2_vmalloc]
Dec 6 03:09:54 cebe-desktop kernel: [167043.582887] [<ffffffffa03d12dc>] ? vb2_vmalloc_alloc+0x3c/0xb0 [videobuf2_vmalloc]
Dec 6 03:09:54 cebe-desktop kernel: [167043.582890] [<ffffffffa0574e45>] ? __vb2_queue_alloc+0x115/0x4d0 [videobuf2_core]
Dec 6 03:09:54 cebe-desktop kernel: [167043.582892] [<ffffffffa057578e>] ? __reqbufs.isra.14+0x16e/0x390 [videobuf2_core]
Dec 6 03:09:54 cebe-desktop kernel: [167043.582895] [<ffffffffa0585f29>] ? uvc_alloc_buffers+0x29/0x50 [uvcvideo]
Dec 6 03:09:54 cebe-desktop kernel: [167043.582897] [<ffffffffa0587dc0>] ? uvc_v4l2_do_ioctl+0xcd0/0x15f0 [uvcvideo]
Dec 6 03:09:54 cebe-desktop kernel: [167043.582900] [<ffffffff810a7a4e>] ? autoremove_wake_function+0xe/0x30
Dec 6 03:09:54 cebe-desktop kernel: [167043.582902] [<ffffffffa05870f0>] ? uvc_v4l2_open+0x140/0x140 [uvcvideo]
Dec 6 03:09:54 cebe-desktop kernel: [167043.582906] [<ffffffffa055616e>] ? video_usercopy+0x1fe/0x540 [videodev]
Dec 6 03:09:54 cebe-desktop kernel: [167043.582910] [<ffffffff811a7ad4>] ? new_sync_write+0x74/0xa0
Dec 6 03:09:54 cebe-desktop kernel: [167043.582913] [<ffffffffa055167b>] ? v4l2_ioctl+0x10b/0x150 [videodev]
Dec 6 03:09:54 cebe-desktop kernel: [167043.582915] [<ffffffff811ba4ef>] ? do_vfs_ioctl+0x2cf/0x4b0
Dec 6 03:09:54 cebe-desktop kernel: [167043.582918] [<ffffffff81075ab7>] ? recalc_sigpending+0x17/0x50
Dec 6 03:09:54 cebe-desktop kernel: [167043.582920] [<ffffffff8107640d>] ? __set_task_blocked+0x2d/0x70
Dec 6 03:09:54 cebe-desktop kernel: [167043.582922] [<ffffffff811a82b4>] ? vfs_write+0x154/0x1f0
Dec 6 03:09:54 cebe-desktop kernel: [167043.582924] [<ffffffff81078991>] ? __set_current_blocked+0x31/0x50
Dec 6 03:09:54 cebe-desktop kernel: [167043.582925] [<ffffffff811ba751>] ? SyS_ioctl+0x81/0xa0
Dec 6 03:09:54 cebe-desktop kernel: [167043.582927] [<ffffffff81078bb3>] ? SyS_rt_sigprocmask+0x83/0xb0
Dec 6 03:09:54 cebe-desktop kernel: [167043.582929] [<ffffffff815116cd>] ? system_call_fast_compare_end+0x10/0x15
extracted the relevant code from utox to reproduce the issue: https://gist.github.com/cebe/386a89b273d0389b86a9 compiling this with
clang -o utox -g -Wall -Wshadow -std=gnu99 ./bug.c `pkg-config --libs --cflags libv4lconvert` -fsanitize=address
and running it, causes the described problem.
For me this hangs at the ioctl call in line 44 resulting from the function call to xioctl in line 158.
According to the docs of v4l (http://www.linuxtv.org/downloads/v4l-dvb-apis/vidioc-reqbufs.html) the implementation seems correct to me.
However if I change the count of requested buffers to 1 instead of 4, this fixes the issue for me. https://gist.github.com/cebe/386a89b273d0389b86a9#file-bug-c-L154
Not sure if this change is good for everyone using utox in general...
reported this to v4l as it looks like a bug to me. https://bugzilla.kernel.org/show_bug.cgi?id=108941
aready open on new repo
I compiled utox master (68a3fd3ac8e472b883c84df62b4c558a637c091c) on debian wheezy 64bit running the binary renders the system unusable due to insane memory usage.
I managed to run it after setting some ulimit settings (memory and virtual memory set to 1GB) and it was killed right after starting: