Bug 906064

Summary: mmap allocation not working correctly on zm 1.25 - need to switch to shmem to get it to run on F18
Product: [Fedora] Fedora Reporter: Axel Mammes <mammes>
Component: zoneminderAssignee: Martin Ebourne <fedora>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 18CC: bugzilla, fedora, j, mammes, mhlavink
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 18:42:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
modprobe bttv params
none
shmem config
none
lspci verbose
none
v4l-info
none
zmudetect
none
memory report from free
none
uname -r none

Description Axel Mammes 2013-01-30 18:37:28 UTC
Description of problem:
mmap buffer allocation is not working correctly. /var/log/messages was full of mmap allocation errors, such as these.

Jan 30 08:58:48 localhost zmc_dvideo0[6568]: ERR [Got unexpected memory map file size 6913112, expected 7604312]
Jan 30 08:58:48 localhost zma_m1[6571]: ERR [Got unexpected memory map file size 6913112, expected 7604312]

After recompiling with --enable-mmap=no the problems have disappeared. ZoneMinder with shmem is stable.

Version-Release number of selected component (if applicable):
zoneminder-1.25.0-11.fc18.i386

How reproducible:
100% of the times on my box. bttv card is Geovision GV600-4 (bt878a). Single analog PAL camera attached on Composite0.

Steps to Reproduce:
1. Configure monitor1 as analog camera on /dev/video0(0) to 320x240 PAL GREY 1 FPS monitor mode. Live feed is shown perfectly.
2. Reconfigure monitor 1 to 640x480 PAL BGR24 1 FPS monitor mode. Try to watch live video.
  
Actual results:
/var/log/messages is full of mmap errors. Live video is not shown.

Expected results:
Buffers should be allocated without problem because there is enough free memory. Live video should appear.

Additional info:
Same exact configuration using shmem instead of mmap works fine. I downloaded the RPM source and changed zoneminder.spec line 103 from --enable-mmap=yes to --enable-mmap=no. Then rebuilt and reinstalled the rpm with --force. New build works fine.

AMD X2 4000 with 3 GB RAM
Fedora 18 i686
Asrock AliveNF6G-Vsta motherboard

Comment 1 Axel Mammes 2013-01-30 18:40:17 UTC
Created attachment 690527 [details]
modprobe bttv params

Comment 2 Axel Mammes 2013-01-30 18:40:48 UTC
Created attachment 690528 [details]
shmem config

Comment 3 Axel Mammes 2013-01-30 18:41:18 UTC
Created attachment 690529 [details]
lspci verbose

Comment 4 Axel Mammes 2013-01-30 18:41:54 UTC
Created attachment 690530 [details]
v4l-info

Comment 5 Axel Mammes 2013-01-30 18:42:14 UTC
Created attachment 690531 [details]
zmudetect

Comment 6 Axel Mammes 2013-01-30 18:43:04 UTC
Created attachment 690532 [details]
memory report from free

Comment 7 Axel Mammes 2013-01-30 18:43:38 UTC
Created attachment 690533 [details]
uname -r

Comment 8 Fedora End Of Life 2013-12-21 11:00:31 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2014-02-05 18:42:29 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.