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

Version 0.18 broken on 32-bit #2847

Closed
Kazark opened this Issue Dec 28, 2016 · 9 comments

Comments

Projects
None yet
3 participants
@Kazark

Kazark commented Dec 28, 2016

Running 32-bit Hugo 0.18 on 32-bit Windows 7 crashes:

Started building sites ...
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x66ea2c]

goroutine 45 [running]:
panic(0x9f3320, 0x128c0030)
/usr/local/Cellar/go/1.7.4/libexec/src/runtime/panic.go:500 +0x331
text/template.errRecover(0x12929c7c)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:140 +0xd9
panic(0x9f3320, 0x128c0030)
/usr/local/Cellar/go/1.7.4/libexec/src/runtime/panic.go:458 +0x40b
sync/atomic.AddUint64(0x12b20cac, 0x1, 0x0, 0x12929324, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/sync/atomic/asm_386.s:112 +0xc
github.com/spf13/hugo/hugolib.(*SiteInfo).addToPaginationPageCount(0x12b20ca8, 0x1, 0x0)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site.go:454 +0x3b
github.com/spf13/hugo/hugolib.(*Page).Paginator.func1()
/Users/bep/go/src/github.com/spf13/hugo/hugolib/pagination.go:294 +0x1fd
sync.(*Once).Do(0x12ba0f24, 0x129293bc)
/usr/local/Cellar/go/1.7.4/libexec/src/sync/once.go:44 +0xcf
github.com/spf13/hugo/hugolib.(*Page).Paginator(0x12a12780, 0xd6d400, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/pagination.go:297 +0x23a
reflect.Value.call(0xa566c0, 0x12a12780, 0x7a13, 0xa58cbf, 0x4, 0x12acc3d0, 0x1, 0x1, 0x0, 0x0, ...)
/usr/local/Cellar/go/1.7.4/libexec/src/reflect/value.go:434 +0xdd7
reflect.Value.Call(0xa566c0, 0x12a12780, 0x7a13, 0xd6d400, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/reflect/value.go:302 +0x8c
text/template.(*state).evalCall(0x12929c40, 0xa566c0, 0x12a12780, 0x16, 0xa566c0, 0x12a12780, 0x7a13, 0xd28620, 0x12a1b620, 0x12ac022e, ...)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:658 +0x87d
text/template.(*state).evalField(0x12929c40, 0xa566c0, 0x12a12780, 0x16, 0x12ac022e, 0x9, 0xd28620, 0x12a1b620, 0x128de968, 0x1, ...)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:549 +0x301
text/template.(*state).evalFieldChain(0x12929c40, 0xa566c0, 0x12a12780, 0x16, 0xa566c0, 0x12a12780, 0x16, 0xd28620, 0x12a1b620, 0x128de930, ...)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:520 +0x1d4
text/template.(*state).evalFieldNode(0x12929c40, 0xa566c0, 0x12a12780, 0x16, 0x12a1b620, 0x128de968, 0x1, 0x1, 0x0, 0x0, ...)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:484 +0x11e
text/template.(*state).evalCommand(0x12929c40, 0xa566c0, 0x12a12780, 0x16, 0x12a1b600, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:422 +0x810
text/template.(*state).evalPipeline(0x12929c40, 0xa566c0, 0x12a12780, 0x16, 0x12a18780, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:400 +0x11c
text/template.(*state).walk(0x12929c40, 0xa566c0, 0x12a12780, 0x16, 0xd284a0, 0x12a1b640)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:226 +0x18a
text/template.(*state).walk(0x12929c40, 0xa566c0, 0x12a12780, 0x16, 0xd286e0, 0x12a1afc0)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:234 +0x523
text/template.(*Template).execute(0x12a1af60, 0xd22e40, 0x12a31560, 0xa566c0, 0x12a12780, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:189 +0x1e3
text/template.(*Template).Execute(0x12a1af60, 0xd22e40, 0x12a31560, 0xa566c0, 0x12a12780, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:175 +0x4b
html/template.(*Template).Execute(0x12a1af80, 0xd22e40, 0x12a31560, 0xa566c0, 0x12a12780, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/html/template/template.go:104 +0x7b
github.com/spf13/hugo/hugolib.(*Site).renderThing(0x12b20c80, 0xa566c0, 0x12a12780, 0x12b05da0, 0x18, 0xd22e40, 0x12a31560, 0x0, 0x0)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site.go:1836 +0x8a
github.com/spf13/hugo/hugolib.(*Site).renderForLayouts(0x12b20c80, 0xa5ae83, 0x5, 0xa566c0, 0x12a12780, 0xd22e40, 0x12a31560, 0x128ac200, 0x14, 0x20, ...)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site.go:1808 +0x1ab
github.com/spf13/hugo/hugolib.(*Site).renderAndWritePage(0x12b20c80, 0xa5ae83, 0x5, 0x129f3200, 0x4, 0xa566c0, 0x12a12780, 0x128ac200, 0x14, 0x20, ...)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site.go:1715 +0xea
github.com/spf13/hugo/hugolib.pageRenderer(0x12b20c80, 0x129e5580, 0x129e5500, 0x128a5da0)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site_render.go:73 +0x34f
created by github.com/spf13/hugo/hugolib.(*Site).renderPages
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site_render.go:46 +0x142

Version information for the problematic install:

Hugo Static Site Generator v0.18 BuildDate: 2016-12-28T10:58:46-05:00

The same site works with Hugo 0.17 installed through Chocolatey on the same machine, with the following version info:

Hugo Static Site Generator v0.17 BuildDate: 2016-10-07T15:45:24-04:00

the site also works with Hugo 0.18 on a 64-bit Ubuntu machine. Let me know what other info you need. We are using version 0.17 for now, so we are operable, but I thought you might like to know.

@bep bep added the Bug label Dec 28, 2016

@bep bep added this to the v0.18.1 milestone Dec 28, 2016

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Dec 28, 2016

Member

Thanks, yea, this is the old "atomic requires 64-bit alignment for struct field access", which obviously changes when we do any structural changes of the struct. We should get a 32 bit CI test server.

Member

bep commented Dec 28, 2016

Thanks, yea, this is the old "atomic requires 64-bit alignment for struct field access", which obviously changes when we do any structural changes of the struct. We should get a 32 bit CI test server.

@Kazark

This comment has been minimized.

Show comment
Hide comment
@Kazark

Kazark Dec 28, 2016

@bep glad you at least know what it is. I always have a love/hate relationship with those sorts of bugs: "Oh, that."

Kazark commented Dec 28, 2016

@bep glad you at least know what it is. I always have a love/hate relationship with those sorts of bugs: "Oh, that."

@bep bep self-assigned this Dec 29, 2016

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Dec 29, 2016

Member

I can reproduce this with the v0.18 tag, but not with the current master -- and I don't really see what magically fixed it ... Will check later.

Member

bep commented Dec 29, 2016

I can reproduce this with the v0.18 tag, but not with the current master -- and I don't really see what magically fixed it ... Will check later.

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Dec 29, 2016

Member

On an added note, you don't need Windows to trigger this:

git checkout v0.18 && env GOARCH=386 make test

Fails even on macOS; this passes:

git checkout master && env GOARCH=386 make test
Member

bep commented Dec 29, 2016

On an added note, you don't need Windows to trigger this:

git checkout v0.18 && env GOARCH=386 make test

Fails even on macOS; this passes:

git checkout master && env GOARCH=386 make test

@bep bep changed the title from Version 0.18 broken on 32-bit Windows 7 to Version 0.18 broken on 32-bit Dec 29, 2016

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Dec 29, 2016

Member

Seems like this fixed it

bcb3ef7

Member

bep commented Dec 29, 2016

Seems like this fixed it

bcb3ef7

bep added a commit to bep/hugo that referenced this issue Dec 29, 2016

@bep bep closed this in #2854 Dec 29, 2016

bep added a commit that referenced this issue Dec 29, 2016

bep added a commit that referenced this issue Dec 29, 2016

@anthonyfok

This comment has been minimized.

Show comment
Hide comment
@anthonyfok

anthonyfok Dec 29, 2016

Contributor

On behalf of the Debian Go packaging team, I would like to express our heartfelt thanks for getting this fixed so quickly. A gentleman on our team has, to my pleasant surprise, packaged the Debian 0.18-2 during my extended absence, but he noticed that Hugo failed to build on i386 and armhf, which would prevent Hugo's entry into the upcoming Debian 9.0 ("stretch") if not resolved by 15 January 2017.

So yes, it is, again, to our pleasant surprise, that this issue is already reported and fixed, and a v0.18.1 regression fix release is on the way!

Thank you so much to both of you, @Kazark and @bep!

Contributor

anthonyfok commented Dec 29, 2016

On behalf of the Debian Go packaging team, I would like to express our heartfelt thanks for getting this fixed so quickly. A gentleman on our team has, to my pleasant surprise, packaged the Debian 0.18-2 during my extended absence, but he noticed that Hugo failed to build on i386 and armhf, which would prevent Hugo's entry into the upcoming Debian 9.0 ("stretch") if not resolved by 15 January 2017.

So yes, it is, again, to our pleasant surprise, that this issue is already reported and fixed, and a v0.18.1 regression fix release is on the way!

Thank you so much to both of you, @Kazark and @bep!

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Dec 29, 2016

Member

I'm going to release it tomorrow.

Member

bep commented Dec 29, 2016

I'm going to release it tomorrow.

@anthonyfok

This comment has been minimized.

Show comment
Hide comment
@anthonyfok

anthonyfok Dec 29, 2016

Contributor

Wonderful! Thank you Bjørn!

Contributor

anthonyfok commented Dec 29, 2016

Wonderful! Thank you Bjørn!

@anthonyfok

This comment has been minimized.

Show comment
Hide comment
@anthonyfok

anthonyfok Dec 29, 2016

Contributor

Cc: @toddy15

Contributor

anthonyfok commented Dec 29, 2016

Cc: @toddy15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment