From nobody Thu Dec 28 01:08:43 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T0r4S2d3Xz54mpM for ; Thu, 28 Dec 2023 01:08:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T0r4S0lYCz3KvM for ; Thu, 28 Dec 2023 01:08:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-555144cd330so2304412a12.2 for ; Wed, 27 Dec 2023 17:08:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1703725734; x=1704330534; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=s9Mun0yrcopsahTGpNyyGsvSq4ccY+gk053xPIPX41w=; b=BKEAl3XVuFHIg83Qo0OY/u/Ph9f/DvkgvtceM/DYHkY91rKoMKONL+EdahIP+FMvIy w4NuaaQNIc8ZStJP96syd7LFTEFqdkYDcX4tsAmCzsVkH8alGw0TtoCVDzeA1mKB0DBh iwoOyuAjmdaDjQI3hspOKkv0H/1iZBKcHMBHAqPDKOeTi5zFWfWVMxuFhkDlDymLfwKc uu0S18/moH60scMuw3VTfJoNn4WEmxxGgpKHiDwU5B/KRkZFpDD4Gbub6BXQVDPh/iNP XDOakIzlZvF7QTrgJrZx2kQqNv9xnddOZBLBAIxbwfRuyoDWVHCM5fuFwAPrQQqF452A d0Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703725734; x=1704330534; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s9Mun0yrcopsahTGpNyyGsvSq4ccY+gk053xPIPX41w=; b=WjUIoTpb4fqUoqdM5sKEVyM/JKqLS7x6ixSsQzzLVsogZua/NYou8EBu+y6b3sLwgA WMA4oGEsa001+EZMbsYaOZMcPztYhPIMmA2T75fifJG/fvtLzQbr9aoywvmaIyZJHgHM +DMqn/pNSqdeYfhyBN0IcLjQiMoVcdsmfjwX7ItJP+Bp24ZZJBhW7+Dgr8/GrA3aG6YC cRRbwuEn+DGmQEmcfgKF7LEgwBfF3FNBlwl/WJ55wfnu/F+QJX6SCWz1XF1aJ5ag4LNi mfi1iPkHINp8e5TAjE8a8dIFs9NzZkyuoIMKdQKoPI+LNIHxmGb00hDz1E7fiXd0euiG wTkQ== X-Gm-Message-State: AOJu0YxfS9Pj9uwyVtXQeDrnMUnG6/nqhKhmcQRnupqlpWv8NLvHp5RF 7y6l4Uhoc3BvCqydIdNW8ZpNb6BDvWTlO4YikMkp4cwXN4OTnw== X-Google-Smtp-Source: AGHT+IFBRoXnOuWCZLB+6Q19diGvZ+o5ddsfciBXOYpjM6MgDeedF0cthSrbCAy9k3h1aix01EWJG5ZUTcn4N1by73Q= X-Received: by 2002:a17:906:2655:b0:a23:5076:763 with SMTP id i21-20020a170906265500b00a2350760763mr4436175ejc.123.1703725734422; Wed, 27 Dec 2023 17:08:54 -0800 (PST) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Wed, 27 Dec 2023 18:08:43 -0700 Message-ID: Subject: Re: MMCCAM hang To: "Bjoern A. Zeeb" Cc: "freebsd-arm@freebsd.org" , Warner Losh Content-Type: multipart/alternative; boundary="00000000000031f85b060d878f9a" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4T0r4S0lYCz3KvM --00000000000031f85b060d878f9a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Dec 27, 2023, 4:55=E2=80=AFPM Bjoern A. Zeeb wrote: > Hi, > > sdhci_fsl_fdt0: Desired SD/MMC freq: 50000000, actual: 50000000; base > 700000000 prescale 1 divisor 14 > GEOM: new disk sdda0 > sdda0 at sdhci_slot0 bus 0 scbus0 target 0 lun 0 > sdda0: Relative addr: 00000002 > Card features: > Card random: unblocking device. > GEOM: new disk sdda0boot0 > memory OCR: 00ff8080 > sdda0: Serial Number ....... > sdda0: MMCHC .................................. by 17 0x0000 > GEOM: new disk sdda0boot1 > uhub0: 2 ports with 2 removable, self powered > > at which point basically anything hangs. In auto-boot it is > before/during file-system checks. > In single user mode camcontrol devlist will show sdda0 > but > > root@:/ # gpart show sdda0 > load: 6.06 cmd: gpart 24 [g_waitfor_event] 1.28r 0.00u 0.00s 0% 2088k > {forever} > > > Unclear at which point I broke to debugger and this is where it seems to > hang: > > db> trace 100088 > Tracing pid 4 tid 100088 td 0xffff0000dc527000 > ipi_stop() at ipi_stop+0x34 > arm_gic_v3_intr() at arm_gic_v3_intr+0xe4 > intr_irq_handler() at intr_irq_handler+0x80 > handle_el1h_irq() at handle_el1h_irq+0x14 > --- interrupt > spinlock_exit() at spinlock_exit+0x44 > callout_reset_sbt_on() at callout_reset_sbt_on+0x210 > sdhci_cam_action() at sdhci_cam_action+0x284 > xpt_run_devq() at xpt_run_devq+0x4c8 > xpt_action_default() at xpt_action_default+0x470 > sddastart() at sddastart+0x1bc > xpt_run_allocq() at xpt_run_allocq+0xa8 > xpt_done_process() at xpt_done_process+0x610 > xpt_done_td() at xpt_done_td+0x1a8 > fork_exit() at fork_exit+0x8c > fork_trampoline() at fork_trampoline+0x18 > > > Anyone an idea? > Looks like deadlock with another thread. Anybody else in the time keeping / callout code? Warmer > -- > Bjoern A. Zeeb r15:7 > --00000000000031f85b060d878f9a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Dec 27, 2023, 4:55=E2=80=AFPM Bjoern A. Zeeb &= lt;bzeeb-lists@lists.zabb= adoz.net> wrote:
Hi,

