LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 12-27-2010, 08:01 PM   #1
lexvictory
LQ Newbie
 
Registered: Nov 2008
Posts: 4

Rep: Reputation: 0
Question kernel panic ubuntu 10.10 - ffmpeg related?


I'm not sure if this is really the right place for a kernel panic question, but since it only occurred after updating form 10.04->10.10 i figured this might be the place (I don't know if its a bug or a hardware problem)

Since upgrading, running ffmpeg seems to cause a kernel panic, usually with a message similar to "BUG: unable to handle kernel NULL pointer dereference at <address>" or "unable to handle kernel paging request" (the 2nd is from memory, I have a photo of the first)
This is really troubling as I can't transcode things i record off tv (using mythtv), also I didn't think a userland program should crash the kernel...

this is the ffmpeg line that has been causing either a segfault in ffmpeg, or the kernel to crash (whether i compile it and libx264 myself or use the repo's version)
Code:
ffmpeg -y -i /home/lex/mythout/mytranscode.m2v -i /home/lex/mythout/mytranscode.ac3 -acodec copy -vcodec libx264  -vpre normal  -crf 20 -b 4000k -deinterlace  -s hd720  -threads 0 "/path/to/out/file.mkv"
(also seems to happen on SD recordings - which have no resize options present)

What should I do? or What extra info should I supply?
The computer is used as a server; no desktop environment (the kdm upstart job file has been renamed)
 
Old 12-28-2010, 12:51 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You might try running an strace on ffmpeg. The last system call used may be the culprit.

Code:
strace /usr/bin/ffmpeg -y -i /home/lex/mythout/mytranscode.m2v -i /home/lex/mythout/mytranscode.ac3 \ 
  -acodec copy -vcodec libx264  -vpre normal  -crf 20 -b 4000k -deinterlace  -s hd720  -threads 0 "/path/to/out/file.mkv" 2>ffmpeg.strace
 
Old 12-28-2010, 07:43 PM   #3
lexvictory
LQ Newbie
 
Registered: Nov 2008
Posts: 4

Original Poster
Rep: Reputation: 0
here are the last few lines: (standard def recording, crashing just ffmpeg rather than whole kernel like HD ones do)
Code:
clone(child_stack=0xb29d8484, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb29d8bd8, {entry_number:6, base_addr:0xb29d8b70, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb29d8bd8) = 19825
gettimeofday({1293586801, 84364}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0})      = 0 (Timeout)
write(5, "\365\201\270\276\313\213\244\234\303\247N\301\354'\235j_\312\2\310@\33\216\266X\240F\337\204m\201\323"..., 32768) = 32768
gettimeofday({1293586801, 84898}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0})      = 0 (Timeout)
gettimeofday({1293586801, 85115}, NULL) = 0
select(1, [0], NULL, NULL, {0, 0})      = 0 (Timeout)
read(3, "r\371\343\221[\1L\3\200(\30\374T5\16\7\266\315\26\371=\372\250\357\3561\230\1\201d<\32"..., 32768) = 32768
futex(0x9dfc368, FUTEX_CMP_REQUEUE_PRIVATE, 1, 2147483647, 0x9dfc34c, 15136) = 1
clone(child_stack=0xb1eb9484, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb1eb9bd8, {entry_number:6, base_addr:0xb1eb9b70, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb1eb9bd8) = 19826
futex(0xb139abd8, FUTEX_WAIT, 19824, NULL <unfinished ...>
+++ killed by SIGSEGV +++
 
Old 12-29-2010, 08:23 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The , NULL <unfinished ...> of the futex command caught my attention, but according to the manpage, for FUTEX_WAIT, that argument, and the next are ignored.

I'd try repeating the experiment and see if the code bails with the same command. If so, maybe you found a bug. I don't know it it would be in ffmpeg or the kernel. The futex command runs in user space if there is no contention, but some code runs in kernel space to handle contentions to the same resource.

Last edited by jschiwal; 12-29-2010 at 08:26 AM.
 
Old 12-29-2010, 08:31 PM   #5
lexvictory
LQ Newbie
 
Registered: Nov 2008
Posts: 4

Original Poster
Rep: Reputation: 0
after some further experimenting, i found that it doesnt crash on my x64 desktop, so i migrated to x64 on my server, but ffmpeg still crashes (well the error is actually in libx264), but so far no kernel panics, just "illegal instruction" or "segmentation fault"...
using gdb on x264 seems to reveal a different crash line every time...

Could this indicate a hardware issue?
Or an asm instruction that is somehow being used and isnt supported? (if so how do i get gdb or some other tool to tell me what instruction?)
 
Old 12-31-2010, 08:22 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You might want to start by testing your ram. Bad ram will cause intermittent errors.
 
Old 01-04-2011, 12:12 AM   #7
lexvictory
LQ Newbie
 
Registered: Nov 2008
Posts: 4

Original Poster
Rep: Reputation: 0
well it appears to have been a RAM problem.. Tho the RAM stick isn't that old and its only since the 10.10 upgrade its been a problem..
Memtest didnt report any problems, but swapping out the stick with the newest from my desktop is letting x264 run properly so far...
Maybe its something to do with it being a 2gb stick instead of a 1gb :S
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Panic on boot related to software raid 6 mdrum Linux - Newbie 1 11-20-2008 01:41 PM
ext3 related kernel panic (keeps occurring) cygnus-x1 Linux - General 8 10-12-2007 01:07 PM
Filesystem-Related Kernel Panic Arg0nyX Linux - Kernel 2 07-04-2007 03:28 PM
Kernel panic with FFMPEG tv capturing Vorik Linux - Software 4 06-22-2004 04:28 AM
LILO-related Kernel Panic on Boot sarboras Slackware - Installation 7 04-28-2004 04:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration