[SOLVED] System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

OSS specific BSD discussion (FreeBSD/NetBSD/OpenBSD)

Moderators: cesium, dev, kodachi, hannu

[SOLVED] System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby xenon » Sat Apr 03, 2010 11:58 am

Hi,
I have a system freeze when I use the sound. (VLC, mplayer, mpc, ...)
After a random time the system freeze, but when the system freeze is reset by the button, i can not do anything else.
This is a desktop computer.
The audio card is : SUPREME FX II (given with the motherboard ASUS Crosshair II formula)

The uname -a :
Code: Select all
FreeBSD fbsd01.xo.lan 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64


The kldstat :
Code: Select all
Id Refs Address            Size     Name
1   30 0xffffffff80100000 d17dc0   kernel
2    1 0xffffffff80e18000 d3cf48   nvidia.ko
3    3 0xffffffff81b55000 413b0    linux.ko
4    3 0xffffffff81b97000 420f8    vboxdrv.ko
5    1 0xffffffff81e22000 3a28     linprocfs.ko
6    2 0xffffffff81e26000 264e     vboxnetflt.ko
7    2 0xffffffff81e29000 8d44     netgraph.ko
8    1 0xffffffff81e32000 13be     ng_ether.ko
9    1 0xffffffff81e34000 d2c      vboxnetadp.ko
10    2 0xffffffff81e35000 82dce    osscore.ko
11    1 0xffffffff81eb8000 22dfc    oss_hdaudio.ko


The pciconf -vl :
Code: Select all
oss_hdaudio0@pci0:0:7:0:        class=0x040300 card=0x829c1043 chip=0x077410de rev=0xa1 hdr=0x00
    vendor     = 'Nvidia Corp'
    class      = multimedia
    subclass   = HDA


The ossinfo :
Code: Select all
Version info: OSS 4.2 (b 2002/201003311436) (0x00040100) BSD
Platform: FreeBSD/amd64 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC (fbsd01.xo.lan)

Number of audio devices:        10
Number of audio engines:        14
Number of MIDI devices:         0
Number of mixer devices:        1


Device objects
0: oss_hdaudio0 nVidia HD Audio interrupts=578 (578)
    HD Audio controller nVidia HD Audio
    Vendor ID    0x10de0774
    Subvendor ID 0x1043829c
     Codec  0: AD1988B (0x11d4198b/0x1043829c)
     Codec  3: Unknown (0x10de0002/0x10de0101)

MIDI devices (/dev/midi*)

Mixer devices
0: High Definition Audio AD1988B (Mixer 0 of device object 0)

Audio devices
HD Audio play front               /dev/oss/oss_hdaudio0/pcm0  (device index 0)
HD Audio play center/LFE          /dev/oss/oss_hdaudio0/pcm1  (device index 1)
HD Audio play rear                /dev/oss/oss_hdaudio0/pcm2  (device index 2)
HD Audio play side                /dev/oss/oss_hdaudio0/pcm3  (device index 3)
HD Audio play headphone           /dev/oss/oss_hdaudio0/pcm4  (device index 4)
HD Audio play spdifout-mix        /dev/oss/oss_hdaudio0/spdout0  (device index 5)
HD Audio play spdifout            /dev/oss/oss_hdaudio0/spdout1  (device index 6)
HD Audio rec rec1-src             /dev/oss/oss_hdaudio0/pcmin0  (device index 7)
HD Audio rec rec2-src             /dev/oss/oss_hdaudio0/pcmin1  (device index 8)
HD Audio rec rec3-src             /dev/oss/oss_hdaudio0/pcmin2  (device index 9)

Nodes
  /dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_hdaudio0/spdout0
  /dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0


If you want more information, ask me.
And im so sorry for my english, if you dont understand ask me and i correct it :D

Thank you.
Last edited by xenon on Sun Dec 01, 2013 12:27 pm, edited 4 times in total.
xenon
New Member
 
Posts: 6
Joined: Sat Apr 03, 2010 11:19 am

Re: System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby cesium » Sat Apr 03, 2010 5:14 pm

