Welcome to the forum, Guest

TOPIC: YACReaderLibraryServer "double free" error

YACReaderLibraryServer "double free" error 5 years 10 months ago #3942

le__el

Offline

Fresh Boarder

Posts: 5

Karma: 0

Hi, just got the iPad version this weekend and wanted to use my local headless server to store the comics, and then "stream" those to the tablet.


The first test I made in a Virtualbox machine. I followed the raspi guide and everything was ok.
But after I installed on my local server I found a issue that was not present on the Virtualbox.

Everything works, but when I get to the last page of a chapter and touch twice to open the next chapter, the YACReaderLibraryServer always crash. Sample:
INFO  2018-05-28T23:10:32.427 YACReaderLibraryServer attempting to start
INFO  2018-05-28T23:10:32.428 ---------- System & configuration ----------
INFO  2018-05-28T23:10:32.428 SO : Linux (unknown version)
INFO  2018-05-28T23:10:32.428 7z : found
INFO  2018-05-28T23:10:32.541 Libraries:  QMap()
INFO  2018-05-28T23:10:32.541 --------------------------------------------
INFO  2018-05-28T23:10:32.542 YACReaderLibrary starting

double free or corruption (out)
Aborted (core dumped)


As a workaround, I started using the bash:
while true; do YACReaderLibraryServer start; done
So when crash it will automatically rerun (almost) immediately.
This is working and most of the times the iPad app is able to automatically load the next chapter, but sometimes the rerun is little slow and the iPad app returns a 404 error and I am sent back to the chapter list (so I have to refresh the page and select the first unread chapter manually).

When trying on the Virtualbox (Windows 10 Host / Ubuntu Server 18.04 Guest), this whole issue didn't happen.



My setup

Tablet:
iPad 3 (iOS 9.3.5)
YACReader for iPad version 2.5.5

Local Server:
Ubuntu Server 18.04 64 bit (Headless server)
Intel(R) Atom(TM) CPU D525 @ 1.80GHz / 4GB RAM
YACReaderLibraryServer --version didn't return anything, but the code was just cloned/compiled from bitbucket from the tutorial.



Any tips to investigate this, enable additional logs, etc?
The server_log.log file is empty.

Thanks!
The administrator has disabled public write access.

YACReaderLibraryServer "double free" error 5 years 10 months ago #3943

selmf

Offline

Developer

Posts: 631

Thank you received: 135

Karma: 18

Hi le_el,

thanks for taking the time to report this, this definitely shouldn't happen. The first thing that strikes me is the log output you posted. I'd expect a list of libraries to be there, but I only see an empty QMap().

To investigate this you should first switch to the latest development version of the headless server. You can get it by cloning from our new github repo:
git clone https://www.github.com/yacreader/yacreader --branch develop

Build YACReaderLibraryServer with debug info enabled:
qmake CONFIG+=debug

That will allow you to load the server into gdb for debugging.
gdb --args YACReaderLibraryServer start

Once gdb has loaded type "r" and hit enter to run it. Try to provoke the crash. Once the crash happens, go to gdb and enter "bt" for backtrace. Copy the backtrace and post it here so we can see what happened before the crash.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

YACReaderLibraryServer "double free" error 5 years 10 months ago #3944

Luis Ángel

Offline

Administrator

Posts: 2616

Thank you received: 543

Karma: 22

You should build the server from the 9.0.0 source tarball, develop contains a lot of changes in the server and the v1 api hasn't been tested.
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: www.paypal.com/donate?business=5TAMNQCDD...e=Support+YACReader\
The administrator has disabled public write access.

YACReaderLibraryServer "double free" error 5 years 10 months ago #3946

selmf

Offline

Developer

Posts: 631

Thank you received: 135

Karma: 18

The 9.0.0 source tarball won't build on Ubuntu without the latest fixes from the master branch.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

YACReaderLibraryServer "double free" error 5 years 10 months ago #3947

le__el

Offline

Fresh Boarder

Posts: 5

Karma: 0

selmf wrote:
thanks for taking the time to report this, this definitely shouldn't happen. The first thing that strikes me is the log output you posted. I'd expect a list of libraries to be there, but I only see an empty QMap().

