I was correct that I had inadvertently installed a 32-bit version. I did not 
know that it was possible to
install a 32-bit version on a 64-bit computer. 

Anyway, using a 64-bit version of ubuntu 12.04, the bug exists in the
newer kernel (3.5.0-23) too.

# uname -a
Linux michael-MS-7596 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 
17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

And after the system crash, the relevant lines are:

# grep test1 /var/log/syslog
Apr  4 17:50:33 michael-MS-7596 kernel: [ 1664.381910] test1: Corrupted page 
table at address 7f44ec76f000
Apr  4 17:50:33 michael-MS-7596 kernel: [ 1664.383402] Pid: 3448, comm: test1 
Not tainted 3.5.0-23-generic #35~precise1-Ubuntu MICRO-STAR INTERNATIONAL 
CO.,LTD MS-7596/760GM-E51(MS-7596)
Apr  4 17:50:33 michael-MS-7596 kernel: [ 1664.384897] Process test1 (pid: 
3448, threadinfo ffff8800c29a8000, task ffff8800c2c31700)

I should add that although the program xawtv runs and does not crash the 
computer, the displayed video is partially
corrupted.

An excerpt of the program "test1.c" is below:

   ...

   //---------------------------------------- open /dev/mem
   fd_mem = open ("/dev/mem", O_RDWR | O_SYNC);
   if (fd_mem < 0) {
      fprintf (stderr, "failed opening \"/dev/mem\" (must run as root)\n");
      exit (-1);
   }


   //----------------------------- initialize all Bt878 video inputs
   n_bt = 0;
   for (i = 0; i < 1; i++) {
      //----------------- read BT878 PCI configuration space (I/O space)
      sprintf (s, "/sys/class/video4linux/video%d/device/config", i);
      fp = fopen (s, "r");
      if (fp == NULL) continue;

      fseek (fp, 0x00, SEEK_SET);       // Vendor ID/Device ID
      fread (&j, 1, 4, fp);
      if (j != 0x036E109E) {            // not Bt878
         fclose (fp);
         continue;
      }

      fseek (fp, 0x10, SEEK_SET);       // Base Address Register 0 (memory 
space registers)
      fread (&j, 1, 4, fp);
      j &= 0xFFFFF000;                  // The low BAR bits have special 
functions!
      fclose (fp);

      //------------------------ mmap memory space registers
      addr = (off_t) j;                 // The low BAR bits have special 
functions!
      memsize = 4096;
      mem = mmap (0, memsize, PROT_READ | PROT_WRITE, MAP_SHARED, fd_mem, addr);
      if (mem == MAP_FAILED) {
         perror ("mmap");
         continue;
      }

//-------------- The computer crashes at the following memcpy line.

      memcpy (&c, mem, 1);      // DSTATUS
      if ((0x80 & c) == 0) {
         fprintf (stderr, "No video signal \"/dev/video%d\"\n", i);
      }

      //----------- open "/dev/video<i>"
      sprintf (s1, "/dev/video%d", i);
      fd = open (s1, O_RDWR);
      if (fd < 0) {
         fprintf (stderr, "open video failed");
         munmap (mem, memsize);
         continue;
      }
   ...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1162555

Title:
  repeatable system crash related to bttv kernel module

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1162555/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to