sdhci_fsl_fdt0: Desired SD/MMC freq: 50000000, actual: 50000000; base 70000= 0000 prescale 1 divisor 14
GEOM: new disk sdda0
sdda0 at sdhci_slot0 bus 0 scbus0 target 0 lun 0
sdda0: Relative addr: 00000002
Card features: <MMC Memory High-Capacity>
Card random: unblocking device.
GEOM: new disk sdda0boot0
memory OCR: 00ff8080
sdda0: Serial Number .......
sdda0: MMCHC .................................. by 17 0x0000
GEOM: new disk sdda0boot1
uhub0: 2 ports with 2 removable, self powered

at which point basically anything hangs.=C2=A0 In auto-boot it is
before/during file-system checks.
In single user mode camcontrol devlist will show sdda0
but

root@:/ # gpart show sdda0
load: 6.06=C2=A0 cmd: gpart 24 [g_waitfor_event] 1.28r 0.00u 0.00s 0% 2088k=
{forever}


Unclear at which point I broke to debugger and this is where it seems to hang:

db> trace 100088
Tracing pid 4 tid 100088 td 0xffff0000dc527000
ipi_stop() at ipi_stop+0x34
arm_gic_v3_intr() at arm_gic_v3_intr+0xe4
intr_irq_handler() at intr_irq_handler+0x80
handle_el1h_irq() at handle_el1h_irq+0x14
--- interrupt
spinlock_exit() at spinlock_exit+0x44
callout_reset_sbt_on() at callout_reset_sbt_on+0x210
sdhci_cam_action() at sdhci_cam_action+0x284
xpt_run_devq() at xpt_run_devq+0x4c8
xpt_action_default() at xpt_action_default+0x470
sddastart() at sddastart+0x1bc
xpt_run_allocq() at xpt_run_allocq+0xa8
xpt_done_process() at xpt_done_process+0x610
xpt_done_td() at xpt_done_td+0x1a8
fork_exit() at fork_exit+0x8c
fork_trampoline() at fork_trampoline+0x18


Anyone an idea?


Looks like deadlock with another= thread. Anybody else in the time keeping / callout code?

Warmer
--
Bjoern A. Zeeb=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r15:7
--00000000000031f85b060d878f9a--