An idea: In the port, uncomment USE_SX_LOCK in kernel/OS/FreeBSD/wrapper/bsddefs.h (change #if 0 to #if 1), and rebuild OSS. Maybe that will help?
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby xenon » Sun Apr 04, 2010 1:23 pm

cesium wrote:An idea: In the port, uncomment USE_SX_LOCK in kernel/OS/FreeBSD/wrapper/bsddefs.h (change #if 0 to #if 1), and rebuild OSS. Maybe that will help?


Thank you for the response :D
Your idea does not work, the system freeze again ...
xenon
New Member
 
Posts: 6
Joined: Sat Apr 03, 2010 11:19 am

Re: System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby cesium » Sun Apr 04, 2010 6:15 pm

Hmm.. Try commenting out VDEV_SUPPORT in the same file and rebuilding. Also, is to possible to get a trace of the crash?
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby xenon » Sun Apr 04, 2010 6:51 pm

cesium wrote:Hmm.. Try uncommenting VDEV_SUPPORT in the same file and rebuilding. Also, is to possible to get a trace of the crash?


Thanks,
I test it now.
Can you help me for get a trace of the crash please ? (commands?)


EDIT:
my bsddefs.h :

Code: Select all
/*
* Purpose: Definitions for routines and variables exported by osscore.c
*
* Do not make any modifications to these settings because OSS core modules
* have been compiled against them. Full rebuild of OSS will be required if
* this file is changed.
*/
/*
* This file is part of Open Sound System
*
* Copyright (C) 4Front Technologies 1996-2008.
*
* This software is released under the BSD license.
* See the COPYING file included in the main directory of this source
* distribution for the license terms and conditions
*/


#include <sys/types.h>
#if 1 /* __FreeBSD_version >= 700031 */
/* Some crashes have been reported with SX on 7-STABLE/8-CURRENT:
* http://4front-tech.com/forum/viewtopic.php?t=2718
* http://4front-tech.com/forum/viewtopic.php?t=2563
*/
#define USE_SX_LOCK   1
#endif
#undef VDEV_SUPPORT
#if __FreeBSD_version >= 700111
#define VDEV_SUPPORT
extern int oss_file_set_private (struct thread *p, void *v, size_t l);
extern int oss_file_get_private (void **v);
#endif
extern int oss_get_uid (void);

typedef struct device dev_info_t;
typedef long long oss_int64_t;         /* Signed 64 bit integer */
typedef unsigned long long oss_uint64_t;   /* Unsigned 64 bit integer */
typedef unsigned long offset_t;

/*
* Some integer types
*/
#if defined(__amd64__)
typedef unsigned long long oss_native_word;   /* Same as the address and status register size */
#else
typedef unsigned long oss_native_word;   /* Same as the address and status register size */
#endif

struct _oss_device_t
{
  int cardnum;
  int dev_type;
  int instance;
  int available;
  dev_info_t *dip;
  void *osid;
  void *devc;
  char *name;
  char *hw_info;
  int major;
  char nick[16];
  char modname[16];
  char handle[32];
  int num_audio_engines;
  int num_audioplay, num_audiorec, num_audioduplex;
  int num_mididevs;
  int num_mixerdevs;
  int num_loopdevs;
  int first_mixer;   /* This must be set to -1 by osdev_create() */

  int intrcount;
  int ackcount;
  volatile int refcount;   /* Nonzero means that the device is needed by some other (virtual) driver. */

};

extern void cmn_err (int level, char *format, ...);
#define CE_CONT      0
#define CE_NOTE      1
#define CE_WARN      2
#define CE_PANIC   3

#ifdef USE_SX_LOCK
typedef struct sx *oss_mutex_t;
#else
typedef struct mtx *oss_mutex_t;
#endif

typedef int ddi_iblock_cookie_t;

extern void oss_udelay (unsigned long t);

#ifdef _KERNEL
#define memset oss_memset
extern void *oss_memset (void *t, int val, int l);
#endif

extern oss_device_t *osdev_create (dev_info_t * dip, int dev_type,
               int instance, const char *nick,
               const char *handle);
extern void osdev_delete (oss_device_t * osdev);

extern char *oss_pci_read_devpath (dev_info_t * dip);
extern int pci_read_config_byte (oss_device_t * osdev, offset_t where,
             unsigned char *val);
extern int pci_read_config_irq (oss_device_t * osdev, offset_t where,
            unsigned char *val);
extern int pci_read_config_word (oss_device_t * osdev, offset_t where,
             unsigned short *val);
extern int pci_read_config_dword (oss_device_t * osdev, offset_t where,
              unsigned int *val);
extern int pci_write_config_byte (oss_device_t * osdev, offset_t where,
              unsigned char val);
extern int pci_write_config_word (oss_device_t * osdev, offset_t where,
              unsigned short val);
extern int pci_write_config_dword (oss_device_t * osdev, offset_t where,
               unsigned int val);
#ifndef OSS_CONFIG_H
/* These definitions must match with oss_config.h */
typedef int (*oss_tophalf_handler_t) (struct _oss_device_t * osdev);
typedef void (*oss_bottomhalf_handler_t) (struct _oss_device_t * osdev);
#endif

extern int oss_register_interrupts (oss_device_t * osdev, int intrnum,
                oss_tophalf_handler_t top,
                oss_bottomhalf_handler_t bottom);
extern void oss_unregister_interrupts (oss_device_t * osdev);

extern void *oss_contig_malloc (unsigned long sz, unsigned long memlimit,
            oss_native_word * phaddr);
extern void oss_contig_free (void *p, unsigned long sz);

extern void oss_register_module (char *name);
extern void oss_unregister_module (char *name);
extern void *oss_find_minor_info (int dev_class, int instance);
extern int oss_find_minor (int dev_class, int instance);
extern void oss_inc_intrcount (oss_device_t * osdev, int claimed);

#define FP_SUPPORT

#ifdef FP_SUPPORT
typedef short fp_env_t[512];
typedef unsigned int fp_flags_t[4];
extern int oss_fp_check (void);
extern void oss_fp_save (short *envbuf, fp_flags_t flags);
extern void oss_fp_restore (short *envbuf, fp_flags_t flags);
#   define FP_SAVE(envbuf, flags)      oss_fp_save(envbuf, flags)
#   define FP_RESTORE(envbuf, flags)      oss_fp_restore(envbuf, flags)
#endif
xenon
New Member
 
Posts: 6
Joined: Sat Apr 03, 2010 11:19 am

Re: System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby cesium » Sun Apr 04, 2010 7:19 pm

Sorry, I meant to comment out (not uncomment) VDEV_SUPPORT. Just comment/erase "#define VDEV_SUPPORT" in the bsddefs.h file. As for a trace, unfortunately I'm not a FreeBSD user, so I don't know...
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby adamk » Mon Apr 05, 2010 2:45 pm

Here, check out this section from the handbook on getting a kernel dump from a crash. Once your system stops working, make sure you wait a few minutes for the kernel to dump the contents from the RAM to swap. Ideally your machine will reboot after it's done dumping the RAM.

I will say that the easiest way I've found to grab a backtrace, though, is via a serial console.

Adam
adamk
Member
 
Posts: 78
Joined: Fri Jun 11, 2004 1:50 pm

Re: System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby xenon » Mon Apr 05, 2010 6:04 pm

adamk wrote:Here, check out this section from the handbook on getting a kernel dump from a crash. Once your system stops working, make sure you wait a few minutes for the kernel to dump the contents from the RAM to swap. Ideally your machine will reboot after it's done dumping the RAM.

I will say that the easiest way I've found to grab a backtrace, though, is via a serial console.

Adam


Thanks I test is.
The machine dont reboot, im wait all the night = no reboot ...
I just see that when VirtualBox is not in use, the system dont freeze when I see video or listen music -_-
xenon
New Member
 
Posts: 6
Joined: Sat Apr 03, 2010 11:19 am

Re: System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby cesium » Mon Apr 05, 2010 11:11 pm

The is interesting. virtualbox as in the app, or the vbox modules? If its the modules, than I strongly suspect a FreeBSD bug.... Also, did you try without VDEV_SUPPORT defined?
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby xenon » Mon Apr 05, 2010 11:54 pm

cesium wrote:The is interesting. virtualbox as in the app, or the vbox modules? If its the modules, than I strongly suspect a FreeBSD bug.... Also, did you try without VDEV_SUPPORT defined?


Hi,
The system freeze only if a Virtual machine is launched. If i dont use a Virtual Machine, i can view the video and listen a music without a freeze after "X" seconds/minutes ...
I test without VDEV_SUPPORT and i say the result =)

Thanks for your help :)

EDIT: No, he doesnt work.
xenon
New Member
 
Posts: 6
Joined: Sat Apr 03, 2010 11:19 am

Re: System Freeze (FreeBSD 8 / OSS 4.2 [build 2002])

Postby xenon » Wed Apr 07, 2010 10:52 am

Hi,
I found the solution !
The problem is the VT-x/AMD-v on VirtualBox.
Disable "VT-x/AMD-v" on the option of the Virtual Machine in virtualbox and i solve the problem.

Thanks for your help =)
Bye.
xenon
New Member
 
Posts: 6
Joined: Sat Apr 03, 2010 11:19 am


Return to BSD

Who is online

Users browsing this forum: No registered users and 1 guest