Oops, my bad, when I deleted the duplicated content from the log, I accidentally mixed the log from before adding the library with the error from after. This is the whole log:
130 servidor@servidor:~$ while true; do    YACReaderLibraryServer start; done
Logging to /home/servidor/.local/share/YACReader/YACReaderLibrary/server_log.log
INFO  2018-05-28T23:42:57.745 YACReaderLibraryServer attempting to start
INFO  2018-05-28T23:42:57.770 ---------- System & configuration ----------
INFO  2018-05-28T23:42:57.770 SO : Linux (unknown version)
INFO  2018-05-28T23:42:57.771 7z : found
INFO  2018-05-28T23:42:57.771 Libraries:  QMap(("teste", QPair(1,"/arquivos/manga/teste")))
INFO  2018-05-28T23:42:57.771 --------------------------------------------
INFO  2018-05-28T23:42:57.772 YACReaderLibrary starting
double free or corruption (out)
Aborted (core dumped)
Logging to /home/servidor/.local/share/YACReader/YACReaderLibrary/server_log.log
INFO  2018-05-28T23:49:33.343 YACReaderLibraryServer attempting to start
INFO  2018-05-28T23:49:33.344 ---------- System & configuration ----------
INFO  2018-05-28T23:49:33.344 SO : Linux (unknown version)
INFO  2018-05-28T23:49:33.344 7z : found
INFO  2018-05-28T23:49:33.344 Libraries:  QMap(("teste", QPair(1,"/arquivos/manga/teste")))
INFO  2018-05-28T23:49:33.345 --------------------------------------------
INFO  2018-05-28T23:49:33.345 YACReaderLibrary starting
double free or corruption (out)
Aborted (core dumped)
Logging to /home/servidor/.local/share/YACReader/YACReaderLibrary/server_log.log
INFO  2018-05-28T23:49:43.180 YACReaderLibraryServer attempting to start
INFO  2018-05-28T23:49:43.180 ---------- System & configuration ----------
INFO  2018-05-28T23:49:43.180 SO : Linux (unknown version)
INFO  2018-05-28T23:49:43.180 7z : found
INFO  2018-05-28T23:49:43.181 Libraries:  QMap(("teste", QPair(1,"/arquivos/manga/teste")))
INFO  2018-05-28T23:49:43.181 --------------------------------------------
INFO  2018-05-28T23:49:43.182 YACReaderLibrary starting
Segmentation fault (core dumped)

In a couple hours I will try to get the gbd logs.

Thanks!
Last Edit: 5 years 10 months ago by Luis Ángel.
The administrator has disabled public write access.

YACReaderLibraryServer "double free" error 5 years 10 months ago #3948

le__el

Offline

Fresh Boarder

Posts: 5

Karma: 0

Just finished compiling and the problem don't happen in the github version.

Also, this time it recognizes which os is running:
servidor@servidor:/arquivos/manga/dev/yacreader_dev/yacreader/YACReaderLibraryServer$ ./YACReaderLibraryServer start
Logging to /home/servidor/.local/share/YACReader/YACReaderLibrary/server_log.log
INFO  2018-05-29T11:31:59.705 YACReaderLibraryServer attempting to start
INFO  2018-05-29T11:31:59.706 ---------- System & configuration ----------
INFO  2018-05-29T11:31:59.706 OS: "Ubuntu 18.04 LTS" Version:  "18.04"
INFO  2018-05-29T11:31:59.706 Kernel: "linux" "4.15.0-22-generic" Architecture: "x86_64"
INFO  2018-05-29T11:31:59.707 Libraries:  QMap(("test", QPair(1,"/home/servidor/yacreader/test")))
INFO  2018-05-29T11:31:59.707 --------------------------------------------
INFO  2018-05-29T11:31:59.708 YACReaderLibrary starting


Should I compile with the debug the bitbucket code to get the error, or since it's working with github it's all good?

Really thanks!


--- edit:

And this is the log from the first tested library (stored in my customized /arquivos/...), instead of the ~/ dir (which I created to test if that was the issue, but also crashed with the previous).
servidor@servidor:/arquivos/manga/dev/yacreader_dev/yacreader/YACReaderLibraryServer$ ./YACReaderLibraryServer start
Logging to /home/servidor/.local/share/YACReader/YACReaderLibrary/server_log.log
INFO  2018-05-29T11:37:15.554 YACReaderLibraryServer attempting to start
INFO  2018-05-29T11:37:15.555 ---------- System & configuration ----------
INFO  2018-05-29T11:37:15.555 OS: "Ubuntu 18.04 LTS" Version:  "18.04"
INFO  2018-05-29T11:37:15.555 Kernel: "linux" "4.15.0-22-generic" Architecture: "x86_64"
INFO  2018-05-29T11:37:15.556 Libraries:  QMap(("teste", QPair(1,"/arquivos/manga/teste")))
INFO  2018-05-29T11:37:15.556 --------------------------------------------
INFO  2018-05-29T11:37:15.556 YACReaderLibrary starting
Last Edit: 5 years 10 months ago by le__el.
The administrator has disabled public write access.

YACReaderLibraryServer "double free" error 5 years 10 months ago #3949

Luis Ángel

Offline

Administrator

Posts: 2616

Thank you received: 543

Karma: 22

If it works now, then great :) The code in github contains the new version comming in a few days/weeks.

The repo in Bitbucket is not used anymore, and it won't be available after the release of 9.5.0
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: www.paypal.com/donate?business=5TAMNQCDD...e=Support+YACReader\
The administrator has disabled public write access.
The following user(s) said Thank You: le__el

YACReaderLibraryServer "double free" error 5 years 10 months ago #3950

selmf

Offline

Developer

Posts: 631

Thank you received: 135

Karma: 18

Thanks for testing this. If it works now that is fantastic. Just keep using it and report back if anything doesn't work as expected.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.
The following user(s) said Thank You: le__el
Powered by Kunena Forum