NetBSD-Bugs archive

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

port-hppa/56118: sporadic app crashes in HPPA -current



>Number:         56118
>Category:       port-hppa
>Synopsis:       sporadic app crashes in HPPA -current
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-hppa-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 20 16:35:00 +0000 2021
>Originator:     Christian Groessler <chris%groessler.org@localhost>
>Release:        NetBSD 9.99.81
>Organization:
private
	
>Environment:
	
	
System: NetBSD hppa.groessler.org 9.99.81 NetBSD 9.99.81 (CPGHPPA) #0: Wed Apr 14 23:36:28 CEST 2021 chris@blitz:/data/home/chris/tmp/netbsd/obj/data/home/chris/tmp/netbsd/src/sys/arch/hppa/compile/CPGHPPA hppa
Architecture: hppa
Machine: hppa
>Description:
	'makemandb', run by the 'daily' script crashes with SIGSEGV. Running in gdb gives:

hppa# gdb /usr/sbin/makemandb #-Q
GNU gdb (GDB) 11.0.50.20200914-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "hppa--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/makemandb...
Reading symbols from /usr/libdata/debug//usr/sbin/makemandb.debug...
(gdb) set args -Q
(gdb) r
Starting program: /usr/sbin/makemandb -Q
[New process 29082]

Thread 1 "" received signal SIGSEGV, Segmentation fault.
0x00035228 in __canonicalize_funcptr_for_compare ()
(gdb) bt
#0  0x00035228 in __canonicalize_funcptr_for_compare ()
#1  0x00013650 in mdoc_parse_Sh (n=<optimized out>, rec=0xb0001708) at /data/home/chris/tmp/netbsd/src/usr.sbin/makemandb/makemandb.c:1082
#2  0x00013670 in mdoc_parse_Sh (n=<optimized out>, rec=0xb0001708) at /data/home/chris/tmp/netbsd/src/usr.sbin/makemandb/makemandb.c:1098
#3  0x00012bac in proff_node (n=<optimized out>, rec=0xb0001708, roff=0xafe97060, func=0x38248 <mdocs>) at /data/home/chris/tmp/netbsd/src/usr.sbin/makemandb/makemandb.c:1171
#4  0x00036ac8 in begin_parse (fd=4, rec=0xb0001708, mp=0xafe9a000, file=0xaf952bb0 "/usr/share/man/man9lua/systm.9lua") at /data/home/chris/tmp/netbsd/src/usr.sbin/makemandb/makemandb.c:892
#5  update_db (rec=0xb0001708, mp=0xafe9a000, db=0xafeab208) at /data/home/chris/tmp/netbsd/src/usr.sbin/makemandb/makemandb.c:825
#6  main (argc=<optimized out>, argv=<optimized out>) at /data/home/chris/tmp/netbsd/src/usr.sbin/makemandb/makemandb.c:434
(gdb) x/4i $pc
=> 0x35228 <__canonicalize_funcptr_for_compare+48>: probei,r (r3),3,r20
   0x3522c <__canonicalize_funcptr_for_compare+52>: cmpiclr,<> 0,r20,r0
   0x35230 <__canonicalize_funcptr_for_compare+56>: b,l,n 0x3527c <__canonicalize_funcptr_for_compare+132>,r0
   0x35234 <__canonicalize_funcptr_for_compare+60>: ldw 0(r3),r20
(gdb) inf reg r3 r20
r3             0x6c696e68          1818848872
r20            0xfff               4095
(gdb)

I've also built bash from prksrc/shells/bash, and this crashes at startup. Don't know if this is related, but for completeness:

hppa# gdb /usr/pkg/bin/bash
GNU gdb (GDB) 11.0.50.20200914-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "hppa--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/pkg/bin/bash...
(No debugging symbols found in /usr/pkg/bin/bash)
(gdb) r
Starting program: /usr/pkg/bin/bash 

Program received signal SIGSEGV, Segmentation fault.
0x000799fc in hash_search ()
(gdb) bt 
#0  0x000799fc in hash_search ()
#1  0x0004e8a0 in find_tempenv_variable ()
#2  0x000c17b4 in ?? ()
#3  0xaf12c168 in jemalloc_secure_getenv (name=0xaf1d9624 "MALLOC_CONF") at /data/home/chris/tmp/netbsd/src/external/bsd/jemalloc/lib/../dist/src/jemalloc.c:744
#4  malloc_conf_init () at /data/home/chris/tmp/netbsd/src/external/bsd/jemalloc/lib/../dist/src/jemalloc.c:970
#5  0xaf12d3ac in malloc_init_hard_a0_locked () at /data/home/chris/tmp/netbsd/src/external/bsd/jemalloc/lib/../dist/src/jemalloc.c:1318
#6  0xaf12db20 in malloc_init_hard () at /data/home/chris/tmp/netbsd/src/external/bsd/jemalloc/lib/../dist/src/jemalloc.c:1554
#7  0xaf1cc1d0 in je_prof_thread_name_set () from /usr/lib/libc.so.12
#8  0xaf03fe0c in ?? () from /usr/lib/libc.so.12
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) x/4i $pc
=> 0x799fc <hash_search+496>:       ldw 8(r5),ret0
   0x79a00 <hash_search+500>:       cmpib,<>,n 0,ret0,0x7984c <hash_search+64>
   0x79a04 <hash_search+504>:       ldb 0(r6),r8
   0x79a08 <hash_search+508>:       b,l 0x7990c <hash_search+256>,r0
(gdb) inf reg r5
r5             0xe84f1304          3897496324
(gdb) 


My custom config file (CPGHPPA) just hard-codes the root partition.
[~/tmp/netbsd/src/sys/arch/hppa/conf]$ diff -u GENERIC CPGHPPA 
--- GENERIC     2021-01-26 12:25:42.614136556 +0100
+++ CPGHPPA     2021-01-26 12:23:37.911318089 +0100
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.37 2021/01/21 06:51:55 nia Exp $
+# $NetBSD: GENERIC,v 1.36 2020/09/27 13:48:51 roy Exp $
 #
 # GENERIC machine description file
 #
@@ -23,7 +23,7 @@
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 options        SYSCTL_INCLUDE_DESCR    # Include sysctl descriptions in kernel
 
-#ident                 "GENERIC-$Revision: 1.37 $"
+#ident                 "GENERIC-$Revision: 1.36 $"
 
 maxusers       32              # estimated number of users
 
@@ -80,7 +80,6 @@
 include        "conf/compat_netbsd20.config"
 
 #options       COMPAT_LINUX    # binary compatibility with Linux
-#options       COMPAT_OSSAUDIO # binary compatibility with Linux
 
 # File systems
 file-system    FFS             # UFS
@@ -193,7 +192,8 @@
 #options       VGA_RASTERCONSOLE
 
 # Kernel root file system and dump configuration.
-config         netbsd  root on ? type ?
+config         netbsd  root on sd0d type ffs
+#config                netbsd  root on ? type ?
 #config                netbsd  root on sd0a type ffs
 #config                netbsd  root on ? type nfs
 

>How-To-Repeat:
	Build -current for HPPA and run 'makemandb -Q'.
>Fix:
	

>Unformatted:
 	-current from Apr-14-2021, +- 2 days
 	


Home | Main Index | Thread Index | Old Index