notsecure / uTox

Lightweight Tox client
utox.org
GNU General Public License v3.0
597 stars 149 forks source link

// , Segfault on Screenshot #1099

Closed v6 closed 8 years ago

v6 commented 9 years ago

// , I'm getting a segfault on some sort of resize panic or race condition when I send a screenshot over a certain size in uTox 0.3.2 on Linux.

$ uname -a

3.16.0-43-generic #58-Ubuntu SMP Fri Jun 19 11:04:02 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Full log of entire program run:

➜  bin  ./utox
Read 84 bytes (/home/******/.config/tox/utox_save)
0
have GTK
Read 31877 bytes (/home/******/.config/tox/tox_save.tox)
new tox object ipv6: 1 udp: 1 proxy: 0  0
File not found (/home/*****/.config/tox/****************************************************************.txt)
File not found (****************************************************************.txt)
Meta Data not found (/home/******/.config/tox/****************************************************************.fmetadata)
File not found (/home/******/.config/tox/****************************************************************.txt)
File not found (****************************************************************.txt)
Meta Data not found (/home/*******/.config/tox/****************************************************************.fmetadata)
Meta Data not found (/home/******/.config/tox/****************************************************************.fmetadata)
File not found (/home/******/.config/tox/****************************************************************.txt)
File not found (****************************************************************.txt)
Meta Data not found (/home/*******/.config/tox/****************************************************************.fmetadata)
File not found (/home/*******/.config/tox/****************************************************************.txt)
File not found (****************************************************************.txt)
Meta Data not found (/home/******/.config/tox/****************************************************************.fmetadata)
Meta Data not found (/home/******/.config/tox/****************************************************************.fmetadata)
Meta Data not found (/home/******/.config/tox/****************************************************************.fmetadata)
File not found (/home/******/.config/tox/****************************************************************.txt)
File not found (****************************************************************.txt)
Meta Data not found (/home/******/.config/tox/****************************************************************.fmetadata)
File not found (/home/******/.config/tox/****************************************************************.txt)
File not found (****************************************************************.txt)
Meta Data not found (/home/******/.config/tox/****************************************************************.fmetadata)
File not found (/home/******/.config/tox/****************************************************************.txt)
File not found (****************************************************************.txt)
Meta Data not found (/home/******/.config/tox/****************************************************************.fmetadata)
Meta Data not found (/home/******/.config/tox/****************************************************************.fmetadata)
Meta Data not found (/home/******/.config/tox/****************************************************************.fmetadata)
Tox ID: ****************************************************************
Audio Filtering and Echo cancellation enabled in this build
frame size: 960
Toxav thread init
desktop: 1920 1080
something went wrong
Input Device List:
Built-in Audio Analog Stereo
Monitor of GK107 HDMI Audio Controller Digital Stereo (HDMI)
Monitor of Built-in Audio Analog Stereo
Loaded font /usr/share/fonts/truetype/roboto/Roboto-Regular.ttf 0 34 -8
Output Device List:
Built-in Audio Analog Stereo
GK107 HDMI Audio Controller Digital Stereo (HDMI)
Loaded font /usr/share/fonts/truetype/roboto/Roboto-Bold.ttf 0 34 -8
Loaded font /usr/share/fonts/truetype/roboto/Roboto-Bold.ttf 0 34 -8
Loaded font /usr/share/fonts/truetype/roboto/Roboto-Regular.ttf 0 34 -8
Loaded font /usr/share/fonts/truetype/roboto/Roboto-Regular.ttf 0 34 -8
Loaded font /usr/share/fonts/truetype/roboto/Roboto-Regular.ttf 0 34 -8
resize
expose
filter audio on
expose
expose
Video size: 640 480
Writing tox_save to: /home/******/.config/tox/tox_save.tox.tmp
Saved data
CHMOD: success
Connected to DHT: 1
Friend (11):         Online (UDP)
FileTransfer:       Starting avatar to friend 11.
Friend Name (11): **********************
Friend Status Message (11): Toxing on uTox
Friend Userstatus (11): 0
Friend Typing (11): 0
FileTransfer:       New Avatar from friend (11)
FileTransfer:       Avatar Unset from friend(11).
FileTransfer:       We just killed file (11 & 65536)
Sent typing state to friend (11): 1
Friend (8):  Online (TCP)
FileTransfer:       Starting avatar to friend 8.
SelectionNotify
Type: ATOM
Property: ATOM
Supported type: TIMESTAMP
Supported type: TARGETS
Supported type: MULTIPLE
Supported type: SAVE_TARGETS
Supported type: UTF8_STRING
Supported type: COMPOUND_TEXT
Supported type: TEXT
Supported type: STRING
Supported type: text/plain;charset=utf-8
Supported type: text/plain
SelectionNotify
Type: UTF8_STRING
Property: TARGETS
cmd 0
Friend Receipt (11): 1
Friend Name (8): end
Friend Status Message (8): *****************
Friend Userstatus (8): 0
Friend Typing (8): 0
FileTransfer:       Friend (8) rejected avatar
FileTransfer:       Cleaning up file transfers! (8 & 0)
Sent typing state to friend (11): 0
Writing tox_save to: /home/******/.config/tox/tox_save.tox.tmp
Saved data
CHMOD: success
Friend (8):  Online (UDP)
resize

expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
expose
resize
resize
expose
resize
expose
resize
expose
resize
expose
Friend (8):  Online (TCP)
Friend (8):  Online (UDP)
FileTransfer:       Starting outgoing image to friend 11.
FileTransfer:       Friend (11) has resumed file (1)
[1]    6060 segmentation fault  ./utox

                                                                                                                                                                                                                        165,1         Bot
GrayHatter commented 9 years ago

can you get a bt?

v6 commented 9 years ago

// , Whether or not I can get a "bt" depends on what a "bt" is, of course. I can try, though.

v6 commented 9 years ago

// ,

NVM, figured it out.

I'll run it similarly to this until I get another segfault: https://github.com/notsecure/uTox/issues/936#issuecomment-87349335

cebe commented 9 years ago

I'll run it similarly to this until I get another segfault: #936 (comment)

then please paste the output of bt you get from gdb.

GrayHatter commented 9 years ago

if you could start it with gdb and then make it crash, then type bt into gdb, and post the output to a gist... that would be SUPER awesome...

henriqueleng commented 9 years ago

The same here, I noticed it happens when I send big images, the select square also bug. I'm on OpenBSD, running on commit d16f53912b161893431fd16025af94d4d8a14f53 There is a bt: FileTransfer: Starting outgoing image to friend 1. FileTransfer: Friend (1) has resumed file (1) Friend Typing (1): 0 Friend Typing (1): 1

Program received signal SIGSEGV, Segmentation fault. [Switching to thread 1010942] 0x0000192ec4cbb73f in handle_packet_connection () from /usr/local/lib/libtoxcore.so.0.0 (gdb) bt

0 0x0000192ec4cbb73f in handle_packet_connection () from /usr/local/lib/libtoxcore.so.0.0

1 0x0000192ec4cbba75 in tcp_data_callback () from /usr/local/lib/libtoxcore.so.0.0

2 0x0000192ec4cd38cb in tcp_data_callback () from /usr/local/lib/libtoxcore.so.0.0

3 0x0000192ec4cd09e5 in do_TCP_connection () from /usr/local/lib/libtoxcore.so.0.0

4 0x0000192ec4cd45d9 in do_tcp_connections () from /usr/local/lib/libtoxcore.so.0.0

5 0x0000192ec4cba31f in do_net_crypto () from /usr/local/lib/libtoxcore.so.0.0

6 0x0000192ec4cc2198 in do_messenger () from /usr/local/lib/libtoxcore.so.0.0

7 0x0000192ec4cc494d in tox_iterate () from /usr/local/lib/libtoxcore.so.0.0

8 0x0000192c14215dab in tox_thread () from /usr/local/bin/utox

9 0x0000192e981d690e in _rthread_start (v=Variable "v" is not available.

) at /usr/src/lib/librthread/rthread.c:145

10 0x0000192e8527d28b in __tfork_thread () at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:75

11 0x0000000000000000 in ?? ()

maybe its not compiled with -debug

henriqueleng commented 9 years ago

So it is a toxcore problem? Wondering if any of these lasts commits solves: https://github.com/irungentoo/toxcore/commits/master

henriqueleng commented 9 years ago

Probably solved with last toxcore, @v6 test it

v6 commented 8 years ago

// , @henriqueleng, I just tested it. I can confirm that this bug was fixed with the latest toxcore. However, I'm curious what could have caused this bug.