Repository navigation
[BUG] kernel reporting bug when using same major ABI with different minor ABIs #822
Copy link
Copy link
Closed
Labels
APLApplies to ApolloLake platformApplies to ApolloLake platformBYTApplies to Baytrail platformApplies to Baytrail platformWHLApplies to WhiskeyLake platformApplies to WhiskeyLake platformbugSomething isn't workingSomething isn't working
Description
Summary
Error: Incompatible ABI version on all platforms,and failed to load DSP topology.
To Reproduce
1.aplay -l
Screenshots or console output
aplay: device_list:270: no soundcards found...
Environment
sof master: 6a9b90b
kernel sof-dev: 46c2b85
tplg: sof-apl-pcm512x.tplg & sof-apl-nocodec.tplg & sof-byt-rt5651.tplg
Dmesg
[ 4.209685] wm8804 i2c-1AEC8804:00: Failed to read device ID: -121
[ 4.209739] wm8804: probe of i2c-1AEC8804:00 failed with error -121
[ 4.224702] sof-audio-pci 0000:00:0e.0: PCI DSP detected
[ 4.225262] sof-audio-pci 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if 0x040100
[ 4.225362] sof-audio-pci 0000:00:0e.0: checking for capabilities at offset 0xc00
[ 4.225365] sof-audio-pci 0000:00:0e.0: found ML capability at 0xc00
[ 4.225367] sof-audio-pci 0000:00:0e.0: checking for capabilities at offset 0x800
[ 4.225368] sof-audio-pci 0000:00:0e.0: found DSP capability at 0x800
[ 4.225371] sof-audio-pci 0000:00:0e.0: checking for capabilities at offset 0x500
[ 4.225373] sof-audio-pci 0000:00:0e.0: found GTS capability at 0x500
[ 4.225376] sof-audio-pci 0000:00:0e.0: checking for capabilities at offset 0x1f00
[ 4.225377] sof-audio-pci 0000:00:0e.0: found DRSM capability at 0x1f00
[ 4.225380] sof-audio-pci 0000:00:0e.0: checking for capabilities at offset 0x700
[ 4.225382] sof-audio-pci 0000:00:0e.0: found SPIB capability at 0x700
[ 4.225395] sof-audio-pci 0000:00:0e.0: DMA mask is 64 bit
[ 4.225398] sof-audio-pci 0000:00:0e.0: hda global caps = 0x1006701
[ 4.225401] sof-audio-pci 0000:00:0e.0: detected 6 playback and 7 capture streams
[ 4.225493] sof-audio-pci 0000:00:0e.0: use msi interrupt mode
[ 4.225495] sof-audio-pci 0000:00:0e.0: using HDA IRQ 125
[ 4.227714] sof-audio-pci 0000:00:0e.0: using IPC IRQ 125
[ 4.230528] sof-audio-pci 0000:00:0e.0: Debug PCIR: 00000000 at 00000044
[ 4.230533] sof-audio-pci 0000:00:0e.0: PP capability, will probe DSP later.
[ 4.230566] sof-audio-pci 0000:00:0e.0: Linked as a consumer to 0000:00:02.0
[ 4.230577] sof-audio-pci 0000:00:0e.0: bound 0000:00:02.0 (ops 0xffffffff868ad860)
[ 4.230579] sof-audio-pci 0000:00:0e.0: Turning i915 HDAC power on
[ 4.236903] sof-audio-pci 0000:00:0e.0: Debug PCIR: 00000040 at 00000048
[ 4.236908] sof-audio-pci 0000:00:0e.0: Debug PCIW: 00000000 at 00000048
[ 4.241429] sof-audio-pci 0000:00:0e.0: Debug PCIR: 00000000 at 00000048
[ 4.241435] sof-audio-pci 0000:00:0e.0: Debug PCIW: 00000040 at 00000048
[ 4.241437] sof-audio-pci 0000:00:0e.0: hda codecs found, mask 4
[ 4.241484] sof-audio-pci 0000:00:0e.0: HDA codec #2 probed OK: response: 8086280a
[ 4.241908] sof-audio-pci 0000:00:0e.0: Turning i915 HDAC power off
[ 4.243279] sof-audio-pci 0000:00:0e.0: Debug PCIR: 00000040 at 00000048
[ 4.243308] sof-audio-pci 0000:00:0e.0: loading firmware
[ 4.338230] sof-audio-pci 0000:00:0e.0: Debug PCIR: 00000002 at 00000048
[ 4.338236] sof-audio-pci 0000:00:0e.0: Debug PCIW: 00000000 at 00000048
[ 4.338240] sof-audio-pci 0000:00:0e.0: Debug PCIR: 00000000 at 00000044
[ 4.338243] sof-audio-pci 0000:00:0e.0: Debug PCIW: 00000004 at 00000044
[ 4.338245] sof-audio-pci 0000:00:0e.0: booting DSP firmware
[ 4.338329] sof-audio-pci 0000:00:0e.0: period_bytes:0x0
[ 4.338331] sof-audio-pci 0000:00:0e.0: periods:1
[ 4.338372] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x3030303 successful
[ 4.338377] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x3030302 successful
[ 4.338380] sof-audio-pci 0000:00:0e.0: unstall/run core: core_mask = 1
[ 4.338384] sof-audio-pci 0000:00:0e.0: DSP core(s) enabled? 1 : core_mask 1
[ 4.338905] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x40000000 successful
[ 4.338910] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x3010202 successful
[ 4.355580] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x5000001 successful
[ 4.369562] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x5 successful
[ 4.369569] sof-audio-pci 0000:00:0e.0: Firmware download successful, booting...
[ 4.371744] sof-audio-pci 0000:00:0e.0: ipc rx: 0x70000000: FW_READY
[ 4.371749] sof-audio-pci 0000:00:0e.0: ipc: DSP is ready 0x70000000 offset 0x81000
[ 4.371766] sof-audio-pci 0000:00:0e.0: Firmware info: version 1:1:0-6a9b9
[ 4.371768] sof-audio-pci 0000:00:0e.0: Firmware: ABI 3:5:0 Kernel ABI 3:4:0
[ 4.371770] sof-audio-pci 0000:00:0e.0: Firmware debug build 1 on Apr 12 2019-02:17:55 - options:
GDB: disabled
lock debug: disabled
lock vdebug: disabled
[ 4.371800] sof-audio-pci 0000:00:0e.0: found ext header type 1 size 0xb8
[ 4.371852] sof-audio-pci 0000:00:0e.0: mailbox upstream 0x81000 - size 0x1000
[ 4.371853] sof-audio-pci 0000:00:0e.0: mailbox downstream 0xa0000 - size 0x2000
[ 4.371855] sof-audio-pci 0000:00:0e.0: stream region 0xc1000 - size 0x1000
[ 4.371859] sof-audio-pci 0000:00:0e.0: ipc rx done: 0x70000000: FW_READY
[ 4.371868] sof-audio-pci 0000:00:0e.0: firmware boot complete
[ 4.371878] sof-audio-pci 0000:00:0e.0: Debug PCIR: 00000000 at 00000048
[ 4.371882] sof-audio-pci 0000:00:0e.0: Debug PCIW: 00000002 at 00000048
[ 4.371887] sof-audio-pci 0000:00:0e.0: Debug PCIR: 00000004 at 00000044
[ 4.371890] sof-audio-pci 0000:00:0e.0: Debug PCIW: 00000000 at 00000044
[ 4.371935] sof-audio-pci 0000:00:0e.0: generating page table for 0000000067f0a1f9 size 0x10000 pages 16
[ 4.371937] sof-audio-pci 0000:00:0e.0: dma_trace_pages: 16
[ 4.371965] sof-audio-pci 0000:00:0e.0: period_bytes:0x0
[ 4.371966] sof-audio-pci 0000:00:0e.0: periods:1
[ 4.371973] sof-audio-pci 0000:00:0e.0: stream_tag: 1
[ 4.371978] sof-audio-pci 0000:00:0e.0: ipc tx: 0x90010000: GLB_TRACE_MSG
[ 4.372477] sof-audio-pci 0000:00:0e.0: ipc tx succeeded: 0x90010000: GLB_TRACE_MSG
[ 4.372570] sof-audio-pci 0000:00:0e.0: created machine bxt-pcm512x
[ 4.372571] sof-audio-pci 0000:00:0e.0: Completing SOF PCI probe
[ 4.377256] HDMI HDA Codec ehdaudio0D2: Max dais supported: 3
[ 4.384353] bxt-pcm512x bxt-pcm512x: info: override FE DAI link SSP5-Codec
[ 4.384357] bxt-pcm512x bxt-pcm512x: info: override FE DAI link iDisp1
[ 4.384358] bxt-pcm512x bxt-pcm512x: info: override FE DAI link iDisp2
[ 4.384359] bxt-pcm512x bxt-pcm512x: info: override FE DAI link iDisp3
[ 4.384425] sof-audio-pci 0000:00:0e.0: loading topology:intel/sof-tplg/sof-apl-pcm512x.tplg
[ 4.392905] sof-audio-pci 0000:00:0e.0: Topology: ABI 3:5:0 Kernel ABI 3:4:0
[ 4.392911] sof-audio-pci 0000:00:0e.0: error: Incompatible ABI version 3:5:0
[ 4.392923] sof-audio-pci 0000:00:0e.0: error: tplg component load failed -22
[ 4.392936] sof-audio-pci 0000:00:0e.0: error: failed to load DSP topology -22
[ 4.392941] sof-audio-pci 0000:00:0e.0: ASoC: failed to probe component -22
[ 4.392966] bxt-pcm512x bxt-pcm512x: ASoC: failed to instantiate card -22
[ 4.393001] bxt-pcm512x bxt-pcm512x: snd_soc_register_card failed -22
[ 4.393017] bxt-pcm512x: probe of bxt-pcm512x failed with error -22
[ 4.918264] random: crng init done
[ 4.918269] random: 7 urandom warning(s) missed due to ratelimiting
[ 5.372466] sof-audio-pci 0000:00:0e.0: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 5.372481] sof-audio-pci 0000:00:0e.0: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 5.599230] systemd-udevd (1484) used greatest stack depth: 11400 bytes left
[ 6.132243] Generic PHY r8169-200:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=r8169-200:00, irq=IGNORE)
[ 6.245007] r8169 0000:02:00.0 enp2s0: Link is Down
[ 6.252815] Generic PHY r8169-300:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=r8169-300:00, irq=IGNORE)
[ 6.366819] r8169 0000:03:00.0 enp3s0: Link is Down
[ 8.350099] r8169 0000:02:00.0 enp2s0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 8.350123] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready
Log file
dmesg.log
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
APLApplies to ApolloLake platformApplies to ApolloLake platformBYTApplies to Baytrail platformApplies to Baytrail platformWHLApplies to WhiskeyLake platformApplies to WhiskeyLake platformbugSomething isn't workingSomething isn't working
Activity
lgirdwood commentedon Apr 15, 2019
@Jiangxinx this is incorrectly being reported as a bug by the kernel. I've updated the title.
@plbossart fyi.
[-][BUG] Error: Incompatible ABI version on all platforms.[/-][+][BUG] kernel reporting bug when using same major ABI with different minor ABIs [/+]lgirdwood commentedon Apr 15, 2019
@bardliao only major ABI updates are incompatible. Minor ABI version changes are backwards compatible. Can you fix this error handling in the kernel.
ranj063 commentedon Apr 15, 2019
@lgirdwood the check for minor ABI was intentional in the kernel as even minor ABI updates could require new tokens in the tplg that may not have previously existed.
lgirdwood commentedon Apr 16, 2019
@ranj063 new or unknown tokens should just be ignored by kernel. The point is that the new feature will work as long as both minor versions are compatible but existing features will work regardless (as long as major ABI is compatible).
lgirdwood commentedon Apr 16, 2019
@xiulipan to fix this you need
1,2 and 4 are below. Need a separate patch for each. Build tested only.
bardliao commentedon Apr 16, 2019
@ranj063 @plbossart I tried to add new dai token in topology and kernel. Firstly, I checked the value of comp_dai.reserve to make sure my patch works. Secondly, reverted the patch on kernel side and confirmed the topology will ignore it without error. So I think it's fine if we only check ABI major version in topology. And it's FW's duty to make sure it's backward compatible if ABI major version is not changed.
On the other hand, we will get ipc error if FW or tplg is not compatible with this kernel. Is there any significant difference when we load topology failed with ipc error or ABI checking error?
plbossart commentedon Apr 16, 2019
xiulipan commentedon Apr 16, 2019
@plbossart @lgirdwood
My suggestion here it to revert the ABI changes on SOF first. And have some discussion about how should we deal with the ABI changes. And then make some written-down rules or guides for ABI and make somebody( I will be volunteer if nobody want. I do not want to see chaos like this anymore caused by ABI) to have manual test to make sure every ABI change is fully reviewed and can be backwards compatible. Also need to keep a time alignment for linux PR and sof PR merging.
I do not like to keep some un-decided changes that blocks everything now. I do see some PR that is merged without basically test. We can indeed to apply some workaround to have manual test but now we are shorthanded and can not make sure to cover every PR.
lgirdwood commentedon Apr 17, 2019
Yes there is, I agree the pipeline that contains the new feature will not exist, but other pipelines/components should still be created without failing big. The implications for failing big are no audio whilst there may be audio if we can continue (depending on topology).
Yes this will happen, there will be error/warnings in the log showing the ABI delta and missing components. The end result is the same as failing big in that the user needs to update his kernel to get the new feature working, but at least he may have working audio until that happens if we continue.
If we make new DAIs or new components a MAJOR ABI change then we make a rod for our own back.
Every MAJOR updates would mean.
Now lets try and keep 1,2 and 3 above in sync to avoid the angry email from Linus when his laptop audio breaks. i.e. it was working yesterday but no longer works now after updating kernel, FW, topology.
To further make things harder, we will have different SOF vendors adding new DAIs and components, meaning managing 1,2 and 3 on an ad-hoc and potentially frequent basis.
New components and DAIs should be MINOR, just like the relationship versioning between kernel, glibc and userspace. New kernel, glibc API features are added via MINOR updates and never break existing userspace. See the man pages, there are lots of references for "only available in kernel x.y onward" or "only in glibc x.y onward". glibc MAJOR has not changed in about 20 years AFAICT.
plbossart commentedon Apr 17, 2019
@lgirdwood So you are essentially saying that we never use the MAJOR version and never check for MINOR versions either. Why do we have an ABI check then? Nothing is ever incompatible in your description.
plbossart commentedon Apr 17, 2019
I will also argue that someone using a firmware+topology more recent than the kernel does not fall in the category of 'we don't break userspace'. The only compatibility we care about is people updating the kernel and working with older firmware+topology. The case of using a firmware+topology more recent than the kernel is maybe valid for developers, certainly not for distros.