Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental scan causes segmentation fault on Arm 64 #209

Closed
Flameborn opened this issue Apr 2, 2022 · 2 comments
Closed

Incremental scan causes segmentation fault on Arm 64 #209

Flameborn opened this issue Apr 2, 2022 · 2 comments

Comments

@Flameborn
Copy link
Contributor

I'm running Gonic from source under Arch Linux on a Raspberry Pi 4 (aarch64).

Currently, an incremental scan causes a segmentation fault and new tracks are not added to the database. My music folder consists of a few symlinks, I'm not using the multi-folder support yet.

I'm pasting The systemd log below, in case it's helpful:

Apr 02 18:17:01 ashildr gonic[23803]: 2022/04/02 18:17:01 finished scan in 321.06ms, +0/58 tracks (0 err)
Apr 02 18:17:01 ashildr gonic[23803]: panic: runtime error: invalid memory address or nil pointer dereference
Apr 02 18:17:01 ashildr gonic[23803]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7ecdd4]
Apr 02 18:17:01 ashildr gonic[23803]: goroutine 54 [running]:
Apr 02 18:17:01 ashildr gonic[23803]: go.senan.xyz/gonic/server/scanner.populateTrack(0x40003e3668, 0x4000208b40, 0x40005abf00, {0xc82e30, 0x40003a6e70}, {0x40000ba340, 0x3d}, 0x1e553309)
Apr 02 18:17:01 ashildr gonic[23803]:         /mnt/hd/gonic/src/server/scanner/scanner.go:299 +0x154
Apr 02 18:17:01 ashildr gonic[23803]: go.senan.xyz/gonic/server/scanner.(*Scanner).populateTrackAndAlbumArtists(0x40000a7680, 0x40003e3668, 0x40001cca10, 0x3, 0x4000208b40?, 0x4000208b40, {0x40000ba340, 0x3d}, {0x40000ea880, 0x7b})
Apr 02 18:17:01 ashildr gonic[23803]:         /mnt/hd/gonic/src/server/scanner/scanner.go:235 +0x53c
Apr 02 18:17:01 ashildr gonic[23803]: go.senan.xyz/gonic/server/scanner.(*Scanner).scanDir(0xb328b3?, 0x40003e3668, 0x40001cca10, {0x7fdcae8e61, 0x13}, {0x40000ba280, 0x3d})
Apr 02 18:17:01 ashildr gonic[23803]:         /mnt/hd/gonic/src/server/scanner/scanner.go:186 +0x418
Apr 02 18:17:01 ashildr gonic[23803]: go.senan.xyz/gonic/server/scanner.(*Scanner).scanCallback(0x40000a7680, 0x40001cca10, {0x7fdcae8e61, 0x13}, {0x40000ba280, 0x3d}, {0xc80e60?, 0x4000075880?}, {0x0?, 0x0?})
Apr 02 18:17:01 ashildr gonic[23803]:         /mnt/hd/gonic/src/server/scanner/scanner.go:135 +0x210
Apr 02 18:17:01 ashildr gonic[23803]: go.senan.xyz/gonic/server/scanner.(*Scanner).scanCallback.func1({0x400093e7b0?, 0x0?}, {0xc80e60, 0x4000075880}, {0x0, 0x0})
Apr 02 18:17:01 ashildr gonic[23803]:         /mnt/hd/gonic/src/server/scanner/scanner.go:126 +0xa4
Apr 02 18:17:01 ashildr gonic[23803]: path/filepath.walkDir({0x400093e7b0, 0x26}, {0xc80e60, 0x4000075880}, 0x40003e3b60)
Apr 02 18:17:01 ashildr gonic[23803]:         /usr/lib/go/src/path/filepath/path.go:386 +0x44
Apr 02 18:17:01 ashildr gonic[23803]: path/filepath.walkDir({0x400007fd00, 0x1c}, {0xc80e60, 0x4000443fc0}, 0x40003e3b60)
Apr 02 18:17:01 ashildr gonic[23803]:         /usr/lib/go/src/path/filepath/path.go:405 +0x1cc
Apr 02 18:17:01 ashildr gonic[23803]: path/filepath.walkDir({0x40006107f0, 0x10}, {0xc80e60, 0x40004438c0}, 0x40003e3b60)
Apr 02 18:17:01 ashildr gonic[23803]:         /usr/lib/go/src/path/filepath/path.go:405 +0x1cc
Apr 02 18:17:01 ashildr gonic[23803]: path/filepath.walkDir({0x4000491890, 0x8}, {0xc80e98, 0x400008f1e0}, 0x40003e3b60)
Apr 02 18:17:01 ashildr gonic[23803]:         /usr/lib/go/src/path/filepath/path.go:405 +0x1cc
Apr 02 18:17:01 ashildr gonic[23803]: path/filepath.WalkDir({0x4000491890, 0x8}, 0x400004fb60)
Apr 02 18:17:01 ashildr gonic[23803]:         /usr/lib/go/src/path/filepath/path.go:469 +0xb8
Apr 02 18:17:01 ashildr gonic[23803]: go.senan.xyz/gonic/server/scanner.(*Scanner).scanCallback(0x40000a7680, 0x40001cca10, {0x7fdcae8e61, 0x13}, {0x400007f760, 0x1f}, {0xc80e60?, 0x4000443440?}, {0x0?, 0x0?})
Apr 02 18:17:01 ashildr gonic[23803]:         /mnt/hd/gonic/src/server/scanner/scanner.go:124 +0x434
Apr 02 18:17:01 ashildr gonic[23803]: go.senan.xyz/gonic/server/scanner.(*Scanner).ScanAndClean.func2({0x400007f760?, 0x0?}, {0xc80e60?, 0x4000443440?}, {0x0?, 0x0?})
Apr 02 18:17:01 ashildr gonic[23803]:         /mnt/hd/gonic/src/server/scanner/scanner.go:80 +0x70
Apr 02 18:17:01 ashildr gonic[23803]: path/filepath.walkDir({0x400007f760, 0x1f}, {0xc80e60, 0x4000443440}, 0x40003e3f30)
Apr 02 18:17:01 ashildr gonic[23803]:         /usr/lib/go/src/path/filepath/path.go:386 +0x44
Apr 02 18:17:01 ashildr gonic[23803]: path/filepath.walkDir({0x7fdcae8e61, 0x13}, {0xc80e98, 0x400008f1b0}, 0x40003e3f30)
Apr 02 18:17:01 ashildr gonic[23803]:         /usr/lib/go/src/path/filepath/path.go:405 +0x1cc
Apr 02 18:17:01 ashildr gonic[23803]: path/filepath.WalkDir({0x7fdcae8e61, 0x13}, 0x400004ff30)
Apr 02 18:17:01 ashildr gonic[23803]:         /usr/lib/go/src/path/filepath/path.go:469 +0xb8
Apr 02 18:17:01 ashildr gonic[23803]: go.senan.xyz/gonic/server/scanner.(*Scanner).ScanAndClean(0x40000a7680, {0x0?})
Apr 02 18:17:01 ashildr gonic[23803]:         /mnt/hd/gonic/src/server/scanner/scanner.go:79 +0x5b0
Apr 02 18:17:01 ashildr gonic[23803]: go.senan.xyz/gonic/server/ctrladmin.doScan.func1()
Apr 02 18:17:01 ashildr gonic[23803]:         /mnt/hd/gonic/src/server/ctrladmin/handlers.go:21 +0x28
Apr 02 18:17:01 ashildr gonic[23803]: created by go.senan.xyz/gonic/server/ctrladmin.doScan
Apr 02 18:17:01 ashildr gonic[23803]:         /mnt/hd/gonic/src/server/ctrladmin/handlers.go:20 +0x70
Apr 02 18:17:01 ashildr systemd[1]: gonic.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 02 18:17:01 ashildr systemd[1]: gonic.service: Failed with result 'exit-code'.
@Flameborn Flameborn changed the title Segmentation fault on Arm 64 Incremental scan causes segmentation fault on Arm 64 Apr 2, 2022
@sentriz sentriz closed this as completed in 01747c8 Apr 2, 2022
@sentriz
Copy link
Owner

sentriz commented Apr 2, 2022

thanks should be fixed

@Flameborn
Copy link
Contributor Author

Confirmed, scans work nicely now.

Thank you so much for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants