Handbrake freezes.

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
StarFire
Posts: 4
Joined: Fri Dec 30, 2016 5:27 am

Handbrake freezes.

Post by StarFire »

Please detail your question or problem in as much detail as possible:
Handbrake closes itself several minutes into the encoding. This was fixed in the latest update, but it now seems to do it every time I try to start an encoding job. I have tried reinstalling Handbrake with no success.
Tell us about your environment. What version of HandBrake? What version of Linux / Unix are you running. etc.
Handbrake 1.0.1 Ubuntu 16.04 LTS
If there was any exception or error displayed, please copy it and paste it here:
*** Error in `ghb': realloc(): invalid next size: 0x00007f9988581150 ***
Please include the scan or encode log:
http://pastebin.com/ZamH5858

Code: Select all

 Paste a log of the scan or encode between these code brackets, or use a pastebin website and provide us with the URL it gives you. 
 Logs are required for all support requests.
crh23
Posts: 4
Joined: Mon Jan 09, 2017 1:53 pm

Re: Handbrake freezes.

Post by crh23 »

Fancy that, after a long time of successful handbrake use I too have just started getting that error! I'm running handbrake 1.0.1 on Mint 18.1. Activity log can be found at http://pastebin.com/A3XD9MJq
The specific error I get is

Code: Select all

*** Error in `ghb': realloc(): invalid next size: 0x00007fd1a4317eb0 ***
One encode did run fully (and I assume successfully?) before it crashed.

Update: still crashing, log at http://pastebin.com/w6vh79tk.
Similar error:

Code: Select all

*** Error in `ghb': realloc(): invalid next size: 0x00007f9a002d7870 ***
Looks like viewtopic.php?f=13&t=35554 is about the same problem.
StarFire
Posts: 4
Joined: Fri Dec 30, 2016 5:27 am

Re: Handbrake freezes.

Post by StarFire »

crh23 wrote:Fancy that, after a long time of successful handbrake use I too have just started getting that error! I'm running handbrake 1.0.1 on Mint 18.1. Activity log can be found at http://pastebin.com/A3XD9MJq
The specific error I get is

Code: Select all

*** Error in `ghb': realloc(): invalid next size: 0x00007fd1a4317eb0 ***
One encode did run fully (and I assume successfully?) before it crashed.

Update: still crashing, log at http://pastebin.com/w6vh79tk.
Similar error:

Code: Select all

*** Error in `ghb': realloc(): invalid next size: 0x00007f9a002d7870 ***
Looks like viewtopic.php?f=13&t=35554 is about the same problem.
Although my other post was about a similar issue, I made a new post because the other one was in an older version of Handbrake. And I assumed that it was fixed in 1.0.1 because it was working for about a week. I have been forced to switch to MediaCoder until a patch is released.
crh23
Posts: 4
Joined: Mon Jan 09, 2017 1:53 pm

Re: Handbrake freezes.

Post by crh23 »

Quick update: I seem to be having more luck in the nightly build: in 20170108193321-b062c3b-master I ran three full encodes without any problems (I would have done more but the whole system crashed, probably not handbrake's fault).

Update again: nope, it did just crash again. For what it's worth, http://pastebin.com/LZ4Gz25Y
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Handbrake freezes.

Post by JohnAStebbins »

Does anyone having this problem have the skills to build HandBrake from source with debugging enabled and run it under gdb? This would show me where the problem is much more clearly.

The 1.0.1 release and the nightly builds haven't diverged much yet since we are mostly doing bug fixes till things settle down with the release. So it's a bit surprising that the nightlies would work any better.
crh23
Posts: 4
Joined: Mon Jan 09, 2017 1:53 pm

Re: Handbrake freezes.

Post by crh23 »

Well, I think I did what you asked, I'm not certain: I don't have the skills, I just like to pretend ¯\_(ツ)_/¯

I compiled with

Code: Select all

./configure --launch-jobs=$(nproc) --launch --debug=max
The output from gdb can be found at http://pastebin.com/XfqnWnkf

In other news, I have found a particular file that very consistently crashes at about (exactly) the same time in the encode
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Handbrake freezes.

Post by JohnAStebbins »

@crh23, great job. Unfortunately, I forgot to ask for something important. After it crashes I need to see a backtrace to determine the full context of the crash. You can get this by giving the "bt" command at the gdb prompt after it crashes.

Something else that might be helpful in this situation (if you have the patience for it) would be to run:

Code: Select all

valgrind ghb
valgrind is a tool for finding memory allocation problems. And since this is failing during a realloc, there is a strong possibility that the heap has been corrupted prior to the actual crash. valgrind would be able to show where the heap is initially corrupted. But valgrind is *very very* slow. If the crash doesn't happen until a lot of video has been encoded, it could literally take days for valgrind to find the problem.

FYI, this issue has also been filed here https://github.com/HandBrake/HandBrake/issues/510
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Handbrake freezes.

Post by JohnAStebbins »

For anyone having this problem. We just had a report that erasing the config directory ~/.config/ghb "makes the problem go away". It would be very helpful if someone could help me out by verifying this. But *first* back up the directory and tar it up so that you can provide it to me for debugging this problem.

Thanks
Last edited by Anonymous on Sun Jan 22, 2017 9:29 am, edited 1 time in total.
Reason: Added emphasis
crh23
Posts: 4
Joined: Mon Jan 09, 2017 1:53 pm

Re: Handbrake freezes.

Post by crh23 »

Sorry, had to run off for a couple of months. Back now, and pleased to report that the problem appears to have been fixed, I assume due to the fixes noted on the github issue. Thanks!
Post Reply