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

SIGSEV on WSL/Debian 12 #413

Open
Coalmine-Canary opened this issue Jan 24, 2024 · 13 comments
Open

SIGSEV on WSL/Debian 12 #413

Coalmine-Canary opened this issue Jan 24, 2024 · 13 comments
Labels

Comments

@Coalmine-Canary
Copy link

What happened?
A SIGSEV (invalid memory address or nil pointer dereference)

What did you expect to happen?

How can we reproduce the behavior you experienced?
Steps to reproduce the behavior:

  1. Add PAT token as "password" and base_url to config file
  2. Run mark with -c $config_file -f file_name and -l $confluence_page_path

May be related to using WSL (debian 12)

In case this is related to specific markdown, please provide a minimal markdown example here.

Information (please complete the following information)

  • Mark Version (mark --version): tried everything newer than 9.6.2 up to 9.11.1
  • Mark Parameters: -c $config_file -f file_name and -l $confluence_page_path
  • Confluence Hosting: Server
  • Confluence Version: 7.19
  • Environment specific Information: WSL, amd64, debian 12

Logs or other output

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xabda95]

goroutine 1 [running]:
main.processFile({0x7ffe6933bca6, 0x19}, 0xb9df60?, 0x0?, {0x7ffe6933bd06?, 0x9}, {0x0, 0x0})
        /home/runner/work/mark/mark/main.go:290 +0x2f5
main.RunMark(0xc0001b88c0)
        /home/runner/work/mark/mark/main.go:241 +0x710
main.main.func2(0xc0001ac2c0?)
        /home/runner/work/mark/mark/main.go:175 +0x19
github.com/urfave/cli/v2.(*Command).Run(0xc0001ac2c0, 0xc0001b88c0, {0xc000034070, 0x7, 0x7})
        /home/runner/work/pkg/mod/github.com/urfave/cli/[email protected]/command.go:274 +0x9eb
github.com/urfave/cli/v2.(*App).RunContext(0xc000238000, {0xfeacf8?, 0xc000038148}, {0xc000034070, 0x7, 0x7})
        /home/runner/work/pkg/mod/github.com/urfave/cli/[email protected]/app.go:332 +0x616
github.com/urfave/cli/v2.(*App).Run(...)
        /home/runner/work/pkg/mod/github.com/urfave/cli/[email protected]/app.go:309
main.main()
        /home/runner/work/mark/mark/main.go:179 +0x13a

Additional context
Add any other context about the problem here.

@mrueg
Copy link
Collaborator

mrueg commented Jan 25, 2024

Which mark version is that trace from? Can you give me the output for v9.11.1 and the content of your config file.

@Coalmine-Canary
Copy link
Author

Thanks for responding mrueg,

That is from v9.11.1 and from all the versions that proceeded it down to v9.6.2 (it was the same in all of them).

Config looks like this (I also tried with a username set):
password = "CONFLUENCE_TOKEN"
base_url = "https://confluence.company.domain.com"

I've just re-run on v9.11.1, here is the error on that version:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xae7eaa]

goroutine 1 [running]:
main.processFile({0xc0002101b0, 0x81}, 0xbce9a0?, 0x0?, {0x7ffdbbf68cec?, 0x9}, {0x0, 0x0})
        /home/runner/work/mark/mark/main.go:325 +0x3aa
main.RunMark(0xc000266900)
        /home/runner/work/mark/mark/main.go:274 +0x710
github.com/urfave/cli/v2.(*Command).Run(0xc0002322c0, 0xc000266900, {0xc000136000, 0x7, 0x7})
        /home/runner/work/pkg/mod/github.com/urfave/cli/[email protected]/command.go:279 +0xa3c
github.com/urfave/cli/v2.(*App).RunContext(0xc000176600, {0x10423c8?, 0xc00012e078}, {0xc000136000, 0x7, 0x7})
        /home/runner/work/pkg/mod/github.com/urfave/cli/[email protected]/app.go:337 +0x63a
github.com/urfave/cli/v2.(*App).Run(...)
        /home/runner/work/pkg/mod/github.com/urfave/cli/[email protected]/app.go:311
main.main()
        /home/runner/work/mark/mark/main.go:212 +0x13a

@mrueg
Copy link
Collaborator

mrueg commented Jan 25, 2024

What happens if you add --space YOUR_SPACE to it? I believe there is a doc that hasn't a space set and the CLI doesn't set one either.

@Coalmine-Canary
Copy link
Author

Same error, I was trying before with the space set in the document like the README suggests, I have just tried with --space too.

@mrueg
Copy link
Collaborator

mrueg commented Jan 25, 2024

Can you share the content of the file (or at least the rough patterns it has)?

@Coalmine-Canary
Copy link
Author

Coalmine-Canary commented Jan 25, 2024

This isn't the real content but it looks like this and it's quite a small file.

Heading:
 - Lorum ipsum dolor sit amet
 - Lorum ipsum dolor sit amet

Heading 2:
- Lorum ipsum dolor sit amet

