Deciphering traceback from ARM CPU on Evaluation Board - arm

I am using a petalinux / yocto on a evaluation board with a MpSoc and a FPGA. I am new to this whole Embedded Linux and gereeted with this error message when I try to run a precompiled example. Any pointers on what's going wrong is appreciated.
[ 91.171070] rcu: INFO: rcu_sched self-detected stall on CPU
[ 91.176642] rcu: 0-....: (5249 ticks this GP) idle=66a/1/0x4000000000000002 softirq=1286/1286 fqs=2625
[ 91.186107] (t=5252 jiffies g=1737 q=5)
[ 91.190013] Task dump for CPU 0:
[ 91.193225] resnet50 R running task 0 740 608 0x00000002
[ 91.200265] Call trace:
[ 91.202701] dump_backtrace+0x0/0x140
[ 91.206352] show_stack+0x14/0x20
[ 91.209652] sched_show_task+0xf4/0x120
[ 91.213479] dump_cpu_task+0x40/0x50
[ 91.217038] rcu_dump_cpu_stacks+0xa0/0xe0
[ 91.221118] rcu_sched_clock_irq+0x52c/0x780
[ 91.225372] update_process_times+0x2c/0x68
[ 91.229539] tick_sched_handle.isra.0+0x30/0x50
[ 91.234052] tick_sched_timer+0x48/0x98
[ 91.237872] __hrtimer_run_queues+0xec/0x1e8
[ 91.242125] hrtimer_interrupt+0x110/0x2c0
[ 91.246207] arch_timer_handler_phys+0x30/0x40
[ 91.250633] handle_percpu_devid_irq+0x80/0x140
[ 91.255147] generic_handle_irq+0x24/0x38
[ 91.259140] __handle_domain_irq+0x60/0xb8
[ 91.263220] gic_handle_irq+0x5c/0xb8
[ 91.266866] el1_irq+0xb8/0x140
[ 91.269992] misc_open+0x50/0x1a0
[ 91.273291] chrdev_open+0xc4/0x200
[ 91.276763] do_dentry_open+0x104/0x398
[ 91.280581] vfs_open+0x28/0x30
[ 91.283708] path_openat+0x4a0/0x1248
[ 91.287353] do_filp_open+0x74/0xf8
[ 91.290825] do_sys_open+0x168/0x218
[ 91.294384] __arm64_sys_openat+0x20/0x28
[ 91.298381] el0_svc_common.constprop.0+0x68/0x160
[ 91.303161] el0_svc_handler+0x6c/0x88
[ 91.306893] el0_svc+0x8/0xc

Related

chart js error in next js site hosted on netlify [duplicate]

This question already has answers here:
Error "RangeError: minimumFractionDigits value is out of range" with ChartJS in Next.js app
(3 answers)
Closed 4 months ago.
everthing is working fine in development on my local machine,
but when I deploy my site to netlify, I get this wierd error in console.
the page data is gotten using getStaticProps function and then passed to the page as props.
here is how the data looks like
[
[ 17671, 19856, 37527 ], [ 4887, 5418, 10305 ],
[ 2803, 2303, 5106 ], [ 8617, 9403, 18020 ],
[ 12664, 15722, 28386 ], [ 4227, 3359, 7586 ],
[ 1371, 1545, 2916 ], [ 17526, 14297, 31823 ],
[ 6883, 4781, 11664 ], [ 9805, 10000, 19805 ],
[ 11068, 12888, 23956 ], [ 4570, 4722, 9292 ],
[ 15428, 17309, 32737 ], [ 3565, 3656, 7221 ],
[ 8750, 10443, 19193 ], [ 1771, 1432, 3203 ],
[ 8495, 9979, 18474 ], [ 288, 265, 553 ],
[ 21130, 19321, 40451 ], [ 6867, 6556, 13423 ],
[ 2656, 2092, 4748 ], [ 967, 656, 1623 ],
[ 4540, 4505, 9045 ], [ 7025, 7108, 14133 ],
[ 53134, 59829, 112963 ], [ 8640, 9028, 17668 ],
[ 6759, 7119, 13878 ], [ 28803, 31362, 60165 ],
[ 7346, 7630, 14976 ], [ 9771, 10963, 20734 ],
[ 15783, 17397, 33180 ], [ 9847, 9706, 19553 ],
[ 15154, 17577, 32731 ], [ 1056, 874, 1930 ],
[ 3260, 2476, 5736 ], [ 1488, 1424, 2912 ],
[ 1656, 1154, 2810 ]
]
it is an array of arrays of 3 numbers.
please how do I solve this?
You need to set swcMinify: false false in your next.confug.js. This is currently a bug in the swcMinifier and you will need to wait until they have fixed it before you can enable it again.

