Bug 206812 - each man invocation leads to the mandoc crash
Summary: each man invocation leads to the mandoc crash
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-01 04:51 UTC by emz
Modified: 2016-11-06 08:29 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emz 2016-02-01 04:51:03 UTC
Version: FreeBSD bsdrookie.norma.com. 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r294254: Mon Jan 18 13:46:05 YEKT 2016     emz@bsdrookie.norma.com.:/usr/obj/usr/src/sys/BSDROOKIE  amd64

Each man invocation leads to the mandoc crashing and dumping a core. 100% reproducible.

backtrace:

[root@bsdrookie:/etc]# gdb `which mandoc` mandoc.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `mandoc'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/lib/libprivatesqlite3.so.0...Reading symbols from /usr/lib/debug//usr/lib/libprivatesqlite3.so.0.debug...done.
done.
Loaded symbols for /usr/lib/libprivatesqlite3.so.0
Reading symbols from /lib/libz.so.6...Reading symbols from /usr/lib/debug//lib/libz.so.6.debug...done.
done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /lib/libc.so.7...Reading symbols from /usr/lib/debug//lib/libc.so.7.debug...done.
done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /lib/libthr.so.3...Reading symbols from /usr/lib/debug//lib/libthr.so.3.debug...done.
done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /libexec/ld-elf.so.1...Reading symbols from /usr/lib/debug//libexec/ld-elf.so.1.debug...done.
done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000800e5148a in thr_kill () from /lib/libc.so.7
[New Thread 801615000 (LWP 102166/<unknown>)]
(gdb) bt
#0  0x0000000800e5148a in thr_kill () from /lib/libc.so.7
#1  0x0000000800e5145b in __raise (s=<value optimized out>) at /usr/src/lib/libc/gen/raise.c:52
#2  0x0000000800e513c9 in abort () at /usr/src/lib/libc/stdlib/abort.c:65
#3  0x0000000800eccce1 in __assert (func=<value optimized out>, file=<value optimized out>, 
    line=<value optimized out>, failedexpr=<value optimized out>) at /usr/src/lib/libc/gen/assert.c:51
#4  0x000000000042c6b0 in main (argc=<value optimized out>, argv=<value optimized out>)
    at /usr/src/usr.bin/mandoc/../../contrib/mdocml/main.c:723
#5  0x000000000040395f in _start ()
#6  0x000000080066e000 in ?? ()
#7  0x0000000000000000 in ?? ()
Comment 1 Jason Unovitch freebsd_committer freebsd_triage 2016-02-02 11:23:52 UTC
Can you check again after updating past r294261 or just applying the following commit?

r294261 | delphij | 2016-01-18 08:52:09 +0000 (Mon, 18 Jan 2016) | 8 lines

MFV r294260:

Fix a wrong assertion in mandoc by applying OpenBSD
main.c,v 1.170 (florian):

Unbreak reading from stdin after recent parse() restructuring.
OK schwarze@
Comment 2 emz 2016-11-06 08:29:30 UTC
This is no longer reproducible on recent versions.