Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2023 11:55:47 +0100
From:      andrew@fubar.geek.nz
To:        Mahesh Vardhamanaiah <maheshmv@juniper.net>
Cc:        Sha Faisal <sfaisal@juniper.net>, "freebsd-arm@FreeBSD.org" <freebsd-arm@freebsd.org>, Steve Kiernan <stevek@juniper.net>, Amit Verma <amitv@juniper.net>
Subject:   Re: Kernel crash before login prompt
Message-ID:  <2bf93ae22548705e689e0bdd47f9d7db@fubar.geek.nz>
In-Reply-To: <PH0PR05MB7782189DE6FCAF371DC918E7D52AA@PH0PR05MB7782.namprd05.prod.outlook.com>
References:  <BYAPR05MB66779D6947C5BE371C8EA3B3B724A@BYAPR05MB6677.namprd05.prod.outlook.com> <BYAPR05MB6677A86EDDAEDBE5E0DD6266B724A@BYAPR05MB6677.namprd05.prod.outlook.com> <E03D720A-B18B-45C6-9BD6-7CA6FDA83560@fubar.geek.nz> <BYAPR05MB6677E63414F88873FF17174BB724A@BYAPR05MB6677.namprd05.prod.outlook.com> <6537067F-670A-4B52-87FA-FF2DBAD68120@fubar.geek.nz> <BYAPR05MB667764EF552E113B08FD1222B725A@BYAPR05MB6677.namprd05.prod.outlook.com> <d12ce5cd719f9e1c2f4c5f53b89e0265@fubar.geek.nz> <BYAPR05MB6677AED54B7EA054E7B8C170B725A@BYAPR05MB6677.namprd05.prod.outlook.com> <1327534fa4a1da584a3a38b194999595@fubar.geek.nz> <BYAPR05MB6677FCD23054EF4D9CA0E4EAB725A@BYAPR05MB6677.namprd05.prod.outlook.com> <BYAPR05MB6677FCA278A0C5FED1B9B423B725A@BYAPR05MB6677.namprd05.prod.outlook.com> <PH0PR05MB7782189DE6FCAF371DC918E7D52AA@PH0PR05MB7782.namprd05.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2023-06-30 10:48, Mahesh Vardhamanaiah wrote:
> Hi Andrew,
> 
> We are observing that self is getting -65536 at line 1329 in
> sched_pickcpu() before panic.

What is the disassembly around reading the cpuid? It looks like it is 
getting 0xffff0000 when it should be zero.

> 
> From the code flow
> 
> sched_add [1](struct thread [2] *td [3], int flags [4])->
> sched_pickcpu()->PCPU_GET
> 
> as below
> 
> static int
> 
>  1321 [5] sched_pickcpu [6](struct thread [2] *td [3], int flags [4])
> 
>  1322 [7] {
> 
>  1323 [8]         struct cpu_group [9] *cg [10], *ccg;
> 
>  1324 [11]         struct td_sched [12] *ts [13];
> 
>  1325 [14]         struct tdq [15] *tdq [15];
> 
>  1326 [16]         cpuset_t [17] *mask [18];
> 
>  1327 [19]         int cpu [20], pri, r [21], self [22], intr;
> 
>  1328 [23]
> 
>  1329 [24]         self [22] = PCPU_GET [25](cpuid [26]);
> 
> PCPU_GET is defined differently in Freebsd14 compared to Freebsd12 but
> I am  unable to dump the pcpup in db> prompt is it proper ?
> 
> Is it expected to be a global ?

You can print all pcpu structs with "show allpcpu".

Andrew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2bf93ae22548705e689e0bdd47f9d7db>