Hello,now that SMP on macppc works again I ran into another problem - occasionally programs would die in SIGILL, apparently at random. Examining the resulting core files I found that they all died in PLTs, disassembling the faults led to something like this:
li r11,something b somewhere li r11,somethingelse b somewhereelse etc.Apparently syncing the caches didn't always happen after writing PLT entries so the other CPU didn't see them -> boom. I came up with the attached patch, basically it adds more paranoid cache syncing to the poweroc-specific part of ld.elf_so. It seems to work fine since with a patched ld.elf_so my dual G4 finished building both KDE from pkgsrc and a complete userland ( with -j2 ) - either would have triggered a SIGILL long before finishing.
Unfortunately this seems to be only one class of SIGILL problems - when building tools I got a SIGILL in gcc's genattrtab which did not come from a PLT entry. As with the other case neither the binary nor the core file showed an illegal instruction at the fault address so I guess there are more wrong or missing __syncicache() and the case above is just the most common one. I've been unable to reproduce the 2nd case so far.
The patch changes two things - I am not sure both are necessary or even useful.
If this indeed helps then it should go into 4.0 as well in one form or another.
have fun Michael
Attachment:
ldso.patch
Description: Binary data
Attachment:
PGP.sig
Description: This is a digitally signed message part