Bug 271917

Summary: installing documentation, make in /usr/doc fails consistently
Product: Documentation Reporter: Stephen Murrell <stephen>
Component: Books & ArticlesAssignee: Danilo G. Baio <dbaio>
Status: Closed Unable to Reproduce    
Severity: Affects Only Me CC: dbaio, doc
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   
URL: https://docs.freebsd.org/en/books/handbook/cutting-edge/#updating-installed-documentation
Attachments:
Description Flags
A non-failing run on 13.2-RELEASE with 4 GB RAM none

Description Stephen Murrell 2023-06-08 20:22:29 UTC
Just updated to FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC
platform claims to be amd64 even though it is really intel.

I don't know how many people this might affect.

Followed the FreeBSD documentation for upgrade to the letter.
Everything else seems to be OK.
When I got to the last step, updating the documentation, it says to type the command "make" in the /usr/doc directory.
Make does not reveal its version number.

It fails exactly the same way every time, with no suggestion of a work-around.

I get many hundreds of lines of output, I've pasted the beginning few here, and the last few at the end.

root@rabbit:~ # cd /usr/doc
root@rabbit:/usr/doc # make
===> documentation (all)
---------------------------------------------------------------
Building the documentation
included languages: bn-bd da de el en es fr hu id it ja ko mn nl pl pt-br ru tr zh-cn zh-tw
excluded languages:
---------------------------------------------------------------
HUGO_DISABLELANGUAGES="" /usr/local/bin/hugo --minify
Start building sites … 
hugo v0.111.3+extended freebsd/amd64 BuildDate=2023-03-17T03:01:46Z+0000 VendorInfo=freebsd
ERROR 2023/06/08 16:05:20 asciidoctor rendering books/handbook/preface/_index.adoc: failed to execute binary "asciidoctor" with args [-r man-macro -r inter-document-references-macro -r cross-document-references-macro -r sectnumoffset-treeprocessor -r packages-macro -r git-macro -a env-beastie=1 -a isonline=1 -a skip-front-matter=1 -a sectanchors=after --no-header-footer -]: 
runtime: out of memory: cannot allocate 4194304-byte block (198836224 in use)
fatal error: out of memory

goroutine 153 [running]:
runtime.throw({0x641391?, 0x74?})
        runtime/panic.go:1047 +0x5d fp=0xd555ce88 sp=0xd555ce58 pc=0x1b02e9d
runtime.(*mcache).allocLarge(0x601700?, 0xe8000, 0x1)
        runtime/mcache.go:236 +0x178 fp=0xd555ced0 sp=0xd555ce88 pc=0x1ae39f8
runtime.mallocgc(0xe8000, 0x0, 0x0)
        runtime/malloc.go:1053 +0x4f7 fp=0xd555cf38 sp=0xd555ced0 pc=0x1ada637
runtime.growslice(0x0, 0xccbe6840?, 0xd555d080?, 0x3046a0?, 0xccb59a40?)
        runtime/slice.go:266 +0x4a8 fp=0xd555cf98 sp=0xd555cf38 pc=0x1b1ad28

---------------that's the beginning, now for the end -----------------

os/exec.(*Cmd).writerDescriptor.func1()
        os/exec/exec.go:560 +0x3a fp=0xcfbb9758 sp=0xcfbb96f8 pc=0x1ce4a9a
os/exec.(*Cmd).Start.func2(0x676e702e65746165?)
        os/exec/exec.go:717 +0x32 fp=0xcfbb97c8 sp=0xcfbb9758 pc=0x1ce57f2
os/exec.(*Cmd).Start.func3()
        os/exec/exec.go:729 +0x2a fp=0xcfbb97e0 sp=0xcfbb97c8 pc=0x1ce578a
runtime.goexit()
        runtime/asm_amd64.s:1598 +0x1 fp=0xcfbb97e8 sp=0xcfbb97e0 pc=0x1b38201
created by os/exec.(*Cmd).Start
        os/exec/exec.go:716 +0xa33
*** Error code 2

Stop.
make[1]: stopped in /usr/doc/documentation
*** Error code 1

Stop.
make: stopped in /usr/doc
Comment 1 Danilo G. Baio freebsd_committer freebsd_triage 2023-06-08 22:26:08 UTC
Hello.

How much memory and swap do you have in this box?

Note you can also install the documentation(HTML and PDF) through packages:
$ pkg install en-freebsd-doc

And amd64 [1] is the correct name; there is some history, but I couldn't find it now.
1 - https://www.freebsd.org/platforms/amd64/

Regards.
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2023-06-10 12:46:29 UTC
Created attachment 242713 [details]
A non-failing run on 13.2-RELEASE with 4 GB RAM
Comment 3 Danilo G. Baio freebsd_committer freebsd_triage 2023-06-10 19:19:35 UTC
It was using 32 GB of memory (said in a private email).

I can't reproduce it, so I'm closing this bug.

Regards.