I don't speak ktrace but looks like alignment problems with a stack variable. What does gdb report?
--david On Wed, Nov 27, 2019 at 8:48 AM Peter J. Philipp <p...@centroid.eu> wrote: > Hi, > > My DNS program gets a SIGBUS when I execute it. I have ktraced it, upped > limits and searched in the mips64 source for answers, could this be a > compiler > problem? > > ktrace-----> > 41651 dddctl CALL connect(6,0xfffffcacb0,16) > 41651 dddctl STRU struct sockaddr { AF_INET, 192.168.177.2:10053 } > 41651 dddctl RET connect 0 > 41651 dddctl CALL kbind(0xfffffc9b48,24,0x801d30cbade359aa) > 41651 dddctl RET kbind 0 > 41651 dddctl PSIG SIGBUS SIG_DFL code BUS_ADRALN<1> addr=0xfffffca17d > trapno=0 > 82637 dddctl RET wait4 41651/0xa2b3 > <----------- > > The SIGBUS code ADRALN I have found in /sys/arch/mips64/mips64/trap.c > around > line 463 on OpenBSD 6.6: > > ------------> > case T_ADDR_ERR_LD+T_USER: /* misaligned or kseg access */ > case T_ADDR_ERR_ST+T_USER: /* misaligned or kseg access */ > ucode = 0; /* XXX should be PROT_something */ > signal = SIGBUS; > sicode = BUS_ADRALN; > break; > <----------- > > I have also set the stack ulimit to 32K but no relief. I'm stuck, > wondering > if you guys can help with interpreting this. > > My program can be downloaded with > > ftp https://delphinusdns.org/download/snapshot/delphinusdnsd-snapshot.tgz > > Where it's remade at midnight CET every day. > > As far as I know it should work on macppc although this particular function > wasn't tested on macppc. And it works on amd64 as I run this delphinusdnsd > in production on my personal nameservers. Getting this working on octeon > would broaden my test network. > > Best Regards, > -peter > >