makew0rld / amfora

A fancy terminal browser for the Gemini protocol.
GNU General Public License v3.0
1.14k stars 68 forks source link

Crash on ARM64 (RaspberryPi CM4, Alpine Linux 6.1.64) #343

Closed Carlo-Monte closed 8 months ago

Carlo-Monte commented 8 months ago

fatal error: sync: Unlock of unlocked RWMutex

goroutine 1 [running]: sync.fatal({0x5577813464?, 0x0?}) runtime/panic.go:1031 +0x20 sync.(RWMutex).Unlock(0x40000b424c) sync/rwmutex.go:209 +0x78 code.rocketnine.space/tslocum/cview.(Application).Init(0x40000b4140) code.rocketnine.space/tslocum/cview@v1.5.6-0.20210530175404-7e8817f20bdc/application.go:226 +0x84 main.main() github.com/makeworld-the-better-one/amfora/amfora.go:71 +0x544

goroutine 18 [runnable]: strings.Index({0x557780aeb4, 0x15}, {0x55778a6740, 0x1}) strings/strings.go:1178 +0x558 strings.genSplit({0x557780aeb4, 0x15}, {0x55778a6740, 0x1}, 0x0, 0x400007c150?) strings/strings.go:251 +0x108 strings.Split(...) strings/strings.go:305 github.com/spf13/viper.(Viper).find(0x4000022900, {0x557780aeb4, 0x15}, 0x1) github.com/spf13/viper@v1.7.1/viper.go:1027 +0x54 github.com/spf13/viper.(Viper).Get(0x4000022900, {0x557780aeb4?, 0x55778f46e0?}) github.com/spf13/viper@v1.7.1/viper.go:728 +0x48 github.com/spf13/viper.(*Viper).GetInt(0x0?, {0x557780aeb4?, 0x0?}) github.com/spf13/viper@v1.7.1/viper.go:805 +0x20 github.com/spf13/viper.GetInt(...) github.com/spf13/viper@v1.7.1/viper.go:803 github.com/makeworld-the-better-one/amfora/subscriptions.updateAll() github.com/makeworld-the-better-one/amfora/subscriptions/subscriptions.go:397 +0xb4 github.com/makeworld-the-better-one/amfora/subscriptions.Init.func1() github.com/makeworld-the-better-one/amfora/subscriptions/subscriptions.go:78 +0x1c created by github.com/makeworld-the-better-one/amfora/subscriptions.Init github.com/makeworld-the-better-one/amfora/subscriptions/subscriptions.go:76 +0x2e0

makew0rld commented 8 months ago

Please let me know what version of Amfora you are running with the output of amfora -v. If you are able, please try to compile a binary from the latest commit on the master branch, to see if you still get the crash there.

Also instructions on what caused the crash will be needed.

makew0rld commented 8 months ago

This looks the same as #300, so I would recommend a fix from that thread: install ncurses on your machine. If that works, I will close this issue, as #300 remains open.

Carlo-Monte commented 8 months ago

Sure:

amfora -v Amfora 1.9.2 Commit: 61d864540140f463a183e187e4211c258bd518bf Built by: Alpine_Linux

uname -a Linux XXX 6.6.4-0-rpi #1-Alpine SMP PREEMPT Mon Dec 4 15:16:56 UTC 2023 aarch64 GNU/Linux

On 12/12/23 16:03, makeworld wrote:

Please let me know what version of Amfora you are running with the output of |amfora -v|. If you are able, please try to compile a binary from the latest commit on the master branch, to see if you still get the crash there.

Also instructions on what caused the crash will be needed.

— Reply to this email directly, view it on GitHub https://github.com/makew0rld/amfora/issues/343#issuecomment-1852212331, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVU74FUPNUYU2LYSF6D7MA3YJBW2JAVCNFSM6AAAAABALHCZ6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJSGIYTEMZTGE. You are receiving this because you authored the thread.Message ID: @.***>

Carlo-Monte commented 8 months ago

I have the following installed:

apk info libncursesw

libncursesw-6.4_p20231125-r0 description: Console display library (libncursesw)

libncursesw-6.4_p20231125-r0 webpage: https://invisible-island.net/ncurses/

libncursesw-6.4_p20231125-r0 installed size: 400 KiB

The package contents is:

apk info -L libncursesw

libncursesw-6.4_p20231125-r0 contains: usr/lib/libncursesw.so.6 usr/lib/libncursesw.so.6.4

Kind Regards, Carlo

On 12/12/23 16:05, makeworld wrote:

This looks the same as #300 https://github.com/makew0rld/amfora/issues/300, so I would recommend a fix from that thread: install |ncurses| on your machine. If that works, I will close this issue, as #300 https://github.com/makew0rld/amfora/issues/300 remains open.

— Reply to this email directly, view it on GitHub https://github.com/makew0rld/amfora/issues/343#issuecomment-1852220526, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVU74FTCMWSL33GPRRLZU2DYJBXETAVCNFSM6AAAAABALHCZ6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJSGIZDANJSGY. You are receiving this because you authored the thread.Message ID: @.***>

makew0rld commented 8 months ago

Hmm ok thanks. Can you make sure you have ncurses-terminfo installed as well? And what terminal are you using?

Carlo-Monte commented 8 months ago

Hi!

It appears that I am all wrong. It's probably not a bug in amfora but an issue with the Alpine package.

I rebuilt amfora from the latest repository version and it works all right. It is, as expected, a statically linked binary. Golang produces statically linked binaries.

The Alpine binary is dynamically linked. Apparently their build file ignores your Makefile and run 'go build' instead, with an external linker. I will issue a bug with them.

Thank you for helping me investigate.

Kind Regards, Carlo

On 12/15/23 10:22 PM, makeworld wrote:

Hmm ok thanks. Can you make sure you have |ncurses-terminfo| installed as well? And what terminal are you using?

— Reply to this email directly, view it on GitHub https://github.com/makew0rld/amfora/issues/343#issuecomment-1858505648, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVU74FRT4KBQVAXH4WHBCYLYJS5RLAVCNFSM6AAAAABALHCZ6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJYGUYDKNRUHA. You are receiving this because you authored the thread.Message ID: @.***>

Carlo-Monte commented 8 months ago

https://gitlab.alpinelinux.org/alpine/aports/-/issues/15615

On 12/15/23 10:22 PM, makeworld wrote:

Hmm ok thanks. Can you make sure you have |ncurses-terminfo| installed as well? And what terminal are you using?

— Reply to this email directly, view it on GitHub https://github.com/makew0rld/amfora/issues/343#issuecomment-1858505648, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVU74FRT4KBQVAXH4WHBCYLYJS5RLAVCNFSM6AAAAABALHCZ6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJYGUYDKNRUHA. You are receiving this because you authored the thread.Message ID: @.***>

makew0rld commented 8 months ago

Ok, thanks! Glad to hear you got it working in some fashion. I will close this issue for now but you can reopen it if needed. And merry Christmas if you celebrate!