NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/58678: ntpd crashes on sparc64
what is cb?
christos
> On Sep 19, 2024, at 6:55 AM, martin%netbsd.org@localhost wrote:
>
>
>>
>> Number: 58678
>> Category: bin
>> Synopsis: ntpd crashes on sparc64
>> Confidential: no
>> Severity: critical
>> Priority: high
>> Responsible: bin-bug-people
>> State: open
>> Class: sw-bug
>> Submitter-Id: net
>> Arrival-Date: Thu Sep 19 10:55:00 +0000 2024
>> Originator: Martin Husemann
>> Release: NetBSD 10.99.12
>> Organization:
> The NetBSD Foundation, Inc.
>> Environment:
> System: NetBSD thirdstage.duskware.de 10.99.12 NetBSD 10.99.12 (MODULAR) #747: Thu Sep 19 10:16:21 CEST 2024 martin%thirdstage.duskware.de@localhost:/home/martin/current/src/sys/arch/sparc64/compile/MODULAR sparc64
> Architecture: sparc64
> Machine: sparc64
>> Description:
>
> After updating to -current as of a few hours ago, ntpd(8) won't startup
> on sparc64
>
> Thread 2 "" received signal SIGBUS, Bus error.
> alloc_res4 ()
> at /home/martin/current/src/external/bsd/ntp/dist/ntpd/ntp_restrict.c:243
> 243 LINK_SLIST(resfree4, res, link);
> (gdb) bt
> #0 alloc_res4 ()
> at /home/martin/current/src/external/bsd/ntp/dist/ntpd/ntp_restrict.c:243
> #1 hack_restrict (op=<optimized out>, resaddr=0x405ca824,
> resmask=0xffffffffffffc918, ippeerlimit=<optimized out>,
> mflags=<optimized out>, rflags=<optimized out>, expire=0)
> at /home/martin/current/src/external/bsd/ntp/dist/ntpd/ntp_restrict.c:705
> #2 0x000000000014e2ac in create_interface (port=123, protot=0x405ca200)
> at /home/martin/current/src/external/bsd/ntp/dist/ntpd/ntp_io.c:2101
> #3 update_interfaces (receiver=0x0, data=<optimized out>, port=123)
> at /home/martin/current/src/external/bsd/ntp/dist/ntpd/ntp_io.c:1912
> #4 0x000000000014f140 in create_sockets (port=123)
> at /home/martin/current/src/external/bsd/ntp/dist/ntpd/ntp_io.c:2039
> #5 io_open_sockets ()
> at /home/martin/current/src/external/bsd/ntp/dist/ntpd/ntp_io.c:514
> #6 0x000000000013725c in config_ntpd (input_from_files=<optimized out>,
> ptree=0x40592000)
> (gdb) list
> 238 }
> 239 rl = eallocarray(count, cb);
> 240 /* link all but the first onto free list */
> 241 res = (void *)((char *)rl + (count - 1) * cb);
> 242 for (i = count - 1; i > 0; i--) {
> 243 LINK_SLIST(resfree4, res, link);
> 244 res = (void *)((char *)res - cb);
> 245 }
> 246 DEBUG_INSIST(rl == res);
> 247 /* allocate the first */
> (gdb) p resfree4
> $1 = (restrict_u *) 0x0
> (gdb) p res
> $2 = (restrict_u *) 0x405e2384
> (gdb) p link
> $3 = {<text variable, no debug info>} 0x41467140 <link>
>
> I guess "restrict_u" needs more than 4 byte alignment, the compiler uses
> stx to store 64byte there:
>
> (gdb) x/16i $pc
> => 0x16da50 <hack_restrict+1680>: stx %g2, [ %g1 ]
> (gdb) p/x $g1
> $6 = 0x405e2384
>
>
>> How-To-Repeat:
> s/a
>
>> Fix:
> n/a
Home |
Main Index |
Thread Index |
Old Index