[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: KASSERT(ci->ci_ilevel < IPL_HIGH) failed when running a linux binary
Arnaud Lacombe <lacombar%gmail.com@localhost> wrote:
> > One of the following printf()s are trying to print a non-terminated
> > string (thus strlen(), inside, traps):
> > http://nxr.netbsd.org/xref/src/sys/kern/exec_elf.c?r=1.20#882
> > Fail is unusual due to kprintf_mtx, which is at IPL_HIGH, and protects
> > kprintf(). ÂTrap at such level is not expected and triggers asserts a
> > bit earlier.
> What is not consistent is that it's taking I/O/cache/VM activity
> (caused by grep) to trigger the crash. I left the binary ran in an
> infinite loop for a few minutes before launching grep and everything
> was fine. The message was printed without trouble and the binary ran
> finely too. As gcc was called without argument, it completed almost
> instantly. If that was as trivial as a bad call to printf, it would
> have failed on the first pass, doesn't it ?
Not necessary, it is random - memory area next may or may not be mapped,
may or may not contain zeros. Luck to not trap and hit zero can actually
be high enough. In any case, code needs further inspection and fixing.
Please fill a PR, unless you want to fix it. :)
Main Index |
Thread Index |