TypeORM - PostGIS use custom feature in query

I have a project where I need to check inside which municipalities a certain road is inside. In order to do so I check this using the ST_Intersects function provided by PostGIS.
The problem that I am facing is that I keep on getting errors when using the roads in the querybuilder of typeorm.
My first attempt gave me the following error QueryFailedError: ST_Intersects: Operation on mixed SRID geometries (MultiPolygon, 4326) != (LineString, 0) at new QueryFailedError:
const municipalities = await getConnection()
.getRepository(Municipality)
.createQueryBuilder('municipality')
.where('ST_Intersects(municipality.polygon, :lineString)', { lineString: feature.geometry })
.getQueryAndParameters()
Then I tried to fix this by setting the CRS of the Linestring using ST_SetSRID function that is also provided by PostGIS. But this gives me the following error QueryFailedError: function st_setsrid(unknown, integer) is not unique:
const municipalities = await getConnection()
.getRepository(Municipality)
.createQueryBuilder('municipality')
.where('ST_Intersects(municipality.polygon, ST_SetSRID(:lineString, 4326))', { lineString: feature.geometry })
.getMany()
I have also tried to transfer the Geojson object using ST_GeomFromGeoJSON function in PostGIS. But this gives me the following error: QueryFailedError: quoted object property name expected (at offset 1):
const municipalities = await getConnection()
.getRepository(Municipality)
.createQueryBuilder('municipality')
.where('ST_Intersects(municipality.polygon, ST_GeomFromGeoJSON(:lineString))', { lineString: feature.geometry.coordinates })
.getMany()
I have tried to see if the problem was when inserting the linestring into the query. I did this by using the getQueryAndParameters return function of typeorm:
[
'SELECT "municipality"."uuid" AS "municipality_uuid", "municipality"."name" AS "municipality_name", ST_AsGeoJSON("municipality"."polygon")::json AS "municipality_polygon" FROM "municipality" "municipality" WHERE ST_Intersects("municipality"."polygon", ST_SetSRID($1, 4326))',
[ { type: 'LineString', coordinates: [Array] } ]
A Linestring object in looks as follows:
{
type: 'LineString',
coordinates: [
[ 3.2188848, 51.1980164 ],
[ 3.2190236, 51.1981144 ],
[ 3.2190737, 51.1981991 ],
[ 3.2191065, 51.1982793 ],
[ 3.2191314, 51.1983772 ],
[ 3.2191128, 51.1984885 ],
[ 3.2192215, 51.1985207 ],
[ 3.2192447, 51.1985056 ],
[ 3.219269, 51.1985136 ],
[ 3.2193766, 51.1985571 ],
[ 3.2194258, 51.1985769 ],
[ 3.2194638, 51.198697 ],
[ 3.2195437, 51.1987221 ],
[ 3.2196618, 51.1987591 ],
[ 3.219529, 51.1989397 ],
[ 3.2195909, 51.1990766 ],
[ 3.2196759, 51.1992964 ],
[ 3.2197817, 51.1993408 ],
[ 3.2199103, 51.1992987 ],
[ 3.2204127, 51.1991677 ],
[ 3.2208458, 51.199056 ],
[ 3.2211454, 51.1989993 ],
[ 3.2217751, 51.1988675 ],
[ 3.2219908, 51.1988136 ],
[ 3.2223186, 51.1987693 ],
[ 3.2223696, 51.1987867 ],
[ 3.2223974, 51.1987845 ],
[ 3.2225339, 51.1987696 ],
[ 3.2230863, 51.1987062 ],
[ 3.2233638, 51.198683 ],
[ 3.2234618, 51.1986505 ],
[ 3.223517, 51.1986535 ],
[ 3.2235298, 51.1986528 ],
[ 3.2236432, 51.198651 ],
[ 3.2243337, 51.1986565 ],
[ 3.2244463, 51.198654 ],
[ 3.2245644, 51.1986568 ],
[ 3.2249334, 51.1986506 ],
[ 3.2249647, 51.1986493 ],
[ 3.2251107, 51.19867 ],
[ 3.225378, 51.1986779 ],
[ 3.2257131, 51.1987153 ],
[ 3.225936, 51.1987341 ]
]
}
I have found an answer. ST_GeomFromGeoJSON was indeed the wright function to use in order to inject a GeoJSON object into the query. But I had accidentally used the coordinates instead of the full GeoJSON object.
So the solution is:
const municipalities = await getConnection()
.getRepository(Municipality)
.createQueryBuilder('municipality')
.where('ST_Intersects(municipality.polygon, ST_GeomFromGeoJSON(:lineString))', { lineString: feature.geometry })
.getMany()

Blazeface predictions returning negative x coordinates

I have my own Typescript Blazeface version up and running. The predictions rectangle however does not show up on the video overlay canvas. Debugging shows that the x coordinates returned from the predictions are negative. Is this user error or some other subtle bug in my code?
The source code can be found in this Codepen:
https://codepen.io/g_debailly/pen/zYGQKOe
This is the predictions array:
[
{
"topLeft": [
-261.7025451660156,
218.29611206054688
],
"bottomRight": [
-429.23638916015625,
343.9468994140625
],
"landmarks": [
[
-309.3980703353882,
265.82969784736633
],
[
-374.39136600494385,
260.38822889328003
],
[
-341.75953893363476,
302.7327650785446
],
[
-344.2469654083252,
320.3148329257965
],
[
-280.4582414627075,
261.1372035741806
],
[
-415.7755718231201,
250.6269371509552
]
],
"probability": [
0.9908785223960876
]
}
]
I solved the problem by setting the argument const flipHorizontal = false in the call to model.estimateFaces().

Reverse Array of coordinates in swift 4

I am trying to reverse an array of coordinates. I have this array:
[
[
9.211615025997162,
44.30419567985762
],
[
9.21164184808731,
44.30412081929745
],
[
9.21165257692337,
44.304053636662175
],
[
9.211606979370117,
44.3038789614507
],
[
9.211572110652924,
44.30381945658962
],
[
9.211539924144745,
44.30378874437967
],
[
9.211507737636566,
44.30376187118276
],
[
9.211564064025879,
44.30377530778277
],
[
9.211574792861937,
44.30374075651943
],
[
9.211574792861937,
44.30371388330059
],
[
9.211574792861937,
44.30369852717
],
[
9.21154797077179,
44.303665895379176
],
[
9.211513102054596,
44.303650539236024
],
[
9.211429953575134,
44.30358911462331
],
[
9.211349487304688,
44.30355840229286
],
[
9.211271703243256,
44.303537287556324
],
[
9.21117514371872,
44.30349505806051
],
[
9.211151003837585,
44.303473943301235
],
[
9.211126863956451,
44.30342979423452
],
[
9.211145639419556,
44.30339908182071
],
[
9.211183190345764,
44.303368369390846
],
[
9.211223423480988,
44.30331846165803
],
[
9.211242198944092,
44.30327623200479
],
[
9.211177825927734,
44.30325895622883
],
[
9.211030304431915,
44.303228243725634
],
[
9.210925698280334,
44.30321096793552
],
[
9.210874736309052,
44.303197531206386
],
[
9.210831820964813,
44.303197531206386
],
[
9.21075403690338,
44.303197531206386
],
[
9.21068161725998,
44.3031994507393
],
[
9.210577011108398,
44.3031994507393
],
[
9.210509955883026,
44.303207128870355
],
[
9.210440218448639,
44.303207128870355
],
[
9.210370481014252,
44.30322632419366
],
[
9.2102712392807,
44.30324743904202
],
[
9.210190773010254,
44.30328199059568
],
[
9.210112988948822,
44.30328391012582
],
[
9.210059344768524,
44.303297346835215
],
[
9.209954738616943,
44.30332422024474
],
[
9.209901094436646,
44.303339576473235
],
[
9.209868907928467,
44.303349174114
],
[
9.209858179092407,
44.30338372560779
],
[
9.209791123867035,
44.30340292087333
],
[
9.209697246551514,
44.30342595518367
],
[
9.209648966789246,
44.3034509090097
],
[
9.209606051445007,
44.30351809233474
],
[
9.209579229354858,
44.30355840229286
],
[
9.209581911563873,
44.3035852755829
],
[
9.209622144699097,
44.30355840229286
],
[
9.20967847108841,
44.30355648277167
],
[
9.209697246551514,
44.30354112659989
]
]
And I would like to reverse the coordinates, which are right now in Long-Lat to Lat-Long thus reversing the whole array or each item in the array would do the job here. I have been stuck trying to make it work, trying things like arrayOfCoords.reversed() and .reverse() to no avail. So how can I do this?
There may be a more elegant/efficient way to do this, but I'd look at using compactMap:
let testArray = [[1.123,2.22], [3.11, 4.0], [5.21, 6.19]]
print(testArray)
[[1.123, 2.22], [3.11, 4.0], [5.21, 6.19]]
let flippedElementArray = testArray.compactMap { $0.count > 1 ? [$0[1], $0[0]] : nil }
print(flippedElementArray)
[[2.22, 1.123], [4.0, 3.11], [6.19, 5.21]]
The $0.count > 1 check just makes sure you have at least 2 elements so you don't get a bounds error. If not, the closure returns nil for that element, which will be filtered out by compactMap. Otherwise, it returns a new array element consisting of the second element followed by the first element. All of those elements are stored in the final mapped array (flippedElementArray).
arrayOfCoords.map{ Array($0.reversed()) }
I'm assuming you want to reverse each coordinate pair, but keep the pairs themselves in the original order. Since you have an array of arrays, you have to do the operation on each sub-array separately. And reversed() returns a ReversedCollection instead of an Array so you have to re-initialize it into an array to use it properly.

Vmwrite error when updating vmcs from kvm_vm_ioctl

i'm implementing an application on top of KVM in which I need to trap writes to CR3.
When I do this when handling a VM EXIT using: vmcs_set_bits(CPU_BASED_VM_EXEC_CONTROL, CPU_BASED_CR3_LOAD_EXITING), it works correctly and I can see the traps in my log file.
Now when I do the same thing after receiving a command from Qemu (command is handled in kvm_vm_ioctl by calling a function I added to kvm_x86_ops vmx_x86_ops) I get a vmwrite error.
Here after the error log:
[ 290.559474] start_vmi
[ 290.559477] vmi: vmx.c: vmx_vmi_start_cr3_store_trapping: vmcs_read32(CPU_BASED_VM_EXEC_CONTROL) & CPU_BASED_CR3_LOAD_EXITING = 0
[ 290.559480] vmwrite error: reg 4002 value c002 (err 16386)
[ 290.559485] CPU: 0 PID: 3376 Comm: qemu-system-i38 Tainted: GF O 3.13.0-32-generic #57~precise1-Ubuntu
[ 290.559513] Call Trace:
[ 290.559525] [<c1680147>] dump_stack+0x41/0x52
[ 290.559533] [<f89f289a>] vmwrite_error+0x35/0x3b [kvm_intel]
[ 290.559538] [<f89e6b95>] vmcs_writel+0x25/0x30 [kvm_intel]
[ 290.559542] [<f89e6c27>] vmcs_set_bits+0x27/0x40 [kvm_intel]
[ 290.559547] [<f89e6c83>] vmx_vmi_start_cr3_store_trapping+0x43/0x50 [kvm_intel]
[ 290.559564] [<fbf861a5>] kvm_vm_ioctl+0x3b5/0x740 [kvm]
[ 290.559570] [<c1150747>] ? __handle_mm_fault+0x127/0x280
[ 290.559574] [<c115093a>] ? handle_mm_fault+0x9a/0x150
[ 290.559580] [<c168ec77>] ? __do_page_fault+0x287/0x520
[ 290.559593] [<fbf85df0>] ? kvm_vm_release+0x20/0x20 [kvm]
[ 290.559600] [<c1194ae2>] do_vfs_ioctl+0x72/0x2e0
[ 290.559604] [<c1194de7>] SyS_ioctl+0x97/0xa0
[ 290.559609] [<c1692b4d>] sysenter_do_call+0x12/0x28
[ 290.559614] [<c1680000>] ? cfq_arm_slice_timer+0x14e/0x254
Does anyone has an idea why what's the problem ? I would be very grateful if there is any answer

Resources