Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 213795 - media-tv/xawtv-3.95-r1: fbtv fails with "mmap: Cannot allocate memory"
Summary: media-tv/xawtv-3.95-r1: fbtv fails with "mmap: Cannot allocate memory"
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-18 08:56 UTC by Stefan Bauer
Modified: 2010-06-28 21:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
strace for emerged xawtv/fbtv (fbtv_gentoo_emerged.trace,14.05 KB, text/plain)
2008-03-18 09:03 UTC, Stefan Bauer
Details
strace for self compiled xawtv/fbtv (fbtv_gentoo_homebrew.trace,8.80 KB, text/plain)
2008-03-18 09:11 UTC, Stefan Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Bauer 2008-03-18 08:56:32 UTC
Trying to watch tv with fbtv fails with the above error.
Hardware:SAA7134-based DVB-C card (Fujitsu Siemens), onboard i810 graphics
Tested Kernels: 2.6.18.8, 2.6.23-gentoo-r8, 2.6.24.3, 2.6.25-rc6
Boot parameter: lapic video=i810fb:hsync1:30,hsync2:72,vsync1   :50,vsync2:120,accel,mtrr,640x480-16@100

Seems not to be fb-driver specific, due this happens also using a Kyro or S3 device. Other users reported this also on nvidiafb, radeonfb and rivafb.

Attached strace shows that a very too high amount of mem is tried to be mapped.
This doesn't happen on a self-compiled fbtv with gentoos patches applied. But this fails with freese of the console (see attached strace).

Reproducible: Always

Steps to Reproduce:
1. try to start fbtv

Actual Results:  
mmap: Cannot allocate memory on a emerged fbtv,
console freeze on home-brew + gentoo-patched fbtv.

Expected Results:  
Show tv.

lspci:
00:00.0 Host bridge: Intel Corporation 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82815 CGC [Chipset Graphics Controller] (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801AA PCI Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801AA IDE Controller (rev 02)
01:0a.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)

emerge -pv xawtv:
[ebuild   R   ] media-tv/xawtv-3.95-r1  USE="lirc mmx -X -aalib -alsa -dv -motif -nls -opengl -quicktime -xext -xv -zvbi" 0 kB

emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.1, glibc-2.5-r0, 2.6.25-rc6 i686)
=================================================================
System uname: 2.6.25-rc6 i686 Pentium III (Coppermine)
Timestamp of tree: Mon, 17 Mar 2008 22:00:04 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61
sys-devel/automake:  1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="-O2 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
MAKEOPTS="-j2"
USE="acl bash-completion berkdb bzip2 cli cracklib crypt cups dri fbcon fortran gdbm iconv isdnlog jpeg lirc md5sum midi mmx mudflap ncurses nptl nptlonly openmp pam pcre pppd readline reflection session spl ssl symlink vim-syntax vram x86 xorg zlib"

Frame buffer device information:
    Name        : I810
    Address     : 0xd0800000
    Size        : 4194304
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 8
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 1280
    MMIO Address: 0xd4000000
    MMIO Size   : 524288
    Accelerator : Unknown (39)
Comment 1 Stefan Bauer 2008-03-18 09:03:35 UTC
Created attachment 146459 [details]
strace for emerged xawtv/fbtv

See line 200: 3,2 GB should be mapped. This fails gently.
Comment 2 Stefan Bauer 2008-03-18 09:11:41 UTC
Created attachment 146460 [details]
strace for self compiled xawtv/fbtv

See line 107: 4 MB (correct size) should be mapped. Thereafter something went wrong, the console freezes. You can still work blind.
The main difference to emerged fbtv is that no plugins could be loaded. So maybe a xawtv plugin caused the wrong size detection.
Comment 3 Stefan Bauer 2008-03-18 09:16:12 UTC
Several gdb sessions of the self-compiled fbtv also freezed.
Location: fbtools.c, function fb_setvt, line 268, "switch(fork()) {"
Comment 4 Stefan Bauer 2008-03-21 15:32:57 UTC
The above listed hardware works with Debian Etch, so there's no hardware issue.

Gentoo fails even on an BX-board with a G450 (matroxfb).

Further debugging brought up, that the mmap error is caused at fbtools.c:428. fb_mem_offset is a huge negative value at this point.

In my self compiled fbtv, this value was 0. The console freezes later in fb_activate_current. 
Comment 5 Stefan Bauer 2010-06-28 21:05:59 UTC
Closing this, because the machine where this has happened doesn't exist anymore.