pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

makewhatis(8) (from textproc/mandoc) fails with SIGSEGV



With a recently-rebuilt mandoc package, and a NetBSD-8.99.22 amd64 host, I am seeing makewhatis(8) aborting with SIGSEGV. I've tried to figure out what's going on, but have not succeeded. The stack backtrace in the core file is unhelpful:

(gdb) target core /var/log/makewhatis.core
[New process 1]
Core was generated by `makewhatis'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000041abee in ?? ()
(gdb) bt
#0  0x000000000041abee in ?? ()
#1  0x000000000041ac2a in ?? ()
#2  0x000000000041b2ca in ?? ()
#3  0x0000000000419fbb in ?? ()
#4  0x000000000043725d in ?? ()
#5  0x0000000000403233 in ?? ()
#6  0x00007b8cb107c000 in ?? ()
#7  0x0000000000000001 in ?? ()
#8  0x00007f7fff5c3fd0 in ?? ()
#9  0x0000000000000000 in ?? ()
(gdb)

Similarly, using ktruss provides no clue:

# ktrusss -i -tA makewhatis
...
  8380      1 makewhatis __sigprocmask14(0x1, 0x7f7fff850660, 0x7f7fff8506e0) = 0
  8380      1 makewhatis __sigprocmask14(0x3, 0x7f7fff8506e0, 0) = 0
  8380      1 makewhatis __sysctl(0x7192a2533128, 0x2, 0x65eb60, 0x7f7fff8505f8, 0, 0) = 0
       "BW\M-M\^W\^Z\^\\M-E\M^K;\^D\M^H\M^I\M-I2\M-C:il\M-y\M-C\M-Fa\M^E\M^N"
  8380      1 makewhatis _lwp_self()               = 1
  8380      1 makewhatis __sigprocmask14(0x1, 0x7f7fff850600, 0x7f7fff8506e0) = 0
  8380      1 makewhatis __sigprocmask14(0x3, 0x7f7fff8506e0, 0) = 0
  8380      1 makewhatis _lwp_self()               = 1
  8380      1 makewhatis __sigprocmask14(0x1, 0x7f7fff850600, 0x7f7fff8506e0) = 0
  8380      1 makewhatis __sigprocmask14(0x3, 0x7f7fff8506e0, 0) = 0
  8380      1 makewhatis __sysctl(0x7f7fff84ff00, 0x2, 0x7192a2777708, 0x7f7fff84fef8, 0, 0) = 0
       "\^P\0\0\0"
  8380      1 makewhatis __sysctl(0x7f7fff84fe28, 0x2, 0x7192a2780aa8, 0x7f7fff84fe20, 0, 0) = 0
       "\0\^P\0\0"
  8380      1 makewhatis readlink("/etc/malloc.conf", 0x7f7fff84ff20, 0x400) Err#2 ENOENT
  8380      1 makewhatis mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7192a2a61000
  8380      1 makewhatis mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7192a2a60000
  8380      1 makewhatis mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7192a2a5f000
  8380      1 makewhatis mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7192a2a5e000
  8380      1 makewhatis mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7192a2a5d000
  8380      1 makewhatis mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7192a2a5c000
  8380      1 makewhatis mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7192a2a5b000
  8380      1 makewhatis mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7192a2a5a000
  8380      1 makewhatis mmap(0, 0x100000, 0x3, 0x14001002, 0xffffffff, 0, 0) = 0x7192a2300000
  8380      1 makewhatis __lstat50("/usr", 0x7f7fff84f640) = 0
  8380      1 makewhatis __lstat50("/usr/share", 0x7f7fff84f640) = 0
  8380      1 makewhatis __lstat50("/usr/share/man", 0x7f7fff84f640) = 0
  8380      1 makewhatis __stat50("/usr/share/man", 0x7f7fff84ff30) = 0
  8380      1 makewhatis SIGSEGV SIG_DFL

ktrace/kdump provides a bit more info on the three calls to __sysctl(). The first __sysctl() entry is for MIB 1.81 and returns 64 bytes of data:

  ...
  3905      1 makewhatis MIB   1.81
  3905      1 makewhatis GIO   read 64 bytes
       "\ru\M^?\M-O\M-G'u\M-UA\M-9\^F\M-y\M^_\M-R-\^D\M^_\M-`:d J\M-F\M-E\f\^D\
        \^X\M^W\^TTX\M-4[\M-M\M-$'\M-(\M-T]\M-C\M-.\M-3\M-Z_\M-Y\M-Ie0\M^BWZh\
        \M-5\M^T\M-[\^Z\M^Or@\M^D\M^O\^U\M-f\M-="
  3905      1 makewhatis RET   __sysctl 0
  ...

  # sysctl 1.81
  kern.arandom = 1732128959
  #

The second and third __sysctl() entries are for MIB 6.3 and 6.7:

  ...
  3905      1 makewhatis CALL  __sysctl(0x7f7fffa27780,2,0x71f64e177708,0x7f7fffa27778,0,0)
  3905      1 makewhatis MIB   6.3
  3905      1 makewhatis GIO   read 4 bytes
       "\^P\0\0\0"
  3905      1 makewhatis RET   __sysctl 0
  3905      1 makewhatis CALL  __sysctl(0x7f7fffa276a8,2,0x71f64e180aa8,0x7f7fffa276a0,0,0)
  3905      1 makewhatis MIB   6.7
  3905      1 makewhatis GIO   read 4 bytes
       "\0\^P\0\0"
  3905      1 makewhatis RET   __sysctl 0
  ...

  # sysctl 6.3
  hw.ncpu = 16
  # sysctl 6.7
  hw.pagesize = 4096
  #


+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index