websocketd runtime crash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

websocketd runtime crash

466 Views
tommy2402
Contributor I

Dear NXP Community,

we use i.MX7 processors in combination with Yocto Project (Release 5.2 (walnascar)).

Last years we used the community kernel [linux-fslc](https://github.com/Freescale/linux-fslc).

Since security requirements getting tighter, we decided to switch to official nxp kernel [linux-imx](https://github.com/nxp-imx/linux-imx) (lf-6.12.y).

Problem: Beside others, we use [websocketd](https://github.com/joewalnes/websocketd) with this example [yocto-recipe](https://layers.openembedded.org/layerindex/recipe/152495/) and it worked well with freescale linux-fslc (tested on different versions). Websocketd is mainly written in go.

When running linux-imx we observer sporadic crashes like:

runtime: s.allocCount= 991 s.nelems= 992
fatal error: s.allocCount != s.nelems && freeIndex == s.nelems

goroutine 121 gp=0x29465a8 m=3 mp=0x2839008 [running]:
runtime.throw({0x836e6b, 0x31})
runtime/panic.go:1101 +0x38 fp=0x284995c sp=0x2849948 pc=0x53c8a8

......

2025/07/17 10:10:14 http: panic serving 127.0.0.1:41334: runtime error: invalid memory address or nil pointer dereference
goroutine 72 [running]:
net/http.(*conn).serve.func1()
net/http/server.go:1947 +0xf0
panic({0x876cd8, 0xa535f8})
runtime/panic.go:792 +0x110


We don´t think that these are bugs inside the application (since it works well on linux-fslc - device tree and kernel config are the same).

Is there anything we missed during the switch over from linux-fslc to linux-imx (MMU, DMA, thread-model ...)?

Thanks in advance and best regards,

Tommy

Labels (4)
Tags (2)
0 Kudos
Reply
1 Reply

443 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello, 

I think you should go with the yocto community sice websocket works with the latest NXP release.

https://www.yoctoproject.org/community/mailing-lists/

 

Regards

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2135760%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ewebsocketd%20runtime%20crash%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2135760%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDear%20NXP%20Community%2C%3C%2FP%3E%3CP%3Ewe%20use%20i.MX7%20processors%20in%20combination%20with%20Yocto%20Project%20(Release%205.2%20(walnascar)).%3C%2FP%3E%3CP%3ELast%20years%20we%20used%20the%20community%20kernel%20%5Blinux-fslc%5D(%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FFreescale%2Flinux-fslc%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FFreescale%2Flinux-fslc%3C%2FA%3E).%3C%2FP%3E%3CP%3ESince%20security%20requirements%20getting%20tighter%2C%20we%20decided%20to%20switch%20to%20official%20nxp%20kernel%20%5Blinux-imx%5D(%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Flinux-imx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fnxp-imx%2Flinux-imx%3C%2FA%3E)%20(lf-6.12.y).%3C%2FP%3E%3CP%3EProblem%3A%20Beside%20others%2C%20we%20use%20%5Bwebsocketd%5D(%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fjoewalnes%2Fwebsocketd%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fjoewalnes%2Fwebsocketd%3C%2FA%3E)%20with%20this%20example%20%5Byocto-recipe%5D(%3CA%20href%3D%22https%3A%2F%2Flayers.openembedded.org%2Flayerindex%2Frecipe%2F152495%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Flayers.openembedded.org%2Flayerindex%2Frecipe%2F152495%2F%3C%2FA%3E)%20and%20it%20worked%20well%20with%20freescale%20linux-fslc%20(tested%20on%20different%20versions).%20Websocketd%20is%20mainly%20written%20in%20go.%3C%2FP%3E%3CP%3EWhen%20running%20linux-imx%20we%20observer%20sporadic%20crashes%20like%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eruntime%3A%20s.allocCount%3D%20991%20s.nelems%3D%20992%0Afatal%20error%3A%20s.allocCount%20!%3D%20s.nelems%20%26amp%3B%26amp%3B%20freeIndex%20%3D%3D%20s.nelems%0A%0Agoroutine%20121%20gp%3D0x29465a8%20m%3D3%20mp%3D0x2839008%20%5Brunning%5D%3A%0Aruntime.throw(%7B0x836e6b%2C%200x31%7D)%0Aruntime%2Fpanic.go%3A1101%20%2B0x38%20fp%3D0x284995c%20sp%3D0x2849948%20pc%3D0x53c8a8%0A%0A......%0A%0A2025%2F07%2F17%2010%3A10%3A14%20http%3A%20panic%20serving%20127.0.0.1%3A41334%3A%20runtime%20error%3A%20invalid%20memory%20address%20or%20nil%20pointer%20dereference%0Agoroutine%2072%20%5Brunning%5D%3A%0Anet%2Fhttp.(*conn).serve.func1()%0Anet%2Fhttp%2Fserver.go%3A1947%20%2B0xf0%0Apanic(%7B0x876cd8%2C%200xa535f8%7D)%0Aruntime%2Fpanic.go%3A792%20%2B0x110%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3EWe%20don%C2%B4t%20think%20that%20these%20are%20bugs%20inside%20the%20application%20(since%20it%20works%20well%20on%20linux-fslc%20-%20device%20tree%20and%20kernel%20config%20are%20the%20same).%3C%2FP%3E%3CP%3EIs%20there%20anything%20we%20missed%20during%20the%20switch%20over%20from%20linux-fslc%20to%20linux-imx%20(MMU%2C%20DMA%2C%20thread-model%20...)%3F%3C%2FP%3E%3CP%3EThanks%20in%20advance%20and%20best%20regards%2C%3C%2FP%3E%3CP%3ETommy%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2135760%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX7Dual%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX7Solo%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EYocto%20Project%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2135864%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20websocketd%20runtime%20crash%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2135864%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20think%20you%20should%20go%20with%20the%20yocto%20community%20sice%20websocket%20works%20with%20the%20latest%20NXP%20release.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.yoctoproject.org%2Fcommunity%2Fmailing-lists%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.yoctoproject.org%2Fcommunity%2Fmailing-lists%2F%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E