Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[DONE] Double free error when closing Sayonara
#21
Closing sayonara /var/crash/_usr_bin_sayonara
[code]ProblemType: Crash
Architecture: amd64
CrashCounter: 1
CurrentDesktop: Unity
Date: Sun Oct 16 22:12:37 2016
DistroRelease: Ubuntu 16.04
ExecutablePath: /usr/bin/sayonara
ExecutableTimestamp: 1476553608
ProcCmdline: sayonara
ProcCwd: /home/test
ProcEnviron:
PATH=(custom, no user)
SHELL=/bin/bash
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR
XDG_RUNTIME_DIR=<set>
ProcMaps:
00400000-00a86000 r-xp 00000000 08:12 1184919 /usr/bin/sayonara
00c85000-00ca3000 r--p 00685000 08:12 1184919 /usr/bin/sayonara
00ca3000-00ca6000 rw-p 006a3000 08:12 1184919 /usr/bin/sayonara

Edit: Output shortened

[Edited on 16-10-2016 by Lucio Carreras]
Reply
#22
I cannot do anything with the procmap. I need a stacktrace (also called backtrace). A stack trace contains the last called methods. I intentionally triggered a free error here. The stack trace looks like that:

Code:
./bin/sayonara(_Z16segfault_handleri+0x2b)[0x63805f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x113d0)[0x7f9f78f653d0]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x22)[0x7f9f78c0ea92]
./bin/sayonara(_Z11parse_imageP11_GstTagListR6QImage+0xce)[0x8889c4]
./bin/sayonara(_ZN15EngineCallbacks17bus_state_changedEP7_GstBusP11_GstMessagePv+0x67d)[0x889304]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0(+0x40d46)[0x7f9f7b602d46]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x15a)[0x7f9f7b0a805a]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a400)[0x7f9f7b0a8400]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7f9f7b0a84ac]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5f)[0x7f9f79ceea7f]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x10a)[0x7f9f79c95dea]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x9c)[0x7f9f79c9de8c]
./bin/sayonara(main+0x3c1)[0x638456]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f9f78bab830]
./bin/sayonara(_start+0x29)[0x6377d9]
*** stack smashing detected ***: ./bin/sayonara terminated
Aborted

Here, I can see in which method the error appears. This is the same binary I sent you. If the stack trace does not indicate anything you have to use a debugging tool like gdb.

Your last stack trace was this:

Code:
*** Error in `sayonara\': double free or corruption (!prev): 0x00000000034ee510 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7ffb1d876725]
/lib/x86_64-linux-gnu/libc.so.6(+0x7ff4a)[0x7ffb1d87ef4a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ffb1d882abc]
sayonara(_ZN15QTypedArrayDataItE10deallocateEP10QArrayData+0x22)[0x639fe4]
sayonara(_ZN7QStringD1Ev+0x31)[0x639ac1]
/lib/x86_64-linux-gnu/libc.so.6(+0x39fe8)[0x7ffb1d838fe8]
/lib/x86_64-linux-gnu/libc.so.6(+0x3a035)[0x7ffb1d839035]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0x7ffb1d81f837]

This indicates that probably some string data was deleted twice. But it does not show where in the code this malfunction appears. There are approx 80.000 lines and maybe 3000 String usages. It\'s the needle in the haystack.

The stack trace I sent you tells me the function (a function has between 1 and 50 lines) where I have to look for the error. In this case the \'parse_image\' function which was called by the \'bus_state_changed\' function. But without the function I have no clue where to search. All I can do is a blind shot into the sky.

In a release build every function information gets lost. In a debug build every function is still available in a human-readable way. That\'s one reason the binary is so large.

But I guess, the debug build saves information where the source code is located at the system. So when I create a debug build for you, the source code is in my home directory and therefore not available on your system.

You can compile sayonara yourself by following these steps. It lasts about 5 minutes and user interaction is required for about 30 seconds.

Code:
sudo apt-get install git

git clone -b master https://git.sayonara-player.com/sayonara.git sayonara-player

sudo apt-get install cmake pkg-config qt5-default qttools5-dev qttools5-dev-tools \\
libqt5core5a libqt5network5 libqt5sql5 libqt5sql5-sqlite libqt5xml5 libtag1-dev \\
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev  libsqlite3-0 libmtp-dev \\
gstreamer1.0-plugins-base gstreamer1.0-plugins-good

cd sayonara-player
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=\"Debug\"
make -j8 (if 8 processor cores)
sudo make install

I guess this is the only way to find the error. If you want your original sayonara installation back, you need to reinstall it:

Code:
sudo apt-get install --reinstall sayonara

Reply
#23
I was trying to reproduce like crazy and finally I could reproduce the error. But the stack trace is the same as yours. Currently, if have no clue how to debug this. But I\'ll find out.
Reply
#24
Ok, I guess I found the error Smile Yippie!

You have enabled the accent free search. Others don\'t. And I obviously changed my habits and I do not search anymore. :lol:
The player does not crash if you start and close it. But if you searched for one term during a session then the player crashes. I will test on another machine tomorrow and if nothing crashes anymore I\'ll upload a new version.
Reply
#25
O.o

Indeed, accent-free search is enabled.

…it sounds so un-related :lol:

Bravo !
Reply
#26
I hope, this bug is away now?
Reply
#27
Did not have much time to play these days…

…but after few hours yesterday, playing randomly, searching titles, going back and forth… no crash.

So it seems solved !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)