Discussion:
[ros-bugs] [jira] (CORE-14617) HDA_FDOQueryBusRelations fails when loading hd audio
Julio Carchi (JIRA)
2018-05-12 12:17:00 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-14617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julio Carchi updated CORE-14617:
--------------------------------
Attachment: (was: IMG_20180512_044947.jpg)
HDA_FDOQueryBusRelations fails when loading hd audio
----------------------------------------------------
Key: CORE-14617
URL: https://jira.reactos.org/browse/CORE-14617
Project: Core ReactOS
Issue Type: Bug
Reporter: Julio Carchi
Assignee: Thomas Faber
Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.
3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.
Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)
The line 674 is
{noformat}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{noformat}
--
This message was sent by Atlassian JIRA
(v7.3.2#73013)
Julio Carchi (JIRA)
2018-05-12 12:16:01 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-14617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julio Carchi updated CORE-14617:
--------------------------------
Attachment: IMG_20180512_044947.jpg
HDA_FDOQueryBusRelations fails when loading hd audio
----------------------------------------------------
Key: CORE-14617
URL: https://jira.reactos.org/browse/CORE-14617
Project: Core ReactOS
Issue Type: Bug
Reporter: Julio Carchi
Assignee: Thomas Faber
Attachments: IMG_20180512_044947.jpg
Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.
3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.
Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)
The line 674 is
{noformat}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{noformat}
--
This message was sent by Atlassian JIRA
(v7.3.2#73013)
Julio Carchi (JIRA)
2018-05-12 11:04:03 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-14617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=103967#comment-103967 ]

Julio Carchi commented on CORE-14617:
-------------------------------------

BTW if the 2nd stage is performed on Real Hardware, the break occurs during the "installing devices" step
HDA_FDOQueryBusRelations fails when loading hd audio
----------------------------------------------------
Key: CORE-14617
URL: https://jira.reactos.org/browse/CORE-14617
Project: Core ReactOS
Issue Type: Bug
Reporter: Julio Carchi
Assignee: Thomas Faber
Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.
3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.
Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)
The line 674 is
{noformat}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{noformat}
--
This message was sent by Atlassian JIRA
(v7.3.2#73013)
Thomas Faber (JIRA)
2018-05-12 07:59:01 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-14617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Faber updated CORE-14617:
--------------------------------
Status: Open (was: Untriaged)
Assignee: Thomas Faber (was: Bug Zilla)

Thanks, you seem to be the first person who's actually able to reproduce this in 3rd stage rather than on boot (which means we can somewhat rule out the PNP manager). I'll try to post a patch that adds some debug prints so we can figure out where the null pointers are coming from.
HDA_FDOQueryBusRelations fails when loading hd audio
----------------------------------------------------
Key: CORE-14617
URL: https://jira.reactos.org/browse/CORE-14617
Project: Core ReactOS
Issue Type: Bug
Reporter: Julio Carchi
Assignee: Thomas Faber
Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.
3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.
Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)
The line 674 is
{noformat}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{noformat}
--
This message was sent by Atlassian JIRA
(v7.3.2#73013)
Julio Carchi (JIRA)
2018-05-12 03:06:00 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-14617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julio Carchi updated CORE-14617:
--------------------------------
Description:
Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.

3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.

Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)

The line 674 is
{noformat}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{noformat}

was:
Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.

3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.

Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)

The line 674 is
{{noformat}}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{{noformat}}
HDA_FDOQueryBusRelations fails when loading hd audio
----------------------------------------------------
Key: CORE-14617
URL: https://jira.reactos.org/browse/CORE-14617
Project: Core ReactOS
Issue Type: Bug
Reporter: Julio Carchi
Assignee: Bug Zilla
Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.
3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.
Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)
The line 674 is
{noformat}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{noformat}
--
This message was sent by Atlassian JIRA
(v7.3.2#73013)
Julio Carchi (JIRA)
2018-05-12 02:43:01 UTC
Permalink
Julio Carchi created CORE-14617:
-----------------------------------

Summary: HDA_FDOQueryBusRelations fails when loading hd audio
Key: CORE-14617
URL: https://jira.reactos.org/browse/CORE-14617
Project: Core ReactOS
Issue Type: Bug
Reporter: Julio Carchi
Assignee: Bug Zilla


Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.

3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.

Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)

