Opened 5 years ago

Closed 3 years ago

#11188 closed bug (not reproducible)

[auich] driver freezes VirtualBox after uptime of 27 hours

Reported by: eanyx Owned by: korli
Priority: normal Milestone: R1
Component: Drivers/Audio/auich Version: R1/Development
Keywords: uptime Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

This bug is related to #6498 (closed).

On a recent hybrid gcc 2 nightly (hrev47687) and virtualbox v 4.3.14 hrev95030, haiku at full load (100 % cpu) crash after 27 hours.

Haiku need more uptime (for exemple for 3D raytracing/rendering).

See attachements.

Attachments (10)

uptime.sh (104 bytes ) - added by eanyx 5 years ago.
uptime script
uptime.out (122.4 KB ) - added by eanyx 5 years ago.
uptime results
syslog (373.3 KB ) - added by eanyx 5 years ago.
syslog
uptime.2.out (123.9 KB ) - added by eanyx 4 years ago.
uptime_21_and_22_august_2015.out
syslog.old_before_crash (512.0 KB ) - added by eanyx 4 years ago.
syslog.old_before_crash_22_august_2015
snapshot_haiku_hrev49548_without_sound_driver-no_hang.png (88.9 KB ) - added by eanyx 4 years ago.
haiku on virtualbox without sound driver no freeze
Screenshot_haiku-with_audio_driver_intel_hd-no_hang.png (405.9 KB ) - added by eanyx 4 years ago.
haiku on virtualbox with intel hd driver no freeze
uptime_ubuntu_15.10_wily.out (583.7 KB ) - added by eanyx 4 years ago.
uptime ubuntu 15.10 wily without freeze
syslog.2 (206.5 KB ) - added by eanyx 3 years ago.
uptime.out.tar.gz (19.3 KB ) - added by eanyx 3 years ago.

Change History (25)

by eanyx, 5 years ago

Attachment: uptime.sh added

uptime script

by eanyx, 5 years ago

Attachment: uptime.out added

uptime results

by eanyx, 5 years ago

Attachment: syslog added

syslog

comment:1 by eanyx, 4 years ago

With recent version of official Haiku hrev49548 hybrid gcc 2, still have the same uptime problem.

My physical host is a RHEL 6.5 (Redhat Enterprise Linux) with virtualbox 4.3.14 v95030.

The crash of the OS is at the same time (+/- 1 day, 3 hours and 2 minutes).

There seems to have some buffer overflow, or other hard coded values.

Last edited 4 years ago by eanyx (previous) (diff)

by eanyx, 4 years ago

Attachment: uptime.2.out added

uptime_21_and_22_august_2015.out

by eanyx, 4 years ago

Attachment: syslog.old_before_crash added

syslog.old_before_crash_22_august_2015

comment:2 by mmlr, 4 years ago

You mention a crash, can you please attach the corresponding output (screenshot of KDL or consoled). Or is there no crash but it just freezes like in ticket #6498?

If it just freezes, please try to get into KDL (using VBoxManage controlvm <VMName> keyboardputscancode 38 54 20 from the host) and check what is running (using the running command) and then get a backtrace (with bt <thread>) of all the running threads.

comment:3 by mmlr, 4 years ago

Interestingly I just stumbled upon that number (27:03:11 actually) in the context of audio, where that's the time it takes to wrap a 32 bit sample count at 44.1 kHz. The syslog you attached as well as ticket #6498 point to virtual AC97 audio being present and therefore the auich driver being in use. It could therefore be a driver issue, or the issue could be somewhere else in the audio path (but I guess others would've noticed). To check if it's within the audio path you could disable emulation of the audio device. If it then doesn't freeze you could check if the auich driver is to blame by changing the emulated audio hardware to something else and seeing if it then also doesn't freeze.

comment:4 by eanyx, 4 years ago

After disabling the AC97 audio driver in Virtualbox I didn't met this hang. I also try with audio driver Intel HD audio and didn't met the hang too.

So I think there is a bug in AC97 driver.

by eanyx, 4 years ago

haiku on virtualbox without sound driver no freeze

by eanyx, 4 years ago

haiku on virtualbox with intel hd driver no freeze

comment:5 by korli, 4 years ago

The problem is to confirm a bug in Haiku or in Virtualbox. Please check with virtual AC97 audio and another OS that Virtualbox doesn't freeze.

comment:6 by eanyx, 4 years ago

On Ubuntu Wily 15.10 with the same virtualbox configuration I didn't see the freeze (more than 3 days uptime).

So it seems the bug came from the haiku AC97 driver.

Last edited 4 years ago by eanyx (previous) (diff)

by eanyx, 4 years ago

uptime ubuntu 15.10 wily without freeze

comment:8 by diver, 4 years ago

After I switched to HDA driver (which doesn't produce any sound in VBox) in VM settings VirtualBox stopped freezing for me.

comment:9 by diver, 4 years ago

Component: - GeneralDrivers/Audio/auich
Owner: changed from nobody to korli
Summary: Virtual box uptime is no more than 27 hours[auich] driver freezes VirtualBox after uptime of 27 hours

comment:10 by eanyx, 4 years ago

When host is running properly, I can enter KDL with VBoxManage controlvm <VMName> keyboardputscancode 38 54 20, and I have the backtrace to serial output.

But when system freezes, the screen goes black, and I cannot enter KDL. Keyboard and mouse seem to not answer at all. And no output in serial file if entered in KDL.

So blocked, need to study auich driver source code to see what is the culprit.

Last edited 4 years ago by eanyx (previous) (diff)

comment:11 by korli, 4 years ago

I tried VirtualBox with ICH AC97 audio device: it seems Haiku picks 48kHz as sample rate, while VirtualBox outputs 44kHz to PulseAudio (the host audio system). The Haiku auich driver uses a int64 as frames count, I don't see anything obvious related here.

Some things to try

  • force 44100Hz as samplerate in auich.settings.
  • check with a recent VirtualBox version.

by eanyx, 3 years ago

Attachment: syslog.2 added

comment:12 by eanyx, 3 years ago

Has a Patch: set

by eanyx, 3 years ago

Attachment: uptime.out.tar.gz added

comment:13 by eanyx, 3 years ago

On CentOS 7.3 (kernel 3.10.0-514.6.1.el7.x86_64) with virtualbox 5.1.12 with haiku compiled from source (hrev 51018 hybrid gcc2 x86), haiku doesn't hang after 27 hours of uptime. See logs attached.

You can close this case

Last edited 3 years ago by eanyx (previous) (diff)

comment:14 by pulkomandy, 3 years ago

Has a Patch: unset

comment:15 by pulkomandy, 3 years ago

Resolution: not reproducible
Status: newclosed

Thanks for reporting.

Note: See TracTickets for help on using tickets.