I encountered a problem when using the swupdate image built by yocto.
Software Update started !
[network_initializer] : Software update started
[extract_file_to_tmp] : Found file
[extract_file_to_tmp] : filename sw-description
[extract_file_to_tmp] : size 303
[get_common_fields] : Version 0.1.0
[get_common_fields] : Description Firmware update for XXXXX Project
[parse_hw_compatibility] : Accepted Hw Revision : 1.0
[parse_hw_compatibility] : Accepted Hw Revision : 1.2
[parse_hw_compatibility] : Accepted Hw Revision : 1.3
[_parse_images] : Found Image: rootfs.ext4.gz in device : /dev/mmcblk2p4 for handler raw
[check_hw_compatibility] : Hardware myir Revision: 1.0
[check_hw_compatibility] : Hardware compatibility verified
[extract_files] : Found file
[extract_files] : filename rootfs.ext4.gz
[extract_files] : size 373258053 required
ERROR : Not enough free space to extract rootfs.ext4.gz (needed 373258053, got 223219712)
Image invalid or corrupted. Not installing ...
[network_initializer] : Main thread sleep again !
Waiting for requests...
ERROR : Writing to IPC fails due to Broken pipe
As shown in the figure, it indicates that there is not enough space, and then I use resize2fs /dev/mmcblk2p4 to expand the space. Now it has 1g of space. But still the same hint. Please let me know what you think.
Try using the installed-directly flag in the sw-description file.
files: (
{
filename = "rootfs.ext4.gz";
sha256 = "bc57b9c737033d0d6826db51618d596da7ecf3fdc0cb48dc9986a6094f529413";
type = "archive";
path = "/path/to/extract";
preserve-attributes = true;
installed-directly = true; <---------- this option
properties: {
create-destination = "true";
}
}
I'm trying to the state of the PRM_RSTST register of my ARM Cortex A8 processor to find the reason of resets because WDIOC_GETBOOTSTATUS isn't implemented for my processor, a TI8148. I know for the datasheet that the offset/adress is supposed to be 0xA8. However if I try to read in in my kernel driver with __raw_readl(0xA8) I get a seg fault. The other idea I had was to use /dev/mem, however if I go in with devmem2 0xA8 I get
/dev/mem opened.Unhandled fault: Precise External Abort on non-linefetch (0x018) at 0x401270a8
Memory mapped at address 0x40127000.
Bus error (core dumped)
So I looked at the mapping of memory with cat /proc/iomem
00000000-00000000 : omap2-nand.0
08000000-08000003 : omap2-nand
20000000-2fffffff : pcie-nonprefetch
47400000-47400fff : usbss
47401000-474017ff : musb0
47401000-474017ff : musb0
47401800-47401fff : musb1
47401800-47401fff : musb1
48010000-480100ff : omap-iommu.1
48010000-480100ff : omap-iommu.1
48020000-48021fff : omap_uart.0
48020000-48021fff : omap_uart
48022000-48023fff : omap_uart.1
48022000-48023fff : omap_uart
48024000-48025fff : omap_uart.2
48024000-48025fff : omap_uart
48028000-48028fff : omap_i2c.1
48028000-48028fff : omap_i2c
4802a000-4802afff : omap_i2c.2
4802a000-4802afff : omap_i2c
48030100-480301ff : omap2_mcspi.1
48030100-480301ff : omap2_mcspi.1
48032000-48032fff : omap_gpio.0
48038000-4803afff : mcasp
48038000-4803afff : davinci-mcasp
4803c000-4803efff : mcasp
4803c000-4803efff : davinci-mcasp
4804c000-4804cfff : omap_gpio.1
48080000-48081fff : omap2_elm.1
48080000-48081fff : omap2_elm.1
480c0000-480c0fff : omap_rtc
480c0000-480c0fff : omap_rtc
480c8000-480c8143 : omap-mailbox
48105500-481058ff : ti81xxvin
48105a00-48105dff : ti81xxvin
481a0100-481a01ff : omap2_mcspi.2
481a0100-481a01ff : omap2_mcspi.2
481a2100-481a21ff : omap2_mcspi.3
481a2100-481a21ff : omap2_mcspi.3
481a4100-481a41ff : omap2_mcspi.4
481a4100-481a41ff : omap2_mcspi.4
481a6000-481a7fff : omap_uart.3
481a6000-481a7fff : omap_uart
481a8000-481a9fff : omap_uart.4
481a8000-481a9fff : omap_uart
481aa000-481abfff : omap_uart.5
481aa000-481abfff : omap_uart
481ac000-481acfff : omap_gpio.2
481ae000-481aefff : omap_gpio.3
481c7000-481c7fff : omap_wdt
481c7000-481c7fff : omap_wdt
481cc000-481cffff : d_can
481cc000-481cffff : d_can
481d8100-481e80ff : mmci-omap-hs.0
481d8100-481e80ff : mmci-omap-hs
49000000-49007fff : edma_cc0
49000000-49007fff : edma
49800000-498003ff : edma_tc0
49900000-499003ff : edma_tc1
49a00000-49a003ff : edma_tc2
49b00000-49b003ff : edma_tc3
4a100000-4a1007ff : cpsw.0
4a100000-4a1007ff : eth0
4a100800-4a1008ff : davinci_mdio.0
4a100800-4a1008ff : davinci_mdio.0
4a100900-4a1009ff : cpsw.0
4a100900-4a1009ff : eth0
4a140000-4a150fff : ahci.0
51000000-51003fff : pcie-regs
55082000-550820ff : omap-iommu.0
55082000-550820ff : omap-iommu.0
80000000-bfffffff : pcie-inbound0
80000000-917fffff : System RAM
80044000-8058cfff : Kernel text
8058e000-8061770f : Kernel data
bd000000-bf7fffff : System RAM
So apparently 0x40127000, where devmem2 wants to look isn't mapped.
So where do I find the register with offset 0xA8?
I am using video-length to get duration of video in nodejs. The code worked fine in Centos.
In Ubuntu 16.x it is showing error:
SyntaxError: Unexpected token G in JSON at position 0
at JSON.parse (<anonymous>)
at VideoLength (/.../node_modules/video-length/video-length.js:14:24)
I have used below code to get duration:
const VideoLength = require('video-length');
VideoLength(video, {
bin: '/usr/bin/mediainfo',
extended: true
})
.then(data => {
console.log("data: %j", data)
duration = data['duration']
console.log("duration: " + duration)
})
.catch(err => {
console.log(err);
})
I have installed mediainfo also. Please guide me if I am doing anything wrong.
After debugging video-length.js, I've found below difference in the stdout obtained in centos and Ubuntu.
In Centos:
{
"media": {
"#ref": "/var/kurento/tmp/30/27122019/1514kurento-recording.webm",
"track": [
{
"#type": "General",
"VideoCount": "1",
"FileExtension": "webm",
"Format": "WebM",
"Format_Version": "2",
"FileSize": "157078809",
"FrameRate": "25.028",
"IsStreamable": "Yes",
"Encoded_Date": "UTC 2019-12-27 09:44:33",
"File_Modified_Date": "UTC 2019-12-27 10:56:31",
"File_Modified_Date_Local": "2019-12-27 16:26:31",
"Encoded_Application": "GStreamer Matroska muxer",
"Encoded_Library": "GStreamer matroskamux version 1.8.1.1",
"extra": {
"IsTruncated": "Yes"
}
},
{
"#type": "Video",
"StreamOrder": "0",
"ID": "1",
"UniqueID": "2934041311738436184",
"Format": "VP8",
"CodecID": "V_VP8",
"Width": "1920",
"Height": "1080",
"PixelAspectRatio": "1.000",
"DisplayAspectRatio": "1.778",
"FrameRate_Mode": "CFR",
"FrameRate": "25.028",
"Compression_Mode": "Lossy",
"Delay": "0.000",
"Title": "Video",
"Language": "en",
"Default": "Yes",
"Forced": "No"
}
]
}
}
In Ubuntu:
General
Count : 308
Count of stream of this kind : 1
Kind of stream : General
Kind of stream : General
Stream identifier : 0
Count of video streams : 1
Video_Format_List : VP8
Video_Format_WithHint_List : VP8
Codecs Video : V_VP8
Video_Language_List : English
Complete name : /var/kurento/tmp/27/23012020/1355kurento-recording.webm
Folder name : /var/kurento/tmp/27/23012020
File name : 1355kurento-recording
File extension : webm
Format : WebM
Format : WebM
Format/Url : http://www.webmproject.org/
Format/Extensions usually used : webm
Commercial name : WebM
Format version : Version 2
Internet media type : video/webm
Codec : WebM
Codec : WebM
Codec/Url : http://www.webmproject.org/
Codec/Extensions usually used : webm
File size : 1760787
File size : 1.68 MiB
File size : 2 MiB
File size : 1.7 MiB
File size : 1.68 MiB
File size : 1.679 MiB
Duration : 45037
Duration : 45s 37ms
Duration : 45s 37ms
Duration : 45s 37ms
Duration : 00:00:45.037
Duration : 00:00:45.037
Overall bit rate : 312772
Overall bit rate : 313 Kbps
Encoded date : UTC 2020-01-23 08:25:19
File last modification date : UTC 2020-01-23 08:26:04
File last modification date (local) : 2020-01-23 13:56:04
Writing application : GStreamer Matroska muxer
Writing application : GStreamer Matroska muxer
Writing library : GStreamer matroskamux version 1.8.1.1
Writing library : GStreamer matroskamux version 1.8.1.1
Video
Count : 311
Count of stream of this kind : 1
Kind of stream : Video
Kind of stream : Video
Stream identifier : 0
StreamOrder : 0
ID : 1
ID : 1
Unique ID : 3811409054155698551
Format : VP8
Format/Url : http://www.webmproject.org/
Commercial name : VP8
Codec ID : V_VP8
Codec ID/Url : http://www.webmproject.org/
Codec : V_VP8
Codec : V_VP8
Bit rate : 293486
Bit rate : 293 Kbps
Width : 1920
Width : 1 920 pixels
Height : 1080
Height : 1 080 pixels
Pixel aspect ratio : 1.000
Display aspect ratio : 1.778
Display aspect ratio : 16:9
Frame rate mode : VFR
Frame rate mode : Variable
Compression mode : Lossy
Compression mode : Lossy
Delay : 0
Delay : 00:00:00.000
Delay, origin : Container
Delay, origin : Container
Title : Video
Language : en
Language : English
Language : English
Language : en
Language : eng
Language : en
Default : Yes
Default : Yes
Forced : No
Forced : No
Don't know the reason for the difference in structure. Still debugging for the cause. Any help will be highly appreciated.
It is good that you found the issue by yourself, As you can see the stdout in Ubuntu is not a valid JSON string and code in lib doing JSON.parse to parse out to object hence it is throwing error.
I would suggest you not using that library because that library itself not tested. If you have other option I would suggest you go with this:https://github.com/caffco/get-video-duration
Install
$ npm install --save get-video-duration
Usage
const { getVideoDurationInSeconds } = require('get-video-duration')
// From a local path...
getVideoDurationInSeconds('video.mov').then((duration) => {
console.log(duration)
})
// From a URL...
getVideoDurationInSeconds('http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4').then((duration) => {
console.log(duration)
})
// From a readable stream...
const fs = require('fs')
const stream = fs.createReadStream('video.mov')
getVideoDurationInSeconds(stream).then((duration) => {
console.log(duration)
})
I was testing out DSC with linux,
Here are the details of the linux server i am using
PS C:\Windows\system32> Get-CimInstance -CimSession $Session -namespace root/omi -ClassName omi_identify
InstanceID : 2FDB5542-5896-45D5-9BE9-DC04430AAABE
SystemName : CENTOSTESTDSC
ProductName : OMI
ProductVendor : Microsoft
ProductVersionMajor : 1
ProductVersionMinor : 0
ProductVersionRevision : 8
ProductVersionString : 1.0.8
Platform : LINUX_X86_64_GNU
OperatingSystem : LINUX
Architecture : X86_64
Compiler : GNU
ConfigPrefix : GNU
ConfigLibDir : /opt/omi-1.0.8/lib
ConfigBinDir : /opt/omi-1.0.8/bin
ConfigIncludeDir : /opt/omi-1.0.8/include
ConfigDataDir : /opt/omi-1.0.8/share
ConfigLocalStateDir : /opt/omi-1.0.8/var
ConfigSysConfDir : /opt/omi-1.0.8/etc
ConfigProviderDir : /opt/omi-1.0.8/etc
ConfigLogFile : /opt/omi-1.0.8/var/log/omiserver.log
ConfigPIDFile : /opt/omi-1.0.8/var/run/omiserver.pid
ConfigRegisterDir : /opt/omi-1.0.8/etc/omiregister
ConfigSchemaDir : /opt/omi-1.0.8/share/omischema
ConfigNameSpaces : {root-check, interop, root-omi, root-cimv2}
PSComputerName : 123.112.123.156
When i try to invoke a DSC configuration against the Linux VM i get an error as below.
I am using the latest PSDSC tar file from below location
wget https://github.com/Microsoft/PowerShell-DSC-for-Linux/releases/download/V1.1.0-466/PSDSC.tar.gz
Can some one help please.
I have a kernel dump for a system hang and I stumbled upon some occupied ALPC ports in the system thread. From nt!AlpcpReceiveMessage I can see the port the thread is waiting on. From the Port I can see the thread that is waiting. But the Thread itself does not indicate the typical - thread X is waiting for ALPC message Y on ALPC port Z.
Thread:
0: kd> !thread fffffa80069dc040
THREAD fffffa80069dc040 Cid 0004.00b0 Teb: 0000000000000000 Win32Thread: 0000000000000000 WAIT: (WrLpcReceive) UserMode Non-Alertable
fffffa80069dc408 Semaphore Limit 0x1
Not impersonating
DeviceMap fffff8a000008ca0
Owning Process fffffa80069a9740 Image: System
Attached Process N/A Image: N/A
Wait Start TickCount 16772 Ticks: 501 (0:00:00:07.815)
Context Switch Count 408 IdealProcessor: 4
UserTime 00:00:00.000
KernelTime 00:00:00.000
Win32 Start Address nt!PopUmpoMessageThread (0xfffff8000308c8e4)
Stack Init fffff88003952c70 Current fffff88003952470
Base fffff88003953000 Limit fffff8800394d000 Call 0
Priority 14 BasePriority 13 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5
Child-SP RetAddr : Args to Child : Call Site
fffff880`039524b0 fffff800`030c45f2 : 00000000`00000000 fffffa80`069dc040 00000000`00000000 00000000`00000009 : nt!KiSwapContext+0x7a
fffff880`039525f0 fffff800`030d599f : 00000000`00000000 00000000`00000000 fffffa80`00000000 00000000`00000000 : nt!KiCommitThreadWait+0x1d2
fffff880`03952680 fffff800`033dc5f9 : 00000000`00000000 00000000`00000010 00000000`00000001 00000000`00000000 : nt!KeWaitForSingleObject+0x19f
fffff880`03952720 fffff800`033dc07c : 00000000`00000000 00000000`00000001 00000000`00000000 00000000`00000000 : nt!AlpcpReceiveMessagePort+0x189
fffff880`03952780 fffff800`033ddd56 : fffffa80`069db1c0 00000000`00000000 00000000`00000000 fffffa80`069db1c0 : nt!AlpcpReceiveMessage+0x2d9
fffff880`03952820 fffff800`030cde53 : fffffa80`069dc040 fffff880`039529c0 fffff880`03952af8 fffff800`0320230d : nt!NtAlpcSendWaitReceivePort+0x1e6
fffff880`039528d0 fffff800`030ca410 : fffff800`0308c996 00000000`00000000 fffff880`03952b30 00000000`6f706d55 : nt!KiSystemServiceCopyEnd+0x13 (TrapFrame # fffff880`03952940)
fffff880`03952ad8 fffff800`0308c996 : 00000000`00000000 fffff880`03952b30 00000000`6f706d55 00000000`000007ff : nt!KiServiceLinkage
fffff880`03952ae0 fffff800`0336a73a : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!PopUmpoMessageThread+0xb2
fffff880`03952c00 fffff800`030bf8e6 : fffff880`009b3180 fffffa80`069dc040 fffffa80`069c6040 00000000`00000000 : nt!PspSystemThreadStartup+0x5a
fffff880`03952c40 00000000`00000000 : fffff880`03953000 fffff880`0394d000 fffff880`03952470 00000000`00000000 : nt!KxStartSystemThread+0x16
Port:
0: kd> !alpc /p fffffa80`069db1c0
Port fffffa80069db1c0
Type : ALPC_CONNECTION_PORT
CommunicationInfo : fffff8a0000a3230
ConnectionPort : fffffa80069db1c0 (PowerPort)
ClientCommunicationPort : 0000000000000000
ServerCommunicationPort : 0000000000000000
OwnerProcess : fffffa80069a9740 (System)
SequenceNo : 0x00000001 (1)
CompletionPort : 0000000000000000
CompletionList : 0000000000000000
ConnectionPending : No
ConnectionRefused : No
Disconnected : No
Closed : No
FlushOnClose : Yes
ReturnExtendedInfo : No
Waitable : No
Security : Static
Wow64CompletionList : No
1 thread(s) are waiting on the port:
THREAD fffffa80069dc040 Cid 0004.00b0 Teb: 0000000000000000 Win32Thread: 0000000000000000 WAIT
Main queue is empty.
Large message queue is empty.
Pending queue is empty.
Canceled queue is empty.
What causes (or could cause) a thread to not indicate the message it
is waiting on? Or - what could cause a thread to await a port that has no message?
Thats a receiver thread. This one is listening n waiting for lpc messages. In other words its idle.
If you are looking for a alpc wait chain you should look for threads with WrLPCReply or something similar.