Status Update
Comments
ad...@google.com <ad...@google.com>
ad...@google.com <ad...@google.com> #2
We should report this problem upstream. Having DMA debugging enabled is certainly causing this lockdep splat to trigger. It looks like tmc_sync_etr_buf()
holds the drvdata->spinlock
and then calls into DMA APIs, which is not good. It would be better to somehow call DMA APIs without holding a spinlock like that.
sa...@google.com <sa...@google.com> #3
Reported upstream:
Is this issue easily reproducible if you run etm profiling manually with perf record -e cs_etm/autofdo/uk -a
?
And did you have any other config changes on top of enabled debug info?
ad...@google.com <ad...@google.com> #4
Is this issue easily reproducible if you run etm profiling manually
That command doesn't cause the lockdep splat if I run it at the login screen. Instead I get this DMA debug error
[ 43.368020] DMA-API: coresight-tmc 6048000.etr: device driver failed to check map error[device address=0x0000000fffc00000] [size=4194304 bytes] [mapped as single]
[ 43.368039] WARNING: CPU: 6 PID: 2961 at kernel/dma/debug.c:1047 check_unmap+0xd80/0x13c0
[ 43.368060] Modules linked in: 8021q lzo_rle lzo_compress zram zsmalloc uinput veth uvcvideo uvc rfcomm algif_hash algif_skcipher venus_dec venus_enc af_alg cros_ec_typec qcom_spmi_adc5 qcom_vadc_common qcom_spmi_temp_alarm roles snd_soc_rt5682_i2c snd_soc_rt5682 snd_soc_sc7180 snd_soc_rl6231 qcom_stats snd_soc_qcom_common hci_uart btqca ip6table_nat venus_core ath10k_snoc ath10k_core icc_bwmon ath coresight_etm4x coresight_funnel coresight_tmc coresight_replicator snd_soc_lpass_sc7180 snd_soc_lpass_hdmi snd_soc_lpass_cpu snd_soc_lpass_platform coresight snd_soc_max98357a xt_MASQUERADE xt_cgroup fuse mac80211 iio_trig_sysfs bluetooth cros_ec_sensors cros_ec_lid_angle ecdh_generic cros_ec_sensors_core ecc industrialio_triggered_buffer kfifo_buf cros_ec_sensorhub cfg80211 joydev
[ 43.368213] CPU: 6 PID: 2961 Comm: kworker/6:3 Not tainted 6.6.21-lockdep-01303-g479a6ef70fae #1 7e7c3a95f01f5b2f78f949dd2505f69e90c5f98d
[ 43.368223] Hardware name: Google Lazor (rev3 - 8) with KB Backlight (DT)
[ 43.368229] Workqueue: events free_event_data [coresight]
[ 43.368254] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 43.368262] pc : check_unmap+0xd80/0x13c0
[ 43.368270] lr : check_unmap+0xd78/0x13c0
[ 43.368277] sp : ffffffc087297860
[ 43.368282] pmr_save: 00000060
[ 43.368286] x29: ffffffc0872978e0 x28: dfffffc000000000 x27: ffffffc08729796c
[ 43.368299] x26: ffffff8080fd2dac x25: ffffffd77e7461a0 x24: 1ffffff0101fa5b5
[ 43.368310] x23: ffffff8080e10660 x22: 0000000fffc00000 x21: ffffff8080fd2d80
[ 43.368322] x20: ffffffd718f614a0 x19: 0000000000400000 x18: 0000000000000000
[ 43.368333] x17: 0000000000000000 x16: 0000000000000000 x15: 000000000000000a
[ 43.368344] x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000000
[ 43.368355] x11: 0000000000000003 x10: 0000000000000000 x9 : 2b6f88e1c8ddb100
[ 43.368367] x8 : 2b6f88e1c8ddb100 x7 : 0000000000000001 x6 : 0000000000000001
[ 43.368378] x5 : ffffffc087297528 x4 : ffffffd77f0f6320 x3 : ffffffd77ca7d510
[ 43.368389] x2 : 0000000000000001 x1 : 0000000000000004 x0 : ffffffd77e746e80
[ 43.368400] Call trace:
[ 43.368404] check_unmap+0xd80/0x13c0
[ 43.368413] debug_dma_unmap_page+0xe8/0x140
[ 43.368421] dma_free_pages+0x44/0x80
[ 43.368429] tmc_etr_free_flat_buf+0x140/0x170 [coresight_tmc 1f6e34c254c5bd8ef086dfe945ba2aa93e0bcfe5]
[ 43.368445] tmc_free_etr_buf+0xa8/0xe8 [coresight_tmc 1f6e34c254c5bd8ef086dfe945ba2aa93e0bcfe5]
[ 43.368458] tmc_free_etr_buffer+0xe4/0x188 [coresight_tmc 1f6e34c254c5bd8ef086dfe945ba2aa93e0bcfe5]
[ 43.368471] free_event_data+0x148/0x2b8 [coresight 652d5f1a302b25638601de5503f8866cafd8f16f]
[ 43.368485] process_scheduled_works+0x510/0xd60
[ 43.368494] worker_thread+0x6f0/0xa80
[ 43.368501] kthread+0x23c/0x358
[ 43.368507] ret_from_fork+0x10/0x20
[ 43.368515] ---[ end trace 0000000000000000 ]---
[ 43.368521] DMA-API: Mapped at:
[ 43.368525] debug_dma_map_page+0x78/0x290
[ 43.368533] dma_alloc_pages+0x78/0xa0
[ 43.368540] tmc_etr_alloc_flat_buf+0xf4/0x298 [coresight_tmc]
[ 43.368553] tmc_alloc_etr_buf+0x138/0x2d8 [coresight_tmc]
[ 43.368565] alloc_etr_buf+0x8c/0x148 [coresight_tmc]
I also tried logging in and running the command and still nothing. Probably because the chain entry #2 is from kswapd?
Description
Version used: 1.0.0-beta01
Steps to Reproduce the Problem:
Step #1: Open up a project that had been using the alpha libraries, and update them to beta01
Step #2: Notice that SliceAction constructors are marked as library-only
Step #3: Search the documentation for SliceAction, to determine how we are supposed to create instances of this class
Step #4: Land on
Step #5: Notice that this is an interface, with no details in the JavaDocs about where and how you are supposed to get instances of this interface
Step #6: Notice that the JavaDocs do point out an implementation of SliceAction... which is also named SliceAction
Step #7: Visit that class documentation at
At minimum, please consider putting documentation on the interface SliceAction to explain that the concrete implementation is the other SliceAction. Even better, rename one of these to be something other than SliceAction, so developers do not get mystified (e.g., code completion).
Thanks for considering this!