The line 674 is
{{noformat}}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{{noformat}}



--
This message was sent by Atlassian JIRA
(v7.3.2#73013)
Julio Carchi (JIRA)
2018-05-16 16:59:00 UTC
Permalink
[ https://jira.reactos.org/browse/CORE-14617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julio Carchi updated CORE-14617:
--------------------------------
Description:
Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.

3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.

Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)

The line 674 is
{noformat}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{noformat}

*Update*
I think found the bug
On debug log says:
{noformat}
(drivers/wdm/audio/hdaudbus/fdo.cpp:214) hda Codec 0 Vendor:8094 ... NodeStart 255 NodeCount 255
{noformat}
this is key to find the bug, in the file there is a loop 2 lines below:
{noformat}
216 for (NodeId = Response.start; NodeId < Response.start + Response.count; NodeId++) {
{noformat}
then there are 2 DPRINTs that repeats a lot of times
{noformat}
(drivers/wdm/audio/hdaudbus/fdo.cpp:222) NodeId 255 GroupType 1
(drivers/wdm/audio/hdaudbus/fdo.cpp:238) NodeId ff found ab audio function group!
{noformat}
and so on 254 times!
looking after at dmesg, I found that the loop stops at 509 and then breaks the debugger, maybe these are the clues to find the guilty line!

was:
Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.

3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.

Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)

The line 674 is
{noformat}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{noformat}
HDA_FDOQueryBusRelations fails when loading hd audio
----------------------------------------------------
Key: CORE-14617
URL: https://jira.reactos.org/browse/CORE-14617
Project: Core ReactOS
Issue Type: Bug
Reporter: Julio Carchi
Assignee: Thomas Faber
Recently bought notebook HP 245 G6, as there is no optical drive, 1st and 2nd stage were performed from Qemu VM using a linux live usb, so ReactOS could be installed at hard disk.
3rd stage (first boot) starts well, showing some new hardware wizards for new devices (mostly ACPI controllers), but when the system loads the multimedia devices, it break the debugger and shows a prompt.
Doing a backtrace the Eip points to HDAudBus.sys (drivers/wdm/audio/hdaudbus/fdo.cpp:674) (HDA_FDOQueryBusRelations)
The line 674 is
{noformat}
672 for (AFGIndex = 0; AFGIndex < Codec->AudioGroupCount; AFGIndex++)
673 {
*674 DeviceRelations->Objects[DeviceRelations->Count] = Codec->AudioGroups[AFGIndex]->ChildPDO;*
675 ObReferenceObject(Codec->AudioGroups[AFGIndex]->ChildPDO);
676 DeviceRelations->Count++;
677 }
{noformat}
*Update*
I think found the bug
{noformat}
(drivers/wdm/audio/hdaudbus/fdo.cpp:214) hda Codec 0 Vendor:8094 ... NodeStart 255 NodeCount 255
{noformat}
{noformat}
216 for (NodeId = Response.start; NodeId < Response.start + Response.count; NodeId++) {
{noformat}
then there are 2 DPRINTs that repeats a lot of times
{noformat}
(drivers/wdm/audio/hdaudbus/fdo.cpp:222) NodeId 255 GroupType 1
(drivers/wdm/audio/hdaudbus/fdo.cpp:238) NodeId ff found ab audio function group!
{noformat}
and so on 254 times!
looking after at dmesg, I found that the loop stops at 509 and then breaks the debugger, maybe these are the clues to find the guilty line!
--
This message was sent by Atlassian JIRA
(v7.3.2#73013)

Loading...