Previously I had the space set like this
<!-- Space: My Space -->

@mrueg
Copy link
Collaborator

mrueg commented Jan 25, 2024

This isn't the real content but it looks like this and it's quite a small file.

Heading:
 - Lorum ipsum dolor sit amet
 - Lorum ipsum dolor sit amet

Heading 2:
- Lorum ipsum dolor sit amet

Previously I had the space set like this <!-- Space: My Space -->

The Heading is using '#' ?

@Coalmine-Canary
Copy link
Author

No not in this case.

@mrueg
Copy link
Collaborator

mrueg commented Jan 25, 2024

Have you tried adding a <!-- Title: My page --> in addition or supply that via the command line?
Also, can you re-run it with --debug ?

@Coalmine-Canary
Copy link
Author

Sorry for the delay on this, I have just tried that and here is the log. I have redacted company-specific stuff

2024-01-29 11:24:32.387 DEBUG config:
2024-01-29 11:24:32.387 DEBUG                files: /mnt/c/Users/-/notes/file.md
2024-01-29 11:24:32.387 DEBUG         compile-only: false
2024-01-29 11:24:32.387 DEBUG              dry-run: false
2024-01-29 11:24:32.387 DEBUG            edit-lock: false
2024-01-29 11:24:32.387 DEBUG              drop-h1: false
2024-01-29 11:24:32.387 DEBUG     strip-linebreaks: false
2024-01-29 11:24:32.387 DEBUG        title-from-h1: false
2024-01-29 11:24:32.387 DEBUG           minor-edit: false
2024-01-29 11:24:32.387 DEBUG                color: auto
2024-01-29 11:24:32.387 DEBUG                debug: true
2024-01-29 11:24:32.387 DEBUG                trace: false
2024-01-29 11:24:32.387 DEBUG             username:
2024-01-29 11:24:32.387 DEBUG             password: ******
2024-01-29 11:24:32.387 DEBUG           target-url: https://confluence.-.-.com/pages/viewpage.action?pageId=471074714
2024-01-29 11:24:32.387 DEBUG             base-url: https://confluence.-.-.com
2024-01-29 11:24:32.387 DEBUG               config: /home/joe/.config/mark/config.toml
2024-01-29 11:24:32.387 DEBUG                   ci: false
2024-01-29 11:24:32.387 DEBUG                space: Space Here
2024-01-29 11:24:32.387 DEBUG              parents:
2024-01-29 11:24:32.387 DEBUG    parents-delimiter: /
2024-01-29 11:24:32.387 DEBUG     mermaid-provider: cloudscript
2024-01-29 11:24:32.387 DEBUG        mermaid-scale: 1
2024-01-29 11:24:32.387 DEBUG         include-path:
2024-01-29 11:24:32.387 DEBUG                 help: false
2024-01-29 11:24:32.387 DEBUG              version: false
2024-01-29 11:24:32.387 INFO  processing /mnt/c/Users/-/file.md
2024-01-29 11:24:32.391 WARN  specified file contains metadata, but it will be ignored due specified command line URL
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xae7eaa]

goroutine 1 [running]:
main.processFile({0xc000164980, 0x7f}, 0xbce9a0?, 0x0?, {0x7ffe386dace1?, 0x9}, {0x0, 0x0})
        /home/runner/work/mark/mark/main.go:325 +0x3aa
main.RunMark(0xc000266900)
        /home/runner/work/mark/mark/main.go:274 +0x710
github.com/urfave/cli/v2.(*Command).Run(0xc0002322c0, 0xc000266900, {0xc000136000, 0xa, 0xa})
        /home/runner/work/pkg/mod/github.com/urfave/cli/[email protected]/command.go:279 +0xa3c
github.com/urfave/cli/v2.(*App).RunContext(0xc000176600, {0x10423c8?, 0xc00012e078}, {0xc000136000, 0xa, 0xa})
        /home/runner/work/pkg/mod/github.com/urfave/cli/[email protected]/app.go:337 +0x63a
github.com/urfave/cli/v2.(*App).Run(...)
        /home/runner/work/pkg/mod/github.com/urfave/cli/[email protected]/app.go:311
main.main()
        /home/runner/work/mark/mark/main.go:212 +0x13a

Thanks for your help so far on this! :)

@mrueg
Copy link
Collaborator

mrueg commented Jan 29, 2024

Could you test this with a simple markdown file that you can share the content with?
Something like:

<!-- Title: My test -->

This is my test markdown.

@Coalmine-Canary
Copy link
Author

Thanks @mrueg, have just tried again with the below filecontent and same result.

Content:

<!-- Title: Test Sync -->
This is my test markdown. 

@mrueg
Copy link
Collaborator

mrueg commented Sep 9, 2024

One thing I spotted while taking another look is 2024-01-29 11:24:32.387 DEBUG target-url: https://confluence.-.-.com/pages/viewpage.action?pageId=471074714 Can you try without having the target-url set? This may cause some issues.

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

No branches or pull requests

2 participants